commit 03de9e18bb84252b0acc731594cfc1ed535108ba Author: Jacques De SAGAN Date: Sun Apr 7 11:52:06 2024 +0800 first import diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f0ebc53 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +ebutest +ebclient diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb72b83 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +ebclient is a simple CLI program for accessing [EPWING](https://ja.wikipedia.org/wiki/EPWING) & [電子ブック]() dictionaries. +It accepts queries from stdin and outputs results to stdout. It's used as the backend of +[EBWeb](https://github.com/sagan/EBWeb). + +## Dependencies + +- [libebu](http://green.ribbon.to/~ikazuhiro/dic/ebu.html). It's a fork of + [libeb (EB ライブラリ)](https://www.mistys-internet.website/eb/) which adds UTF-8 support to the latter. +- [libmxml](https://github.com/michaelrsweet/mxml). Used for accessing xml format gaiji + ([外字](https://ja.wikipedia.org/wiki/%E5%A4%96%E5%AD%97)) - + unicode mapping files that some epwing dictioneries provide. +- libz (`apt-get install lib32z1-dev`) + +## Build + +Install build tools (`apt-get install build-essential libtool-bin`) and run `make` in src/ dir. +The dependencies must be compiled priorly and put to corresponding locations which are referenced in Makefile. + +## Usage + +`./ebclient ` + +`` is the dir where epwing dictionaries files are put at, e.g.: + +``` +dicts_path/ +|---dict_A/ +|------CATALOGS +|------subbook_1/ +|------subbook_2/ +|---dict_B/ +|------CATALOGS +|------subbook_1/ +|------subbook_2/ +``` + +libeb project provides [appendix](https://www.mistys-internet.website/eb/appendix.html) (補助データ) files for +some known dictionaries. For epwing dictionary, put the appendix file in the "subbook" folder +(the dir where "honmon" file exists) and rename it to "furoku". For 電子ブック dictionary, +put it to the subbook folder (the dir where "start" file exists) and keep the original "appendix" name unchanged. + +## Communication protocol + +When started, ebclient output the flatten list of all subbooks of all dictionaries in dicts_path in json format (with a trailing `\n`), e.g.: + +``` +["広辞苑第六版","付属資料","NHK 日本語発音アクセント辞典"] + +``` + +Afterwards, it read queries from stdin line by line, and output results to stdout in the same order. + +Basic (input) query format: + +``` + +``` + +- `` : the subbook index (0-based) in the flatten list to query +- ``: 0: prefix match; 1: suffix match; 2: exact match + +Basic (output) result format (json): + +[heading1, text1, heading2, text2...] + +There are other query formats, distinguished by the first char of query line. For example, query line starts with `d` read an audio (wav) content from dictionary. For more, read the codes. diff --git a/lib/eb/appendix/cencro-1.0.tar.gz b/lib/eb/appendix/cencro-1.0.tar.gz new file mode 100644 index 0000000..456a189 Binary files /dev/null and b/lib/eb/appendix/cencro-1.0.tar.gz differ diff --git a/lib/eb/appendix/chujiten-2.3.tar.gz b/lib/eb/appendix/chujiten-2.3.tar.gz new file mode 100644 index 0000000..45f9916 Binary files /dev/null and b/lib/eb/appendix/chujiten-2.3.tar.gz differ diff --git a/lib/eb/appendix/chujiten2-2.0.tar.gz b/lib/eb/appendix/chujiten2-2.0.tar.gz new file mode 100644 index 0000000..e413e6f Binary files /dev/null and b/lib/eb/appendix/chujiten2-2.0.tar.gz differ diff --git a/lib/eb/appendix/chujiten6-2.3.tar.gz b/lib/eb/appendix/chujiten6-2.3.tar.gz new file mode 100644 index 0000000..da1c1df Binary files /dev/null and b/lib/eb/appendix/chujiten6-2.3.tar.gz differ diff --git a/lib/eb/appendix/colloc-2.0.tar.gz b/lib/eb/appendix/colloc-2.0.tar.gz new file mode 100644 index 0000000..1321422 Binary files /dev/null and b/lib/eb/appendix/colloc-2.0.tar.gz differ diff --git a/lib/eb/appendix/crownfj-2.0.tar.gz b/lib/eb/appendix/crownfj-2.0.tar.gz new file mode 100644 index 0000000..0f2305e Binary files /dev/null and b/lib/eb/appendix/crownfj-2.0.tar.gz differ diff --git a/lib/eb/appendix/crownfj2-1.0.tar.gz b/lib/eb/appendix/crownfj2-1.0.tar.gz new file mode 100644 index 0000000..861c040 Binary files /dev/null and b/lib/eb/appendix/crownfj2-1.0.tar.gz differ diff --git a/lib/eb/appendix/crowngj-1.0.tar.gz b/lib/eb/appendix/crowngj-1.0.tar.gz new file mode 100644 index 0000000..c27e295 Binary files /dev/null and b/lib/eb/appendix/crowngj-1.0.tar.gz differ diff --git a/lib/eb/appendix/daihyakka-1.0.tar.gz b/lib/eb/appendix/daihyakka-1.0.tar.gz new file mode 100644 index 0000000..09d11cf Binary files /dev/null and b/lib/eb/appendix/daihyakka-1.0.tar.gz differ diff --git a/lib/eb/appendix/daijirin-2.0.tar.gz b/lib/eb/appendix/daijirin-2.0.tar.gz new file mode 100644 index 0000000..cffe341 Binary files /dev/null and b/lib/eb/appendix/daijirin-2.0.tar.gz differ diff --git a/lib/eb/appendix/dd75-2.0.tar.gz b/lib/eb/appendix/dd75-2.0.tar.gz new file mode 100644 index 0000000..4448822 Binary files /dev/null and b/lib/eb/appendix/dd75-2.0.tar.gz differ diff --git a/lib/eb/appendix/gendai2000-1.0.tar.gz b/lib/eb/appendix/gendai2000-1.0.tar.gz new file mode 100644 index 0000000..cc318dd Binary files /dev/null and b/lib/eb/appendix/gendai2000-1.0.tar.gz differ diff --git a/lib/eb/appendix/genius-1.0.tar.gz b/lib/eb/appendix/genius-1.0.tar.gz new file mode 100644 index 0000000..6c7ba63 Binary files /dev/null and b/lib/eb/appendix/genius-1.0.tar.gz differ diff --git a/lib/eb/appendix/genius2-1.1.tar.gz b/lib/eb/appendix/genius2-1.1.tar.gz new file mode 100644 index 0000000..1f1396f Binary files /dev/null and b/lib/eb/appendix/genius2-1.1.tar.gz differ diff --git a/lib/eb/appendix/global-2.0.tar.gz b/lib/eb/appendix/global-2.0.tar.gz new file mode 100644 index 0000000..06165e5 Binary files /dev/null and b/lib/eb/appendix/global-2.0.tar.gz differ diff --git a/lib/eb/appendix/heritage-2.2.tar.gz b/lib/eb/appendix/heritage-2.2.tar.gz new file mode 100644 index 0000000..9a5218b Binary files /dev/null and b/lib/eb/appendix/heritage-2.2.tar.gz differ diff --git a/lib/eb/appendix/hyogen-1.0.tar.gz b/lib/eb/appendix/hyogen-1.0.tar.gz new file mode 100644 index 0000000..7b63eba Binary files /dev/null and b/lib/eb/appendix/hyogen-1.0.tar.gz differ diff --git a/lib/eb/appendix/izumi-2.0.tar.gz b/lib/eb/appendix/izumi-2.0.tar.gz new file mode 100644 index 0000000..6675ec4 Binary files /dev/null and b/lib/eb/appendix/izumi-2.0.tar.gz differ diff --git a/lib/eb/appendix/jitenban-2.4.tar.gz b/lib/eb/appendix/jitenban-2.4.tar.gz new file mode 100644 index 0000000..4f06f43 Binary files /dev/null and b/lib/eb/appendix/jitenban-2.4.tar.gz differ diff --git a/lib/eb/appendix/jitenban97-2.1.tar.gz b/lib/eb/appendix/jitenban97-2.1.tar.gz new file mode 100644 index 0000000..8451208 Binary files /dev/null and b/lib/eb/appendix/jitenban97-2.1.tar.gz differ diff --git a/lib/eb/appendix/kanjigen-2.0.tar.gz b/lib/eb/appendix/kanjigen-2.0.tar.gz new file mode 100644 index 0000000..463d6a1 Binary files /dev/null and b/lib/eb/appendix/kanjigen-2.0.tar.gz differ diff --git a/lib/eb/appendix/kanjigen2-2.0.tar.gz b/lib/eb/appendix/kanjigen2-2.0.tar.gz new file mode 100644 index 0000000..7b7cdcd Binary files /dev/null and b/lib/eb/appendix/kanjigen2-2.0.tar.gz differ diff --git a/lib/eb/appendix/kojien-2.3.tar.gz b/lib/eb/appendix/kojien-2.3.tar.gz new file mode 100644 index 0000000..c14c5e8 Binary files /dev/null and b/lib/eb/appendix/kojien-2.3.tar.gz differ diff --git a/lib/eb/appendix/kojien2-2.0.tar.gz b/lib/eb/appendix/kojien2-2.0.tar.gz new file mode 100644 index 0000000..d0ec2d4 Binary files /dev/null and b/lib/eb/appendix/kojien2-2.0.tar.gz differ diff --git a/lib/eb/appendix/kojien4-2.2.tar.gz b/lib/eb/appendix/kojien4-2.2.tar.gz new file mode 100644 index 0000000..8c3dd35 Binary files /dev/null and b/lib/eb/appendix/kojien4-2.2.tar.gz differ diff --git a/lib/eb/appendix/oxford-2.0.tar.gz b/lib/eb/appendix/oxford-2.0.tar.gz new file mode 100644 index 0000000..9062e87 Binary files /dev/null and b/lib/eb/appendix/oxford-2.0.tar.gz differ diff --git a/lib/eb/appendix/plus-2.0.tar.gz b/lib/eb/appendix/plus-2.0.tar.gz new file mode 100644 index 0000000..0585127 Binary files /dev/null and b/lib/eb/appendix/plus-2.0.tar.gz differ diff --git a/lib/eb/appendix/readers-2.2.tar.gz b/lib/eb/appendix/readers-2.2.tar.gz new file mode 100644 index 0000000..0c043ba Binary files /dev/null and b/lib/eb/appendix/readers-2.2.tar.gz differ diff --git a/lib/eb/appendix/readers2-2.0.tar.gz b/lib/eb/appendix/readers2-2.0.tar.gz new file mode 100644 index 0000000..a790ce6 Binary files /dev/null and b/lib/eb/appendix/readers2-2.0.tar.gz differ diff --git a/lib/eb/appendix/ruigigo-1.0.tar.gz b/lib/eb/appendix/ruigigo-1.0.tar.gz new file mode 100644 index 0000000..8fccbfa Binary files /dev/null and b/lib/eb/appendix/ruigigo-1.0.tar.gz differ diff --git a/lib/eb/appendix/superdic98-1.0.tar.gz b/lib/eb/appendix/superdic98-1.0.tar.gz new file mode 100644 index 0000000..1a14a6e Binary files /dev/null and b/lib/eb/appendix/superdic98-1.0.tar.gz differ diff --git a/lib/ebu/AUTHORS b/lib/ebu/AUTHORS new file mode 100644 index 0000000..99a23db --- /dev/null +++ b/lib/ebu/AUTHORS @@ -0,0 +1 @@ +Motoyuki Kasahara diff --git a/lib/ebu/COPYING b/lib/ebu/COPYING new file mode 100644 index 0000000..46b46ec --- /dev/null +++ b/lib/ebu/COPYING @@ -0,0 +1,23 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. 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. +3. Neither the name of the project 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 PROJECT 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 PROJECT 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. diff --git a/lib/ebu/ChangeLog b/lib/ebu/ChangeLog new file mode 100644 index 0000000..1f3ac20 --- /dev/null +++ b/lib/ebu/ChangeLog @@ -0,0 +1,708 @@ +2020-04-13 Kazuhiro Ito + + Add color chart suppot. + + * configure.ac: Version 4.5. + + * ebu/color.c: New file. + + * ebu/text.h (EB_HOOK_BEGIN_COLOR_CHART) + (EB_HOOK_END_COLOR_CHART): New macros. + + * ebu/defs.h (EB_NUMBER_OF_HOOKS): Increase to 57. + (EB_MAX_COLOR_VALUE_LENGTH, EB_MAX_COLOR_NAME_LENGTH): New macros. + (EB_Subbook_Struct): Add new member color_chart. + + * ebu/error.h (EB_ERR_NO_SUCH_COLOR): New macro. + (EB_NUMBER_OF_ERRORS): Increased to 70 + + * ebu/readtext.c (eb_read_text_internal): Support new hooks. + + * ebu/subbook.c (eb_load_subbook_indexes): Support index of color + chart. + + * ebu/jacode.c (ebcdic_ascii_table): New constant. + (eb_ebcdic037_to_ascii): New function. + + * ebu/error.c (error_strings, error_messages): Add new entry for + EB_ERR_NO_SUCH_COLOR. + + * ebu/eb.h: Add new functions in color.c + + * ebu/build-post.h.in: Add declaration for eb_ebcdic037_to_ascii. + + * ebu/Makefile.am (libebu_la_SOURCES): Add color.c + + * ebinfo/ebinfo.c (output_information): Output information for + color chart. + + * po-ebutils/ebuutils.pot: Updated. + + * po-ebutils/ja.po: Likewise. + + * po-eb/ebu.pot: Likewise. + + * po-eb/ja.po: Likewise. + +2020-03-10 Kazuhiro Ito + + * ebu/zio.c (zio_unzip_slice_epwing): Fix wrong variable type + definition. + Cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833085#5 + +2019-06-30 Kazuhiro Ito + + * ebzip/zipfile.c (ebzip_zip_file_internal): Fix progress messages + were showed too frequently. + +2019-06-30 Kazuhiro Ito + + Add libdeflate library support. To enable it, run configure with + --enable-libdeflate option. + + * configure.ac: Accept --enable-libdeflate, + --with-libdeflate-includes, --with-libdeflate-libraries options. + + * ebu/bitmap.c (png_compress): Add libdeflate support. Return 0 + when succeeded, otherwise -1. + (eb_bitmap_to_png): Adopt to the change. + + * ebzip/zipfile.c (ebzip_zip_file_internal): Add libdeflate support. + + * ebzip/unzipfile.c (ebzip_unzip_file_internal): Likewise. + + * ebzip/ebzip1.c (ebzip1_slice): Likewise. + + * ebzip/ebzip.h: Likewise. + + * ebu/zio.c (zio_unzip_slice_ebzip1) + (zio_unzip_slice_ebzip1_internal): zio_unzip_slice_ebzip1_internal + is extracted uncompressing part from zio_unzip_slice_ebzip1 and + libdeflate support is added. + + * libebutils/ebutils.c (output_version): output "LIBDEFLATE" + feature when build with libdeflate. + +2019-06-27 Kazuhiro Ito + + * ebzip/ebzip1.c (ebzip1_slice): Use Z_BEST_COMPRESSION instead of + Z_DEFAULT_COMPRESSION when compression level is higher than 3. + +2015-03-01 Kazuhiro Ito + + * ebfont/ebfont.c (make_subbook_size_fonts): Fix error handling. + +2015-02-28 Kazuhiro Ito + + * m4/gettext.m4 (eb_GNU_GETTEXT): Support Cygwin environment. + + * libebutils/puts_eucjp.c (fputs_eucjp_to_locale): Support the + case which has libiconv_open and doesn't have iconv_open. + +2015-02-28 Kazuhiro Ito + + * libebutils/makedir.c (make_missing_directory): Fix the case of + 64-bit Windows. + +2015-02-28 Kazuhiro Ito + + * ebu/urlparts.c (url_parts_parse): Do not perform a NULL-pointer + dereference. + Cf. Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715855#20 + +2015-02-28 Kazuhiro Ito + + * libebutils/makedir.c (make_missing_directory): Correct parameter + declarations. + Cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748030#12 + + * libebutils/makedir.h: Include sys/types.h. + +2015-02-28 Kazuhiro Ito + + * ebinfo/ebinfo.c (output_multi_information, output_information): + Fix too many arguments for format string. + Cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776602#5 + +2010-03-08 Motoyuki Kasahara + + * Version 4.4.3. + + * configure.ac (AC_INIT): Set version to 4.4.3. + * eb/ebnet.c (ebnet_open): Use _atoi64() or atol(), when atoll() + is not available. + * configure.ac (LIBEB_VERSION_INFO): + EB Library verison 4.2.2 sets LIBEB_VERSION_INFO to 15:0:2, + but it is wrong. To avoid the confusion, I decide to update + LIBEB_VERSION_INFO to 16:0:0. + +2010-01-16 Motoyuki Kasahara + + * Version 4.4.2. + + * eb/readtext.c (eb_read_text_internal): In the escape sequence + 0x1c and 0x1d sections, separate EBXA-C codes from others. + +2010-01-03 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to 4.4.2. + * configure.ac (LIBEB_VERSION_INFO): Set LIBEB_VERSION_INFO to 15:0:2. + + * ebzip/speedup.c (ebzip_set_zip_speedup): + Add missing ebzip_close() and ebzip_finalize() calls for zio. + * ebzip/ebzip.c (main): Don't call(1) just after unzip_book(). + * ebzip/copyfile.c (ebzip_copy_file): Don't copy a file in + case of test mode. + + * ebzip/unlinkfile.c: New file. + * ebzip/Makefile.am (ebzip_SOURCES): Add unlinkfile.c + * ebzip/zipfile.c (ebzip_zip_file): Don't call unlink() directly + for an input file. Call unlink_files_add() instead. + * ebzip/unzipfile.c (ebzip_unzip_file): Likewise. + * ebzip/copyfile.c (ebzip_copy_file): Likewise. + +2009-05-02 Motoyuki Kasahara + + * eb/text.h (EB_HOOK_BEGIN_UNICODE, EB_HOOK_END_UNICODE, + EB_HOOK_BEGIN_EBXAC_GAIJI, EB_HOOK_END_EBXAC_GAIJI, + EB_HOOK_EBXAC_GAIJI): Added. + * eb/defs.h (EB_NUMBER_OF_HOOKS): Defined as 54. + * eb/defs.h (EB_Text_Context_Struct): Add `ebxac_gaiji_flag'. + * eb/readtext.c (eb_read_text_internal): Also recognize escape + sequences 0x0b, 0x0c, 0x1c and 0x1d. + +2009-03-14 Motoyuki Kasahara + + * Version 4.4.1. + + * configure.ac (AC_INIT): Set version to 4.4.1. + * configure.ac (LIBEB_VERSION_INFO): Set LIBEB_VERSION_INFO to 14:0:1. + + * eb/binary.c (eb_set_binary_mono_graphic, eb_set_binary_gray_graphic, + eb_set_binary_wave, eb_set_binary_color_graphic): Apply large + file support patch by Kazuhiro Ito. + +2009-02-28 Motoyuki Kasahara + + * Version 4.4. + + * configure.ac (AC_CHECK_FUNCS): Also checks atoll() and _atoi64(). + * eb/ebnet.c (ebnet_open, ebnet_lseek, ebnet_read): + Support large files. + * eb/multiplex.c (EBNet_Socket_Entry_Struct, ebnet_get_file_size): + Likewise. + * eb/ebnet.h: Likewise. + +2009-01-29 Motoyuki Kasahara + + * Version 4.4. + + * eb/zio.c (zio_open_ebzip): Always set zio->code to ZIO_EBZIP1, + regardless of ebzip-mode value in an EBZIP header. + + * ebzip/zipfile.c (ebzip_zip_file_internal): Improve compression + progress messages. Don't output a message with the same percent + as the previous. + * ebzip/unzipfile.c (ebzip_unzip_file_internal): Also improve + uncompression messages. + + * ebzip/zipbook.c (ebzip_zip_book_eb, ebzip_zip_book_epwing): + Output an error message when make_missing_directory() fails. + * ebzip/unzipbook.c (ebzip_unzip_book_eb, ebzip_unzip_book_epwing): + Ditto. + * ebzip/copyfile.c (ebzip_copy_files_in_directory): Ditto. + +2009-01-23 Motoyuki Kasahara + + * INSTALL: Describe `--enable-largefile' option of configure. + + * eb/subbook.c (eb_set_subbook): If eb_set_subbook_eb() or + eb_set_subbook_epwing() returns -1, also this function returns -1. + + * ebzip/zipbook.c (ebzip_zip_book_eb, ebzip_zip_book_epwing): + Output a warning mesage when eb_load_all_subbooks() fails. + * ebzip/unzipbook.c (ebzip_unzip_book_eb, + ebzip_unzip_book_epwing): Ditto. + * ebzip/zipinfobook.c (ebzip_zipinfo_book_eb, + ebzip_zipinfo_book_epwing): Ditto. + + * ebzip/zipfile.c (ebzip_zip_file_internal): Don't output + strerror(errno) in an error message when zio_open(), zio_lseek() or + zio_read() fails, since errno may be 0. + * ebzip/unzipfile.c (ebzip_unzip_file_internal): Likewise. + * ebzip/sppedup.c (ebzip_zipinfo_file_internal): Likewise. + +2009-01-08 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to 4.4. + * configure.ac (EB_VERSION_MINOR): Set EB_VERSION_MINOR to 4. + * configure.ac (LIBEB_VERSION_INFO): Set LIBEB_VERSION_INFO to 13:0:0. + + * configure.ac (eb_SYS_LARGEFILE): Added. + * m4/largefile.m4: New file. It defines macros to check + large file support. + + * m4/libtool.m4, m4/m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4, + m4/ltversion.m4, m4/lt~obsolete.m4, ltmain.sh, config.guess, + config.sub: Import from libtool-2.2.6. + + * depcomp, missing, compile, install-sh: Import from Autoconf-1.63. + * po-eb/Makefile.in, po-ebutils/Makefile.in (datarootdir): + Set `datarootdir' macro. + + * m4/eb.m4 (AC_C_CONST, AC_C_PROTOTYPES, AC_HEADER_TIME): + Don't call those obsolete macros any longer. + + * po-ep/Makefile.in, po-ebutils/Makefile.in (datarootdir): Defined. + +2009-01-07 Motoyuki Kasahara + + * eb/build-post.h.in (off_t_is_large): New macro. + * eb/zio.c (off_t_is_large): Likewise. + + * ebzip/zipinfofile.c, ebzip/sebxa.c, ebzip/zipfile.c, + ebzip/speedup.c, ebzip/unzipfile.c, ebzip/copyfile.c: + Support large files (over 2GB). + + * eb/narwfont.c, eb/zio.c, eb/subbook.c, eb/readtext.c, eb/binary.c, + eb/appsub.c, eb/multi.c, eb/search.c: Likewise. + +2008-12-25 Motoyuki Kasahara + + * Version 4.3.3. + + * configure.ac (AC_INIT): Set version to 4.3.4. + + * m4/gettext.m4 (eb_GNU_GETTEXT): Fix a bug of iconv() and + iconv_open() checks. Don't add '-liconv' to LIBS at all times. + +2008-09-29 Motoyuki Kasahara + + * Version 4.3.3. + + * configure.ac (AC_INIT): Set version to 4.3.3. + * configure.ac (LIBEB_VERSION_INFO): Set it to 12:7:0. + * ltmain.sh, m4/libtool.m4, config.guess, config.sub: Import from + libtool-1.5.26. + +2008-09-17 Motoyuki Kasahara + + * eb/Makefile.am (libeb_la_LDFLAGS): Add `-no-undefined' option + Add $(ZLIBLIBS) and $(INTLLIBS) arguments. + * ebzip/Makefile.am (ebzip_LDADD): Exchange the order of + $(LIBEBUTILS) and $(LIBEB). + +2008-02-04 Motoyuki Kasahara + + * ebzip/zipinfofile.c (ebzip_zipinfo_file_internal): Don't close + `in_file' directly. On Windows, it raises an exception. + +2008-01-28 Motoyuki Kasahara + + * Version 4.3.2. + + * configure.ac (LIBEB_VERSION_INFO): Set it to 12:6:0. + In EB Library version 4.3.1, LIBEB_VERSION_INFO is set to 12:4:1, + but it is incorrect. It would be 12:5:0. + + * po-ebutils/ja.po: Add a missing space to a msgstr corresponding + to the msgid "image-menu ". + +2008-01-14 Motoyuki Kasahara + + * Version 4.3.1. + + * ltmain.sh, config.sub, config.guess: Imported from libtool-1.5.24. + +2007-02-13 Motoyuki Kasahara + + * ltmain.sh, config.sub, config.guess: Imported from libtool-1.5.22. + + * eb/multiplex.c (ebnet_set_book_name): Fix a buffer overrun bug. + * eb/binary.c (eb_set_binary_mpeg): Fix a bug that it doesn't + compose a movie file name correctly. + * eb/book.c (misleaded_book_table): Add Panasonic KX-EBP2 accessories. + +2006-08-31 Motoyuki Kasahara + + * Version 4.3. + + * configure.ac (LIBEB_VERSION_INFO): Set it to 12:4:0. + * configure.ac (AC_INIT): Set version to 4.3.0. + * configure.ac (EB_VERSION_MINOR): Set it to 3. + + * eb/subbook.c (eb_load_subbook_indexes): Support for image menu, + contributed by Kazuhiro Ito. + * eb/readtext.c (eb_read_text_internal): Ditto. + * eb/readtext.c (EB_MAX_ARGV): Change the value from 6 to 7. + * eb/text.h (EB_HOOK_BEGIN_IMAGE_PAGE, EB_HOOK_END_IMAGE_PAGE, + EB_HOOK_BEGIN_CLICKABLE_AREA, EB_HOOK_END_CLICKABLE_AREA): + Add the four hooks. + * eb/menu.c (eb_have_image_menu, eb_image_menu): New functions. + * eb/defs.h (EB_NUMBER_OF_HOOKS): Change the value from 45 to 49. + * eb/defs.h (EB_Subbook_Struct): Add the member `image_menu'. + * ebinfo/ebinfo.c (output_information): Also display "image-menu". + +2006-06-20 Motoyuki Kasahara + + * Makefile.am (EXTRA_DIST): Add `ChangeLog.2'. + + * ebappendix/ebappendix.in: Use `File::Basename' module. + * ebappendix/ebappendix.in: Specify `my' modifier to local variables. + * ebappendix/ebappendix.in: Use reference (\$var, \@array and \%hash) + instead of alias (*name). + + * ebzip/ebunzip.c (ebzip_unzip_book_eb): Fix a bug that `ebunzip + --test' rewrites START files. + + * eb/zio.c (zio_unzip_slice_sebxa): Fix a bug in the uncompression + algorithm. + +2006-06-16 Motoyuki Kasahara + + * eb/subbook.c (eb_set_subbook_epwing): Fix a bug that EB + cannot initialize a book if a subbook has stream data only + and the subbook shares `data' sub-directory with another + subbook. + + * libebutils/strlist.c, libebutils/strlist.h: New file. + * libebutils/Makefile.am (libebutils_a_SOURCES): Add strlist.c. + * libebutils/Makefile.am (dist_noinst_HEADERS): Add strlist.h. + * ebzip/zipbook.c (ebzip_zip_book_eb, ebzip_zip_book_epwing): + Use `String_List' to avoid compressing a file twice. + * ebzip/unzipbook.c (ebzip_unzip_book_eb, ebzip_unzip_book_epwing): + Ditto. + +2006-05-15 Motoyuki Kasahara + + * ebappendix/ebappendix.in: Fix a bug that ebappendix creates + an appendix in EB style even when it reads `catalogs.app'. + +2005-11-26 Motoyuki Kasahara + + * Version 4.2.2. + + * ltmain.sh, config.sub, config.guess, depcomp, install-sh: + Imported from libtool-1.5.20 and Automake-1.9.6. + + * m4/lcmessage.m4, m4/gettext.m4, m4/sockaddrin6.m4, m4/in6addr.m4, + m4/sockinttypes.m4, configure.ac: Substitute AC_TRY_COMPILE, + AC_TRY_LINK and AC_TRY_RUN with AC_COMPILE_IFELSE, AC_LINK_IFELSE + and AC_RUN_IFELSE. + +2005-11-21 Motoyuki Kasahara + + * m4/gettext.m4: Check for existance of libintl and libiconv even + when `--with-gettext-libraries' or `--with-iconv-libraries' option + is not specified. + * m4/gettext.m4: Do not perform AC_TRY_RUN to check for gettext(). + We perform AC_TRY_LINK instead. On Debian Linux, the test program + doesn't succeed though gettext() is available. The test program + called setlocale(LC_ALL, "en_US") but it didn't change the locale + to `en' or `en_US' since "en_US" is not acceptable locale name on + that environment. + * gttest.po, gttest.mo: Deleted. + * Makefile.am (EXTRA_DIST): Likewise. + +2005-11-20 Motoyuki Kasahara + + * eb/binary.c (eb_set_binary_wave): Fix a bug that it set wrong + wave data size to `context'. + * eb/binary.c (eb_set_binary_wave): Fix a bug that it generated + wrong RIFF header when the CD-ROM book provided fmt block of the + wave data. + + * eb/multiplex.c (ebnet_get_addresses): Retry getnameinfo() + without the NI_WITHSCOPEID flag if getnameinfo() with that flag + doesn't succeed. + +2005-10-25 Motoyuki Kasahara + + * eb.conf.in (EBCONF_ENABLE_NLS): Fix a bug that Makefile filled + an incorrect value. + * Makefile.am (eb.conf): Likewise. + + * eb/book.c (eb_load_catalog_epwing): When EPWING version is 1, + the function never read an extra information block. + +2005-09-16 Motoyuki Kasahara + + * eb/book.c (eb_load_catalog_epwing): Fix a bug that it sometimes + raises an error when the catalog file doesn't have extra information + block. + +2005-09-08 Motoyuki Kasahara + + * eb/search.c (eb_and_hit_lists): Fix a bug that it outputs + a wrong debug mesasge at the end of the function. + +2005-08-14 Motoyuki Kasahara + + * Version 4.2.1. + + * eb/book.c (eb_load_catalog_epwing): Fix a bug that EB Library + sets wrong graphic and sound file names if target subbook contains + graphic and/or sound data in a text file. + + * eb/book.c (eb_load_catalog_epwing): Correct a debug message + that shows EB_ERR_FAIL_READ_CAT error. + +2005-05-29 Motoyuki Kasahara + + * Version 4.2. + + * eb/book.c (eb_load_catalog_epwing): Fix a bug that EB Library + sets wrong graphic and sound file names if target subbook has + HONMON2 only. + + * eb/binary.c (eb_set_binary_wave): Fix a bug that the function + appends "fmt " to the wave data mistakenly. + +2005-04-18 Motoyuki Kasahara + + * ltmain.sh, config.guess, config.sub, install-sh, m4/libtool.m4: + Import from libtool 1.5.18. + +2005-04-10 Motoyuki Kasahara + + * eb/build-post.h.in (EB_TEXT_TEXT): Renamed to EB_TEXT_MAIN_TEXT. + * eb/ebinfo.c: Support `Cross Search'. + + * eb/multiplex.c (ebnet_create_new_connection): Set stream socket + to non-blocking I/O mode. + +2005-03-20 Motoyuki Kasahara + + * eb/binary.c (eb_read_binary_mono_graphic, + eb_read_binary_gray_graphic): Fix the 2nd argument to zio_lseek(). + `line_length * -2' must be `(off_t)line_length * -2' since + `line_length' is `size_t' which is usually unsigned integral type. + +2005-02-05 Motoyuki Kasahara + + * eb/multi.c (eb_initialize_multi_searches, + eb_finalize_multi_searches): Remove the internal functions. + + * eb/defs.h (EB_Subbook_Struct): Add the member `cross'. + * eb/defs.h (EB_MAX_CROSS_ENTRIES): Defined. + * eb/build-post.h.in (EB_SEARCH_CROSS): Defined. + * eb/Makefile.am (libeb_la_SOURCES): Add `cross.c'. + * eb/cross.c: New file. + * eb/search.c (eb_initialize_searches, eb_hit_list): Support for + cross search. + * eb/subbook.c (eb_load_subbook_indexes): Ditto. + + * eb/filename.c (eb_compose_movie_path_name): New function. + + * configure.ac (AC_CONFIG_SUBDIRS): Remove `zlib'. + * Makefile.am (SUBDIRS): Remove $(ZLIB_SUBDIR). + +2005-01-29 Motoyuki Kasahara + + * ebrefile/ebrefile.c (copy_file, refile_book): `ebrefile' + preserves an original catalog file in an output directory as + "catalogs.old" and then it overwrites the original catalog file. + +2004-12-05 Motoyuki Kasahara + + * Version 4.1.3. + + * po-eb/Makefile.in, po-ebutils/Makefile.in (mkinstalldirs): + Defined as `$(install_sh) -d'. + * po-eb/Makefile.in, po-ebutils/Makefile.in (install_sh): + Defined as `@install_sh@'. + + * configure.ac (LIBEB_VERSION_INFO): Set it to 9:1:0. + * configure.ac (AC_INIT): Set version to 4.1.3. + +2004-11-28 Motoyuki Kasahara + + * Version 4.1.2. + + * ebzip/ebzip.c (main): Also recognize `\' as a path separator when + DOS_FILE_PATH is defined. + + * po-eb/Makefile.in, po-ebutils/Makefile.in (mkinstalldirs): + Defined as `$(SHELL) $(top_srcdir)/mkinstalldirs'. + It was defined as `$(mkdir_p)', but it causes cycric reference + on FreeBSD-5.3-RELEASE. + + * eb/readtext.c (eb_seek_text): Accept position whose offset is + greater than or equal to EB_SIZE_PAGE. + * eb/binary.c (eb_set_binary_mono_graphic, eb_set_binary_gray_graphic, + eb_set_binary_wave, eb_set_binary_color_graphic, eb_set_binary_mpeg): + Don't accept position whose offset is less than 0. + +2004-11-22 Motoyuki Kasahara + + * eb/search.c (eb_hit_list_word, eb_hit_list_keyword, + eb_hit_list_multi): Fix a historical bug that EB Library cannot + find matched entries in particular books. + + * eb/eb.c (eb_initialize_library): In debug mode, EB Library + displays its version number. + + * eb/searh.c (eb_presearch_word, eb_hit_list_word, + eb_hit_list_keyword, eb_hit_list_multi): The debug messages also + outputs index page number. + +2004-10-24 Motoyuki Kasahara + + * Version 4.1.1. + + * libebutils/getopt.c: Fix a bug in getopt_long(). + It may abort when it outputs the message "option `--xxx' requires + an argument". + + * eb/readtext.c (eb_write_text_byte2): Fix a bug that the function + writes incorrect data on the text buffer. + +2004-07-03 Motoyuki Kasahara + + * Version 4.1. + + * doc/Makefile.am (uninstall-hook): Defined. + * doc/Makefile.am: Fix bugs that `make all' fails when $(srcdir) + != `.'. + +2004-06-23 Motoyuki Kasahara + + * doc/Makefile.am (pkgdoc_DATA): Do not use meta characters to + specify splitted HTML files. Use `install-data-hook' instead. + +2004-05-27 Motoyuki Kasahara + + * README-ja, INSTALL-ja: Removed. + * README, INSTALL: These documents are now written in Japanese. + + * doc-ja: Directory removed. + * doc: The documents under the directory are now written in Japanese + and with HTML format. + + * Makefile.am (SUBDIRS): Delete `doc-ja'. + * configure.ac (AC_CONFIG_FILES): Ditto. + + * configure.ac (AC_ARG_WITH): Add `--with-pkgdocdir' option. + + * move-if-change: Rewrite it from scratch. + +2004-05-22 Motoyuki Kasahara + + * EB Library now adopts BSD License. + + * ebzip/zipfile.c (ebzip_zip_file_internal), + ebzip/zipbook.c (ebzip_zip_book_eb, ebzip_zip_book_epwing): + Support for partial compression. + * ebzip/speedup.c: New file. + * ebzip/Makefile.am (ebzip_SOURCES): Add `ebzip/speedup.c'. + * po-ebutils/Makefile.in (POTFILES): Ditto. + +2004-05-16 Motoyuki Kasahara + + * ebzip/sebxa.c (fix_sebxa_start): Renamed to rewrite_sebxa_start(). + * ebzip/sebxa.c (fix_sebxa_start): Fix a bug that ebzip outputs + `completed' message even when quiet flag is enabled. + +2004-05-09 Motoyuki Kasahara + + * ebzip/zipfile.c (ebzip_zip_file_internal): Output compression + result even when input is an empty file. + +2004-05-08 Motoyuki Kasahara + + * configure.ac (AC_CHECK_HEADERS): Delete `utime.h' and `sys/utime.h'. + Add `mbstring.h' instead. + * ebzip/ebzip.h (EBZIP_OVERWRITE_QUERY): Renamed to + EBZIP_OVERWRITE_CONFIRM. + + * ebzip/ebzip.c: Add `--overwrite' (-w) option. + + * ebzip/zipfile.c (ebzip_zip_file_internal): Don't abort when ebzip + fails to delete an original file. Delete an original file even when + ebzip outputs "already exists, skip the file" message. + ebzip/unzipfile.c (ebzip_unzip_file_internal): Ditto. + ebzip/copyfile.c (ebzip_copy_file): Ditto. + +2004-05-07 Motoyuki Kasahara + + * Use Automake-1.8.4 and Libtool-1.5.6. + + * configure.ac (AC_TYPE_SIGNAL, AC_STRUCT_UTIMBUF): Removed. + * configure.ac (AC_CHECK_FUNCS): Remove dup2() and utime(). + * m4/herrno.m4, m4/utimbuf,m4, m4/voidpointer.m4: Removed. + +2004-04-29 Motoyuki Kasahara + + * eb/bitmap.c (eb_bitmap_to_png): New function. + * eb/bitmap.c (eb_bitmap_to_xbm, eb_bitmap_to_xpm, eb_bitmap_to_gif, + eb_bitmap_to_bmp, eb_bitmap_to_png): They return EB_Error_Code. + * ebfont/ebfont.c: `ebfont' supports PNG format images. + + * eb/zio.c: Enlarge cache buffer, contributed by Takashi NEMOTO. + + * eb/setword.c (eb_convert_euc_jp): Fix argument order. + + * configure.ac (AC_INIT): Set version to 4.1. + * configure.ac (EB_VERSION_MINOR): Set minor version to 1. + * configure.ac (LIBEB_VERSION_INFO): Set version to 9:0:0. + + * configure.ac (AC_C_CONST, AC_C_PROTOTYPES, AC_C_VOID_POINTER, + AC_HEADER_STDC, AC_HEADER_STAT, AC_HEADER_TIME, AC_HEADER_DIRENT, + AC_FUNC_VPRINTF, AC_TYPE_OFF_T, AC_TYPE_SIZE_T): Removed. + * configure.ac (AC_CHECK_HEADERS): Remove checks for fcntl.h, + limits.h, memory.h, stdlib.h and unistd.h. + * eb/Makefile.am + * configure.ac (AC_CHECK_FUNCS): Remove checks for getcwd(), memcpy(), + memmove() and strchr(). + * configure.ac (AC_REPLACE_FUNCS): Remove checks for memset() and + strerror(). + + * eb/appendix.c, eb/appendix.h, eb/appsub.c, eb/bcd.c, eb/binary.c, + eb/binary.h, eb/bitmap.c, eb/book.c, eb/booklist.c, eb/booklist.h, + eb/build-post.h.in, eb/build-pre.h, eb/copyright.c, eb/defs.h, + eb/eb.c, eb/eb.h, eb/ebnet.c, eb/ebnet.h, eb/endword.c, eb/error.c, + eb/error.h, eb/exactword.c, eb/filename.c, eb/font.c, eb/font.h, + eb/getaddrinfo.c, eb/getaddrinfo.h, eb/hook.c, eb/jacode.c, + eb/keyword.c, eb/linebuf.c, eb/linebuf.h, eb/lock.c, eb/log.c, + eb/makeproto, eb/match.c, eb/menu.c, eb/multi.c, eb/multiplex.c, + eb/narwalt.c, eb/narwfont.c, eb/readtext.c, eb/search.c, eb/setword.c, + eb/stopcode.c, eb/strcasecmp.c, eb/subbook.c, eb/text.c, eb/text.h, + eb/urlparts.c, eb/urlparts.h, eb/word.c, eb/zio.c, eb/zio.h, + ebfont/ebfont.c, ebinfo/ebinfo.c, ebrefile/ebrefile.c, + ebstopcode/ebstopcode.c, ebzip/copyfile.c, ebzip/ebzip.c, + ebzip/ebzip.h, ebzip/ebzip1.c, ebzip/sebxa.c, ebzip/unzipbook.c, + ebzip/unzipfile.c, ebzip/zipbook.c, ebzip/zipfile.c, + ebzip/zipinfobook.c, ebzip/zipinfofile.c, libebutils/ebutils.c, + libebutils/ebutils.h.in, libebutils/getopt.c, libebutils/getopt.h, + libebutils/getumask.c, libebutils/getumask.h, libebutils/makedir.c, + libebutils/makedir.h, libebutils/puts_eucjp.c, libebutils/samefile.c, + libebutils/samefile.h, libebutils/strcasecmp.c, libebutils/yesno.c, + libebutils/yesno.h, samples/appendix.c, samples/booklist.c, + samples/disctype.c, samples/font.c, samples/initexit.c, + samples/subbook.c, samples/text.c, samples/word.c: + EB Library now assumes POSIX.1-1990 systems and requires ANSI C89 + compiler. + +2004-03-20 Motoyuki Kasahara + + * Version 4.0.1. + + * ebzip/zipfile.c, ebzip/unzipfile.c, ebzip/copyfile.c, ebzip/sebxa.c: + Output progress messages to stderr, not stdout. + + * ebzip/zipbook.c (ebzip_zip_book, ebzip_zip_book_eb, + ebzip_zip_book_epwing): Abort if ebzip_zip_file() fails. + * ebzip/unzipbook.c (ebzip_unzip_book, ebzip_unzip_book_eb, + ebzip_unzip_book_epwing): Abort if ebzip_unzip_file() or + ebzip_unzip_start_file() fails. + +2004-02-29 Motoyuki Kasahara + + * ebzip/zipinfobook.c (ebzip_zipinfo_book_epwing): Also display + movie files. + +2004-01-30 Motoyuki Kasahara + + * eb/build-pre.h, eb/defs.h, ebzip/ebzip.h (EB_P): Fix typo in + the definition of EB_P. + * eb/zio.h (ZIO_P): Likewise. diff --git a/lib/ebu/ChangeLog.0 b/lib/ebu/ChangeLog.0 new file mode 100644 index 0000000..f411bec --- /dev/null +++ b/lib/ebu/ChangeLog.0 @@ -0,0 +1,1464 @@ +1999-12-03 Motoyuki Kasahara + + * Version 2.3.6. + + * eb/subbook.c (eb_initialize_indexes): Fix a bug that search + method parameters aren't set correctly. + + * eb/font.c (eb_initialize_eb_fonts): If the number of characters + in a font is 0, ignore the font entry. This fix is for "Nihongo + Goi Taikei" (EPWING, Iwanami Shoten). + * eb/font.c (eb_initialize_epwing_fonts): Likewise. + +1999-11-03 Motoyuki Kasahara + + * Version 2.3.5. + +1999-10-23 Motoyuki Kasahara + + * Version 2.3.4. + + * eb/epwunzip.c (eb_epwunzip_slice): Fix a bug that an + application dumps core when the compression ratio of a target + page is over 100%. + + * eb/appendix.h: Add missing `}' for extern "C". + +1999-10-03 Motoyuki Kasahara + + * ebrefile/ebrefile.in: When the `--version' option is specified, + don't put an empty line followed by the Copyright string. + * ebappendix/ebappendix.in: Likewise. + + * ebinfo/ebinfo.c (output_information): Add `S-EBXA' to the + string `EB/EBG/EBXA/...'. + +1999-09-04 Motoyuki Kasahara + + * Version 2.3.3. + +1999-06-20 Motoyuki Kasahara + + * Version 2.3.2. + + * Use libtool-1.3.2. + + * eb/text.c (eb_read_internal): Skip text within `1ff0H - 1ff1H', + `1ff2H - 1ff3H', ... `1ffeH - 1ffHH', not `1ff1H - 1ff2H', + `1ff3H - 1ff4H' ... `1ffdH - 1ffeH'. + +1999-04-29 Motoyuki Kasahara + + * Version 2.3. + +1999-04-24 Motoyuki Kasahara + + * Version 2.3beta2. + + * eb/subbook.c (eb_initialize_subbook): Don't access the removed + `length' member in the `EB_Search' structure. + * eb/text.c (eb_text): Likewise. Don't tell text from menu. + * eb/text.c (CONTENT_MENU): Removed. + +1999-04-17 Motoyuki Kasahara + + * eb/eb.c (eb_initialize_catalog): Change the character code + parameter of `EB Kagakugijutu Yougo Daijiten (YRRS-048)' + to JIS X 0208. + +1999-04-11 Motoyuki Kasahara + + * eb/zio.c (eb_zopen): Remove and append `.' to a filename + and try to open the file, when failed to open the file. + +1999-03-28 Motoyuki Kasahara + + * Version 2.3beta1. + + * ebinfo/ebinfo.c (output_information): Recognize the book + written in EB_CHARCODE_JISX0208_GB2312. + + * eb/text.c (eb_read_internal): Case to `unsigned char' when + assign an integral value to `*workbuf'. + + * eb/defs.h (EB_Search): Add the member `length'. + * eb/subbook.c (eb_initialize_subbook): Record not only start + pages of search methods but their index length. + * eb/text.c (CONTENT_MENU): Defined. + * eb/text.c (eb_text): Check for the content type, text or menu. + * eb/text.c (eb_read_internal): If the content type is menu, + text is fed to the application until the library meets `0x1f03'. + + * eb/eb.c (eb_initialize_catalog): Tell EB_CHARCODE_ISO8859_1 + from others, not EB_CHARCODE_JISX0208 from others. + * eb/font.c (eb_initialize_eb_fonts, + eb_initialize_epwing_fonts): Likewise. + * eb/narwalt.c(eb_narrow_alt_character_text, + eb_forward_narrow_alt_character, + eb_backward_narrow_alt_character): Likewise. + * eb/narwfont.c (eb_narrow_font_character_bitmap, + eb_forward_narrow_font_character, + eb_backward_narrow_font_character): Likewise. + * eb/widealt.c(eb_wide_alt_character_text, + eb_forward_wide_alt_character, + eb_backward_wide_alt_character): Likewise. + * eb/widefont.c (eb_wide_font_character_bitmap, + eb_forward_wide_font_character, + eb_backward_wide_font_character): Likewise. + + * eb/text.c (eb_read_internal): Recognize GB 2312 character in + EBXA-C. + * eb/text.h (EB_HOOK_GB2312): Add the hook. + * eb/text.h (EB_NUM_HOOKS): Increment. + + * eb/defs.h (EB_CHARCODE_JISX0208_GB2312): Defined. + * eb/language.c:eb_initialize_languages): Recognize EBXA-C disc. + +1999-03-07 Motoyuki Kasahara + + * Version 2.3beta0. + + * eb/ebrefile.in: Find catalog file in the same order as + ebzip does. + + * eb/zio.c (eb_zopen2): Defined. + * eb/zio.c (eb_zclose): Dispose memory for huffman nodes. + + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Support + CD-ROM book compressed with EPWING compression format. + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Support + CD-ROM book compressed with EPWING compression format. + * ebzip/ebzip.c (zip_file, unzip_file): Argument formats are + changed. `in_filename' are changed to `in_filename_list'. + * ebzip/ebzip.c (zipinfo_file): Argument format is changed. + `ebz_filename' and `orig_filename' are unified to `filename_list'. + * ebzip/ebzip.c (zip_file, unzip_file, zipinfo_file): Use + eb_zopen2(), eb_zlseek(), eb_zread() and eb_zclose() for input + files. + + * ebzip/ebzip.c (fix_filename, zip_file, unzip_file, zipinfo_file): + `eb_canonicalize_filename()' are called at `fix_filename()', not + elsewhere. + +1999-02-27 Motoyuki Kasahara + + * eb/zio.c (eb_read_all): Return the number of read bytes so far + when it receives an EOF. + +1999-02-26 Motoyuki Kasahara + + * eb/internal.h (EB_HUFFMAN_NODE_INTERMEDIATE, EB_HUFFMAN_NODE_LEAF8, + EB_HUFFMAN_NODE_LEAF16, EB_HUFFMAN_NODE_EOF): Defined. + +1999-02-25 Motoyuki Kasahara + + * eb/unzip1.c: Renamed to `ebunzip1.c'. + * eb/ebunzip1.c (eb_unzip_mode1): Renamed to `eb_ebunzip1_slice'. + + * ebzip/zip1.c: Renamed to `ebzip1.c'. + * ebzip/ebzip1.c (zip_mode1): Renamed to `ebzip1_slice'. + + * eb/def.h (EB_SIZE_ZIP_HEADER): Renamed to `EB_SIZE_EBZIP_HEADER'. + * eb/def.h (EB_SIZE_ZIP_MARGIN): Renamed to `EB_SIZE_EBZIP_MARGIN'. + * eb/def.h (EB_SIZE_ZIP_LEVEL): Renamed to `EB_SIZE_EBZIP_LEVEL'. + * eb/def.h (EB_ZIP_MODE1): Renamed to `EB_ZIP_EBZIP1'. + * eb/def.h (EB_ZIP_EPWING): Defined. + * eb/defs.h (EB_Huffman_Node): Defined. + * eb/defs.h (EB_Zip): Add some members for EPWING compression: + `index_location', `index_length', `frequencies_location', + `frequencies_length', `huffman_nodes' and `huffman_root'. + + * eb/zio.c (eb_zopen): Split this function into `eb_zopen()' and + `eb_zopen_ebzipped()'. + * eb/zio.c (eb_zopen): Split this function into `eb_zread()' and + `eb_zread_ebzipped()'. + * eb/zio.c (eb_zopen_epwzipped, eb_zread_epwzipped): Defined. + * eb/zio.c (eb_fix_ebzip_filename): Removed. The procedures in + this function are moved into `eb_open_ebzipped'. + +1999-02-20 Motoyuki Kasahara + + * Version 2.2.1. + + * eb/jpcode.c: Renamed to `eb/jacode.c'. + + * configure.in (AC_CYGWIN, AC_MINGW32, AC_EXEEXT, AC_OBJEXT): + Added. + * configure.in: Add AM_CONDITIONAL(EXEEXT, ...) + * ebzip/Makefile.am: add `if..else..endif' statement which + branches off according with `EXEEXT'. + + * Makefile.am: add `if..else..endif' statement which branches + off according with `ENABLE_SAMPLES'. + * Makefile.am (EXTRA_DIST): Delete files under the `samples' + and `samples-ja' directories. + * Makefile.am (SUBDIRS): Add `$(SAMPLES_SUBDIR)'. + * samples/disctype.c, samples/subbook.c, samples/word.c: + Import Japanese comments in `samples-ja/*.c' and renamed + to `*.c.in'. + * samples/Makefile.am (disctype.c, subbook.c, word.c): They + are generated from `*.c.in' files. + * samples-ja/configure.in, samples-ja/Makefile.am + samples-ja/disctype.c, samples/subbook.c, samples/word.c: + Removed. + * doc/Makefile.am (disctype.c.texi, subbook.c.texi): Generated + from `$(samplesdir)/disctype.c.in' and `$(samplesdir)/subbook.c.in'. + * doc-ja/Makefile.am (disctype.c.texi, subbook.c.texi): Likewise. + * doc-ja/Makefile.am (samplesdir): Changed to `$(srcdir)/../samples', + from `$(srcdir)/../samples-ja'. + +1999-02-11 Motoyuki Kasahara + + * ebinfo/ebinfo.c (main): Don't include . + * ebfont/ebfont.c (main): Likewise. + * ebfont/ebzip.c (main): Likewise. + + * lib/fakelog.c (set_fakelog_level): Takes a facility with + `FAKELOG_' prefix as an argument. + * lib/fakelog.h, lib/fakelog.c: Move facility macros definitions + (`FAKELOG_QUIET', `FAKELOG_EMERG' ...) from `lib/fakelog.c' to + `lib/fakelog.h'. + * lib/fakelog.c: include `syslog.h' only when `HAVE_SYSLOG_H' + is defined (for DOS and Windows). + * lib/fakelog.c (fakelog): call syslog() only when HAVE_SYSLOG + is defined (for DOS and Windows). + * configure.in (AC_CHECK_FUNCS): Add `syslog'. + * configure.in (AC_CHECK_HEADERS): Add `syslog.h'. + +1999-01-28 Motoyuki Kasahara + + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): + Fix eb_canonicalize_filename() calls in the `DOS_FILE_PATH' + blocks. Undefined variables were used. + +1999-01-15 Motoyuki Kasahara + + * Version 2.2. + + * eb/text.c (eb_initialize_hookset): Set hook functions + of `EB_HOOK_STOPCODE', `EB_HOOK_NARROW_JISX0208', + `EB_HOOK_NARROW_FONT' and `EB_HOOK_WIDE_FONT' + + * eb/hookset.c (eb_hook_stopcode_dummy, eb_hook_stopcode_mixed): + Now, simply call `eb_hook_stopcode'. + * eb/hookset.c (eb_hook_stopcode_mixed): Rename to + `eb_hook_stopcode'. The old version of `eb_hook_stopcode' + has overwritten. + + * eb/hookset.c (eb_hook_narrow_character_text, + eb_hook_wide_character_text, eb_hook_empty): Add three builtin + hooks. + +1999-01-10 Motoyuki Kasahara + + * eb/text.c (default_hookset, default_hookset_initialized): + Add these static variables. + * eb/text.c (eb_text, eb_heading): Initialize `default_hookset' + if it has not been initialized yet. + * eb/text.c (eb_read_internal): Use `default_hookset' when + `hookset' is `NULL'. + + * doc/Makefile.am (info_TEXINFOS): Add `eb.texi'. + * doc/Makefile.am (eb_ja_TEXINFOS): Define this macro. + * doc/Makefile.am (MOSTLYCLEANFILES): Rename to `CLEANFILES'. + * doc/Makefile.am (CLEANFILES): Add `disctype.c.texi' and + `subbook.c.texi'. + * doc/Makefile.am (EXTRA_DIST): Add `stamp-eb'. + * doc/Makefile.am (eb-ver.texi, stamp-eb): Add these targets. + + * doc-ja/Makefile.am (info_TEXINFOS): Add `eb-ja.texi'. + * doc-ja/Makefile.am (eb_ja_TEXINFOS): Define this macro. + * doc-ja/Makefile.am (MOSTLYCLEANFILES): Rename to `CLEANFILES'. + * doc-ja/Makefile.am (CLEANFILES): Add `disctype.c.texi' and + `subbook.c.texi'. + * doc-ja/Makefile.am (EXTRA_DIST): Add `stamp-eb'. + * doc-ja/Makefile.am (eb-ver.texi, stamp-eb): Add these targets. + + * Makefile.am (EXTRA_DIST): add files under the `samples' and + `samples-ja' directories. + +1998-12-12 Motoyuki Kasahara + + * Version 2.1.2. + + * ebzip/ebzip.c (zip_file, unzip_file, copy_file): Check + whether SIGHUP, SIGTERM and SIGQUIT are defined or not. + + * config.guess, config.sub, ltconfig, ltmain.sh: Use libtool + version 1.2c, taken via anonymous CVS. This version supports + FreeBSD-ELF. + + * configure.in (LIBEB_VERSION_INFO): Set it to `1:2:0'. + (The previous version was `1:1:1', but this is incorrect.) + +1998-11-13 Motoyuki Kasahara + + * Version 2.1.1. + + * eb/text.c (eb_read_internal): Update `pagebufp' and `pagerest' + before go to `at_end'. + +1998-11-09 Motoyuki Kasahara + + * eb/eb.c (eb_initialize_catalog): If the target book is a + CD-ROM of SONY DataDiscMan (DD-DR1), modify `char_code' to + JIS X 0208. + + * eb/appendix.c (eb_initialize_appendix_catalog): Raise an error + if the target appendix has no subbook. + * eb/eb.c (eb_initialize_catalog): Raise an error if the target + book has no subbook. + +1998-11-08 Motoyuki Kasahara + + * ebinfo/ebinfo.c (output_information): Output `copyright' + instead of `copyright-notice'. + +1998-11-06 Motoyuki Kasahara + + * INSTALL-ja, README-ja: Add these files. + * Makefile.am (EXTRA_DIST): Add this macro. + + * configure.in (LIBEB_VERSION_INFO): Set it to `1:1:1'. + + * eb/appsub.c (eb_initialize_all_appendix_subbooks): Examine + whether the appendix is bound or not. + * eb/subbook.c (eb_initialize_all_subbooks): Examine whether + the book is bound or not. + +1998-10-31 Motoyuki Kasahara + + * doc-ja/texinfo.tex: Use Japanized 1998-10-27 version. + * doc/texinfo.tex: Use 1998-10-27 version. + * doc-ja/Makefile.am (EXTRA_DIST): Add texinfo-ja.tex. + +1998-10-28 Motoyuki Kasahara + + * eb/font.c (eb_initialize_epwing_fonts): Close a font file + immediately and set `font_count' to 0 when an error occurs. + +1998-10-19 Motoyuki Kasahara + + * libebutils/samefile.c (is_same_file): If `DOS_FILE_PATH' + is defined, compare fields other than `st_dev' and `st_ino'. + +1998-10-08 Motoyuki Kasahara + + * eb/ebzip.c (main): Ignore case of the command name + when DOS_FILE_PATH is defined. + * eb/ebzip.c (main, zip_book, unzip_book, zipinfo_book): + Call eb_canonicalize_filename() after fix_filename(), when + DOS_FILE_PATH is defined. + * eb/ebzip.c (main): Recognize the command name `ebunzip.exe' + and `ebzipinfo.exe' when DOS_FILE_PATH is defined. + + * eb/ebzip.c (info_book): Rename it to `zipinfo_book'. + * eb/ebzip.c (info_file): Rename it to `zipinfo_file'. + +1998-10-02 Motoyuki Kasahara + + * Version 2.1. + + * eb/subbook.c (eb_initialize_indexes): Recognize an index + with the identifer 0x02 as copyright notice. + +1998-09-23 Motoyuki Kasahara + + * ebzip/ebzip.c: Add missing O_BINARY modifier to an argument + to read(). + +1998-09-17 Motoyuki Kasahara + + * eb/text.c (eb_read_internal): `0x1f53' is an escape sequence + for END-OF-SOUND, not END-OF-PICTURE. + +1998-08-21 Motoyuki Kasahara + + * ebrefile/ebrefile.in: Copy reserved area 1 (described in JIS + X 4081) in an original CATALOG(S) to a new CATALOG(S). + + * configure.in (LIBZ_INCLUDED): Rename it to `INCLUDED_FOR_LIBZ'. + * configure.in (LIBZ_DEPENDED): Rename it to `DEPENDENCIES_FOR_LIBZ'. + * configure.in (LIBZ_LDADDED): Rename it to `LDADD_FOR_LIBZ'. + +1998-08-15 Motoyuki Kasahara + + * Version 2.1beta2. + + * eb/defs.h (EB_VERSION_MINOR): Set to `1'. + (NDTPD 2.1beta0 and beta1 set wrong miner version.) + +1998-08-14 Motoyuki Kasahara + + * libebutils/getopt_long.pl (getopt_long): Set option name to '' + for a return value of a non-option argument when RETURN_IN_ORDER + mode. + +1998-08-02 Motoyuki Kasahara + + * ebzip/Makefile.am (TEXINFO_TEX): Deleted. + +1998-07-19 Motoyuki Kasahara + + * ebappendix/Makefile.am (EXTRA_DIST, ebappendix): Move + `getopt_long.in' to the `libebutils' directory. + * libebutils/Makefile.am (EXTRA_DIST): Add `getopt_long.in'. + + * eb/zio.c (eb_zread): Decrease size of `tmp_buffer'. + * eb/unzip1.c (eb_unzip_mode1): Set `avail_out' to just + `out_byte_length'. Don't add margin. + + * ebrefile/ebrefile.in, ebrefile/Makefile.am, ebrefile/getopt_long.pl: + Add these files. + * Makefile.am (SUBDIRS): Add `ebrefile'. + * configure.in (AC_OUTPUT): Add `ebrefile/Makefile'. + + * eb/ebzip.c (info_file): Output size of original files. + * eb/defs.h (EB_MAX_ZIP_LEVEL): Set to `3' (it was `2'). + +1998-07-16 Motoyuki Kasahara + + * Version 2.1beta1. + + * libebutils/samefile.c (is_same_file): Fix an expression of + inode comparion. + * ebzip/ebzip.c (main): Don't change `filename_suffix' regardless + of action mode. + * ebzip/ebzip.c (list_book): Rename to `info_book'. + * ebzip/ebzip.c (list_file): Rename to `info_file'. + * ebzip/ebzip.c (fix_output_directory): Delete the function. + * ebzip/ebzip.c (fix_output_filename): Rename to `fix_filename' + and change its interface. + + * ebzip/ebzip.c (zip_file, unzip_file): Output status messages + with more precise output byte-counts during compression/uncompression. + +1998-07-16 Motoyuki Kasahara + + * zlib/Makefile.am (EXTRA_DIST): List minimum files; `*.c' and + `*.h' sources required to build the library, and documents. + + * Import zlib-1.1.3 sources. + + * acinclude.m4 (AX_HAVE_STRUCT_UTIMBUF): Fix a message. + + * ebinfo/Makefile.am, ebfont/Makefile.am (INCLUDES): Delete + `-I$(zincludedir)'. + + * ebzip/ebzip.c (compress_book, uncompress_book): Correctly + generate filenames of HONMON files. + + * ebzip/ebzip.c (output_help): Fix miss-spelling. + +1998-07-12 Motoyuki Kasahara + + * Version 2.1beta0. + + * ebappendix/ebappendix.in: Fix option parser. + + * ebfont/ebfont.c (make_subbook_size_fonts): Omit intermedate + directories for image-names. + + * configure.in (AC_ARG_WITH): Add `--with-zlib'. + +1998-07-10 Motoyuki Kasahara + + * doc/Makefile.am (ebinfo-ver.texi, stamp-ebinfo, ebzip-ver.texi, + stamp-ebzip): Define these rules. + * doc-ja/Makefile.am (ebinfo-ver.texi, stamp-ebinfo, ebzip-ver.texi, + stamp-ebzip): Liksewise. + + * doc/Makefile.am (ebinfo_TEXINFOS, ebzip_TEXINFO): Define + these macros. + * doc-ja/Makefile.am (ebinfo_ja_TEXINFOS, ebzip_ja_TEXINFO): + Likewise. + + * doc/Makefile.am (MOSTLYCLEANFILES): Add vti.tmp. + * doc-ja/Makefile.am (MOSTLYCLEANFILES): Likewise. + + * doc/ebzip.texi: Add this file. + * doc/ebzip-ja.texi: Likewise. + * doc/Makefile.am (info_TEXINFOS): Add `ebzip.texi'. + * doc/Makefile.am (info_TEXINFOS): Likewise. + +1998-07-05 Motoyuki Kasahara + + * Makefile.am (JA_DOC_SUBDIR): Define this variable according to + `ENABLE_JA_DOC' conditinal flag. + * Makefile.am (SUBDIRS): Add `doc' and `$(JA_DOC_SUBDIR)'. + * configure.in (AC_ARG_ENABLE): Add `--with-ja-doc'. + * configure.in (AM_CONDITIONAL): Add `ENABLE_JA_DOC'. + * configure.in (AC_OUTPUT): Add `doc/Makefile' and `doc-ja/Makefile'. + + * ebinfo/Makefile.am (info_TEXINFOS, TEXINFO_TEX): Delete these + macros. + * ebinfo/ebinfo.texi: Move to `doc/ebinfo.texi'. + * doc-ja/Makefile.am: Add this file. + * doc-ja/ebinfo-ja.texi: Add this file. + * doc/Makefile.am: Likewise. + +1998-06-28 Motoyuki Kasahara + + * ebfont/ebfont.c (short_options): Define this variable and passed + to getopt_long(). + * ebinfo/ebinfo.c (longopts): Likewise. + + * ebfont/ebfont.c (longopts): Rename to `long_options'. + * ebinfo/ebinfo.c (longopts): Likewise. + +1998-06-27 Motoyuki Kasahara + + * eb/appendix.c (eb_clear_appendix), eb/eb.c (eb_clear): Call + `eb_zclear'. + * eb/appendix.c, eb/eb.c: Use `eb_read_all' instead of `read'. + * eb/appsub.c, eb/font.c, eb/keyword.c, eb/language.c, eb/message.c, + eb/multi.c, eb/narwalt.c, eb/narwfont.c, eb/search.c, eb/subbook.c, + eb/text.c, eb/widealt.c, eb/widefont.c: Use `eb_zopn', `eb_zclose', + `eb_zlseek' and `eb_zread' instead of `open', `close', `lseek' and + `read'. + + * eb/internal.h: Add declarations of the functions defined in + `unzip.c' and `zio.c'. + * eb/defs.h (EB_Appendix_Subbook, EB_Font, EB_Subbook): Add + the member `zip'. + * eb/defs.h (EB_Zip_Code, EB_Zip): Define these types. + * eb/defs.h (EB_ZIP_NONE, EB_ZIP_MODE1, EB_SIZE_ZIP_HEADER, + EB_SIZE_ZIP_MARGIN, EB_MAX_ZIP_LEVEL): Define these macros. + * eb/Makefile.am (libeb_la_SOURCES): Add `zio.c' and `unzip1.c'. + * eb/zio.c, eb/unzip1.c: Add the file. + + * Makefile.am (ZLIB_SUBDIR): Define this variable according to + `WITH_ZLIB' conditinal flag. + * Makefile.am (SUBDIRS): Add `$(ZLIB_SUBDIR)'. + * configure.in (AC_ARG_WITH): Add `--with-zlib-includes' + and `--with-zlib-libraries'. + * configure.in (AM_CONDITIONAL): Add `WITH_ZLIB'. + * configure.in (AC_CONFIG_SUBDIRS): Set as `zlib'. + + * Use libtool-1.2a. + + * eb/Makefile.am (install-data-hook): Insert $(DESTDIR) to + filenames. + + * configure.in (AC_TYPE_SIGNAL): Add this macro. + * configure.in (AC_DEFINE): Define RETSIGTYPE_VOID. + * acconfig.h: Add RETSIGTYPE_VOID. + +1998-06-23 Motoyuki Kasahara + + * ebfont/ebfont.c (main): Call output_try_help() when + an argument to `-f' or `-i' is invalid value. + +1998-06-21 Motoyuki Kasahara + + * ebfont/Makefile.am (INCLUDES): Add `-I$(zincludedir)'. + + * ebfont/Makefile.am (ebfont_LDADD): Add $(LIBZ) + * ebinfo/Makefile.am (ebinfo_LDADD): Likewise. + + * ebfont/Makefile.am (LIBZ): Set this macro. + * ebinfo/Makefile.am (LIBZ): Likewise. + + * configure.in (LIBEB_VERSION_INFO): Set to `1:1:0'. + * configure.in (AC_CONFIG_SUBDIRS): Add `zlib'. + * configure.in (AC_ARG_WITH): Add the `--with-zlib-includes' + and `--with-zlib-libraries' options. + * configure.in (AM_CONDITIONAL): Add `WITH_ZLIB'. + * configure.in (AC_SUBST): Substitute `zincludedir' and + `zlibdir'. + + * Import zlib-1.12 sources. + +1998-06-18 Motoyuki Kasahara + + * configure.in (AC_PREREQ): Set to `2.12'. + +1998-06-14 Motoyuki Kasahara + + * configure.in (AC_CHECK_FUNCS): Add `utime'. + * configure.in (AC_CHECK_HEADERS): Add `utime.h'. + + * ebappendix/ebappendix.in: Rename the option name `--filename-case' + to `--case'. + +1998-06-13 Motoyuki Kasahara + + * ebfont/ebfont.c: Include `getumask.h'. + * ebfont/ebfont.c (get_umask): Move the function to + `libebutils/getumask.c'. + * libebutils/getumask.c, libebutils/getumask.h: Add these files. + * libebutils/Makefile.am (libebutils_a_SOURCES): Add `getumask.c' + and `getumask.h'. + + * ebfont/ebfont.c (main): Check the length of an argument + to the option `-o', canonicalize the argument as an absolute + path, and then check the length of the canonicalized path + again. + +1998-06-11 Motoyuki Kasahara + + * Version 2.0.1. + + * eb/defs.h: Add `EB_SUFFIX_DOT' for an alias name to + `EB_SUFFIX_PERIOD'. + + * eb/eb.c (eb_initialize_catalog): Ignore font filenames + which beginning with a character 0x80...0xff. + * eb/filename.c (eb_catalog_filename_internal): Fix a gug; + add a suffix to a filename correctly. + +1998-06-09 Motoyuki Kasahara + + * Version 2.0. + + * eb/filename.c (eb_canonicalize_filename): Rename + `EB_ERR_TOO_LONG_FNAME' to `EB_ERR_TOO_LONG_FILENAME'. + +1998-06-07 Motoyuki Kasahara + + * ebappendix/ebappendix.in: Rename argument to the `--suffix' + (`-s') option; from `period' to `dot'. + + * ebfont/ebfont.c (longopts): Add the `--subbook' (`-S') option. + * ebfont/ebfont.c (main, help): Add the `--subbook' (`-S') option. + * ebfont/ebfont.c (make_book_fonts): Change an arugment list. + Add `subname_list' and `subname_count' arguments. + * ebfont/ebfont.c (make_fonts): Rename to `make_book_fonts'. + +1998-06-06 Motoyuki Kasahara + + * ebfont/ebfont.c (DEFAULT_FONT_HEIGHT, DEFAULT_IMAGE_FORMAT): + Define these macros as strings; "16" and "xbm". + * ebfont/ebfont.c (main): Call `parse_font_argument' with + `DEFAULT_FONT_HEIGHT' when `-f' option is not speicified. + * ebfont/ebfont.c (main): Call `parse_image_argument' with + `DEFAULT_IMAGE_HEIGHT' when `-i' option is not speicified. + +1998-06-05 Motoyuki Kasahara + + * ebfont/ebfont.c (parse_font_argument): Use `strcmp' to + check an argument instead of `strncmp'. + + * ebfont/ebfont.c: Define `DEFAULT_BOOK_DIRECTORY' and use + it rather than ".". + * ebfont/ebinfo.c: Define `DEFAULT_BOOK_DIRECTORY' and use + it rather than ".". + +1998-06-01 Motoyuki Kasahara + + * ebappendix/ebappendix.in: Use `if expr {die "..."}' intead + of `die "..." if expr' when `$!' is used in "...". + * ebappendix/ebappendix.in: Add two argument tyes `version' + and `both' to the option `-s'. + + * ebappendix/ebappendix.in (@long_options): + Rename `--check-only'(`-n') to `--test'(`-t'). + Rename `-N'(`--no-catalog') to `-n'(`--no-catalog'). + +1998-05-30 Motoyuki Kasahara + + * eb/Makefile.am (libeb_la_SOURCES): Add `unzip.c' and + `unzip-mode1.c'. + * eb/unzip.c, eb/unzip-mode1.c: Add these files. + * ebzip/Makefile.am, ebzip/zip-mode1.c, ebzip/ebzip.c: + Add these files. + * Makefile.am (SUBDIRS): Add `ebzip'. + * configure.in (AC_OUTPUT): Add `ebzip/Makefile'. + + * eb/defs.h: include `time.h' and/or `sys/time.h' according + with `TIME_WITH_SYS_TIME' and `HAVE_SYS_TIME_H'. + * configure.in: Add `AC_HEADER_TIME'. + * eb/eb.c (eb_bind): Assume that the suffix `.ebz' may be + inserted to the filename. + * eb/defs.h (EB_Appendix_Subbook, EB_Font, EB_Subbook): Add + the member `unzip'. + * eb/defs.h (EB_Zip): Define the type. + +1998-05-23 Motoyuki Kasahara + + * eb/defs.h (EB_Appendix_Subbook): + Rename `appfile' to `sub_file'. + Rename `charcode' to `char_code'. + Rename `narwstart' to `narw_start'. + Rename `widestart' to `wide_start'. + Rename `narwend' to `narw_end'. + Rename `wideend' to `wide_end'. + Rename `narwpage' to `narw_page'. + Rename `widepage' to `wide_page'. + * eb/defs.h (EB_Appendix): + Rename `pathlen' to `path_length'. + Rename `disccode' to `disc_code'. + Rename `casecode' to `case_code'. + Rename `suffixcode' to `suffix_code'. + Rename `subcount' to `sub_count'. + Rename `subcurrent' to `sub_current'. + Rename `narwcache' to `narw_cache'. + Rename `widecache' to `wide_cache'. + * eb/defs.h (EB_Font): + Rename `fontfile' to `font_file'. + * eb/defs.h (EB_Language): + Rename `msgcount' to `msg_count'. + * eb/defs.h (EB_Search): + Rename `entrycount' to `entry_count'. + * eb/defs.h (EB_Subbook): + Rename `startfile' to `sub_file'. + Rename `multicount' to `multi_count'. + Rename `fontcount' to `font_count'. + Rename `narwcurrent' to `narw_current'. + Rename `widecurrent' to `wide_current'. + * eb/defs.h (EB_Book): + Rename `disccode' to `disc_code'. + Rename `charcode' to `char_code'. + Rename `pathlen' to `path_length'. + Rename `casecode' to `case_code'. + Rename `suffixcode' to `suffix_code'. + Rename `subcount' to `sub_count'. + Rename `subcurrent' to `sub_current'. + Rename `langcount' to `lang_count'. + Rename `langcurrent' to `lang_current'. + +1998-04-29 Motoyuki Kasahara + + * Version 2.0beta1. + + * Use automake 1.3. + + * eb/appendix.h, eb/eb.h, eb/error.h, eb/font.h, eb/internal.h, + eb/language.h, eb/text.h (EB_P): Examine whether the `__cplusplus' + macro is defined or not. + + * ebappendix/getopt_long.pl: Don't use the expression like as + `($ver, $var, $var) = (0..2)'. Perl5.004_01 doesn't accept + such an expression. + + * ebappendix/ebappendix.in: Rename an option name; + `--filename-cases' to `--filename-case'. + + * texinfo.tex: Move to the sub-directory `ebinfo'. + * ebinfo/Makefile.am: Delete `TEXINFO_TEX'. + (automake-1.2 and 1.3 seems to ignore TEXINFO_TEX.) + +1998-04-14 Motoyuki Kasahara + + * ebappendix/Makefile.am (ebappendix): Concat the header part + of `ebappendix.in', `getopt_long.pl' and the body part of + `ebappendix.in' in that order to generate `ebappendix'. + +1998-04-11 Motoyuki Kasahara + + * eb/setword.c (eb_fix_word_jis): Return with the return value + EB_WORD_OTHER when a word contains kana and kanji, or contains + alphabet and kanji. + + * eb/defs.h (EB_WORD_KANJI): Rename to `EB_WORD_OTHER'. + + * eb/filename.c (eb_catalog_filename_internal): Find a catalog + file with EB_SUFFIX_VERSION style filename. + * eb/defs.h (EB_SUFFIX_VERSION): Add this cpp macro. + +1998-04-05 Motoyuki Kasahara + + * eb/setword.c (eb_fix_word_jis): Don't reject spaces. + * eb/subbook.c (eb_initialize_indexes): Initialize `search.space' + when inex style information is available. + + * eb/text.h (EB_HOOK_JISX0208): Split to `EB_HOOK_NARROW_JISX0208' + and `EB_HOOK_WIDE_JISX0208'. + + * eb/text.h (EB_HOOK_NULL): Modify its value to -1. + +1998-04-04 Motoyuki Kasahara + + * eb/font.h, eb/bitmap.c (eb_convert_bitmap_xbm, + eb_convert_bitmap_xpm, eb_convert_bitmap_gif): Rename to + `eb_bitmap_to_xbm', `eb_bitmap_to_xpm', `eb_bitmap_to_gif'. + + * eb/defs.h (EB_CHARACTER_ISO8859_1 and EB_CHARACTER_JISX0208): + Rename to `EB_CHARCODE_ISO8859_1' and `EB_CHARCODE_JISX0208'. + +1998-04-01 Motoyuki Kasahara + + * eb/eb.c (eb_initialize_catalog): Fix the character-code of + the earliest edition of `Shin Eiwa Waei Chujiten'. + +1998-03-30 Motoyuki Kasahara + + * eb/text.c (eb_read_internal): Don't use auto stop-code decision + mechanism. This mechanism cannot guess a stop-code collectly. + + * eb/appendix.c (eb_clear_appendix): Call `eb_unset_appendix_subbook' + at first, and then dispose memories asigned to `appendix->subbooks'. + +1998-03-25 Motoyuki Kasahara + + * Version 2.0beta0. + + * Use GNU libtool-1.2. + +1998-03-21 Motoyuki Kasahara + + * eb/text.c (eb_text_internal): Detect text stopcode automatically. + + * narwfont.c (eb_forward_narrow_character): Rename to + `eb_forward_narrow_font_character'. + * widefont.c (eb_forward_wide_character): Rename to + `eb_forward_wide_font_character'. + + * widealt.c (eb_have_wide_alternation, + eb_wide_alternation_start, + eb_wide_alternation_end, + eb_wide_character_text, + eb_wide_character_text_jis, + eb_wide_character_text_latin, + eb_next_wide_appendix_character, + eb_previous_wide_appendix_character): Rename to + `eb_have_wide_alt', + `eb_wide_alt_start', + `eb_wide_alt_end', + `eb_wide_alt_character', + `eb_wide_alt_character_jis, + `eb_wide_alt_character_latin, + `eb_forward_wide_alt_character', and + `eb_backward_wide_alt_character'. + * narwalt.c (eb_have_narrow_alternation, + eb_narrow_alternation_start, + eb_narrow_alternation_end, + eb_narrow_character_text, + eb_narrow_character_text_jis, + eb_narrow_character_text_latin, + eb_next_narrow_appendix_character, + eb_previous_narrow_appendix_character): Rename to + `eb_have_narrow_alt', + `eb_narrow_alt_start', + `eb_narrow_alt_end', + `eb_narrow_alt_character', + `eb_narrow_alt_character_jis, + `eb_narrow_alt_character_latin, + `eb_forward_narrow_alt_character', and + `eb_backward_narrow_alt_character'. + * appendix.c (eb_initialize_alternation_cache), appsub.c, + (eb_initialize_appendix_subbook): Rename + `eb_initialize_alternation_cache' to `eb_initialize_alt_cache'. + + * eb/search.c (eb_hit_list): Add the function. + * eb/search.c (eb_next_word, eb_next_endword): Delete these + functions. + * eb/search.c (eb_search_endword, eb_search_endword): Change + interfaces. + * eb/search.c (eb_presearch, eb_next_word_internal): + Change interfaces and rename to `eb_search_word_internal' + and `eb_hit_list_internal'. + + * eb/text.c (eb_next_text_internal): Change interface and rename + to `eb_read_internal'. + * eb/text.c (eb_text, eb_heading): Change interfaces. + These functions can be invoked repeatedly in order to get suceesive + text. + * eb/io.c (eb_read), eb/text.c: Rename `eb_read' to `eb_rawtext' + and move it to `eb/text.c'. + * eb/text.c (eb_next_text, eb_next_heading): Delete these functions. + * eb/io.c (eb_seek): Change interface. + This function is used before getting text or heading. + + * eb/setword.c (eb_fix_word_jis): Support SS2. + +1998-03-08 Motoyuki Kasahara + + * eb/narwalt.c (eb_forward_narrow_appendix_character): + Rename to `eb_forward_narrow_alternation_character'. + * eb/widealt.c (eb_forward_wide_appendix_character): + Rename to `eb_forward_wide_alternation_character'. + + * eb/narwfont.c (eb_forward_narrow_character): + Rename to `eb_forward_narrow_font_character'. + * eb/widefont.c (eb_forward_wide_character): + Rename to `eb_forward_wide_font_character'. + +1998-03-08 KSK + + * eb/filename.c (eb_canonicalize_filename): Add DOS version + of this function. + +1998-02-20 Motoyuki Kasahara + + * ebinfo/ebinfo.c (output_information): Add 2nd argument + `multiflag'. Call `output_multi_information' when `multiflag' + is non-zero. + * ebinfo/ebinfo.c (output_multi_information): Add this function. + * ebinfo/ebinfo.c (option longopts, main, outout_help): + Add the `-m' and `--multi-search' options. + +1998-02-15 Motoyuki Kasahara + + * eb/subbook.c (eb_subbook2): Add this function. + * eb/appsub.c (eb_appendix_subbook2): Add this function. + + * eb/subbook.c (eb_initialize_subbook): Get the location of + the index page from the member `page_index' in `EB_Subbook'. + * eb/eb.c (eb_initialize_catalog): Get an index page location + from the `CATALOGS' file. + * eb/internal.c (eb_uint3): Add this macro. + + * eb/multi.c (eb_initialize_multi_search, eb_multi_search_count, + eb_multi_search_list, eb_multi_entry_count, eb_multi_entry_list, + eb_multi_entry_label, eb_multi_entry_have_exactword_search, + eb_multi_entry_have_word_search, eb_multi_entry_have_endword_search, + eb_multi_entry_have_keyword_search): Add these functions. + * eb/subbook.c (eb_initialize_subbook): Call + eb_initialize_multi_search(). + * eb/error.h, eb/error.c (messages): Add new error codes + `EB_ERR_NO_SUCH_MULTI_ID' and `EB_ERR_NO_SUCH_ENTRY_ID'. + * eb/error.h: Increase EB_NUM_ERRORS. + + * eb/setword.c (eb_set_word, eb_set_endword): Fully revised. + * eb/setword.c (eb_convert_katakana_jis, eb_convert_lower_latin, + eb_convert_lower_jis, eb_delete_marks_jis, eb_convert_long_vowels_jis, + eb_delete_long_vowels_jis, eb_convert_double_consonants_jis, + eb_convert_contracted_sounds_jis, eb_convert_small_vowels_jis, + eb_convert_voiced_consonants_jis, eb_convert_p_sounds_jis, + eb_delete_spaces_jis): Add these functions. + * eb/setword.c (eb_fix_word_jis): Don't delete spaces in a + word. + * ebinfo/ebinfo.c (output_multi_information): Add this function. + +1998-02-11 Motoyuki Kasahara + + * eb/appendix.h, eb/defs.h, eb/eb.h, eb/error.h, + eb/font.h, eb/internal.h, eb/language.h, eb/text.h: + Define the cpp macro `EB_P' used at function declarations. + + * eb/Makefile.am (install-data-hook): Add this target. + + * eb/appendix.h, eb/eb.h, eb/font.h, eb/internal.h, eb/language.h, + eb/text.h: Regenerate function declarations. + + * eb/text.h (EB_UINT_FUNC): Rename to `EB_UINT_FUNCTION'. + + * eb/defs.h, eb/types.h: Merge these files and put into + `eb/defs.h'. `eb/types.h' is deleted. + + * eb/havesearch.c (eb_have_word_search, eb_have_endword_search, + eb_have_exactword_search): Move to `eb/search.c'. + * eb/havesearch.c (eb_have_keyword_search): Move to `eb/keyword.c'. + * eb/havesearch.c (eb_have_multi_search): Move to `eb/multi.c'. + * eb/havesearch.c (eb_have_grpahic_search): Move to `eb/graphic.c'. + * eb/havesearch.c (eb_have_menu): Move to `eb/menu.c'. + * eb/havesearch.c (eb_have_copyright): Move to `eb/copyright.c'. + * eb/search.c (eb_menu): Move to `eb/menu.c'. + * eb/search.c (eb_copyright): Move to `eb/copyright.c'. + + * eb/io.c (eb_seek, eb_read): Move to `eb/text.c'. + * eb/io.h: Move definitions of eb_seek() and eb_read() to + `eb/text.h' + * eb/io.c: Rename to `eb/uint.c'. + * eb/io.h: Move definitions of eb_uint1(), eb_uint2(), eb_uint4(), + eb_bcd2(), eb_bcd4() and eb_bcd6() to `text.h' and `internal.h'. + * eb/io.h: Delete this file. + +1998-01-26 Motoyuki Kasahara + + * eb/text.c (eb_text_internal, eb_text, eb_heading): + Unified the `page' and `offset' static variables, and + to `location'. In `eb_text_internal', `page' and `offset' + were not updated correctly. + +1998-01-19 Motoyuki Kasahara + + * eb/setword.c (eb_fix_word_latin): Don't ignore spaces in + a word. + + * eb/search.c (eb_search_exactword, eb_search_word, + eb_search_endword): Don't canonicalize a word if the book + is EPWING and if `page' is `EB_INDEX_WORD_ASIS'. + (temporary solution) + +1998-01-11 Motoyuki Kasahara + + * eb/Makefile.am (libeb_la_LDFLAGS): Use `@LIBEB_VERSION_INFO@' + as an argument to the `-version-info' option of libtool. + * configure.in: Add the `LIBEB_VERSION_INFO' variable and + substitute it by `AC_SUBST'. + +1998-01-10 Motoyuki Kasahara + + * eb/subbook.c (eb_initialize_subbook, eb_initialize_indexes): + Initialize `EB_Search' type members in `EB_Subbook' data at + `eb_initialize_indexes'. + + * eb/io.c (eb_seek, eb_tell, eb_read), eb/text.c (eb_heading, + eb_next_heading, eb_text, eb_next_text): Return with the error + code `EB_ERR_NO_START' when the subbook lacks a start file. + * eb/error.c, eb/error.h: Add `EB_ERR_NO_START' to the error + code list. + + * eb/narwalt.c (eb_previous_narrow_appendix_character): + Set `eb_error' to `EB_ERR_NO_CUR_APPSUB', not `EB_ERR_NO_CUR_SUB' + when the current subbook is not selected. + + * eb/io.c (eb_seek): Set `eb_error' when lseek() is failed. + + * eb/language.c (eb_initialize_languages): Close the LANGUAGE + file upon return. + + * ebappendix/getopt_long.pl (getopt_initialize), + ebappendix/ebappendix.in (long_options): + Modify option-list format of `getopt_long'. + FLAGS must be `no-argument' or `required-argument'. + +1998-01-04 Motoyuki Kasahara + + * eb/subbook.c (eb_initialize_indexes), eb/search.c + (eb_search_exactword, eb_search_word, eb_search_endword, eb_menu, + eb_copyright), havesearch.c (eb_have_word_search, + eb_have_endword_search, eb_have_keyword_search, eb_have_multi_search, + eb_have_graphic_search, eb_have_menu, eb_have_copyright): + Adapt to new `EB_Subbook' structure. + * eb/types.h (EB_Subbook): Delete the `indexes' member, and add + `word_alpha', `word_asis', `word_kana', `endword_alpha', + `endword_asis', `endword_kana', `keyword', `menu', `graphic', + `copyright', `multi' and `multicount' members. + Delete the `EB_Index_Code' type; + * eb/defs.h: Delete `EB_INDEX_WORD_KANA', `EB_INDEX_WORD_ASIS', + `EB_INDEX_WORD_ALPHA', `EB_INDEX_ENDWORD_KANA', + `EB_INDEX_ENDWORD_ASIS', `EB_INDEX_ENDWORD_ALPHA', + `EB_INDEX_KEYWORD', `EB_INDEX_MENU', `EB_INDEX_GRAPHIC' and + `EB_INDEX_MULTI'. + +1998-01-03 Motoyuki Kasahara + + * eb/havesearch.c: Rename `eb_have_menu_search' to `eb_have_menu'. + * eb/search.c: Rename `eb_search_menu' to `eb_menu'. + +1998-01-01 Motoyuki Kasahara + + * eb/match.c (eb_match_word, eb_match_exactword): + Don't ignore all spaces in a search pattern, but in the tail of + the pattern. + + * eb/narwalt.c: Rename `eb_narrow_character_text_ltn' to + `eb_narrow_character_text_latin'. + * eb/narwfont.c: Rename `eb_narrow_character_bitmap_ltn' + to `eb_narrow_character_charavter_latin'. + * eb/setword.c Rename `eb_fix_word_ltn, eb_reverse_word_ltn' + to `eb_fix_word_latin' and `eb_reverse_word_ltn'. + * eb/widealt.c: Rename `eb_wide_character_text_ltn' to + `eb_wide_character_text_latin'. + * eb/widefont.c: Rename `eb_wide_character_bitmap_ltn' + to `eb_wide_character_charavter_latin'. + + * eb/defs.h: Define `EB_INDEX_STYLE_CONVERT', `EB_INDEX_STYLE_ASIS' + and `EB_INDEX_STYLE_DELETE'. + * eb/types.h: Define the `EB_Search', `EB_Multi_Entry', + `EB_Index_Style_Code', `EB_Multi_Search_Code' and + `EB_Multi_Entry_Code' types. + * eb/types.h (EB_Subbook): Add the `index_page' member. + * eb/tyes.h (EB_Subbook): Add the `multicout' and `multi' members. + * eb/defs.h: Define `EB_MAX_MULTI_SEARCHES` and + `EB_MAX_MULTI_ENTRIES' macros. + +1997-12-31 Motoyuki Kasahara + + * ebinfo/ebinfo.texi: Add this file. + * ebinfo/Makefile.am: Define `info_TEXINFOS' as `ebinfo.texi'. + + * ebinfo/ebinfo.c (main), ebfont/ebfont.c (main): + Call `set_fakelog_name', `set_fakelog_mode' and `set_fakelog_level'. + * ebinfo/ebinfo.c: Include `fakelog.h'. + + * ebappendix/ebappendix.in: Delete the `--no-catalogs' option. + * ebappendix/ebappendix.in, ebfont/ebfont.c (main, output_help, + longopts): Add the `--verbose' option. + + * Makefile.am: Define `appendixdir' and `appendix_DATA'. + + * ebappendix/ebappendix.in, ebfont/ebfont.c (main, make_fonts, + make_subbook_fonts, make_subbook_size_fonts, + make_subbook_size_image_fonts, save_image_file), ebinfo/ebinfo.c + (main, output_information): Unify style of error messages. + + * configure.in: ebappendix/Makfile.am, ebappendix/ebappendix.in: + Set and substitute `MAILING_ADDRESS'. + + * ebappendix/ebappendix.in, ebfont/ebfont.c (output_help, + output_version), ebinfo/ebinfo.c (output_help, output_version): + Change version and help messages; output to standard rather than + standard error, add copyright and license into version message, + and add mailing address information into help message. + +1997-12-27 Motoyuki Kasahara + + * eb/appendix.c, eb/appsub.c, eb/eb.c, eb/font.c, eb/language.c, + eb/message.c, eb/subbook.c, ebfont/ebfont.c: + Define O_BINARY if not defined. + Specify `O_BINARY' at the 2nd argument of `open'. + +1997-12-21 Motoyuki Kasahara + + * eb/setword.c (eb_set_word, eb_set_endword): + Don't call `eb_canonicalize_word_jis' when the current subbook + doesn't have a KANA index table. + The current subbook must have been set to call the functions. + + * Delete the `doc/' subdirectory. + +1997-12-06 Motoyuki Kasahara + + * eb/appendix.c: Move functions related to subbook to the new + file `appsub.c'. + * eb/Makefile.am (libeb_la_SOURCES): Add `eb/appsub.c'. + + * ebinfo/Makefile.am (ebinfo_LDADD, ebinfo_DEPENDENCIES), + ebfont/Makefile.am (ebfont_LDADD, ebfont_DEPENDENCIES): + Link `../eb/libeb.la' instead of `../eb/libeb.a'. + * eb/Makefile.am: Rename `lib_LIBRARIES' to `lib_LTLIBRARIES'. + Rename `libeb_a_SOURCES' to `libeb_la_SOURCES'. + Define `libeb_la_LDFLAGS'. + * configure.in: Define `AM_PROG_LIBTOOL'. + * Get 4 files from the libtool-1.0 distribution; + `config.guess', `config.sub', `ltconfig' and `ltmain.sh'. + +1997-11-30 Motoyuki Kasahara + + * eb/error.h: + Rename `EB_ERR_TOO_LONG_FNAME' to `EB_ERR_TOO_LONG_FILENAME'. + Rename `EB_ERR_TOO_LONG_FILENAME' to `EB_ERR_TOO_EMPTY_FILENAME'. + + * eb/eb.h, eb/filename.c: + Rename `EB_FSUFFIX_NONE' to `EB_SUFFIX_NONE'. + Rename `EB_FSUFFIX_DOT' to `EB_SUFFIX_DOT'. + Rename `EB_FSUFFIX_BOTH' to `EB_SUFFIX_BOTH'. + Rename `EB_FCASE_UPPER' to `EB_CASE_UPPER'. + Rename `EB_FCASE_LOWER' to `EB_CASE_LOWER'. + Rename `EB_SIZE_EP_CATALOG' to `EB_EPWING_EB_SIZE_EPWING_CATALOG'. + Rename `EB_MAXLEN_EP_TILE' to `EB_EPWING_EB_MAXLEN_EPWING_TITLE'. + Rename `EB_FNAME_START' to `EB_FILENAME_START'. + Rename `EB_FNAME_SOUND' to `EB_FILENAME_SOUND'. + Rename `EB_FNAME_CATALOG' to `EB_FILENAME_CATALOG'. + Rename `EB_FNAME_LANGUAGE' to `EB_FILENAME_LANGUAGE'. + Rename `EB_FNAME_VTOC' to `EB_FILENAME_VTOC'. + Rename `EB_FNAME_WELCOME' to `EB_FILENAME_WELCOME'. + Rename `EB_FNAME_CATALOGS' to `EB_FILENAME_CATALOGS'. + Rename `EB_FNAME_HONMON' to `EB_FILENAME_HONMON'. + Rename `EB_FNAME_APPENDIX' to `EB_FILENAME_APPENDIX'. + Rename `EB_FNAME_FUROKU' to `EB_FILENAME_FUROKU'. + Rename `EB_CHAR_ISO8859_1' to `EB_CHARACTER_ISO8859_1'. + Rename `EB_CHAR_JISX0208' to `EB_CHARACTER_JISX0208'. + + * Delete the `utils/' sub-directory. + * utils/lib/fakelog.c, utils/lib/fakelog.h, utils/lib/getopt.c, + utils/lib/getopt.h, utils/lib/getopt1.c, utils/lib/makedir.c, + utils/lib/makedir.h, utils/lib/memset.c, utils/lib/strcasecmp.c, + utils/lib/strerror.c: Move these files to the `libebutils/' + sub-directory. + * utils/src/ebappendix.in: Move this file to the `ebappendix' sub- + directory. + * utils/src/ebinfo.c: Move this file to the `ebinfo/' sub-directory. + * utils/src/ebfont.c: Move this file to the `ebfont/' sub-directory. + * ebappendix/Makefile.am, ebinfo/Makefile.am, ebfont/Makefile.am: + Add these files. + * Makefile.am (SUBDIR): Define as `eb libebutils ebappendix ebfont + ebinfo'. + +1997-11-23 Motoyuki Kasahara + + * Version 1.0.4. + + * ebappendix/ggetopt.pl: Rename to `ebappendix/getopt_long.pl'. + + * eb/ebinfo.c (output_information): Display whether a target book + has a copyright notice or not. + + * eb/subbook.c (eb_initialize_indexes): Record an index of + multi search. eb_have_search() returns with a valid return + code, but multi search has not implemented yet. + + * eb/search.c, eb/eb.h: Add the `eb_copyright' function. + * eb/havesearch.c, eb/eb.h: Add the `eb_have_copyright' function. + + * eb/defs.h: Define `EB_INDEX_COPYRIGHT'. + + * Makefile.am: Generate dependency rules again. + + * eb/subbook.c (eb_initialize_subbook): Call `eb_initialize_fonts' + instead of `eb_initialize_eb_fonts' and `eb_initialize_epwing_fonts'. + + * eb/font.c, eb/font.h: Add the `eb_initialize_fonts' function. + + * eb/ebinfo.c (output_information), eb/ebfont.c (main): Call + `eb_bind', and then call `eb_initialize'. + * eb/eb.c (eb_bind): Call `eb_clear' rather than `eb_initialize'. + + * eb/language.c, eb/message.c: Move the functions `eb_message_count', + `eb_message_list', `eb_have_message' and `eb_message' in + `eb/language.c' to `eb/message.c'. + * eb/eb.c, eb/message.c: Move `eb_initialize_messages' in `eb/eb.c' + to `eb/message.c'. + * eb/eb.c, eb/language.c: Move `eb_initialize_language' in `eb/eb.c' + to `eb/language.c', and rename it to `eb_initialize_languages'. + * eb/eb.c, eb/font.c: Move `eb_initialize_eb_fonts' and + `eb_initialize_epwing_fonts' in `eb/eb.c' to `eb/font.c'. + * eb/eb.c, eb/subbook.c: Move `eb_initialize_subbook', + `eb_initialize_all_subbooks', and `eb_initialize_indexes' + in `eb/eb.c' to `eb/subbook.c'. + + * eb/appendix.c, eb/font.c, eb/eb.c, eb/language.c, eb/subbook.c: + Don't include `ctype.h'. + + * Add `eb/internal.h' and `eb/message.c'. + + * eb/util.c, eb/eb.c: Delete `eb/util.c'. + Move `eb_is_bound' `eb_path' and `eb_disc_type' in `eb/util.c' to + `eb/eb.c'. + * eb/init.c: Rename to `eb/eb.c'. + +1997-11-03 Motoyuki Kasahara + + * eb/text.h, text.c (eb_text_internal): Delete the hook + `EB_HOOK_UNKNOWN_SEQUENCE'. + + * eb/text.c (eb_text_internal): Skip data between a pair of + extended control sequences, as described in JIS X 4081. + +1997-10-19 Motoyuki Kasahara + + * Version 1.0.3. + + * utils/src/ebfont.c (make_subbook_fonts): Don't exit if a subbook + lacks the specified font. + + * utils/src/ebappendix.in: Add `-s' (and `--suffix') options. + +1997-10-18 Motoyuki Kasahara + + * configure.in: Use `AC_MSG_WARN' rather than `echo'. + + * eb/match.c (eb_match_word, eb_match_exactword): Ignore spaces + in a search pattern. This modicication is for the Oxford Concise + Dictionary. + + * eb/setword.c (eb_fix_word_ltn): Ignore spaces in a search + word. + + * utils/src/ebfont.c (make_fonts): Split into the five functions; + `make_fonts', `make_subbook_fonts', `make_subbook_size_fonts' + `make_subbook_size_image_fonts', and `save_image_file'. + +1997-10-10 Motoyuki Kasahara + + * utils/src/Makefile.am (ebappendix): Use `$(srcdir)/ebappendix.in' + rather than `ebappendix.in'. + Use `$(srcdir)/ggetopt.pl', not `ggetopt.pl'. + + * utils/src/Makefile.am (INCLUDES): + Use the `-I$(top_srcdir)' option, not `-I$(top_srcdir)/eb'. + + * eb/bitmap.h: Define macros; `EB_SIZE_NARROW_FONT_16_XBM', + `EB_SIZE_NARROW_FONT_16_XPM', `EB_SIZE_NARROW_FONT_16_GIF', + `EB_SIZE_NARROW_FONT_24_XBM', `EB_SIZE_NARROW_FONT_24_XPM', + `EB_SIZE_NARROW_FONT_24_GIF', `EB_SIZE_NARROW_FONT_30_XBM', + `EB_SIZE_NARROW_FONT_30_XPM', `EB_SIZE_NARROW_FONT_30_GIF', + `EB_SIZE_NARROW_FONT_48_XBM', `EB_SIZE_NARROW_FONT_48_XPM', + `EB_SIZE_NARROW_FONT_48_GIF'. + * eb/bitmap.c, eb/bitmap.h: Delete `eb_save_bitmap_xbm', + `eb_save_bitmap_xpm', `eb_save_bitmap_gif', `eb_write_bitmap_xbm', + `eb_write_bitmap_xpm', and `eb_write_bitmap_gif'. + * eb/bitmap.c, eb/bitmap.h: Add `eb_narrow_font_xbm_size', + `eb_narrow_font_xpm_size', `eb_narrow_font_gif_size', + `eb_wide_font_xbm_size', `eb_wide_font_xpm_size', + `eb_wide_font_gif_size', `eb_convert_bitmap_xbm', + `eb_convert_bitmap_xpm' and `eb_convert_bitmap_gif'. + + * eb/error.h, eb/error.c: Delete three error codes; + `EB_ERR_BAD_SIZE_BITMAP', `EB_ERR_FAIL_OPEN_BITMAP', and + `EB_ERR_FAIL_WRITE_BITMAP'. + +1997-10-05 Motoyuki Kasahara + + * eb/error.h: Define EB_MAXLEN_ERROR_MESSAGE. + + * utils/src/ebfont.c (make_fonts): Use `eb_forward_narrow_character' + and `eb_forward_wide_character'. + Don't calculate character number by itself. + * eb/widealt.c: Add `eb_forward_wide_appendix_character' and + `eb_backward_wide_appendix_character'. + * eb/narwalt.c: Add `eb_forward_narrow_appendix_character' and + `eb_backward_narrow_appendix_character'. + * eb/widefont.c: Add `eb_forward_wide_character' and + `eb_backward_wide_character'. + * eb/narwfont.c: Add `eb_forward_narrow_character' and + `eb_backward_narrow_character'. + + * eb/font.c (eb_font): Set `eb_errno' when no current book + is set. + * eb/font.c (eb_font_list): Return -1 when an error occurs. + +1997-09-27 Motoyuki Kasahara + + * Version 1.0.2. + + * utils/src/ebfont.c (make_fonts): Fix error messages. + Append some information to the error message. + +1997-09-25 Motoyuki Kasahara + + * utils/lib/memset.c: Add this file. + + * configure.in (AC_REPLACE_FUNCS): Add `memset'. + + * eb/narwalt.c, eb/widealt.c: Define `SEEK_SET', `SEEK_CUR' and + `SEEK_END' if undefined. + + * eb/bitmap.c, eb/bitmap.h: Adapt to EB library. + Insert the `eb_' prefix to function names. + Set `eb_error' instead of syslog message when an error occurs. + * utils/lib/bitmap.h, utils/lib/bitmap.c: Move to the `eb/' + sub-directory. + + * eb/error.h, eb/error.c: Add the following error codes; + `EB_ERR_BAD_SIZE_BITMAP', `EB_ERR_FAIL_OPEN_BITMAP', and + `EB_ERR_FAIL_WRITE_BITMAP'. + + * lib/fakelog.c (fakelog): Fix a mistake in `%m' expansion. + Took `strcat' for `strcpy'. + +1997-09-18 Motoyuki Kasahara + + * lib/logpid.c (log_pid_file): Output the warning message + which tells pid file already exists only when the file is + regular file. + +1997-09-13 Motoyuki Kasahara + + * utils/src/version.h.in, utils/src/version.h: Delete these files + because `config.h' also defines $(VERSION). + +1997-09-06 Motoyuki Kasahara + + * Version 1.0.1. + + * eb/text.c (eb_text_internal): Fix the control sequence + processes. + The display control sequences `1f1a'...`1f1f' and `1fe0' take + an arguemnt only when the book is EPWING. + + * utils/src/ebappendix.in: Fix the calculation way of + $wide_len and $narrow_len. + +1997-09-03 Motoyuki Kasahara + + * eb/init.c (eb_initialize_catalog): Scan all eight filename + slots in the `catalogs' file even when an empty filename is + found. (for EPWING `Readers eiwa jiten', kenkyusha) + +1997-08-30 Motoyuki Kasahara + + * Use original version of automake-1.2. + + * doc/texinfo.tex: Delete this file. + + * eb/defs.h, eb/setword.c, eb/search.c, eb/init.c, havesearch.c: + Rename `EB_INDEX_WORD_ALPHA' to `EB_INDEX_WORD_ASIS', and + add `EB_INDEX_WORD_ALPHA' again. + Rename `EB_INDEX_ENDWORD_ALPHA' to `EB_INDEX_ENDWORD_ASIS', + and add `EB_INDEX_ENDWORD_ALPHA' again. + (for EPWING `Readers eiwa jiten', kenkyusha) + +1997-08-24 Motoyuki Kasahara + + * lib/bitmap.c, lib/bitmap.h: Add `write_bitmap_xbm', + `write_bitmap_xpm', and `write_bitmap_gif'. + + * eb/text.c (eb_text_internal): Fix a bug which causes + segmentation violation when `EB_HOOK_NARROW' is not defined. + + * eb/text.c (eb_text_internal): Parse control sequences described + in JIS X 4081-1996. + + * eb/defs.h, eb/search.c (eb_search_exact_word, eb_search_word, + eb_search_endword), eb/setword.c (eb_fix_word_jis): + Define the new word type `EB_WORD_KANJI'. + +1997-08-19 Motoyuki Kasahara + + * configure.in: Delete `AC_PROG_MAKE_SET'. + It is defined by `AM_INIT_AUTOMAKE'. + + * utils/src/Makefile.am (ebappendix): Generate `ebappendix.tmp' + from `ebappendix.in', and then copy `ebappendix.tmp' to `ebappendix'. + * utils/src/Makefile.am (CLEANFILES): Add `ebappendix.tmp'. + +1997-08-09 Motoyuki Kasahara + + * utils/src/ebappendix.in: Don't output a blank page in the + tail of the alternation text data. + +1997-08-05 Motoyuki Kasahara + + * Version 1.0. + + * doc/texinfo.tex: Get the file from texinfo-3.11. + +1997-07-19 Motoyuki Kasahara + + * Version 1.0beta2. + + * eb/init.c (eb_bind), eb/appendix.c (eb_bind_appendix): Get + disc and filename types before trying to open a language file + and a catalog file. + + * eb/io.c (eb_uint1, eb_uint2, eb_uint4), eb/io.h (eb_uint1, + eb_uint2, eb_uint4): Fix casts. + eb/io.c (eb_bcd2, eb_bcd4, eb_bcd6): Fix functions because + they returns an incorrect value. + + * eb/text.c (eb_text_internal): Call a hook function of + `EB_HOOK_END_REFERENCE', not `EB_HOOK_END_KEYWORD'. + + * eb/init.c, eb/language.c, eb/eb.h (eb_init_language): Split + into `eb_init_language' and `eb_init_messages'. + +1997-07-06 Motoyuki Kasahara + + * Use automake-1.2. + + * utils/src/ebinfo.c (output_information): Output title and + directory name of a subbook even when eb_set_subbook() to the + subbook is failed. + + * eb/error.c (messages): Modify error messages. + +1997-06-25 Motoyuki Kasahara + + * lib/getopt.c, lib/getopt1.c, lib/getopt.h: Get these files + from glibc-2.0.4. + +1997-06-18 Motoyuki Kasahara + + * Version 1.0beta1. + + * lib/fakelog.c, lib/fakelog.h: Don't include `varargs.h' for + ANSI C compilers even when `STDC_HEADERS' is undefined. + + * utils/src/ebfont.c: Add the missing `HAVE_STRCASECMP' check. + +1997-06-08 Motoyuki Kasahara + + * utils/src/ebappendix.in: Add a character code field with 2 + bytes in the beginning of an appendix file -- the format of + appendix data files is changed. + * eb/appendix.c (eb_initialize_appendix_subbook): Get a character + code from appendix data when initializing subbook. + + * eb/types.h (EB_Appendix_Subbook): Add the `charcode' member. + + * eb/narwalt.c (eb_narrow_character_text), eb/widealt.c + (eb_wide_character_text): Fix bugs in alternation text proceessing. + Character code of appendix data was examined by a wrong way. + +1997-06-07 Motoyuki Kasahara + + * configure.in: Add `AC_HEADER_STAT'. + + * lib/makedir.c, eb/filename.c: Use `S_ISDIR' instead of `S_IFDIR'. + Define `S_ISREG' and `S_ISDIR' if they aren't defined in . + Redefine `S_ISREG' and `S_ISDIR' if they are broken. diff --git a/lib/ebu/ChangeLog.1 b/lib/ebu/ChangeLog.1 new file mode 100644 index 0000000..9d33b12 --- /dev/null +++ b/lib/ebu/ChangeLog.1 @@ -0,0 +1,2222 @@ +2001-06-03 Motoyuki Kasahara + + * Version 3.0. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.0. + + * eb/error.h (EB_ERR_FAIL_OPEN_LANG, EB_ERR_FAIL_READ_LANG, + EB_ERR_FAIL_SEEK_LANG, EB_ERR_UNEXP_LANG, EB_ERR_NO_LANG, + EB_ERR_NO_MSG, EB_ERR_NO_CUR_LANG, EB_ERR_NO_SUCH_LANG, + EB_ERR_NO_SUCH_MSG): Removed. + * eb/error.c (error_messages): Ditto. + + * eb/book.c (eb_initialize_language): Not to return a value. + +2001-05-19 Motoyuki Kasahara + + * eb/book.c: Function declaration of eb_initialize_catalog() is + duplicated. Fixed. + * eb/book.c: + * eb/language.c, eb/message.c: Removed. + All functions in the files except for eb_initialize_languages() + are removed. + eb_initialize_languages() is renamed to eb_initialize_languages() + and it is now placed in eb/book.c. + * eb/defs.h (EB_MAX_LANGUAGE_NAME_LENGTH, EB_MAX_MESSAGE_LENGTH, + EB_MAX_LANGUAGES, EB_MAX_MESSAGES): Deleted. + * eb/defs.h (EB_Language_Code, EB_Message_Code, EB_Language_Struct): + Removed. + * eb/defs.h (EB_Book_Struct): Delete `language_file_name', + `language_zio', `language_count', `languages', `language_current', + and `messages' from the structure. + * eb/zipbook.c (eb_zip_book_eb): Find LANGUAGE file by itself. + * eb/unzipbook.c (eb_unzip_book_eb): Ditto. + * eb/zipinfobook.c (eb_zipinfo_book_eb): Ditto. + +2001-05-11 Motoyuki Kasahara + + * Version 3.0beta1. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.0beta1. + + * eb/Makefile, libebutils/Makefile, ebfont/Makefile, ebinfo/Makefile, + ebrefile/Makefile, ebzip/Makefile: Delete dependencies between *.c + and *.o. + +2001-05-09 Motoyuki Kasahara + + * m4/eb3.m4 (eb_LIB_EB3): Avoid other AC_TRY_LINK and CK_TRY_RUN + checks linking libeb.* to test program. + +2001-05-08 Motoyuki Kasahara + + * Makefile.am (ACLOCAL_AMFLAGS): Set the variable to `-I m4', not + `-I $(srcdir)/m4'. + +2001-05-02 Motoyuki Kasahara + + * ebzip/zipbook.c (ebzip_zip_book_epwing): Fix a bug that ebzip + doesn't compress gaiji files. + + * eb/narwfont.c (eb_initialize_narrow_font): Canonicalize font file + name before fix. + * eb/filename.c (eb_canonicalize_font_file_name): New function. + + * po-ebutils/Makefile.in (POTFILES): Updated. + Delete ebzip/filename.c and add ebrefile/ebrefile.c. + + * ebrefile/Makefile.am: Revised. Now ebrefile is written in C. + * ebrefile/ebrefile.c: New file. + * ebrefile/ebrefile.in: Deleted. + +2001-04-28 Motoyuki Kasahara + + * ebzip/filename.c, eb/filename.c: fix_path_name_suffix() is + renamed to eb_fix_path_name_suffix() and its definition is moved + from ebzip/filename.c to eb/filename.c. + * ebzip/filename.c: Removed. + * ebzip/Makefile.am (ebzip_SOURCES): Delete `filename.c'. + + * ebfont/Makefile.am (ebfont_LDADD): Fix the order of library to + be linked. + * ebinfo/Makefile.am (ebinfo_LDADD): Ditto. + * ebzip/Makefile.am (ebzip_LDADD): Ditto. + +2001-04-24 Motoyuki Kasahara + + * eb/setword.c (eb_fix_word): Fix word if the given word is for + keyword search or multi-search without candidates. Reported by + Kenichi Suto. + +2001-04-23 Motoyuki Kasahara + + * configure.in: Renamed to `configure.ac'. + +2001-04-13 Motoyuki Kasahara + + * eb/narwfont.c (eb_initialize_narrow_font): Fix a bug in reopen + a font file, reported by HASEGAWA Masafumi. + +2001-04-12 Motoyuki Kasahara + + * eb/subbook.c (eb_initialize_indexes): Fix calcuration of end + page number of an index. + + * m4/gettext.m4 (eb_GNU_GETTEXT): Ignore arguments. + * configure.in (eb_GNU_GETTEXT): Don't pass arguments to the macro. + + * eb/po: Move the directory to po-eb. + * po-eb/Makefile.in (top_builddir, subdir): Updated. + * po: Move the directory to po-ebutils. + * po-ebutils/Makefile.in (subdir): Updated. + + * configure.in (AC_OUTPUT): Delete `po/Makefile' and `eb/po/Makefile', + and add `po-eb/Makefile' and `po-ebutils/Makefile' instead. + * Makefile.am (SUBDIRS): Delete `po' and add `po-eb' and `po-ebutils' + instead. + * eb/Makefile.am (SUBDIRS): Deleted. + +2001-04-10 Motoyuki Kasahara + + * Version 3.0beta0. + + * ebzip/Makefile.am (noinst_HEADERS): Add `ebzip.h'. + + * gttest.po: Add header. + +2001-04-08 Motoyuki Kasahara + + * eb/defs.h (EB_Search_Struct): Add `index_id'. + * eb/subbook.c (eb_initialize_indexies): Also set index ID. + * eb/multi.c (eb_initialize_multi_search): Likewise. + * eb/setword.c (eb_fix_word): Copy `canonicalized_word' to `word' + if as-is or alphabet search. Don't modify `word' otherwise. + Don't modify `word' nor `canonicalized_word' if keyword or + candidate search. + * eb/setword.c (eb_set_multiword): Pass entry's search information + to `eb_fix_word', not to pass method's search information. + + * configure.in (AC_ARG_ENABLE): Use `[[' and `]]' in a help string. + + * Makefile.am (SUBDIRS): Delete `intl'. + * configure.in (AC_OUTPUT): Delete `intl/Makefile'. + * m4/gettext.m4 (AM_GNU_GETTEXT_HACKED): Renamed to `eb_GNU_GETTEXT', + and revised to support GNU gettext 0.10.36. Now, we inspect not only + libintl but also libiconv. Instead, we never use included libintl + sources. + + * configure.in (AM_INIT_AUTOMAKE): Set version to `3.0beta0'. + +2001-04-07 Motoyuki Kasahara + + * ebzip/zipbook.c (zip_book.c): Change type of the argument + `subbook_name_list'. + * ebzip/unzipbook.c (unzip_book.c): Ditto. + * ebzip/zipinfobook.c (zipinfo_book.c): Ditto. + +2001-04-06 Motoyuki Kasahara + + * eb/internal.h.in (EB_TEXT_OPTINAL_TEXT): Defined. + * eb/defs.h.in (EB_Search_Struct): add `end_page'. Rename + `index_page' to `start_page'. + * eb/subbook.c (eb_initialize_indexes): Also initialize and set + end pages of search methods. + * eb/text.c (eb_read_text): Set text mode to EB_TEXT_OPTINAL_TEXT + if the current position points to menu or copyright text. + +2001-04-05 Motoyuki Kasahara + + * po/Makefile.in (POTFILES): Add `ebzip/copyfile.c', + `ebzip/filename.c', `ebzip/unzipbook.c', `ebzip/unzipfile.c', + `ebzip/zipbook.c', `ebzip/zipfile.c', `ebzip/zipinfobook.c', + `ebzip/zipinfofile.c'. Delete `ebzip/ebzip1.c'. + + * eb/text.h (EB_HOOK_BEGIN_BITMAP, EB_HOOK_END_BITMAP): Renamed to + EB_HOOK_BEGIN_MONO_GRAPHIC and EB_HOOK_END_MONO_GRAPHIC. + * eb/text.h (EB_HOOK_BEGIN_BMP, EB_HOOK_END_BMP): Renamed to + EB_HOOK_BEGIN_COLOR_BMP and EB_HOOK_END_COLOR_BMP. + * eb/text.h (EB_HOOK_BEGIN_JPEG, EB_HOOK_END_JPEG): + EB_HOOK_BEGIN_COLOR_JPEG and EB_HOOK_END_COLOR_JPEG. + * eb/text.h (EB_HOOK_BEGIN_IN_JPEG, EB_HOOK_END_IN_JPEG): + EB_HOOK_BEGIN_IN_COLOR_JPEG and EB_HOOK_END_IN_COLOR_JPEG. + * eb/text.h (EB_HOOK_BEGIN_GRAY_GRAPHIC, EB_HOOK_END_GRAY_GRAPHIC): + Defined. + + * eb/internal.h.in (EB_BINARY_MONO_GRAPHIC, EB_BINARY_COLOR_GRAPHIC, + EB_BINARY_WAVE, EB_BINARY_MPEG, EB_BINARY_GRAY_GRAPHIC, + EB_BINARY_INVALID): Defined. + * eb/ebconfig.h (EB_Binary_Code): Defined. + * eb/defs.h (EB_SIZE_BINARY_CACHE_BUFFER): Change the value to 128. + * eb/defs.h (EB_Binary_Context_Struct): Add `code' and `width'. + * eb/binary.c (eb_set_binary_mono_graphic, eb_set_binary_gray_graphic, + eb_read_binary_mono_graphic): New functions. + +2001-03-25 Motoyuki Kasahara + + * eb/libintl_r.c, eb/libintl_r.h: Removed. + * eb/Makefile.am (libeb_la_SOURCES): Remove `libintl_r.c'. + * eb/Makefile.am (pkginclude_HEADERS): Remove `libintl_r.h'. + + * eb/error.h (EB_MAX_ERROR_MESSAGE_LENGTH): Deleted. + * eb/error.c (eb_error_message_r): Deleted. + +2001-03-20 Motoyuki Kasahara + + * m4/gettext.m4 (AM_GNU_GETTEXT_HACKED): Quote $INCLUDED_GETTEXT + and $ENABLE_NLS. + +2001-03-18 Motoyuki Kasahara + + * ebzip/zio.c (zio_reopen): Return -1 if `zio' context cannot be + re-used. + + * eb/book.c (eb_initialize_book): `book->language_zio' was not + initialized. Fixed. + + * eb/defs.h (EB_Font_Struct): Fix the length of the array `file_name'. + + * eb/narwfont.c (eb_initialize_narrow_font): Fix a bug that it cannot + open a font file correctly. + + * eb/zio.c (eb_reopen): Check strictly whehter the zio context is + ready to reopen. + + * eb/zio.h (ZIO_REOPEN, ZIO_EBZIP1, ZIO_EPWING, ZIO_EPWING6, + ZIO_SEBXA): Renumbered. + + * ebfont/ebfont.c: Don't include . + * ebinfo/ebinfo.c: Ditto. + * ebfont/ebfont.c (main): Don't call set_fakelog_name(), + set_fakelog_mode() nor set_fakelog_level(). + * ebinfo/ebinfo.c (main): Ditto. + + * libebutils/ebutils.c (output_try_help): Add the argument + `invoked_name'. + * libebutils/ebutils.c (output_version): Add the arguments + `program_name' and `program_version'. + * libebutils/ebutils.c (parse_subbook_name_argument): Add the + argument `invoked_name'. + * libebutils/ebutils.c: Delete definition of `program_name', + `program_version' and `invoked_name'. + * ebfont/ebfont.c: Define `program_name', `program_version' and + `invoked_name'. + * ebinfo/ebinfo.c: Ditto. + * ebfont/ebfont. (main): Don't initialize `program_name'. + * ebinfo/ebinfo.c (main): Ditto. + + * ebfont/ebfont.c (subbook_list, subbook_count): + Changed to `static' variables. + * ebfont/ebfont.c (font_list, fount_count): Ditto. + * ebfont/ebfont.c (image_list, image_count): Ditto. + + * ebfont/ebfont.c (parse_image_argument): The order of arguments + is changed. + * ebfont/ebfont.c (parse_font_argument): Ditto. + + * libebtuils/ebutils.c (find_subbook): Fix a bug. The function + returns invalid error code if an error has occured. + + * ebzip/copyfile.c: Include "eb.h", "error.h" and "internal.h". + + * ebzip/copyfile.c (copy_file): Don't `stat' the input file. + + * ebzip/copyfile.c (copy_files_in_directory): Don't output an error + message if input directory doesn't exists. + * ebzip/copyfile.c (copy_files_in_directory): Output an error message + if failed to open the input directory. + * ebzip/copyfile.c (copy_files_in_directory): Skip a file entry + if it is not regular file. + + * ebzip/ebzip.c: Add `-s' and `--skip-content' options. + * ebzip/ebzip.c (ebzip_skip_flag_font, ebzip_skip_flag_graphic, + ebzip_skip_flag_movie, ebzip_skip_flag_sound): New variables. + * ebzip/ebzip.h (EBZIP_DEFAULT_SKIP_FONT, EBZIP_DEFAULT_SKIP_GRAPHIC, + EBZIP_DEFAULT_SKIP_MOVIE, EBZIP_DEFAULT_SKIP_SOUND): New cpp macros. + * ebzip/ebzip.c (parse_skip_content_argument): New function. + + * ebzip/ebzip.h (EBZIP_SUFFIX_NONE, EBZIP_SUFFIX_EBZ, + EBZIP_SUFFIX_ORG): New cpp macros. + + * ebzip/filename.c (compose_unfixed_path_name): Renamed to + fix_path_name_suffix() and revised. + * ebzip/filename.c (compose_unfixed_path_name2, + compose_unfixed_path_name3, compose_fixed_path_name, + compose_fixed_path_name2, compose_fixed_path_name3): Deleted. + + * ebzip/zipbook.c (ebzip_zipbook): In order to compose a file name, + use eb_find_file_name(), eb_compose_file_name(), + eb_compose_file_name2(), eb_compose_file_name3() and + fix_path_name_suffix(). + * ebzip/unzipbook.c (ebzip_unzip_book): Ditto. + * ebzip/zipinfobook.c (ebzip_zipinfo_book): Ditto. + + * ebzip/zipbook.c (ebzip_zip_book): Support movie files. + * ebzip/unzipbook.c (ebzip_unzip_book): Ditto. + +2001-03-12 Motoyuki Kasahara + + * configure.in (AC_PROG_CC, AC_AIX, AC_MINIX, AC_PROG_LIBTOOL): + Check AC_PROG_CC, (AC_AIX + AC_MINIX) and AC_PROG_LIBTOOL in that + order. + + * eb/filename.c (eb_fix_file_name, eb_fix_file_name2, + eb_fix_file_name3): Removed. + * eb/filename.c (eb_find_file_name, eb_find_file_name2, + eb_find_file_name3): Added. + * eb/filename.c (eb_compose_path_name, eb_compose_path_name2, + eb_compose_path_name3): Revised. + * eb/internal.h.in (EB_FILE_NAME_START, EB_FILE_NAME_SOUND, + EB_FILE_NAME_CATALOG, EB_FILE_NAME_LANGUAGE, EB_FILE_NAME_VTOC, + EB_FILE_NAME_WELCOME, EB_FILE_NAME_CATALOGS, EB_FILE_NAME_HONMON, + EB_FILE_NAME_HONMON2, EB_FILE_NAME_HONMONG, EB_FILE_NAME_HONMONS, + EB_FILE_NAME_APPENDIX, EB_FILE_NAME_FUROKU): Deleted. + * eb/internal.h.in (EB_SUFFIX_NONE, EB_SUFFIX_EBZ, EB_SUFFIX_ORG): + Deleted. + + * eb/appendix.c (eb_initialize_appendix_catalog): + Use eb_find_file_name() to find a file to open. + * eb/appsub.c (eb_set_appendix_subbook_eb): Ditto. + * eb/appsub.c (eb_set_appendix_subbook_epwing): Ditto. + * eb/binary.c (eb_set_binary_mpeg): Ditto. + * eb/book.c (eb_initialize_catalog): Ditto. + * eb/language.c (eb_initialize_languages, eb_set_language): Ditto. + * eb/message.c (eb_initialize_messages): Ditto. + * eb/narwfont.c (eb_initialize_narrow_font): Ditto. + * eb/subbook.c (eb_set_subbook_eb, eb_set_subbook_epwing): Ditto. + + * eb/defs.h (EB_Font_Struct): Delete unused member `available'. + * eb/defs.h (EB_Book_Struct): Add the member `language_file_name'. + * eb/defs.h (EB_Book_Struct): Add `language_file_name' and + `language_zio'. + +2001-02-26 Motoyuki Kasahara + + * eb/appsub.c (eb_initialize_appendix_subbook, + eb_set_appendix_subbook): fix `data' sub-dirtory name in + eb_set_appendix_subbook(), reported by HASEGAWA Masafumi. + +2001-02-25 Motoyuki Kasahara + + * m4/eb3.m4 (AC_ARG_WITH): Fix typo. + + * m4/utimbuf.m4: Rename variable prefix from `ax_cv' to `ac_cv'. + +2001-02-20 Motoyuki Kasahara + + * check gettext() in libintl , and then in libc. + +2001-02-19 Motoyuki Kasahara + + * ebzip/filename.c (compose_unfixed_path_name2): Enclose "%s/%s" + with F_(). + +2001-02-18 Motoyuki Kasahara + + * ebzip/filename.c (compose_out_path_name, compose_out_path_name2, + compose_out_path_name3): Rename prefix from `compose_out_' to + `compose_unfixed_'. + + * ebzip/filename.c (compose_existent_path_name, + compose_existent_path_name2, compose_existent_path_name3): Rename + prefix from `compose_exisntent_' to `compose_fixed_'. + + * lib/text.c (eb_read_text_internal): Fix ISO 8859-1 code point range, + reported by HASEGAWA Masafumi. + +2001-02-12 Motoyuki Kasahara + + * ebzip/ebzip.c: Split the file into 9 files; eb/copyfile.c, + eb/ebzip.c, eb/ebzip.h, eb/unzipbook.c, eb/unzipfile.c, eb/zipbook.c, + eb/zipfile.c, eb/zipinfobook.c and eb/zipinfofile.c. + + * ebzip/zipbook.c (zip_book, zip_book_eb, zip_book_epwing): + Add the prefix `ebzip_', and revised. + * ebzip/zipfile.c (zip_file): Ditto. + * ebzip/unzipbook.c (unzip_book, unzip_book_eb, unzip_book_epwing): + Ditto. + * ebzip/unzipfile.c (unzip_file): Ditto. + * ebzip/zipinfobook.c (zipinfo_book, unzip_book_eb, + unzip_book_epwing): Ditto. + * ebzip/zipinfofile.c (zipinfo_file): Ditto. + + * ebzip/ebzip.h (zip_level, keep_flag, quiet_flag, test_flag, + overwirte_mode): Add the prefx `ebzip_'. + + * libebutils/Makefile.am (INCLUDES): Remove `-DUSE_FAKELOG'. + * libebutils/Makefile.am (noinst_HEADERS): Remove `fakelog.h'. + * libebutils/Makefile.am (libebutils_a_SOURCES): Remove `fakelog.c'. + * libebutils/fakelog.c, libebutils/fakelog.h: Removed. + * libebutils/makedir.c: Don't use fakelog. + + * libebutils/makedir.c (make_missing_directory_chaing): Removed. + +2001-02-11 Motoyuki Kasahara + + * m4/gettext.m4 (AM_GNU_GETTEXT_HACKED): Find gettext() in libc. + + * eb/search.c (eb_hit_list_keyword, eb_hit_list_multi): Comparison + Group entry with `context->word', not `context->canonicalized_word'. + Pill Book 2001 needs this fix. + + * eb/configure.in (AM_INIT_AUTOMAKE): Set version to `3.0alpha5'. + +2001-02-09 Motoyuki Kasahara + + * eb/filename.c (eb_canonicalize_path_name): Fix typo, reported + by Satomi Igi. + + * eb/internal.h.in (EB_SUFFIX_ORG): Defined. + * eb/subbook.c (eb_set_subbook_epwing): Try to open `HONMON2.ORG'. + * eb/subbook.c (eb_set_subbook_epwing): Assume HONMON(.EBZ) file + has graphic and sound data regardless of EPWING version. + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Support + `HONMONS', `HONMONG' and `HONMON2.ORG' files. + * ebzip/ebzip.c (zip_book): When compress HONMON2, output the result + to HONMON2.EBZ, not `HONMON.EBZ'. + * ebzip/ebzip.c (unzip_book): When uncompress HONMON2.EBZ, output the + result to `HONMON2.ORG', not `HONMON2' or `HONMON'. + +2001-02-06 Motoyuki Kasahara + + * zlib/Makefile.am (AC_CHECK_FUNCS): Fix typo (vnsprintf -> vsnprintf). + Reported by Takashi NEMOTO. + * m4/gettext.m4: When tests, use the locale name `en_US' instead of + `en'. Reported by Takashi NEMOTO. + * libebutils/Makefile.am (INCLUDES): Use @INTLINCS@, not `-I../intl' + Reported by Takashi NEMOTO. + * intl/libgettext.h: Added again. Since `intl/bindtextdomain.c' + includes the file. Reported by Takashi NEMOTO. + +2001-02-03 Motoyuki Kasahara + + * Version 3.0alpha4. + + * po/Makefile.in, eb/po/Makefile (DISTFILES): Distribute + `Makefile.in', not `Makefile.in.in'. Add `$(CATALOGS)'. + * po/Makefile.in, eb/po/Makefile (distclean): Don't delete `Makefil.in' + itself. + * eb/text.c (eb_read_text_internal): Dispatch the BEGIN_WAVE hook. + +2001-01-31 Motoyuki Kasahara + + * eb/defs.h (EB_Appendix_Subbook_Struct): Rename `appendix_zio' to + `zio'. + * eb/defs.h (EB_Font_Struct): Rename `font_zio' to `zio'. + + * eb/graphic.c: Removed. + * eb/Makefile.am (libeb_la_SOURCES): Remove `eb/graphic.c'. + * eb/defs.h (EB_Subbook_Struct): The member `graphic' is removed. + * eb/ebinfo.c (output_information): Delete `graphic search' + information. + + * eb/defs.h (EB_Subbook_Struct): The member `sound' is added. + * eb/subbook.c (eb_initialize_indexes): Recognize 0xd8 as sound data. + + * eb/defs.h (EB_Binary_Context_Struct): Add the members; + `cache_buffer', `cache_length' and `cache_offset'. + * eb/binary.c (eb_set_binary_wave): Add the argument `type'. + * eb/binary.c (eb_est_binary_wave, eb_set_binary_color_graphic, + eb_set_binary_mpeg, eb_read_binary, eb_unset_binary): Update cache + data. + + * eb/Makefile.am (pkginclude_HEADERS): Add `zio.h'. + +2001-01-28 Motoyuki Kasahara + + * ebfont/ebfont.c (make_subbook_size_image_fonts): Fix typo. + + * eb/uint.c: Renamed to `eb/bcd.c'. + * eb/uint.c: Delete definition of eb_uint1(), eb_uint2(), eb_uint4() + and eb_uint4_le(). + + * eb/zio.h: New file. + * eb/defs.h (EB_Zip_Code ,EB_Huffman_Node): Move declaration of + these types to `eb/zio.h'. + * eb/defs.h (EB_SIZE_EBZIP_HEADER, EB_SIZE_EBZIP_MARGIN, + EB_MAX_EBZIP_LEVEL, EB_HUFFMAN_NODE_INTERMEDIATE, + EB_HUFFMAN_NODE_EOF, EB_HUFFMAN_NODE_LEAF8, EB_HUFFMAN_NODE_LEAF16, + EB_HUFFMAN_NODE_LEAF32, EB_ZIO_NONE, EB_ZIO_EBZIP1, EB_ZIO_EPWING, + EB_ZIO_EPWING6, EB_ZIO_SEBXA, EB_ZIO_INVALID): Move definition of + these cpp macros to `eb/zio.h'. + * eb/zio.c: Include `eb/zio.h'. + * eb/defs.h: Include `eb/zio.h'. + + * eb/zio.h (EB_Zip): Renamed to `Zio'. + * eb/zio.h (EB_Zip_Code): Renamed to `Zio_Code'. + * eb/defs.h (EB_SIZE_EBZIP_HEADER): Renamed to `ZIO_SIZE_EBZIP_HEADER'. + * eb/defs.h (EB_SIZE_EBZIP_MARGIN): Renamed to `ZIO_SIZE_EBZIP_MARGIN'. + * eb/defs.h (EB_MAX_EBZIP_LEVEL): Renamed to `ZIO_MAX_EBZIP_LEVEL'. + * eb/defs.h (EB_HUFFMAN_NODE_INTERMEDIATE): Renamed to + `ZIO_HUFFMAN_NODE_INTERMEDIATE'. + * eb/defs.h (EB_HUFFMAN_NODE_EOF): Renamed to `ZIO_HUFFMAN_NODE_EOF'. + * eb/defs.h (EB_HUFFMAN_NODE_LEAF8): Renamed to + `ZIO_HUFFMAN_NODE_LEAF8'. + * eb/defs.h (EB_HUFFMAN_NODE_LEAF16): Renamed to + `ZIO_HUFFMAN_NODE_LEAF16'. + * eb/defs.h (EB_HUFFMAN_NODE_LEAF32): Renamed to + `ZIO_HUFFMAN_NODE_LEAF32'. + * eb/defs.h (EB_ZIO_NONE): Renamed to `ZIO_NONE'. + * eb/defs.h (EB_ZIO_EBZIP1): Renamed to `ZIO_EBZIP1'. + * eb/defs.h (EB_ZIO_EPWING): Renamed to `ZIO_EPWING'. + * eb/defs.h (EB_ZIO_EPWING6): Renamed to `ZIO_EPWING6'. + * eb/defs.h (EB_ZIO_SEBXA): Renamed to `ZIO_SEBXA'. + * eb/defs.h (EB_ZIO_INVALID): Renamed to `ZIO_INVALID'. + + * eb/unebzip.c, eb/unzepwng.c, eb/unzsebxa.c: Removed. + The contents of those files are moved to `eb/zio.c'. + + * eb/defs.h (EB_Appendix_Subbook_Struct): Rename `appendix_zip' to + `appendix_zio'. + * eb/defs.h (EB_Appendix_Subbook_Struct): Remove `appendix_file'. + * eb/defs.h (EB_Font_Struct): Rename `font_zip' to `font_zio'. + * eb/defs.h (EB_Font_Struct): Delete `font_file'. + * eb/defs.h (EB_Subbook_Struct): Rename `text_zip' to `text_zio'. + * eb/defs.h (EB_Subbook_Struct): Delete `text_file'. + * eb/defs.h (EB_Subbook_Struct): Rename `graphic_zip' to `graphic_zio'. + * eb/defs.h (EB_Subbook_Struct): Delete `graphic_file'. + * eb/defs.h (EB_Subbook_Struct): Rename `sound_zip' to `sound_zio'. + * eb/defs.h (EB_Subbook_Struct): Delete `sound_file'. + * eb/defs.h (EB_Subbook_Struct): Add `movie_zip'. + * eb/defs.h (EB_Binary_Context_Struct): Delete `file'. + * eb/defs.h (EB_Binary_Context_Struct): Rename `zip' to `zio'. + + * eb/zio.c: Don't include `ebconfig.h', `errorh.h' nor `internal.h'. + * eb/zio.c (eb_zinitialize): Renamed to `zio_initialize_library'. + * eb/zio.c (eb_zfinalize): Renamed to `zio_finalize_library'. + * eb/zio.c (eb_zopen): Renamed to `zio_open'. + * eb/zio.c (eb_zopen_none): Renamed to `zio_open_none'. + * eb/zio.c (eb_zopen_ebzip): Renamed to `zio_open_ebzip'. + * eb/zio.c (eb_zopen_epwing): Renamed to `zio_open_epwing'. + * eb/zio.c (eb_zopen_epwing6): Renamed to `zio_open_epwing6'. + * eb/zio.c (eb_zopen_sebxa): Renamed to `zio_open_sebxa'. + * eb/zio.c (eb_zclose): Renamed to `zio_close'. + * eb/zio.c (eb_zlseek): Renamed to `zio_lseek'. + * eb/zio.c (eb_zread): Renamed to `zio_read'. + * eb/zio.c (eb_zread_ebzip): Renamed to `zio_read_ebzip'. + * eb/zio.c (eb_zread_epwing): Renamed to `zio_epwing'. + * eb/zio.c (eb_make_epwing_huffman_tree): Renamed to + `zio_make_epwing_huffman_tree'. + * eb/zio.c (eb_unzip_slice_ebzip1): Renamed to + `zio_unzip_slice_ebzip1'. + * eb/zio.c (eb_unzip_slice_epwing): Renamed to + `zio_unzip_slice_epwing'. + * eb/zio.c (eb_unzip_slice_epwing6): Renamed to + `zio_unzip_slice_epwing6'. + * eb/zio.c (eb_initialize, eb_finalize, eb_reopen, eb_file): + New functions. + * eb/zio.c (eb_read_all): Renamed to `zio_read_raw'. + + * eb/zio.c (Zio): Add the member `file'. + + * eb/zio.c (zio_close, zio_lseek, zio_read, zio_read_ebzip, + eb_zread_epwing, eb_zread_sebxa): Delete 2nd argument `file'. + + * eb/zio.c (zio_uint1, zio_uint2, zio_uint4): Defined. + Don't use eb_uint1, eb_uint2 or zio_uint4. + + * eb/appendix.c (eb_finalize_appendix): Finalize `appendix_zio' + in all subbooks. + * eb/book.c (eb_finalize_book): Ditto. + + * eb/appendix.c (eb_initialize_appendix_catalog): Use zio to + open a catalog file. + * eb/book.c (eb_initialize_catalog): Ditto. + + * eb/book.c (eb_fix_misleaded_book): New function. + * eb/book.c (eb_initialize_catalog): Fix chachacter-code information + by calling eb_fix_misleaded_book(). + + * eb/appendix.c (eb_initialize_catalog): Initialize `appendix_zio' in + an EB_Appendix_Subbook Object. + * eb/book.c (eb_initialize_catalog): Initialize `text_zio', + `graphic_zio', `sound_zio and movie_zio' in an EB_Book_Subbook object. + +2001-01-27 Motoyuki Kasahara + + * eb/error.h: Rivse error codes. + * eb/error.c (error_messages): Revised. + * eb/binary.c (eb_set_binary_mpeg): Fix a bug in initialization of + binary context. + * eb/filename.c (eb_decompose_movie_file_name): New function. + * eb/filename.c (eb_compose_movie_file_name): Don't believe file name + consists of 8 characters. + + * eb/text.c (SIZE_FEW_REST): Change the value from 40 to 48. + * eb/text.c (eb_read_text_internal): BEGIN_MPEG hook was not called + correctly. Fixed. + + * eb/subbook.c (eb_set_subbook_epwing): Don't suppose graphic or + sound data are in HONMON file if EPWING version is 5 or later. + +2001-01-23 Motoyuki Kasahara + + * eb/error.h (EB_ERR_BAD_FILE_NAME, EB_ERR_BAD_DIR_NAME): Add these + error codes. + + * eb/filename.c (eb_fix_directory_name, eb_fix_directory_name2, + eb_fix_file_name, eb_fix_file_name2, eb_fix_file_name3, + eb_compose_path_name, eb_compose_path_name2, eb_compose_path_name3): + eb_compose_movie_file_name): Return EB_Error_Code, not {0 or -1}. + +2001-01-21 Motoyuki Kasahara + + * eb/error.h, eb/error.c (EB_ERR_FAIL_OPEN_BIANRY, + EB_ERR_FAIL_READ_BINARY, EB_ERR_FAIL_SEEK_BINARY, EB_ERR_UNEXP_BINARY, + EB_ERR_NO_CUR_BINARY, EB_ERR_NO_SUCH_BINARY): Add these error codes. + + * eb/binary.h: New file. + * eb/Makefile.am (pkginclude_HEADERS): Add binary.h. + + * eb/text.h, eb/internal.h.in: Move function declaration of + eb_uint1(), eb_uint2(), eb_uint4(), eb_bcd2(), eb_bcd4() and eb_bcd6() + from eb/text.h to eb/internal.h.in. + +2001-01-20 Motoyuki Kasahara + + * configure.in, m4/gettext.m4 (AM_GNU_GETTEXT): renamed to + AM_GNU_GETTEXT_HACKED. + * m4/gettext.m4: Use the language `en' instead of `fr' in the test + program. + + * eb/defs.h (EB_Subbook_Struct): Fix array length of `text_file_name', + `graphic_file_name' and `sound_file_name'. + + * eb/internal.h.in: Declare eb_intialize_binary(). + * eb/binary.c: Added. + * eb/subbook.c: Call eb_initialize_binary() to initialize a binary + context. + + * eb/Makefile.am (libeb_la_SOURCES): Add `binary.c'. + +2001-01-17 Motoyuki Kasahara + + * eb/text.c (EB_MAX_ARGV): Change the value from 4 to 6. + + * eb/filename.c (eb_compose_movie_file_name): Defined. + + * ebzip/ebzip.c (zip_eb_book): Renamed to zip_book_eb(). + * ebzip/ebzip.c (zip_epwing_book): Renamed to zip_book_epwing(). + * ebzip/ebzip.c (unzip_eb_book): Renamed to unzip_book_eb(). + * ebzip/ebzip.c (unzip_epwing_book): Renamed to unzip_book_epwing(). + * ebzip/ebzip.c (zipinfo_eb_book): Renamed to zipinfo_book_eb(). + * ebzip/ebzip.c (zipinfo_epwing_book): Renamed to + zipinfo_book_epwing(). + + * eb/defs.h (EB_Subbook_Struct): Add the following members; + `graphic_file', `graphic_zip', `sound_file' and `sound_zip'. + * eb/internal.h.in (EB_FILE_NAME_HONMONG, EB_FILE_NAME_HONMONS): + Defined. + * eb/subbook.c (eb_set_subbook): Split this function into + eb_set_subbook(), eb_set_subbook_eb() and eb_set_subbook_epwing(). + * eb/subook.c (eb_set_subbook_epwing): Try opening graphic and sound + files. + + * eb/uint.c, eb/internal.h.in (eb_uint4_le): Defined. + + * eb/defs.h (EB_Binary_Context_Struct, EB_Binary_Context): Defined. + * eb/defs.h (EB_Book_Struct): Add the member `binary_context'. + + * eb/text.h: (EB_HOOK_BEGIN_BITMAP, EB_HOOK_END_BITMAP, + EB_HOOK_BEGIN_BMP, EB_HOOK_BEGIN_JPEG, EB_HOOK_END_COLOR_GRAPHIC, + EB_HOOK_BEGIN_IN_BMP, EB_HOOK_BEGIN_IN_JPEG, + EB_HOOK_END_IN_COLOR_GRAPHIC, EB_HOOK_BEGIN_WAVE, EB_HOOK_END_WAVE, + EB_HOOK_BEGIN_MPEG, EB_HOOK_END_MPEG): Defined. + * eb/defs.h (EB_NUMBER_OF_HOOKS): Updated. + + * eb/zio.c (zio_reopen): become `static' function. + * eb/zio.h (ZIO_REOPEN): Added. + * eb/zio.c (zio_open): Recognize the compression mode `ZIO_REOPEN'. + * eb/zio.c (zio_mode): New function. + + * eb/book.c (eb_filenalize_book): Don't call zio_finalize() for + `movie_zio'. Call zio_finalize() for `language_zio'. + +2001-01-16 Motoyuki Kasahara + + * eb/internal.h (EB_Subbook_Struct): Remove the member + `stream_directory_name'. + * eb/subbook.c (eb_set_subbook): Don't initialize + `subbook->stream_directory_name'. + + * eb/text.h (EB_HOOK_STOP_CODE, EB_HOOK_BEGIN_BITMAP, + EB_HOOK_END_BITMAP, EB_HOOK_BEGIN_BMP, EB_HOOK_BEGIN_JPEG, + EB_HOOK_END_IMAGE, EB_HOOK_BEGIN_IN_BMP, EB_HOOK_BEGIN_IN_JPEG, + EB_HOOK_END_IN_IMAGE, EB_HOOK_BEGIN_WAVE, EB_HOOK_END_WAVE, + EB_HOOK_BEGIN_MPEG, EB_HOOK_END_MPEG): Define new text hooks. + + * eb/text.c (SIZE_FEW_REST): Change the value from 16 to 40. + +2001-01-14 Motoyuki Kasahara + + * eb/defs.h (EB_Binary_Context_Struct, EB_Binary_Context, + EB_Binary_Code): Defined. + +2001-01-11 Motoyuki Kasahara + + * m4/gettext.m4 (AM_GNU_GETTEXT): Set LC_ALL to `fr', and set LANGUAGE + to empty string. + + * ebzip/ebzip.c (zip_epwing_book, unzip_epwing_book, + zipinfo_epwing_book): Fix filenames in error messages. + +2001-01-03 Motoyuki Kasahara + + * lib/strcasecmp.c (strncasecmp): Fix a bug that the function returns + wrong result when comparison length is 0. + * libebutils/strcasecmp.c (strncasecmp): Ditto. + + * eb/Makefile.am (SUBDIRS): Don't use @POSUB@. + +2001-01-02 Motoyuki Kasahara + + * configure.in (AC_ARG_WITH): Fix a bug that configure cannot + recognize --with-included-zlib option. Reported by Kazuhiko. + +2001-01-01 Motoyuki Kasahara + + * po/Makefile.in.in, eb/po/Makefile.in.in: Use `ENABLE_NLS', not + `USE_NLS'. + + * eb/Makefile.am (SUBDIRS): Set to `po', not `@POSUB@'. + +2000-12-31 Motoyuki Kasahara + + * intl/Makefile.am (noinst_HEADERS): Remove `libgettext.h'. Add + `libintl.h' instead. + * intl/Makefile.am (BUILT_SOURCES): Remove libintl.h. + * intl/Makefile.am (DISTCLEANFILES): Remove libintl.h. + + * po/Makefile.in.in, eb/po/Makefile.in.in (ja_JP.SJIS): Remove the + target. + + * gttest.po, gttest.mo: New files. + * Makefile.am (EXTRA_DIST): Add `gttest.mo' and `gttest.po'. + * Makefile.am (gttest.mo): New target. + * m4/gettext.m4: Fully revised. + * configure.in (AC_OUTPUT): Fix an output file name. + +2000-12-30 Motoyuki Kasahara + + * libebutils/Makefile.am (EXTRA_DIST): Delete `memset.c', `strerror.c' + and `strcasecmp.c'. Automake recognizes them as distirbution files. + +2000-12-29 Motoyuki Kasahara + + * Makefile.am (ACLOCAL_AMFLAGS): Defined. + + * m4/ssizet.m4 (AX_TYPE_SSIZE_T): Renamed to `AC_TYPE_SSIZE_T'. + * m4/utimbuf.m4 (AX_HAVE_STRUCT_UTIMBUF): Renamed to + `AC_STRUCT_UTIMBUF'. + * configure.in: Use new macro names described above. + + * m4/libtool.m4: New file. + (This file will be removed when a bug in libtool.m4 distributed + with Libtool is fixed.) + * m4/Makefile.am (EXTRA_DIST): Add `libtool.m4'. + +2000-12-23 Motoyuki Kasahara + + * Use autoconf 2.49b, automake 1.4b, and libtool 1.3c (checkout + 2000-12-18). + * depcomp: New file. + + * configure.in: Call `AX_TYPE_SSIZE_T' instead of + `AC_CHECK_TYPE(ssize_t, int)'. + + * lib/fakelog.c (fakelog): Use memcpy() instead of strcpy() to + expand `%m'. + + * m4/Makefile.am, m4/eb3.m4, m4/gettext.m4, m4/lcmessage.m4, + m4/ssize_t.m4, m4/utimbuf.m4: New files. + * configure.in (AC_OUTPUT): Add `m4/Makefile.in'. + * Makefile.am (SUBDIRS): Add `m4'. + + * acconfig.h, acinclude.m4: Removed. + + * intl/Makefile.am, eb/Makefile.am, libebutils/Makefile.am, + ebfont/Makefile.am, ebinfo/Makefile.am, ebzip/Makefile.am, + doc/Makefile.am, doc-ja/Makefile.am: + Remove @MAKE_SET@. + +2000-12-06 Motoyuki Kasahara + + * Version 3.0alpha3. + + * ebzip/Makefile.am (INCLUDES): Delete `-I$(top_srcdir)'. + * ebzip/Makefile.am (INCLUDES): Add `-I../eb' and `-I$(top_srcdir)/eb'. + * ebzip/ebzip.c: Include `*.h' in the `../eb' directory, not `eb/*.h'. + +2000-11-28 Motoyuki Kasahara + + * eb/subbook.c (eb_subbook_directory, eb_subbook_directory2): + All letters in a directory name are converted to lower letters + that were converted to upper letters. + * libebutils/ebutils.c (parse_subbook_name_argument): Ditto. + +2000-11-23 Motoyuki Kasahara + + * intl/Makefile.am: Don't make a symbolc link `libintl.h'. + + * eb/font.c (eb_set_font): Set font files to -1. + * eb/font.c (eb_unset_font): Check file descriptor before close + the file. + +2000-11-18 Motoyuki Kasahara + + * configure.in (AC_OUTPUT_COMMANDS): Copy `intl/libgettext.h' to + `intl/libintl.h'. + + * eb/filename.c, ebzip/filename.c, ebfont/ebfont.c: Define the macro + `F_' to resolve path notation problem between UNIX and DOS. + + * ebconfig.h: New file. + * appendix.c, appsub.c, bitmap.c, book.c, copyright.c, eb.c, + endword.c, error.c, exactword.c, filename.c, font.c, graphic.c, + hook.c, jacode.c, keyword.c, language.c, lock.c, match.c, menu.c, + message.c, multi.c, narwalt.c, narwfont.c, search.c, setword.c, + stopcode.c, subbook.c, text.c, uint.c, unzebzip.c, unzepwing.c, + unzsebxa.c, widefont.c, word.c, zio.c: + Include `ebconfig.h'. + Dont' include public headers nor define public macros. + * Makefile.am (noinst_HEADERS): Add `ebconfig.h'. + + * eb/search.c (eb_and_hit_lists): In its prototype declaration, + type of the 4th argument is changed from (EB_Hit [N1][]) to + (EB_Hit [][N2]). + +2000-11-14 Motoyuki Kasahara + + * Makefile.am (CLEANFILES): Add stamp-widealt-h, stamp-widefont-h, + widealt.c and widefont.c. + * Makefile.am (BUILT_SOURCES): Add widealt.c and widefont.c. + * Makefile.am (widealt.c, stamp-widealt-h): Add the targets. + * Makefile.am (widefont.c, stamp-widefont-h): Add the targets. + * widealt.c, widefont.c: Generated from narwalt.c and narwfont.c. + +2000-11-08 Motoyuki Kasahara + + * eb/text.c (eb_read_text_internal): + * eb/text.h (EB_HOOK_END_CANDIDATE): Split this hook into + EB_HOOK_END_CANDIDATE_GROUP and EB_HOOK_END_CANDIDATE_LEAF. + * eb/text.h (EB_HOOK_BEGIN_SOUND, EB_HOOK_END_SOUND, + EB_HOOK_BEGIN_PICTURE, EB_HOOK_END_PICTURE): Removed temporary. + * eb/defs.h (EB_NUMBER_OF_HOOKS): Updated. + + * eb/defs.h (EB_Text_Context): Add the members `candidate' and + `is_candidate'. + * eb/text.c (eb_current_candidate): New function. + + * eb/text.c (eb_read_internal): Manage the current candidate. + * eb/text.c (eb_seek_text, eb_read_text, eb_read_heading): + Clear the current candidate. + + * eb/text.c (eb_seek_text): Complain if the given position is not + valid. + +2000-11-07 Motoyuki Kasahara + + * eb/hook.c (euc_a1_to_ascii_table, euc_a1_to_ascii_table): + The tables start with the character 0xa0 and end with 0xff. + * eb/hook.c (EUC_TO_ASCII_TABLE_START, EUC_TO_ASCII_TABLE_END): + Defined + * eb/hook.c (eb_hook_euc_to_ascii): Use new convertion tables. + + * eb/multi.c (eb_multi_entry_candidates): Return EB_ERR_NO_CANDIDATES + not EB_ERR_NO_SUCH_SEARCH if the multi entry doesn't have candidates. + + * eb/error.c (EB_ERR_STOP_CODE): Defined. + * eb/error.c (EB_ERR_HOOK_WORKSPACE): Removed. + * eb/hook.c (eb_hook_stop_code): Return EB_ERR_STOP_CODE when the + stop code is found. + * eb/text.c (eb_read_text_internal): Return only when STOP_CODE hook + function returns EB_ERR_STOP_CODE. + +2000-11-06 Motoyuki Kasahara + + * eb/text.c (eb_read_text_internal): `argv' must be `unsigned int []'. + * eb/text.c (eb_read_text_internal): Set MSB of argv[0] passed to + NARROW_JISX0208, WIDE_JISX0208, GB2312 hooks. + +2000-11-04 Motoyuki Kasahara + + * eb/text.c: Include . + +2000-11-03 Motoyuki Kasahara + + * eb/defs.h (EB_Text_Context_Strcut): + The member `work_buffer', `work_length' and `work_step' are removed. + The member `out', `out_rest_length', `unprocessed', `in_step', + `out_step' and `unprocessed_size' are added. + * eb/text.c (eb_read_text_internal): `text_p' and `text_rest_length' + are now recorded in `book->text_context.out' and + `book->text_context.out_rest_length'. + * eb/defs.h (EB_MAX_WORK_LENGTH): Removed. + + * eb/text.c (eb_read_text_internal): Don't write `\0' on the tail + of text buffer. + + * eb/text.c (eb_write_text_byte1, eb_write_text_byte2, + eb_write_text_string, eb_write_text): New functions. + * eb/text.c (eb_read_text_internal): Use eb_write_text*() functions + to write characters to a text buffer. Don't write directly. + + * eb/defs.h (EB_Hook_Struct): The type of `argv' is changed from + `const int *' to `const unsigned int *'. + + * eb/defs.h (EB_Hook_Struct): Add the new argument `container' + and remove `workbuf'. + * eb/hook.c (eb_hook_euc_to_ascii, eb_hook_stop_code, + eb_hook_narrow_character_text, eb_hook_wide_character_text, + eb_hook_empty): Ditto. + * eb/text.c (eb_read_text, eb_read_heading): Add the new argument + `container'. + + * eb/hook.c (eb_hook_newline): New function. + * eb/hook.c (eb_initialize_hookset): Set EB_HOOK_NEWLINE of the + default hookset. + +2000-10-31 Motoyuki Kasahara + + * ebinfo/ebinfo.c (output_information): In the font-size and + font-range paramter lines, output a newline character even + when an error occurs. + +2000-10-30 Motoyuki Kasahara + + * eb/hook.c (eb_hook_stop_code): Return EB_ERR_HOOK_WORKSPACE + not -1 when a stop code is found. + + * eb/text.c (eb_read_text, eb_read_heading, eb_read_text_internal): + give up formatting text when a hook function returns any other value + than EB_SUCCESS. + +2000-10-27 Motoyuki Kasahara + + * ebzip/filename.c (compose_exisitent_path_name, + compose_exisitent_path_name2, compose_exisitent_path_name3): + New functions. + * ebzip/ebzip.c (zip_eb_book, zip_epwing_book, unzip_eb_book, + unzip_epwing_book, zipinfo_eb_book, zipinfo_epwing_book): Use + compose_exisitent_path_name*() functions instead of sprintf(). + + * eb/filename.c (eb_canonicalize_path_name): Don't expand `/./' + and `/../' in the given path name. + +2000-10-26 Motoyuki Kasahara + + * eb/subbook.c (eb_set_subbook): Set `book->subbook_current->text_file' + to 1 when no text file exists. + +2000-10-21 Motoyuki Kasahara + + * eb/text.c (eb_read_text_internal): Cache controll bug was still + remained. Fix the bug. + + * doc-ja/ebinfo-ja.texi: Include `ebinfo-ver.texi', not `version.texi'. + +2000-10-20 Motoyuki Kasahara + + * Version 3.0alpha2. + + * doc-ja/Makefile.am (EXTRA_DIST): Remove `stamp-eb'. + * doc-ja/Makefile.am (stamp-eb): Remove the target. + + * eb/text.c (eb_read_text_internal): Fix a cache controll bug. + Reported by Rei. + +2000-10-17 Motoyuki Kasahara + + * eb/ebzip.c (zip_epwing_book): Fix a bug that it tries to compress + non-existant font files. + * eb/text.c (eb_read_text_internal): Check text-end-flag, + cache buffer, and unprocessed data in the text context, in + this order. + +2000-09-30 Motoyuki Kasahara + + * eb/zio.c (eb_zopen_epwing): Add missing initialization code for + the variable `read_length'. + +2000-09-24 Motoyuki Kasahara + + * eb/defs.h (EB_Language_Struct): the member `offset' is renamed to + `location'. + * eb/defs.h (EB_Zip_Struct): likewise. + + * eb/appsub.c (eb_initialize_appendix_subbook): value passed to + eb_zlseek() must be off_t. + * eb/font.c (eb_initialize_font): Likewise. + * eb/language.c (eb_set_language): Likewise. + * eb/multi.c (eb_initialize_multi_search): Likewise. + * eb/narwalt.c (eb_narrow_character_text_jis): Likewise. + * eb/narwalt.c (eb_narrow_character_text_latin): Likewise. + * eb/narwfont.c (eb_initialize_narrow_font): Likewise. + * eb/narwfont.c (eb_narrow_character_bitmap_jis): Likewise. + * eb/narwfont.c (eb_narrow_character_bitmap_latin): Likewise. + * eb/search.c (eb_presearch_word): Likewise. + * eb/search.c (eb_hit_list_word): Likewise. + * eb/search.c (eb_hit_list_keyword): Likewise. + * eb/search.c (eb_hit_list_multi): Likewise. + * eb/subbook.c (eb_initialize_subbook): Likewise. + * eb/widealt.c (eb_wide_character_text_jis): Likewise. + * eb/widealt.c (eb_wide_character_text_latin): Likewise. + * eb/widefont.c (eb_initialize_wide_font): Likewise. + * eb/widefont.c (eb_wide_character_bitmap_jis): Likewise. + * eb/widefont.c (eb_wide_character_bitmap_latin): Likewise. + * eb/text.c (eb_initialize_text): `book->text_context.location' + must be calculated with `off_t' values. + + * po/POTFILES.in: Add `libebutils/getopt.c'. + + * eb/zio.c (eb_zopen_none): Get file size, reported by Takashi NEMOTO. + +2000-09-09 Motoyuki Kasahara + + * eb/defs.h (EB_Subbook_Struct): Add the member `cross'. + * eb/subbook.c (eb_initialize_subbook): Also initialize the member + `cross'. + * eb/subbook.c (eb_initialize_indexes): Recognize index code + 0x81 as Cross-Index. + +2000-09-07 Motoyuki Kasahara + + * eb/setword.c (eb_fix_word_latin): Renamed to `eb_convert_latin'. + * eb/setword.c (eb_fix_word_jis): Renamed to `eb_convert_euc_jp'. + + * eb/setword.c (eb_fix_word): New static function. + * eb/setword.c (eb_set_word, eb_set_endword, eb_set_keyword): + Call `eb_fix_word' to fix `word' and `canonicalized_word' according + with index page style. + * eb/setword.c (eb_set_endword): Get index page style from endword + search indexes, not from word search. + * eb/setword.c (eb_set_keyword): Get index page style from keyword + search indexes, not from word search. + + * eb/libintl_r.c: New file. + * eb/error.c (gettext_mutex): Moved to `libintl_r.c'. + * eb/error.c (eb_error_message): Do not lock. + * eb/error.c (eb_error_message_r): New function. + + * eb/lock.c (eb_pthread_enabled): New function. + * eb/eb.c (eb_nls_enabled): New function. + + * eb/Makefile.am (pkginclude_HEADERS): Add `libintl_r.h'. + * eb/Makefile.am (libintl_la_SOURCES): Add `libintl_r.c'. + + * eb/subbook.c (eb_set_subbook): Don't return an error code when + no text file exists. + + * eb/setword.c (eb_convert_euc_jp): Accept local character + 0xa121 ... 0xfe7e. + + * eb/subbook.c (eb_initialize_subbook): Becomes static function. + * eb/appsub.c (eb_initialize_appendix_subbook): Likewise. + + * eb/text.c (eb_read_text, eb_read_heading, eb_forward_text, + eb_read_text_internal): Discard `const' of the argument `hookset'. + + * eb/subbook.c (eb_set_subbook): Add missing call of eb_unlock(). + + * eb/text.c (eb_fowrard_text): Don't unlock `cache_mutex'. + * eb/text.c (eb_fowrard_heading): Likewise. + + * eb/zio.c (eb_zread_ebzip, eb_zread_epwing, eb_zread_sebxa): Don't + lock or unkock `cache_mutex'. + * eb/zio.c (eb_zread): Lock and unkock `cache_mutex'. + + * eb/internal.h.in (EB_ZIP_INVALID): Defined. + * eb/zip.c (eb_zopen_none, eb_zopen_ebzip, eb_zopen_epwing, + eb_zopen_epwing6): Now they are static functions. + * eb/zip.c (eb_zopen): New function. + + * eb/appsub.c (eb_set_subbook): Call eb_zopen(), instead of + eb_zopen_ZIPTYPE() functions. + * eb/font.c (eb_set_font): Likewise. + * eb/language.c (eb_initialize_language): Likewise. + * eb/language.c (eb_set_language): Likewise. + * eb/subbook.c (eb_set_subbook): Likewise. + * ebzip/ebzip.c (zip_eb_book, zip_epwing_book, unzip_eb_book, + unzip_epwing_book, zipinfo_eb_book, zipinfo_epwing_book): Likewise. + * ebzip/ebzip.c (zip_file, unzip_file, zipinfo_file): The argument + `in_open_function' is replaced to `in_zip_code'. + + * ebzip/ebzip.c (zipinfo_file): Call `stat' before open a file. + + * ebzip/ebzip.c (zipinfo_epwing_book): Skip font entires whose + code is EB_FONT_INVALID. + +2000-09-05 Motoyuki Kasahara + + * eb/internal.h.in, libebutils/ebutils.c, ebfont/ebfont.c, + ebinfo/ebinfo.c, ebzip/ebzip.c: Define `_' and `N_' macros even + when ENABLE_NLS is not defined. + +2000-08-11 Motoyuki Kasahara + + * ebfont/ebfont.c (make_subbook_size_image_fonts): Fixed bugs + that use old API. Reported by Takashi NEMOTO. + * eb/book.c (eb_initialize_catalog): Fix a bug that wrong font code + is set to EB_Font struct. Reported by Takashi NEMOTO. + + * eb/internal.h.in (EB_INDEX_STYLE_REVERSED_CONVERT): Defined. + Super Tougou Jisho 2000 sets 2 to the katakana index style parameter. + * eb/setword.c (eb_convert_hiragana_jis): New function. + Convert all hiragana characters in a string to katakana. + * eb/setword.c (eb_set_word): If the katakana index style parameter + is EB_INDEX_STYLE_REVERSED_CONVERT, call eb_convert_hiragana_jis(). + +2000-08-04 Motoyuki Kasahara + + * eb/internal.h.in (eb_initialize_lock, eb_finalize_lock, eb_lock, + eb_unlock): Add function declarations. + * eb/font.c (eb_set_font): Set the variable `subbook' after + lock the book. + * eb/font.c (eb_set_font, eb_font_list, eb_have_font): Set the + variable `subbook' after lock the book. + + * eb/Makefile.am (libeb_la_SOURCES): Add lock.c. + +2000-07-21 Motoyuki Kasahara + + * Version 3.0alpha1. + + * eb/defs.h (EB_Huffman_Node_Struct): The type of the member `value' + is changed to `unsigned int'. + + * eb/epwunzip.c (eb_unzip_slice_epwing6): New function. + + * libebutils/ebutils.c (fix_file_name, parse_case_argument, + parse_suffix_argument): Removed. + + * eb/internal.h.in: Include `config.h'. + * eb/internal.h.in: Always includes `defs.h'. + * eb/internal.h: Delete extern declaration of `eb_option'. + + * eb/font.c, eb/message.c, eb/search.c, eb/text.c: Remove cpp macro + definition of `memmove'. + * eb/internal.h.in: Add cpp macro definition of `memmove'. + * eb/filename.c: Remove cpp macro definition of `strcasecmp' and + `strncasecmp'. + * eb/internal.h.in: Add cpp macro definition of `strcasecmp' and + `strncasecmp'. + + * ebzip/ebzip.c (short_options, long_options): Delete `--suffix' + and `--case' options. + +2000-07-20 Motoyuki Kasahara + + * eb/filename.c (eb_fix_file_name2, eb_fix_file_name3): New functions. + * ebzip/filename.c (compose_out_file_name, compose_out_file_name2, + compose_out_file_name3): New functions, New file. + * eb/Makefile.am (ebzip_SOURCES): Add `filename.c'. + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Rewritten. + * ebzip/ebzip.c: Delete `--case' and `--suffix' options. + + * eb/defs.h (EB_ZIP_EPWING): Assign the value `100'. + * eb/defs.h (EB_ZIP_EPWING6, EB_ZIP_SEBXA): New macros. + + * eb/internal.h.in (EB_HUFFMAN_NODE_EOF, EB_HUFFMAN_NODE_LEAF8, + EB_HUFFMAN_NODE_LEAF16): Assign new values. + * eb/internal.h.in (EB_HUFFMAN_NODE_LEAF32): Defined. + + * eb/zio.c (eb_zread_ebzipped): Renamed to eb_zread_ebzip(). + * eb/zio.c (eb_zread_epwzipped): Renamed to eb_zread_epwing(). + * eb/ebunzip1.c (eb_ebunzip1_slice): Renamed to + eb_unzip_slice_ebzip1().. + * eb/epwunzip.c (eb_epwunzip_slice): Renamed to + eb_unzip_slice_epwing(). + + * eb/ebunzip1.c: Renamed to eb/unzebzip.c. + * eb/epwunzip.c: Renamed to eb/unzepwing.c. + * eb/unzsebxa.c: New file. + +2000-07-16 Motoyuki Kasahara + + * eb/subbook.c (eb_initialize_all_subbooks): Also set each font. + * eb/subbook.c (eb_initialize_all_subbooks): Call eb_unset_subbook() + if an error occurs. + + * ebzip/Makefile.am (ebzip_SOURCES): Remove `filelist.c'. + * ebzip/ebzip.c: Remove function declarations of + initialize_file_name_list(), finalize_file_name_list() and + add_file_name_list(). + +2000-07-09 Motoyuki Kasahara + + * eb/narwfont.c (eb_narrow_font_file_name, eb_narrow_font_file_name2): + Removed. + * eb/widefont.c (eb_wide_font_file_name, eb_wide_font_file_name2): + Removed. + + * eb/font.c (eb_initialize_fonts, eb_initialize_eb_fonts, + eb_initialize_epwing_fonts): Removed. + * eb/font.c (eb_initialize_font): New function. + * eb/narwfont.c (eb_initialize_narrow_font): New function. + * eb/widefont.c (eb_initialize_wide_font): New function. + * eb/appendix.c (eb_initialize_appendix_catalog): Adapt to new + file name composition rule. + * eb/appsub.c (eb_set_subbook): Likewise. + * eb/book.c (eb_initialize_catalog): Likewise. + * eb/font.c (eb_set_font): Likewise. + * eb/language.c (eb_initialize_language): Likewise. + * eb/language.c (eb_set_language): Likewise. + * eb/subbook.c (eb_set_subbook): Likewise. + + * eb/zio.c (eb_zopen, eb_zopen2): Removed. + * eb/zio.c (eb_zopen_none): New function. + * eb/zio.c (eb_zopen_ebzipped): Renamed to `eb_zopen_ebzip' and + changed to non-static. + * eb/zio.c (eb_zopen_epwing): Renamed to `eb_zopen_epwing' and + changed to non-static. + + * eb/appendix.c (eb_initialize_appendix_catalog): Adjuts subbook + directory names. + * eb/book.c (eb_initialize_catalog): Likewise. + * eb/appsub.c (eb_initialize_appendix_subbook): Adjust data directory + name. + * eb/subbook.c (eb_initialize_subbook): Adjust date, gaiji, stream + and movie directory names. + + * configure.in (AC_HEADER_DIRENT): Added. + + * eb/subbook.c (eb_initialize_subbook): Don't call + eb_initialize_fonts(). + + * eb/defs.h (EB_CASE_UNCHANGE, EB_CASE_UPPER, EB_CASE_LOWER): Deleted. + * eb/defs.h (EB_SUFFIX_UNCHANGE, EB_SUFFIX_NONE, EB_SUFFIX_DOT, + EB_SUFFIX_PERIOD, EB_SUFFIX_VERSION, EB_SUFFIX_BOTH): Deleted. + * eb/ebzip.c (CASE_UNCHANGE, CASE_UPPER, CASE_LOWER): Defined. + * eb/ebzip.c (SUFFIX_UNCHANGE, SUFFIX_NONE, SUFFIX_DOT, + SUFFIX_VERSION, SUFFIX_BOTH): Defined. + + * eb/defs.h (EB_FILE_NAME_START, EB_FILE_NAME_SOUND, + EB_FILE_NAME_CATALOG, EB_FILE_NAME_LANGUAGE, EB_FILE_NAME_WELCOME, + EB_FILE_NAME_CATALOGS, EB_FILE_NAME_HONMON, EB_FILE_NAME_HONMON2, + EB_FILE_NAME_APPENDIX, EB_FILE_NAME_FUROKU, EB_DIRECTORY_NAME_DATA, + EB_DIRECTORY_NAME_GAIJI, EB_DIRECTORY_NAME_STREAM, + EB_DIRECTORY_NAME_MOVIE): Move these definitions to `eb/internal.h.in' + and convert their values to lower cases. + * eb/internal.h.in (EB_SUFFIX_EBZ): Defined. + * eb/internal.h.in (EB_SUFFIX_NONE): Defined. + * eb/internal.h.in (EB_FILE_NAME_HONMONS): Defined. + * eb/internal.h.in (EB_FILE_NAME_HONMONG): Defined. + * eb/internal.h.in (EB_FILE_NAME_VTOC): Removed. + + * eb/ebinfo.c (output_information): Adapt to new EB_FONT_* macro + values. They were 16, 24, 30, 48, but now they are 0, 1, 2, 3. + +2000-07-08 Motoyuki Kasahara + + * eb/defs.h (EB_MAX_BASE_NAME_LENGTH): Renamed to + EB_MAX_DIRECTORY_NAME_LENGTH. + * eb/defs.h (EB_MAX_FILE_NAME_LENGTH): Defined. + + * eb/defs.h (EB_Subbook_Struct): Add the member `version'. + * eb/book.c (eb_initialize_catalog): Set format version. + + * eb/zio.c (eb_zopen_epwzipped): Check if least frequent node + is found or not after scanning a node list. + + * eb/strcasecmp.c: New file. + * eb/Makefile.am (libeb_la_SOURCES): Add `strcasecmp.c'. + + * libebutil/strcasecmp.c: Include `sys/type.h'. + + * eb/defs.h (EB_Subbook_Struct): Rename the member `directory' to + `directory_name', + * eb/defs.h (EB_Subbook_Struct): Add the member `data_directory_name', + `gaiji_directory_name', `movie_directory_name', + `stream_directory_name', `text_file_name', `graphic_file_name', + and `sound_file_name'. + * eb/defs.h (EB_Book_Struct): Remove the member `case_code' and + `suffix_code'. + * eb/defs.h (EB_Appendix_Struct): Add the member `data_directory_name', + and `appendix_file_name'. + * eb/defs.h (EB_Appendix_Subbook_Struct): Rename the member + `directory' to `directory_name', + * eb/defs.h (EB_APpendix_Subbook_Struct): Remove the member + `case_code' and `suffix_code'. + + * eb/filename.c (eb_catalog_file_name): Removed. + * eb/filename.c (eb_appendix_catalog_file_name): Removed. + * eb/filename.c (eb_canonicalize_appendix_file_name): Removed. + * eb/filename.c (eb_canonicalize_file_name_internal): Renamed to + `eb_canonicalize_file_name'. The original `eb_canonicalize_file_name' + is overwritten. + * eb/filename.c (eb_fix_file_name): Removed. + * eb/filename.c (eb_fix_appendix_file_name): Removed. + * eb/filename.c (eb_fix_file_name_internal): Removed. + * eb/filename.c (eb_fix_directory_name, eb_fix_sub_directory_name): + New functions. + * eb/filename.c (eb_fix_file_name, eb_compose_file_name, + eb_compose_file_name2, eb_compose_file_name3): New functions. + + * eb/defs.h (EB_DIRECTORY_NAME_DATA, EB_DIRECTORY_NAME_GAIJI, + EB_DIRECTORY_NAME_STREAM): Moved to eb/internal.h.in. + * eb/internal.h.in (EB_DIRECTORY_NAME_STREAM, + EB_DIRECTORY_NAME_MOVIE): Defined. + + * eb/font.h (EB_FONT_16, EB_FONT_24, EB_FONT_30, EB_FONT_48): + Change their integer values. + + * eb/defs.h (EB_Font_Struct): Remove the memeber `width' and `height'. + * eb/defs.h (EB_Font_Struct): Add the memeber `available' and + `font_code'. + * eb/defs.h (EB_Subbook_Struct): Remove the memeber `font_count'. + * eb/defs.h (EB_Subbook_Struct): Split the memeber `fonts' into + `narrow_fonts' and `wide_fonts'. + * eb/book.c (eb_initialize_catalog): Assume that the order of font + names is always wide-16, -24, -30, -48, narrow-16, -24, -30, -48. + + * eb/font.c (eb_initialize_eb_fonts, eb_initialize_epwing_fonts, + eb_font, eb_set_font, eb_unset_font, eb_font_list, eb_have_font): + Catch up with new EB_Font_Struct. + * eb/narwfont.c (eb_have_narrow_font, eb_narrow_font_width, + eb_narrow_font_width2, eb_narrow_font_size, eb_narrow_font_size2, + eb_narrow_font_file_name, eb_narrow_font_file_name2, + eb_narrow_font_start, eb_narrow_font_end, + eb_narrow_character_bitmap_jis, eb_narrow_character_bitmap_latin): + Likewise. + * eb/widefont.c (eb_have_wide_font, eb_wide_font_width, + eb_wide_font_width2, eb_wide_font_size, eb_wide_font_size2, + eb_wide_font_file_name, eb_wide_font_file_name2, + eb_wide_font_start, eb_wide_font_end, + eb_wide_character_bitmap_jis, eb_wide_character_bitmap_latin): + Likewise. + * eb/subbook.c (eb_initialize_indexes): Likewise. + + * eb/font.c (eb_font_height, eb_font_height2): New functions. + * eb/font.h (EB_HEIGHT_FONT_16, EB_HEIGHT_FONT_24, EB_HEIGHT_FONT_30, + EB_HEIGHT_FONT_48): Defined. + + * eb/defs.h (EB_Subbook_Struct): Rename the member `zip' to + `text_zip'. + * eb/defs.h (EB_Appendix_Subbook_Struct): Rename the member `zip' to + `appendix_zip'. + +2000-06-24 Motoyuki Kasahara + + * eb/subbook.c (eb_initialize_subbook): Fix bugs that EB 2.x API + are remained. + + * eb/setword.c (eb_fix_word_jis): Initialize `c1' and `c2' to + avoid GCC warning `might be used uninitialized...'. + + * eb/search.c (eb_presearch_word): Return EB_ERR_FAIL_SEEK_TEXT + when eb_zlseek() failed, and EB_ERR_FAIL_READ_TEXT when eb_zread(). + + * eb/exactword.c (eb_search_exactword): Return EB_ERR_NO_SUCH_FONT + when invalid font height is given. + + * eb/bitmap.c (eb_narrow_font_xbm_size): Return EB_ERR_NO_SUCH_FONT + when invalid font height is given. + * eb/bitmap.c (eb_narrow_font_xpm_size): Likewise. + * eb/bitmap.c (eb_narrow_font_gif_size): Likewise. + * eb/bitmap.c (eb_wide_font_xbm_size): Likewise. + * eb/bitmap.c (eb_wide_font_xpm_size): Likewise. + * eb/bitmap.c (eb_wide_font_gif_size): Likewise. + + * eb/appendix.c (eb_initialize_appendix_catalog): Return + EB_ERR_FAIL_OPEN_CATAPP when failed to open the catalog file. + * eb/book.c (eb_initialize_catalog): Return EB_ERR_FAIL_OPEN_CAT when + failed to open the catalog file. + + * eb/hook.c: Include appendix.h. + + * configure.in (AC_OUTPUT_COMMANDS): Remove `libintl.h', linked + from `libgettext.h' by gettext.m4. + * intl/Makefile.am: Make a symlink from `libgettext.h' to `libintl.h'. + + * eb/zio.c (eb_zopen, eb_zopen2): Support DOS style path, reported + by Kazuhiro Ito. + + * Makefile.am (SUBDIRS): Don't use ${INTL_SUBDIR} for `intl' + because automake complains. + * intl/Makefile.am (INCLUDED_LIBINTL): Use this conditional + to determine whether we build `libintl.la' or not. + * Makefile.am (intl/lib_LTLIBRARIES): Set to $(INTL_LTLIB). + +2000-06-17 Motoyuki Kasahara + + * ebrefile/ebrefile.in: Fix a bug that ebrefile fills the reserved-1 + with 0x00, reported by Takashi NEMOTO. + +2000-06-13 Motoyuki Kasahara + + * eb/keyword.c (eb_search_keyword): Type of 2nd argument is changed + from `const *[]' to `const * const []'. + * eb/multi.c (eb_search_multi): Likewise. + + * configure.in (ZLIBLIBS): Fixed a bug that this variable was not + set when zlib was built from included sources,reported by Kazuhiro + Ito. + * eb/filename.c (eb_canonicalize_file_name_internal for DOS): + EB Library 2.x API code was remained, reported by Kazuhiro Ito. + Fixed. + +2000-06-11 Motoyuki Kasahara + + * ebzip/ebzip.c (zip_file): Type of 2nd argument is changed from + `const char **' to `const char * const *'. + * ebzip/ebzip.c (unzip_file): Likewise + * ebzip/ebzip.c (zip_finfo): Likewise. + + * libebutils/ebutils.c (parse_case_argument): Control reached end of + non-void function. Fixed. + * libebutils/ebzip.c (parse_suffix_argument): Likewise. + * libebutils/getumask.c: Include `sys/stat.h'. + + * eb/book.c (misleaded_book_table): Type is changed from + `const char *[]' to `const char * const[]'. + * eb/error.c (error_messages): Likewise. + +2000-05-27 Motoyuki Kasahara + + * Version 3.0alpha0. + + * configure.in: Add `--enable-pthread', `--with-pthread-cppflags', + `--with-pthread-cflags' and ``--with-pthread-ldflags'. + * configure.in (AC_TRY_LINK): Add a test program that checks Pthread. + + * configure.in (WITH_ZLIB): Renamed to `INCLUDED_ZLIB'. + + * configure.in: Add `--with-gettext-includes' and + `--with-gettext-libraries' options. + + * configure.in (EBCONF_ZLIBINCS, EBCONF_ZLIBLIBS, PTHREAD_CPPFLAGS, + PTHREAD_CFLAGS, PTHREAD_LDFLAGS, EBCONF_INTLINCS, EBCONF_INTLLIBS, + EBCONF_EBINCS, EBCONF_EBLIBS): Substitute these variables, for + generating eb.conf. + * Makefile.am (sysconf_DATA): Add `eb.conf'. + * Makefile.am (CLEANFILES): Add `eb.conf'. + * Makefile.am (EXTRA_DIST): Add `eb.conf.in'. + * Makefile.am (eb.conf): New target. + +2000-05-22 Motoyuki Kasahara + + * configure.in: Remove the `--enable-ja-doc' option. + * Makefile.am (ENABLE_JA_DOC): Remvoe the condition. + * Makefile.am (SUBDIRS): Remove $(JA_DOC_SUBDIR). + + * configure.in (AC_OUTPUT): Add `eb_r/Makefile'. + * Makefile.am (ENABLE_PTHREAD): Add the condition. + * Makefile.am (SUBDIRS): Add $(EB_R_SUBDIR). + * eb_r/Makefile.am: New file. + + * eb/defs.h (EB_Text_Context_Struct): Add `auto_stop_code'. + * eb/text.c (eb_seek_text): Initialize `auto_stop_code' of the + text context in `book'. + * eb/text.c (eb_read_text_internal): Update `auto_stop_code' + when the control sequence 0x41 is seen. + * eb/hook.c (eb_hook_stop_code): Don't assume the control sequence + 0x09 as the stop code. + + * eb/text.h (EB_HOOK_STOPCODE): Renamed to EB_HOOK_STOP_CODE. + +2000-05-21 Motoyuki Kasahara + + * eb/Makefile.am (install-data-hook): Removed. + +2000-05-20 Motoyuki Kasahara + + * libebtuils/Makefile.am (libebutils_a_SOURCES): Add `ebtuils.c'. + * libebtuils/Makefile.am (INCLUDES): Add `-I$(top_srcdir)/intl'. + * libebtuils/ebtuils.c: New file. + * libebtuils/ebtuils.c (output_try_help, output_version, + parse_case_argument, parse_suffix_argument, + parse_subbook_name_argument, find_subbook, fix_file_name, + canonicalize_path): Define these functions. + * libebtuils/ebtuils.c (program_name, program_version, invoked_name): + Define these global variables. + * ebfont/ebfont.c (program_name, program_version, invoked_name): + these global variables are removed. + * ebinfo/ebinfo.c (program_name, program_version, invoked_name): + Likewise. + * ebzip/ebzip.c (program_name, program_version, invoked_name): + Likewise. + * ebfont/ebfont.c (parse_subbook_name_argument, find_subbook, + output_version, output_try_help, canonicalize_path): + these global functions are removed. + * ebinfo/ebinfo.c (output_version, output_try_help): + Likewise. + * ebzip/ebzip.c (output_version, output_try_help, + parse_subbook_name_argument, find_subbook, fix_file_name, + canonicalize_path): + Likewise. + +2000-05-18 Motoyuki Kasahara + + * eb/Makefile.am (EXTRA_DIST): Add `internal.h.in'. + * eb/Makefile.am (CLEANFILES): Defined and add + `stamp-defs-h` and `internal.h' to this macro. + * eb/Makefile.am (BUILT_SOURCES): Defined as `internal.h'. + * eb/Makefile.am (noinst_HEADERS): Add `internal.h'. + * eb/Makefile.am (internal.h, stamp-internal-h): New targets. + +2000-05-14 Motoyuki Kasahara + + * move-if-change: New script. + * Makfile.am (EXTRA_DIST): Add `move-if-change'. + * libebutils/Makefile.am (EXTRA_DIST): Add `ebutils.h.in'. + * libebutils/Makefile.am (CLEANFILES): Defined and add + `stamp-defs-h` and `ebutils.h' to this macro. + * libebutils/Makefile.am (BUILT_SOURCES): Defined as `ebutils.h'. + * libebutils/Makefile.am (noinst_HEADERS): Add `ebutils.h'. + * libebutils/Makefile.am (ebutils.h, stamp-ebutils-h): New targets. + + * eb/error.c, ebfont/ebfont.c, ebinfo/ebinfo.c, ebzip/ebzip.c, + ebzip/filelist.c: Support gettext. + * ebfont/ebfont.c, ebinfo/ebinfo.c, ebzip/ebzip.c: Include + locale.h, libintil.h and ebutils.h. + * ebfont/ebfont.c, ebinfo/ebinfo.c, ebzip/ebzip.c (main): Call + setlocale(), bindtextdomain() and textdomain() when NLS is enabled. + + * ebfont/Makefile.am, ebinfo/Makefile.am, ebzip/Makefile.am + (INCLUDES): Add `-I$(srcdir)/../intl'. + * ebfont/Makefile.am (ebfont_LDADD): Add @INTLLIBS@. + * ebinfo/Makefile.am (ebinfo_LDADD): Likewise. + * ebzip/Makefile.am (ebzip_LDADD): Likewise. + * ebfont/Makefile.am (ebfont_DEPENDENCIES): Add @INTLDEPS@. + * ebinfo/Makefile.am (ebinfo_DEPENDENCIES): Likewise. + * ebzip/Makefile.am (ebzip_DEPENDENCIES): Likewise. + + * po/Makefile.in.in, eb/po/Makefile.in.in: Support DESTDIR. + * po/Makefile.in.in, eb/po/Makefile.in.in (TEXTDOMAIN, top_builddir, + subdir): Defined. + * po/Makefile.in.in, eb/po/Makefile.in.in: Don't use $PACKAGE for + text domain name. Use $TEXTDOMAIN, instead. + * po/Makefile.in.in, eb/po/Makefile.in.in: Don't use `basename'. + * po/Makefile.in.in, eb/po/Makefile.in.in: Use `$(top_builddir)' not + '..'. Use `$(top_srcdir) not `$(srcdir)/.' + * po/Makefile.in.in, eb/po/Makefile.in.in: Use `$(top_builddir)/intl' + not `../intl'. Use `$(top_srcdir)/../intl' not `$(srcdir)/../intl'. + * po/Makefile.in.in, eb/po/Makefile.in.in: Set @localedir@ to + $localedir. + * po/Makefile.in.in, eb/po/Makefile.in.in: Use `$(subdir)' not `po'. + +2000-05-13 Motoyuki Kasahara + + * eb/po: New directory. + * eb/Makefile.am (SUBDIRS): Add `po'. + * configure.in (AC_OUTPUT): Add `eb/po/Makefile.in'. + * configure.in (AC_OUTPUT_COMMANDS): Generate `Makefile' from + `Makefile.in'. + * configuer.in: Subst `localedir'. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, + HAVE_STPCPY): Defined. + + * configure.in (DEPENDENCIES_FOR_LIBZ): Renamed to `ZLIBDEPS'. + * configure.in (LDADD_FOR_LIBZ): Renamed to `ZLIBLIBS'. + * configure.in (INCLUDES_FOR_LIBZ): Renamed to `ZLIBINCS'. + +2000-05-11 Motoyuki Kasahara + + * configure.in (--with-zlib): Renamed to `--with-included-zlib'. + * Invoke gettexize. + * configure.in (ALL_LINGUAS, AM_GNU_GETTEXT): Added. + * Makefile.am (SUBDIRS): Add `intl' and `po'. + * configure.in (AC_OUTPUT): Add `intl/Makefile' and `po/Makefile'. + +2000-05-05 Motoyuki Kasahara + + * acconfig.h (USE_FAKELOG, EB_BUILD_LIBRARY): Remove the definitions. + * eb/Makefile.am (INCLUDES): Add `-DEB_BUILD_LIBRARY'. + * libebutils/Makefile.am (INCLUDES): Defined as `-DUSE_FAKELOG'. + +2000-05-03 Motoyuki Kasahara + + * eb/error.h (EB_ERR_NO_CANDIDATES): Added. + + * eb/language.h (EB_LANG_ENGLISH, EB_LANG_FRENCH, EB_LANG_GERMAN, + EB_LANG_ITALIAN, EB_LANG_SPANISH, EB_LANG_JAPANESE, EB_LANG_DANISH, + EB_LANG_FINNISH, EB_LANG_SWEDISH, EB_LANG_NORWEGIAN, EB_LANG_DUTCH, + EB_LANG_POLISH): Rename _LANG_ to _LANGUAGE_. + * eb/language.h (EB_MSG_WORD_SEARCH, EB_MSG_END_SEARCH, + EB_MSG_KEY_SEARCH, EB_MSG_MENU_SEARCH, EB_MSG_MULTI_SEARCH, + EB_MSG_GRAPHIC_SEARCH, EB_MSG_BOOK_CONTAIN, EB_MSG_ENTER_WORD, + EB_MSG_ENTER_WORDS, EB_MSG_SUCCESSFUL, EB_MSG_ENTRY, EB_MSG_ENTRIES, + EB_MSG_SEARCH_FAIL, EB_MSG_PUSH_NO, EB_MSG_INSERT_DISC, + EB_MSG_CANT_READ, EB_MSG_REINSERT_DISC, EB_MSG_CLEAN_DISC, + EB_MSG_NOT_EB_DISC, EB_MSG_SEARCHING, EB_MSG_CHANGING_BATT, + EB_MSG_DRY_BATT, EB_MSG_CHARGE_END, EB_MSG_BATT_EMPTY, + EB_MSG_BATT_CHANGE, EB_MSG_CANT_CHANGE_BATT, EB_MSG_SELECT_LANGUAGE, + EB_MSG_MENU): Rename _MSG_ to _MESSAGE_. + + * eb/language.h (EB_MESSAGE_INVALID): Defined. + * eb/language.h (EB_LANG_ERROR): Renamed to EB_LANGUAGE_INVALID. + * eb/defs.h (EB_MULTI_INVALID, EB_MULTI_ENTRY_INVALID): Defined. + + * eb/defs.h (EB_CHARCODE_ERROR): Renamed to EB_CHARCODE_INVALID. + * eb/defs.h (EB_WORD_ERROR): Renamed to EB_WORD_INVALID. + * eb/defs.h (EB_TEXT_ERROR): Renamed to EB_TEXT_INVALID. + * eb/defs.h (EB_DISC_ERROR): Renamed to EB_DISC_INVALID. + * eb/defs.h (EB_SUBBOOK_ERROR): Renamed to EB_SUBBOOK_INVALID. + * eb/defs.h (EB_MULTI_ERROR): Renamed to EB_MULTI_INVALID. + * eb/defs.h (EB_MULTI_ENTRY_ERROR): Renamed to + EB_MULTI_ENTRY_INVALID. + * eb/font.h (EB_FONT_ERROR): Renamed to EB_FONT_INVALID. + +2000-03-29 Motoyuki Kasahara + + * ebinfo/ebinfo.c (output_multi_information): Fix the length of + an entry label buffer. + + * eb/stopcode.c (eb_have_stopcode): Renamed to eb_have_stop_code(). + * eb/stopcode.c (eb_stopcode): Renamed to eb_stop_code(). + * eb/hook.c (eb_hook_stopcode): Renamed to eb_hook_stop_code(). + + * eb/defs.h (EB_Appendix_Subbook_Struct): the members `narw_start' + `narw_end' and `narw_page' are renamed to `narrow_start', `narrow_end' + and `narrow_page'. + * eb/def.sh (EB_Appendix_Struct): the member `narw_cache' is renamed + to `narrow_cache'. + * eb/defs.h (EB_Subbook_Struct): the member `narw_current' is + renamed to `narrow_current'. + * eb/defs.h (EB_Text_Context_Struct): the member `narw_flag' is + renamed to `narrow_flag'. + + * eb/defs.h (EB_Alternation_Cache_Struct): the memeber `char_no' is + renamed to `character_number'. + * eb/defs.h (EB_Appendix_Subbook_Struct): the memeber `char_code' is + renamed to `character_code'. + * eb/defs.h (EB_Subbook_Struct): Likewise. + + * eb/error.h (EB_NUM_ERRORS): Renamed to EB_NUMBER_OF_ERRORS. + * eb/def.s (EB_NUM_HOOKS): Renamed to EB_NUMBER_OF_HOOKS. + * eb/def.s (EB_NUM_SEARCH_CONTEXTS): Renamed to + EB_NUMBER_OF_SEARCH_CONTEXTS. + +2000-03-27 Motoyuki Kasahara + + * ebzip/ebzip.c: Don't include `ctype.h'. Define compatible + character test and letter conversion macros. + * ebinfo/ebinfo.c: Likewise. + + * eb/defs.h (EB_EB_MAXLEN_WORD): Renamed to EB_MAX_WORD_LENGTH. + * eb/defs.h (EB_MAXLEN_EB_TITLE): Renamed to EB_MAX_EB_TITLE_LENGTH. + * eb/defs.h (EB_MAXLEN_EPWING_TITLE): Renamed to + EB_MAX_EPWING_TITLE_LENGTH. + * eb/defs.h (EB_MAXLEN_TITLE): Renamed to EB_MAX_TITLE_LENGTH. + * eb/defs.h (EB_MAXLEN_BASENAME): Renamed to EB_MAX_BASE_NAME_LENGTH. + * eb/defs.h (EB_MAXLEN_LANGNAME): Renamed to + EB_MAX_LANGUAGE_NAME_LENGTH. + * eb/defs.h (EB_MAXLEN_MESSAGE): Renamed to EB_MAX_MESSAGE_LENGTH. + * eb/defs.h (EB_MAXLEN_MULTI_LABEL): Renamed to + EB_MAX_MULTI_LABEL_LENGTH. + * eb/defs.h (EB_MAXLEN_ALTERNATION_TEXT): Renamed to + EB_MAX_ALTERNATION_TEXT_LENGTH. + * eb/error.h (EB_MAXLEN_ERROR_MESSAGE): Renamed to + EB_MAX_ERROR_MESSAGE_LENGTH. + + * eb/defs.h (EB_FILENAME_START): Renamed to EB_FILE_NAME_START. + * eb/defs.h (EB_FILENAME_SOUND): Renamed to EB_FILE_NAME_SOUND. + * eb/defs.h (EB_FILENAME_CATALOG): Renamed to EB_FILE_NAME_CATALOG. + * eb/defs.h (EB_FILENAME_LANGUAGE): Renamed to EB_FILE_NAME_LANGUAGE. + * eb/defs.h (EB_FILENAME_VTOC): Renamed to EB_FILE_NAME_VTOC. + * eb/defs.h (EB_FILENAME_WELCOME): Renamed to EB_FILE_NAME_WELCOME. + * eb/defs.h (EB_FILENAME_CATALOGS): Renamed to EB_FILE_NAME_CATALOGS. + * eb/defs.h (EB_FILENAME_HONMON): Renamed to EB_FILE_NAME_HONMON. + * eb/defs.h (EB_FILENAME_HONMON2): Renamed to EB_FILE_NAME_HONMON2. + * eb/defs.h (EB_FILENAME_APPENDIX): Renamed to EB_FILE_NAME_APPENDIX. + * eb/defs.h (EB_FILENAME_FUROKU): Renamed to EB_FILE_NAME_FUROKU. + + * eb/defs.h (EB_DIRNAME_DATA): Renamed to EB_DIRECTORY_NAME_DATA. + * eb/defs.h (EB_DIRNAME_GAIJI): Renamed to EB_DIRECTORY_NAME_GAIJI. + + * eb/defs.h (EB_Font_Struct): Rename the member `filename' to + `file_name'. + + * eb/font.h (EB_ERR_EMPTY_FILENAME): Renamed to EB_ERR_EMPTY_FILE_NAME. + * eb/font.h (EB_ERR_TOO_LONG_FILENAME): Renamed to + EB_ERR_TOO_LONG_FILENAME. + + * eb/error.h (EB_ERR_EMPTY_FILENAME): EB_ERR_EMPTY_FILE_NAME. + * eb/error.h (EB_ERR_TOO_LONG_FILENAME): EB_ERR_TOO_LONG_FILE_NAME. + +2000-02-27 Motoyuki Kasahara + + * eb/defs.h (EB_Search_Context): Add the member `keyword_heading' + for keyword search. + + * eb/text.c, eb/text.h (eb_seek, eb_tell): Renamed to eb_seek_text() + and eb_tell_text(). + +2000-02-10 Motoyuki Kasahara + + * eb/zio.c (eb_zopen_epwzipped): Fix offset passed to lseek(). + Reported by Takashi NEMOTO. + +2000-01-23 Motoyuki Kasahara + + * configure.in (--with-zlib): zlib is detected automatically. + + * acconfig.h (MAILING_ADDRESS, PACKAGE, VERSION, RETSIGTYPE_VOID, + HAVE_STRUCT_UTIMBUF, WITH_SYMBOL_UNDERSCORE, DOS_FILE_PATH, + EXEEXT_EXE): Removed. + * acinclude.m4 (HAVE_STRUCT_UTIMBUF): Specify the third argument + of AC_DEFINE. + * cofigure.in (RETSIGTYPE_VOID): Likewise. + * cofigure.in (EXEEXT_EXE): Likewise. + + * configure.in: Delete the `--enable-samples' option. + * Makefile.am (ENABLE_SAMPLES): Remove the condition variable. + + * doc/Makfile.am (info_TEXINFOS): Remove eb.texi. + * doc/Makfile.am (eb_TEXINFOS): Removed. + * doc/Makfile.am (EXTRA_DIST): Remove `stamp-eb'. + * doc/Makfile.am (eb-ver.texi, stamp-eb): Delete the targets. + + * eb/filename.c: Don't use ctype.h. + + * eb/text.c, eb/text.h (eb_forward_text): New function. + * eb/text.c, eb/eb.h (eb_forward_heading): New function. + * eb/search.c (eb_hit_list_keyword): Use eb_forward_heading() + to get heading position. + +2000-01-22 Motoyuki Kasahara + + * ebfont/ebfont.c (canonicalize_path): New function, copied + from eb/ebzip.c. + * ebzip/ebzip.c (main): Don't call eb_canoncalize_filename() to + canonicalize `out_path'. Use canonicalize_path() instead. + * ebfont/ebfont.c (make_book_fonts): Check whether `book_path' + is "/". + + * eb/setword.c (eb_convert_lower_latin): Also convert alphaet + with an accent mark to the corresponding upper letter. + + * eb/font.c, eb/font.h (eb_font_count): Removed. + * eb/subbook.c, eb/eb.h (eb_subbook_count): Removed. + * eb/appsub.c, eb/eb.h (eb_appendix_subbook_count): Removed. + * eb/language.c, eb/language.h (eb_language_count): Removed. + * eb/message.c, eb/language.h (eb_message_count): Removed. + * eb/multi.c, eb/eb.h (eb_multi_search_count): Removed. + * eb/multi.c, eb/eb.h (eb_multi_entry_count): Removed. + +2000-01-18 Motoyuki Kasahara + + * eb/hook.c (euc2ascii_table_a1, euc2ascii_table_a3): Renamed + to `euc_a1_to_ascii_table' and `euc_a3_to_ascii_table'. + + * eb/defs.h (EB_TEXT_ERROR): Defined. + * eb/text.c (eb_read_text, eb_heading, eb_rawtext): If it returns + with an error, set context mode to `EB_TEXT_ERROR'. + + * ebappendix/ebappendix.in ($copyright): Defined and use it + when `ebappendix --version'. + * ebrefile/ebrefile.in ($copyright): Likewise. + +2000-01-16 Motoyuki Kasahara + + * eb/text.c (eb_text, eb_heading, eb_rawtext): Renamed to + eb_read_text(), eb_read_heading(), eb_read_rawtext(). + + * eb/defs.h (EB_CASE_UNCHANGE, EB_SUFFIX_UNCHANGE): Define the cpp + macros. + + * ebinfo/ebinfo.c (output_error_message): New static function. + * ebinfo/ebinfo.c: Use output_error_message() to output an error + messge. + + * ebzip/ebzip.c (find_subbook): Oputput an error message when + an errorr occurs. + * ebzip/ebzip.c: Return EB_SUBBOOK_ERROR rather than -1 if + the target subbook is not found. + +2000-01-15 Motoyuki Kasahara + + * eb/match.c (eb_match_exactword): Also ignores NULs in the + tail of a pattern. + + * eb/search.c (eb_presearch_word, eb_hit_list_word, + eb_hit_list_keyword, eb_hit_list_multi): Support DUDEN, which + has leaf index pages of fixed length entires. + + * eb/defs.h (Text_Context_Struct): Remove the membsers + `modifier_hook' and `reference_hook'. + * eb/text.c (eb_read_internal): Delete operations to `modifier_hook' + and `reference_hook'. + * eb/text.h (EB_HOOK_NARROW, EB_HOOK_SUBSCRIPT, EB_HOOK_SUPERSCRIPT, + EB_HOOK_EMPHASIS, EB_HOOK_PICTURE, EB_HOOK_MENU, EB_HOOK_SOUND, + EB_HOOK_REFERENCE, EB_HOOK_KEYWORD): Remove these hook codes. + * eb/defs.h (EB_NUM_HOOKS): Updated. + +2000-01-13 Motoyuki Kasahara + + * eb/defs.h (EB_Hook_Struct): The member `function' is pointer + to a function that returns `EB_Error_Code', not `int'. + + * eb/error.h (EB_NO_ERR): Renamed to `EB_SUCCESS'. + + * eb/search.c (EB_PAGE_ID_LEAF, EB_PAGE_ID_START, EB_PAGE_ID_END, + EB_PAGE_ID_HAVE_GROUP): Define these cpp macros. + * eb/search.c (eb_presearch_word, eb_hit_list_word, + eb_hit_list_keyword, eb_hit_list_multi): Use EB_PAGE_ID_* macros + to check page id. + +2000-01-10 Motoyuki Kasahara + + * eb/text.c (eb_read_internal): Discard cache data when read error + occurs. + * eb/search.c (eb_hit_list_word, eb_hit_list_keyword, + eb_hit_list_multi): Likewise. + + * eb/search.c (cache_rest_length): Declare as an auto variable + in eb_read_internal(), not static variable in this file. + * eb/search.c (cache_location, cache_length): New static variables. + * eb/text.c (eb_read_internal): Check cache status before processing + text. + + * eb/eb.c, eb/book.c: All the functions defined in eb/eb.c + are moved to `eb/book.c'. + * eb/eb.c, eb/eb.h (eb_initialize_library, eb_finalize_library): + New functions. + * eb/book.c (eb_initialize, eb_clear): Renamed to + `eb_initialize_book' and `eb_finalize_book'. + * eb/appendix.c (eb_clear_appendix): Renamed to `eb_finalize_appendix'. + + * eb/book.c (eb_finalize_book): Don't call eb_initialize_book(). + Reset variables by itself. + * eb/appendix.c (eb_finalize_appendix): Don't call + eb_finalize_appendix(). Reset variables by itself. + + * ebzip/ebzip.c (canonicalize_path): New function. + * ebzip/ebzip.c (main): Don't call eb_canoncalize_filename() to + canonicalize `out_path'. Use canonicalize_path() instead. + * ebzip/ebzip.c (main): Define `book_path' as an array of char, + rather than a pointer to char. Copy a book's path to it, and + call canonicalize_path() to canonicalize it. + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Also takes + `book_path' as an argument. Refer it rather than `book->path'. + * ebzip/ebzip.c (zip_book, unzip_book, zipinfo_book): Check whether + `book_path' and/or `out_path' is "/". + +2000-01-09 Motoyuki Kasahara + + * eb/zio.c (eb_zclaer): dispose `cache_buffer' only when it is not + NULL. + * eb/zio.c (eb_zclaer): Renamed to eb_zfinalize(). + * eb/zio.c (eb_zinitialize): Add the new function. + * eb/zio.c (eb_zinitialize, eb_zread_ebzipped, eb_zread_epwzipped): + Allocate memory to `cache_buffer' in the new function eb_zinitialize() + rather than eb_zread_ebzipped() or eb_zread_epwzipped(). + + * eb/text.c (eb_text, eb_heading): Don't initialize `default_hookset'. + * eb/text.c (default_hookset): Move to `hook.c' and renamed to + `eb_default_hookset'. + * eb/internal.h (eb_default_hookset): Declare as an external variable. + * eb/hook.c, eb/internal.h (eb_initialize_default_hookset): + Add the function. + + * ebzip/ebzip.c (main): Go to `die' when eb_subbook_list() fails, + or when an unknown subbook is specified. + * eb/ebzip.c (main): Call eb_clear() at the end of the routine. + + * eb/search.c (eb_hit_list): Fully re-written to support + keyword and multi search. + + * eb/search.c (eb_initialize_search): Initialize also + `search_contexts[0].code' in a book. + * eb/search.c (eb_presearch_word, eb_hit_list_word, + eb_hit_list_keyword, eb_hit_list_multi): Take a search context + as a second argument to record search parameters. + * eb/search.c (eb_search_word_internal): Use search context + in a target book. + * eb/search.c (eb_hit_list): Likewise. + * eb/search.c (eb_hit_list_internal): Likewise. + * eb/exactword.c (eb_search_exactword): Likewise. + * eb/word.c (eb_search_word): Likewise. + * eb/endword.c (eb_search_endword): Likewise. + +2000-01-08 Motoyuki Kasahara + + * eb/defs.h (EB_BOOK_NONE): Define the cpp macro. + * eb/text.c (eb_initialize_text, eb_read_internal): Use EB_BOOK_NONE + rather than -1, to represent no cache data is buffered. + * eb/search.c (eb_initialize_search, eb_presearch_word): Likewise. + + * eb/appsub.c (eb_initialize_appendix_subbook, + eb_set_appendix_subbook): Define the `succeeded' label, and + go to there when there is nothing to be done in the latter of the + function. + * eb/font.c (eb_set_font) Likewise. + * eb/language.c (eb_set_language): Likewise. + * eb/narwalt.c (eb_narrow_character_text_jis, + eb_narrow_character_text_latin): Likewise. + * eb/narwfont.c (eb_have_narrow_font): Likewise. + eb/search.c (eb_presearch_word, eb_hit_list_word, eb_hit_list_keyword, + eb_hit_list_multi): Likewise. + * eb/subbook.c (eb_initialize_subbook, eb_set_subbook): Likewise. + * eb/widealt.c (eb_wide_character_text_jis, + eb_wide_character_text_latin): Likewise. + * eb/widefont.c (eb_have_wide_font): Likewise. + + * eb/appendix.c, eb/appsub.c, eb/copyright.c, eb/eb.c, + eb/exactword.c, eb/filename.c, eb/font.c, eb/graphic.c, eb/hook.c, + eb/keyword.c, eb/language.c, eb/menu.c, eb/message.c, eb/multi.c, + eb/narwalt.c, eb/narwfont.c, eb/search.c, eb/setword.c, eb/stopcode.c, + eb/subbook.c, eb/text.c, eb/widealt.c, eb/widefont.c, eb/word.c: + Define the `failed' label in most functions. Go to there + if error. + + * eb/defs.h (EB_SUBBOOK_ERROR): Define the cpp macro. + * eb/appsub.c (eb_appendix_subbook): Return EB_SUBBOOK_ERROR + rather than -1 if error. + * eb/subbook.c (eb_subbook): Likewise. + + * eb/defs.h (EB_DISC_ERROR): Define the cpp macro. + * eb/eb.c (eb_disc_type): Return EB_DISC_ERROR rather than -1 + if error. + * eb/defs.h (EB_CHARCODE_ERROR): Define the cpp macro. + * eb/eb.c (eb_character_code): Return EB_CHARCODE_ERROR rather than + -1 if error. + + * eb/font.h (EB_FONT_ERROR): Define the cpp macro. + * eb/eb.c (eb_font): Return EB_FONT_ERROR rather than -1 if error. + + * eb/language.h (EB_LANG_ERROR): Define the cpp macro. + * eb/setword.c (eb_language): Return EB_LANG_ERROR rather than + -1 if error. + + * eb/setword.c (eb_reverse_word_latin): Don't check whether + `word_length' is 0. This is not needed. + * eb/setword.c (eb_reverse_word_jis): Don't check whether + `word_length' is less than 2. This is not needed. + + * eb/messages.c (eb_initialize_messages): Return 0 or -1. + + * eb/narwalt.c (eb_narrow_alt_start, eb_narrow_alt_end): + Return -1 if an error occurs. + * eb/widealt.c (eb_wide_alt_start, eb_wide_alt_end): Likewise. + +2000-01-07 Motoyuki Kasahara + + * eb/defs.h (EB_Appendix_Struct, EB_Book_Struct, EB_Hookset_Struct): + Add a member named `error'. + * eb/appendix.c (eb_initialize_appendix): Initialize `error' to 0. + * eb/eb.c (eb_initialize): Initialize `error' to 0. + * eb/hook.c (eb_initialize_hookset): Initialize `error' to 0. + + * eb/setword.c (eb_fix_word_latin, eb_fix_word_jis): + Takes the argument `book' as the first argument. + + * eb/appendix.c, eb/appsub.c, eb/hook.c, eb/narwalt.c, eb/widealt.c: + Set `appendix->error' instead of `eb_error', if an error occurs. + * eb/copyright.c, eb/eb.c, eb/error.c, eb/font.c, eb/graphic.c, + eb/keyword.c, eb/language.c, eb/match.c, eb/menu.c, eb/message.c, + eb/multi.c, eb/narwfont.c, eb/search.c, eb/setword.c, eb/stopcode.c, + eb/subbook.c, eb/text.c, eb/uint.c, eb/widefont.c: Set `book->error' + instead of `eb_error', if an error occurs. + * eb/hookset.c: Set `hookset->error' instead of `eb_error', + if an error occurs. + + * eb/filename.c (eb_canonicalize_filename, + eb_canonicalize_filename_internal, eb_canonicalize_appendix_filename): + Rename the original `eb_canonicalize_filename()' to `...internal()', + and add the argument `error'. + Add the new function `eb_canonicalize_filename()' and + `eb_canonicalize_appendix_filename()'. + * filename.c (eb_catalog_filename_internal, + eb_fix_filename_internal): Call `eb_canonicalize_filename_internal()', + instead of `eb_canonicalize_filename'. + * eb/eb.c (eb_bind): Call `eb_canonicalize_appendix_filename()', + instead of `eb_canonicalize_filename'. + + * eb/error.c, eb/error.h (eb_error): Removed. + * eb/error.c, eb/error.h (eb_error, eb_appendix_error, + eb_hookset_error): Add these functions. + * eb/error.c, eb/error.h (eb_error_message, eb_error_message2): + The original eb_error_message2() is renamed to eb_error_message(). + The original eb_error_message() is overwritten. + + * eb/narwfont.c (eb_narrow_font_width2, eb_narrow_font_size2): + Don't set `eb_error'. + * eb/widefont.c (eb_wide_font_width2, eb_wide_font_size2): + Likewise. + * eb/bitmap.c (eb_narrow_font_xbm_size, eb_narrow_font_xpm_size, + eb_narrow_font_gif_size, eb_wide_font_xbm_size, + eb_wide_font_xpm_size, eb_wide_font_gif_size): + Likewise. + + * eb/text.c, eb/text.h (eb_initialize_hookset, eb_set_hook, + eb_set_hooks): Move to `eb/hook.c'. + * eb/hook.c, eb/text/h (eb_hook_stopcode_dummy, + eb_hook_stopcode_mixed): Removed. + + * Makefile.am (EXTRA_DIST): Add `ChangeLog.0'. + + * eb/font.c (eb_font_count): Return -1 if an error occurs. + + * eb/appendix.c (eb_bind_appendix): Don't call + eb_initialize_appendix(), but eb_clear_appendix(). + +2000-01-06 Motoyuki Kasahara + + * eb/defs.h (EB_Subbook): Rename the member `multi' to `multis'. + + * eb/font.c (eb_initialize_eb_fonts, eb_initialize_epwing_fonts): + Use memmove(), not memcpy(). + * eb/message.c (eb_initialize_messages): Likewise. + * eb/text.c (eb_read_internal): Likewise. + * eb/font.c, eb/message.c, eb/text.c: Check for HAVE_MEMMOVE. + * eb/memmove.c: New file. + * eb/internal.h: Declare eb_memmove(). + * eb/Makefile.am (libeb_la_SOURCES): Add `memmove.c'. + * configure.in (AC_CHECK_FUNCS): Add `memmove'. + + * eb/search.c: Include string.h, and check HAVE_MEMCPY and + MEMMOVE. + + * libebutils/memset.c (memset): Type of return value is `VOID *', + not `void *'. + +2000-01-05 Motoyuki Kasahara + + * eb/defs.h (EB_SEARCH_EXACTWORD, EB_SEARCH_WORD, EB_SEARCH_ENDWORD, + EB_SEARCH_KEYWORD, EB_SEARCH_MULTI,EB_SEARCH_NONE): Defined. + * eb/defs.h (EB_Search_Code, EB_Text_Code): Defined. + * eb/defs.h (EB_Multi_Search_Struct, EB_Search): Defined. + * eb/defs.h (EB_Search_Context_Struct, EB_Search_Context): Defined. + * eb/defs.h (EB_Multi_Entry_Struct, EB_Multi_Entry): Merged to + `EB_Search_Struct' and `EB_Search'. + * eb/defs.h (EB_Search_Context_Struct): Add the member `label' and + `candidates_page', and rename `page' to `index_page'. + * eb/defs.h (EB_Multi_Search_Struct): Add the member `search', and + change the type of `entries' from `EB_Multi_Entry' to `EB_Search'. + * eb/defs.h (EB_Subbook_STruct): Change the type of `multi' from + `EB_Search[]' to `EB_Multi_Search[]'. + + * eb/eb.h: Declaration of functions defined in eb/filename.c + are moved to `eb/internal.h'. + + * eb/search.c: Move eb_have_word_search() and eb_search_word() + to the new file eb/word.c. + * eb/search.c: Move eb_have_endword_search() and eb_search_endword() + to eb/endword.c, new file. + * eb/search.c: Move eb_have_endword_search() and eb_search_endword() + to the new file eb/endword.c. + * eb/search.c: Move eb_have_exactword_search() and + eb_search_exactword() to the new file eb/exactword.c. + + * eb/multi.c, eb/eb.h (eb_multi_entry_have_exactword_search, + eb_multi_entry_have_word_search, eb_multi_entry_have_endword_search, + eb_multi_entry_have_keyword_search): Removed. + * eb/multi.c, eb/eb.h (eb_multi_entry_have_candidates, + eb_multi_entry_candidates): Added these functions. + * eb/multi.c, eb/eb.h (eb_search_multi): Added these functions. + + * eb/error.h (EB_ERR_DIFF_SUBBOOK, EB_ERR_DIFF_BOOK, + EB_ERR_NO_PREV_SEARCH, EB_ERR_NO_PREV_CONTENT, + EB_ERR_NO_SUCH_MULTI_ID, EB_ERR_NO_SUCH_ENTRY_ID): Removed. + * eb/error.h (EB_ERR_FAIL_OPEN_START, EB_ERR_FAIL_READ_START, + EB_ERR_FAIL_SEEK_START, EB_ERR_UNEXP_START, EB_ERR_NO_START): + Removed these obsolete error code names that are remained for + backword compatibility. + + * eb/error.h (EB_ERR_TOO_MANY_WORDS, EB_ERR_NO_WORD): Add these + to the error code list. + + * eb/hook.c (euc2ascii_table_a1, euc2ascii_table_a3) Declared + as `const'. + + * eb/keyword.c: Define `eb_search_keyword()'. + + * eb/setword.c, eb/internal.h (eb_set_keyword, eb_set_multiword): + Added these functions. + + * eb/subbook.c (eb_initialize_indexes): Initialize `label' and + `candidates_page', the struct members in `EB_Search'. + + * eb/search.c (comparison_result, word, canonicalized_word, page, + offset, page_id, entry_count, entry_index): These static variables + are moved to struct members of `EB_Search_Context'. + * eb/search.c (subbook_code): The static variable are removed. + * eb/search.c (book_code, page_buffer, bufp): These static variables + are renamed to `cache_book_code', `cache_buffer' and `cachep'. + * eb/search.c (cache_page): New static variable. + + * eb/search.c (eb_search_word_internal): Renamed to + `eb_presearch_word'. + * eb/search.c (eb_hit_list_internal): Renamed to `eb_hit_list_word'. + * eb/search.c (eb_hit_list_word): Read a page at the beginning of + the loop, instead of the tail. + * eb/search.c (eb_hit_list_keyword, eb_hit_list_multi): New functions. + * eb/defs.h (EB_Book_Struct): Add the member `search_contexts'. + * eb/defs.h (EB_Search_Context_Struct): Defined. + + * eb/ebinfo.c (output_multi_information): Output `with candidates' + instead of `search methods'. + +2000-01-03 Motoyuki Kasahara + + * eb/setword.c (jisx0208_table, jisx0201_table, long_vowel_table, + voiced_consonant_table): Declared as `const'. + * eb/hook.c (euc2ascii_table_a1, euc2ascii_table_a3): Likewise. + + * eb/defs.h, eb/internal.h: All functions defined in `eb/filename.h' + are declared in `eb/internal.h', not `eb/defs.h'. + + * eb/text.h: Use `EB_UINT_FUNCTION', not `EB_UINT_FUNC'. + +1999-12-28 Motoyuki Kasahara + + * eb/bitmap.c (gif_preamble): Renamed to `gif_default_preamble'. + * eb/bitmap.c (eb_bitmap_to_gif): Don't modify `gif_default_preamble'. + +1999-12-26 Motoyuki Kasahara + + * eb/text.c (eb_read_internal): Discard cache buffered in + `cache_buffer' if different book's data are cached. + * eb/text.c (eb_read_internal): Update `book->text_context.location' + when the pointed character is prossessed. + + * eb/text.c (eb_initialize_text): Rewritten. + + * eb/text.c (eb_text): Don't check for EB_ERR_NO_PREV_CONTENT, + EB_ERR_DIFF_BOOK or EB_ERR_DIFF_SUBBOOK error. + * eb/text.c (eb_heading): Likewise. + + * eb/text.c, eb_text.h (eb_tell): Add this function. + + * eb/text.c (eb_set_hook): Don't test whether `hook->code' is + EB_HOOK_NULL. + + * eb/text.c (bookcode, pagebuf, pagebufp, pagerest): Renamed to + `cache_book_code`, `cache_buffer`, `cachep` and `cache_rest_length'. + * eb/text.c (callcount, subcode, location, workbuf, worklen, + modhook, refhook, narwflag, charapp, bookeof, textend, skipcode): + Remove these static variables. + * eb/defs.h (EB_Book_Struct): Add the member `text_context'. + * eb/defs.h (EB_Text_Context_Struct): Defined. + + * eb/bitmap.c, eb/copyright.c, eb/ebunzip1.c, eb/error.c, + eb/filename.c, eb/graphic.c, eb/hook.c, eb/menu.c, eb/setword.c, + eb/stopcode.c, eb/uint.c: Include `internal.h'. + * eb/uint.c: Undefine the cpp macros eb_uint1, eb_uint2, eb_uint3 + and eb_uint4. + + * eb/defs.h, eb/appendix.h, eb/eb.h, eb/error.h, eb/font.h, + eb/internal.h, eb/language.h, eb/text.h (EB_P): + Defined in eb/defs.h only. + + * eb/appsub.c, eb/appendix.h (eb_appendix_subbook2): Removed. + + * eb/defs.h, eb/text.h (EB_Hook, EB_Hookset): Move definitions + from eb/text.h to eb/defs.h, + * eb/defs.h (EB_Book_Struct): Rename the member `sub_count' to + `subbook_count', `sub_current' to `subbook_current', `lang_count' + to `language_count' and `lang_current' to `language_current'. + * eb/defs.h (EB_Subbook_Struct): Rename the member `sub_file' to + `text_file', `word_alpha' to `word_alphabet' and `endword_alpha' + to `endword_alphabet'. + * eb/defs.h (EB_Language_Struct): Rename the member `msg_count' to + `message_count'. + * eb/defs.h (EB_Appendix_Struct): Rename the member `sub_count' to + `subbook_count', and `sub_current' to `subbook_current'. + * eb/defs.h (EB_Alternation_Cache_Struct): Rename the member + `charno' to `char_no'. + * eb/defs.h (EB_Huffman_Node_Struct): Change the type of the members + `left` and `right` to `EB_Huffman_Node'. + * eb/defs.h (EB_Huffman_Node, EB_Zip, EB_Alternation_Cache, + EB_Appendix_Subbook, EB_Appendix, EB_Font, EB_Language, + EB_Multi_Entry, EB_Search, EB_Subbook, EB_Text_Context, EB_Book, + EB_Position, EB_Hit, EB_Hook, EB_Hookset): Typedef'ed first, + and then define their conrete structs. + * eb/defs.h, eb/error.h (EB_Error_Code): + Move definition from eb/error.h to eb/defs.h. + * eb/defs.h, eb/text.c (EB_MAXLEN_TEXT_WORK, EB_NUM_HOOKS): + Move definitions from eb/text.c to eb/defs.h. + * eb/defs.h, eb/text.c (CONTENT_TEXT, CONTENT_HEADING, + CONTENT_RAWTEXT): Move definitions from eb/text.c to eb/defs.h, + and renamed to EB_TEXT_TEXT, EB_TEXT_HEADING and EB_TEXT_RAWTEXT. + Add the new content type macro `EB_TEXT_NONE'. + * eb/defs.h (EB_WORD_ALPHA): Renamed to `EB_WORD_ALPHABET'. + + * eb/error.c (messages): Add the `const' modifier. + +1999-12-13 Motoyuki Kasahara + + * eb/error.h: Rename the error code + EB_ERR_FAIL_OPEN_START to EB_ERR_FAIL_OPEN_TEXT, + EB_ERR_FAIL_READ_START to EB_ERR_FAIL_READ_TEXT, + EB_ERR_FAIL_SEEK_START to EB_ERR_FAIL_SEEK_TEXT, + EB_ERR_UNEXP_START to EB_ERR_UNEXP_TEXT, + and EB_ERR_NO_START to EB_ERR_NO_TEXT. + The old error code names are obsoleted, but still available. + + * eb/defs.h (EB_WORD_ALPHA): Renamed to `EB_WORD_ALPHABET'. + * eb/defs.h (EB_Alternation_Cache): Rename the structure member + `charno' to `char_no'. + * eb/defs.h (EB_Appendix): Rename the structure member + `sub_file' to `appendix_file', + `sub_count' to `subbook_count' + and `sub_current' to `subbook_current'. + * eb/defs.h (EB_Language): Rename the structure member + `msg_count' to `message_count'. + * eb/defs.h (EB_Book): Rename the structure member + `sub_file' to `text_file', + `word_alpha' to `word_alphabet', + `endword_alpha' to `endword_alphabet', + `sub_count' to `subbook_count', + `sub_current' to `subbook_current'. + `sub_count' to `subbook_count', + and `lang_current' to `language_current'. + +1999-12-12 Motoyuki Kasahara + + * eb/error.c (messages): Modify the error message of the error + code 39 (EB_ERR_NO_START). + + * eb/text.c, eb/internal.h (eb_initialize_text): Add an argument + `book'. Initialize variables only when a code of `book' is + equal to `bookcode'. + * eb/seaarch.c, eb/internal.h (eb_initialize_search): Likewise. + + * eb/text.c (eb_text, eb_heading, eb_rawtext): Check `bookcode' + for the EB_ERR_NO_PREV_CONTENT error when `callcount' is 0. + + * eb/text.c (eb_tell): Add a new function. + + * eb/text.c (eb_text_internal): Don't go to `at_end' when + no enough space is left on the text buffer. + diff --git a/lib/ebu/ChangeLog.2 b/lib/ebu/ChangeLog.2 new file mode 100644 index 0000000..775864b --- /dev/null +++ b/lib/ebu/ChangeLog.2 @@ -0,0 +1,1409 @@ +2003-12-28 Motoyuki Kasahara + + * Version 4.0. + + * eb/defs.h: Do not be generated from `eb/defs.h.in' any longer. + * eb/Makefile.am (EXTRA_DIST, MAINTAINERCLEANFILES): Delete + `stamp-defs-h' and `defs.h.in'. + * eb/Makefile.am (BUILT_SOURCES): Delete `defs.h'. + + * configure.ac (AC_ARG_ENABLE): Add `--enable-ebnet' option. + * eb/Makefile.am (libeb_ebnet_sources): Define the variable according + with ENABLE_EBNET. + + * samples/Makefile.am (noinst_PROGRAMS): Add `booklist'. + * doc-ja/Makefile.am (eb_ja_TEXINFOS, MAINTAINERCLEANFILES): + add `booklist-c.texi'. + + * eb/zio.h: Fix TIME_WITH_SYS_TIME check code. + + * eb/defs.h: Include `sysdefs.h'. Use `EB_ENABLE_PTHREAD' and + `EB_ENABLE_EBNET', instead of `EBCONF_ENABLE_PTHREAD' and + `EBCONF_ENABLE_EBNET'. + * eb/Makefile.am (CLEANFILES): Add `stamp-sysdefs-h' and `sysdefs.h'. + * eb/Makefile.am (BUILT_SOURCES): Add `sysdefs.h' + * eb/Makefile.am (nodist_pkginclude_HEADERS): Defined. + +2003-12-22 Motoyuki Kasahara + + * m4/eb3.m4: Renamed to `eb4.m4'. + * m4/Makefile.am (m4data_DATA, EXTRA_DIST): Rename `eb4.m4' to + `eb3.m4'. + + * Use Autoconf-2.59, Automake-1.8 and Libtool-1.5. + * m4/eb4.m4, m4/gettext.m4, m4/herrno.m4, m4/in6addr.m4, + m4/lcmessage.m4, m4/libtool.m4, m4/sockaddrin6.m4, + m4/utimbuf.m4, m4/voidpointer.m4: Quote function name to be defined + in AC_DEFUN. + + * m4/eb4.m4 (AC_REQUIRE): Add AC_C_PROTOTYPES. + +2003-12-21 Motoyuki Kasahara + + * eb.conf.in: Always define EBCONF_ENABLE_EBNET. + * m4/eb3.m4: Check EBCONF_ENABLE_EBNET. + * eb/defs.h.in: Use EBCONF_ENABLE_EBNET instead of ENABLE_EBNET. + + * eb/error.c, eb/error.h: Add two error codes EB_ERR_UNBOUND_BOOKLIST + and EB_ERR_NO_SUCH_BOOK. + * eb/defs.h, eb/booklist.c, eb/booklist.h: APIs for EB_BookList + are revised. eb_booklist_book_count(), eb_booklist_book_name() + and eb_booklist_book_title() return EB_Error_Code. + * eb/defs.h, eb/booklist.c, eb/booklist.h: Support for pthread. + * eb/defs.h, eb/booklist.c, eb/booklist.h: Add internal object counter + for EB_BookList. + +2003-11-23 Motoyuki Kasahara + + * config.guess, config.sub, depcomp, install-sh, missing, + mkinstalldirs, doc/mdate-sh, doc-ja/mdate-sh: + Import from Autocomake-1.7.9. + +2003-11-22 Motoyuki Kasahara + + * m4/Makefile.am (EXTRA_DIST): Add `voidpointer.m4'. + + * eb/search.c (eb_hit_list_keyword, eb_hit_list_multi): + Don't perform comparison of input keyword and group entry element. + + * eb/readtext.c (eb_read_text_internal): Fix a bug that EB Library + crashes when it outputs a debug log. + +2003-11-19 Motoyuki Kasahara + + * configure.ac (AC_C_VOID_POINTER, AC_C_PROTOTYPES): Added. + * configure.ac (AC_C_VOID_POINTER): Added. + * m4/voidpointer.m4: Define `AC_C_VOID_POINTER'. + * ebrefile/ebrefile.c, ebfont/ebfont.c, eb/zio.c, eb/memmove.c, + eb/zio.h, eb/urlparts.c, eb/urlparts.h, eb/linebuf.c, eb/build-pre.h, + eb/linebuf.h, eb/defs.h.in, eb/filename.c, eb/log.c, eb/multiplex.c, + eb/getaddrinfo.c, eb/eb.h, eb/getaddrinfo.h, eb/ebnet.c, + ebstopcode/ebstopcode.c, libebutils/getopt.c, libebutils/yesno.h, + libebutils/getopt.h, libebutils/ebutils.c, libebutils/makedir.h, + libebutils/getumask.h, libebutils/samefile.h, libebutils/memset.c, + ebinfo/ebinfo.c, ebzip/ebzip.h: + Use PROTOTYPES and VOID, instead of __STDC__ and WIN32. + + * eb/log.c, eb/build-pre.h, eb/eb.h: Use `stdarg.h' if __STDC__ or + MSVC is defined. + +2003-11-12 Motoyuki Kasahara + + * eb/match.c (eb_match_word_jis_kana): Rename the function to + `eb_match_word_kana_group'. + Add variant function eb_match_word_kana_group_single(). + * eb/match.c (eb_exact_match_word_jis_kana): Rename the function to + `eb_exact_match_word_kana_group'. + Add variant function eb_match_exact_word_kana_group_single(). + +2003-10-19 Motoyuki Kasahara + + * Version 4.0beta3. + + * ebstopcode/ebstopcode.c (parse_text_position_argument): Add check + codes for page:offset. + +2003-10-18 Motoyuki Kasahara + + * ebstopcode/ebstopcode.c: Add `--text-position' (-p) option. + +2003-10-14 Motoyuki Kasahara + + * doc-ja/c2texi: Expand tabs to spaces. + +2003-10-13 Motoyuki Kasahara + + * eb/subbook.c, eb/urlparts.c, eb/build-pre.h, eb/filename.c, + eb/ebnet.c, libebutils/ebutils.c, ebfont/ebfont.c, + ebrefile/ebrefile.c, ebstopcode/ebstopcode.c, ebzip/ebzip.c, + ebzip/ebzip.h: Don't redefine or use ctype macros such as isalpha(). + Define and use ASCII_ISXXX() macros instead. + +2003-10-04 Motoyuki Kasahara + + * eb/Makefile.am (stamp-defs-h, stamp-build-post-h, stamp-widealt-h, + stamp-widefont-h): Insert "automatically generated from ..." messages + to the source files. + + * m4/gettext.m4 (eb_GNU_GETTEXT): Also checks for iconv.h, + libcharset.h, iconv_open(), libiconv_open(), locale_charset() and + -liconv. Also add the ICONVINCS and ICONVLIBS variables. + * m4/gettext.m4 (eb_GNU_GETTEXT): Don't add iconv_includes to INTLINCS. + * configure.ac (AC_CHECK_FUNCS): Add nl_langinfo(). + * configure.ac (AC_CHECK_HEADERS): Add `langinfo.h'. + + * ebfont/Makefile.am (ebfont_LDADD, ebfont_DEPENDENCIES): + Add $(ICONVLIBS) and $(ICONVDEPS) respectively. + * ebinfo/Makefile.am (ebinfo_LDADD, ebinfo_DEPENDENCIES): Ditto + * ebrefile/Makefile.am (ebrefile_LDADD, ebrefile_DEPENDENCIES): Ditto + * ebstopcode/Makefile.am (ebstopcode_LDADD, ebstopcode_DEPENDENCIES): + Ditto + * ebzip/Makefile.am (ebzip_LDADD, ebzip_DEPENDENCIES): Ditto + + * libebutils/puts_eucjp.c: New file. + * libebutils/Makefile.am (libebutils_a_SOURCES): Add puts_eucjp.c + * libebutils/Makefile.am (INCLUDES): Add @ICONVINCS@ + + * ebinfo/ebinfo.c: Print EUC-JP strings as the current locale + encoding with fputs_eucjp_to_locale(). + * ebstopcode/ebstopcode.c: Ditto. + + * ebzip/ebzip.c (main): Also recognize "ebzipinfo.exe" and "ebzipinf" + as the `invoked_base_name' when EXEEXT_EXE is defined. + +2003-10-03 Motoyuki Kasahara + + * eb/build-post.h.in (LOCALEDIR): Renamed to EB_LOCALEDIR. + * eb/build-post.h.in (LOCALEDIR): Set to localedir() if WIN32. + * ebutils/ebutils.h.in (LOCALEDIR): Ditto. + + * eb/Makefile.am (dist_libeb_la_SOURCES, nodist_libeb_la_SOURCES): + Move `widealt.c' and `widefont.c' from nodist_ to to dist_. + * eb/Makefile.am (CLEANFILES, MAINTAINERCLEANFILES): + Move `stamp-wide-alt-h', `stamp-wide-font-h', `widealt.c' and + `widefont.c' from CLEANFILES to MAINTAINERCLEANFILES. + * eb/Makefile.am (EXTRA_DIST): Add ``stamp-wide-alt-h' and + `stamp-wide-font-h'. + + * eb/Makefile.am (dist_pkginclude_HEADERS, nodist_pkginclude_HEADERS): + Move `defs.h' from nodist_ to to dist_. + * eb/Makefile.am (CLEANFILES, MAINTAINERCLEANFILES): + Move `stamp-defs-h' from CLEANFILES to MAINTAINERCLEANFILES. + * eb/Makefile.am (EXTRA_DIST): Add ``stamp-defs-h'. + +2003-09-23 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to 4.0beta3. + + * eb/build-pre.h, eb/refile.c, ebfont/ebfont.c, eb/urlparts.c, + ebstopcode/ebstopcode.c, libebutils/ebutils.c, ebzip/ebzip.h + Undefine ctype macros if defined. + + * ebzip/unzipfile (EB_P): Delete definition of the cpp macro. + + * eb/ebnet.c (ebnet_get_booklist): Fix a bug. Don't call close() + directly to close a connection. Call ebnet_disconnect_socket() + instead. + + * configure.ac (AC_CHECK_FUNCS): Delete `syslog' and `vsyslog'. + Add `dup2' instead. + * eb/ebnet.c (ebnet_read): Change type of the first argument + `file' from `int' to `int *'. It means the given file descriptor + might be changed by ebnet_read(). + + * eb/multiplex.c: On WIN32, call closesocket() instead of close() + to close a socket. + + * eb/zio.c, eb/build-post.h.in (is_ebnet_url): Don't call + strncasecmp(). + + * eb/filename.c (eb_fix_path_name_suffix, eb_compose_path_name, + eb_compose_path_name2, eb_compose_path_name3): Supprt for EBNET URL + handle on WIN32. + * eb/ebnet.c (ebnet_initialize): Call WSAStartup() if WIN32. + * eb/muliplex.c (ebnet_connect_socket): Replace dup() with + WSADuplicateSocket() if WIN32. + + * ebinfo/ebinfo.c (output_booklist): Call eb_initialize_library() + and eb_finalize_library(). + +2003-09-21 Motoyuki Kasahara + + * eb/match.c (eb_match_word_jis_kana): Fix a bug that it never returns + 0 even if `word' matches `pattern'. + + * eb/keyword.c (eb_search_keyword): Perform `word search' for each + keyword. + eb/multi.c (eb_search_multi): Perform `word search' for each entry + if the entry doesn't have candidates. + + * libebutils/makedir.c (make_missing_directory): Support for WIN32. + * eb/log.c (eb_log): Ditto. + * eb/linebuf.c: Ditto. + * eb/getaddrinfo.c, eb/getaddrinfo.h: Ditto. + * eb/dummyin6.c, eb/dummyin6.h: Ditto. + * eb/linebuf.c (read_line_buffer, binary_read_line_buffer): For WIN32, + use recv() rather than read(). + * eb/filename.c (eb_path_name_zio_code): Support for Win32. + + * libebutils/getopt.c: Include if exists. + + * eb/Makefile.am (noinst_HEADERS): `build-post.h' is now + nodist_noinst_HEADERS. + +2003-09-01 Motoyuki Kasahara + + * Version 4.0beta2. + + * eb/defs.h.in (EB_Search_Context_Struct): Add `compare_pre'. + * eb/match.c (eb_pre_match_word, eb_exact_pre_match_word_jis, + eb_exact_pre_match_word_latin): New functions for pre-search. + *eb/search.c (eb_presearch_word): Use `compare_pre' for comparision. + + * eb/match.c (eb_match_word_jis_kana, eb_match_exactword_jis_kana): + Fix bugs in comparision of Kana characters. + +2003-08-30 Motoyuki Kasahara + + * Version 4.0beta1. + + * eb/error.c, eb/error.h: Add EB_ERR_NO_ALT and EB_ERR_NO_STOPCODE. + * eb/stopcode.c: Set stop_code[0] and stop_code[1] to -1 if an error + occurs. + + * samples/Makefile.am (noinst_PROGRAMS): Add `appendix'. + * samples/appendix.c: New file. + +2003-08-24 Motoyuki Kasahara + + * eb/multiplex.c (ebnet_connect_socket): Fix a bug in duplication + of socket entry. + + * eb/narwfont.c (eb_open_narrow_font_file): Fix bugs in LOG() calls. + +2003-08-15 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to "4.0beta1". + +2003-08-14 Motoyuki Kasahara + + * eb/Makefile.am (dist_libeb_la_SOURCES): Add `booklist.c'. + * eb/Makefile.am (dist_pkginclude_HEADERS): Add `booklist.h'. + * eb/booklist.c: New file. + * eb/defs.h.in (EB_BookList_Entry, EB_BookList): New structured types. + * eb/ebnet.h (EBNET_MAX_BOOK_TITLE_LENGTH): Defined. + * eb/ebnet.c (ebnet_get_booklist): New function. + * ebinfo/ebinf.c (output_booklist): New function. + * ebinfo/ebinf.c (main): Add `--booklist' and `-l' options. + * ebinfo/ebinfo.c (output_information, output_multi_information): + Return `EB_Error_Code' instead of `int'. + +2003-08-09 Motoyuki Kasahara + + * eb/appendix.in: delete `--case' and `--suffix' options. + Now ebappendix checks all existing directories and files. + +2003-07-30 Motoyuki Kasahara + + * configure.ac, ebstopchk/ebstopchk.c, ebstopchk/Makefile.am: + Rename `ebstopchk' to `ebstopcode'. + + * Makefile.am (EXTRA_DIST): Add `misc/ebdump', `misc/ebfixlog' and + `misc/eb-index-info'. + +2003-07-24 Motoyuki Kasahara + + * eb/bitmap.c (eb_wide_font_xbm_size, eb_wide_font_xpm_size, + eb_wide_font_gif_size, eb_wide_font_bmp_size): Fix bugs that they + returned size of narrow font. + + * eb/defs.h.in (EB_Search_Context_Struct): Rename `compare_pre' and + `compare_hit' to `compare_single' and `compare_group'. + + * eb/match.c: Revise string comparison functions. + * eb/word.c (eb_search_word), eb/endword.c (eb_search_endword), + eb/exactword.c (eb_search_exactword), eb/keyword.c (eb_search_keyword), + eb/multi.c (eb_search_multi): Likewise. + eb/search.c (eb_hit_list_word, eb_hit_list_keyword, + eb_hit_list_multi): Likewise. + +2003-07-19 Motoyuki Kasahara + + * eb/narwfont.c (eb_open_narrow_font_file): Fix a bug that it + cannot open a font file in EB/EBG/EBXA/S-EBXA/EBXA-C. + + * eb/subbook.c (eb_load_subbook_indexes): Fix a bug in word search + that EB Library sometimes cannot have found words. + * eb/match.c (eb_match_word_latin, eb_match_word_jis, + eb_exact_match_word_latin, eb_exact_match_word_jis): Ditto. + +2003-07-11 Motoyuki Kasahara + + * eb/ebnet.c (ebnet_read): Output a log message upon return. + +2003-07-03 Motoyuki Kasahara + + * eb/book.c (misleaded_book_table): + Add "Japanese-English-Spanish Jiten (YRRS-060)". + +2003-06-11 Motoyuki Kasahara + + * Version 4.0beta0. + + * eb/multiplex.c (ebnet_connect_socket): Fix a bug that it tries to + connect with an empty address. + +2003-06-07 Motoyuki Kasahara + + * eb/defs.h.in (EB_Font_Struct): Add `glyphs'. + * eb/narwfont.c (eb_load_narrow_font): Split it into + eb_open_narrow_font_file() and eb_load_narrow_font_header(). + * eb/narwfont.c (eb_load_narrow_font_glyphs): New function. + * eb/font.c (eb_load_fonts): Renamed to eb_load_font_headers(). + Don't call eb_set_font(). + * eb/font.c (eb_set_font, eb_narrow_character_bitmap_jis, + eb_narrow_character_bitmap_latin): Load font glyph data to memory. + + * eb/narwfont.c (eb_narrow_font_size2): Add missing `break' statements + in a `switch' block. + +2003-06-05 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to 4.0beta0. + + * eb/appendix.c (eb_initialize_appendix, eb_bind_appendix, + eb_finalize_appendix): Add ebnet supprt codes. + * eb/ebnet.c (ebnet_bind_appendix, ebnet_finalize_appendix): + New functions. + * eb/defs.h.in (EB_Appendix_Struct): Add `ebnet_file'. + +2003-05-22 Motoyuki Kasahara + + * eb/ebnet.c, eb/multiplex.c: Implement automatic reconnection. + + * eb/multiplex.c (hello_hook, bye_hook): They are now static variables + in this file. + * eb/multiplex.c (ebnet_set_hello_hook, ebnet_set_bye_hook): + New functions. + * eb/multiplex.c (ebnet_initialize): + Renamed to `ebnet_initialize_multiplex'. + * eb/ebnet.c (ebnet_initialize): New function. + * eb/multiplex.c (ebnet_mark_as_lost_sync): + Renamed to `ebnet_set_lost_sync'. + +2003-05-12 Motoyuki Kasahara + + * eb/font.c (eb_load_fonts): Load 8x16 and 16x16 fonts only for + efficiency. + +2003-05-07 Motoyuki Kasahara + + * m4/Makefile.am (EXTRA_DIST): Add `herrno.m4', `in6addr.m4', + `sockaddrin6.m4' and `sockinttypes.m4'. + * configure.ac (AC_CHECK_LIB): Check resolv, bind, nsl and socket + libraries. + +2003-05-06 Motoyuki Kasahara + + * configure.ac (AC_INIT): Set version to 4.0alpha0. + * configure.ac (LIBEB_VERSION_INFO): Set to `8:0:0'. + * configure.ac (EB_VERSION_MAJOR, EB_VERSION_MINOR): + Set EB_VERSION_MAJOR to `4' and EB_VERSION_MINOR to `0'. + +2003-05-05 Motoyuki Kasahara + + * configure.ac (AC_ARG_ENABLE): Add `--enable-ipv6' option for + ebnet support. + * configure.ac (AC_REPLACE_FUNCS): Add `strtol'. + * configure.ac (AC_TYPE_IN_PORT_T, AC_TYPE_SA_FAMILY_T, + AC_TYPE_SOCKLEN_T, AC_STRUCT_IN6_ADDR, AC_STRUCT_SOCKADDR_IN6, + AC_STRUCT_SOCKADDR_STORAGE, AC_DECL_IN6ADDR_ANY, + AC_DECL_IN6ADDR_LOOPBACK): Added for ebnet support. + * configure.ac (AC_CHECK_FUNCS): Add getaddrinfo(), getnameinfo() + and gai_strerror() for ebnet support. + * eb/Makefile.am (dist_libeb_la_SOURCES): Add `ebnet.c', + `multiplex.c', `linebuf.c', `urlparts.c', `getaddrinfo.c' + and `dummyin6.c' for ebnet support. + * configure.ac (noinst_HEADERS): Add `dummyin6.h', `ebnet.h', + `getaddrinfo.h', `linebuf.h' and `urlparts.h' for ebnet support. + * eb/build-pre.h (addrinfo, getaddrinfo, freeaddrinfo, getnameinfo, + gai_strerror, in6addr_any, in6addr_loopback): Define if missing. + * eb/erro.c, eb/error.h (EB_ERR_EBNET_UNSUPPORTED, + EB_ERR_EBNET_FAIL_CONNECT, EB_ERR_EBNET_SERVER_BUSY, + EB_ERR_EBNET_NO_PERMISSION): Add the error codes. + * eb/build-post.h.in, eb/zio.c (is_ebnet_url): Defined. + + * eb/eb.c (eb_initialize_library, eb_finalize_library): Add ebnet + support codes. + * eb/book.c (eb_initialize_book, eb_bind, eb_finalize_book): Ditto. + * eb/zio.c (eb_read_raw): Ditto. + * eb/zio.c (eb_open_raw, eb_close_raw, eb_lseek_raw): New functions. + Any other functions in eb/zio.c must not call open(), close(), + lseek() or read() directly. + + * eb/ebzip.c (main): Complain if book path is ebnet URL. + +2003-04-26 Motoyuki Kasahara + + * eb/build-post.h.in (EB_MAX_RELATIVE_PATH_LENGTH): Defined. + +2003-03-29 Motoyuki Kasahara + + * configure.ac (AC_REPLACE_FUNCS): Add strtol.c. + * libebutils/strtol.c: New file. + + * configure.ac (AC_CONFIG_FILES): Add `ebstopchk/Makefile'. + * Makefile.am (SUBDIRS): Add `ebstopchk'. + * ebstopchk/ebstopchk.c, ebstopchk/Makefile.am: New files. + * po-ebutils/Makefile.in (POTFILES): + Add `$(top_srcdir)/ebstopchk/ebstopchk.c'. + +2003-03-05 Motoyuki Kasahara + + * Version 3.3.2. + + * configure.ac (LIBEB_VERSION_INFO): Change LIBEB_VERSION_INFO from + 7:0:2 to 7:2:1. The previous version 7:0:2 is wrong. + + * configure.ac (AC_INIT): Set version to 3.3.2. + + * eb/book.c (misleaded_book_table): Add `Nichi-Ei-Futsu Jiten' + YRRS-059. + +2003-03-01 Motoyuki Kasahara + + * Version 3.3.1. + + * configure.ac (LIBEB_VERSION_INFO): Change LIBEB_VERSION_INFO from + 7:0:1 to 7:0:2. + * configure.ac (AC_INIT): Set version to 3.3.1. + +2003-02-28 Motoyuki Kasahara + + * eb/match.c (eb_match_canonicalized_word, + eb_exact_match_canonicalized_word): If first `length' characters + of `canonicalized_word' and `pattern' are equivalent, the functions + return 0. This change is for EPWING Genius Eiwa Daijiten. + +2003-02-16 Motoyuki Kasahara + + * eb/readtext.c (eb_read_text, eb_read_heading, eb_read_text_internal, + eb_forward_text, eb_backward_text): Fix bugs in call of LOG(). + +2003-02-11 Motoyuki Kasahara + + * eb/multi.c (eb_initialize_multi_searches): Fix a bug that it + doesn't initialize multi search entries correctly. + +2003-02-07 Motoyuki Kasahara + + * Version 3.3. + + * configure.ac (AC_INIT): Set VERSION to 3.3. + +2003-02-01 Motoyuki Kasahara + + * eb/binary.c (eb_read_binary_generic): Fix a bug that it cannot + read an MPEG file correctly. + +2003-01-12 Motoyuki Kasahara + + * Version 3.3beta3. + + * doc-ja/Makefile.am (eb-ver.texi, stamp-eb): Add missing targets. + * doc-ja/Makefile.am (EXTRA_DIST): Add `stamp-eb'. + + * eb/multi.c (eb_load_multi_searches): Set index style flags. + + * configure.ac (AC_INIT): Set version to `3.3beta3'. + +2002-10-30 Motoyuki Kasahara + + * Version 3.3beta2. + + * configure.ac (AC_INIT): Set version to 3.3beta2. + + * eb/bitmap.c (eb_narrow_font_xbm_size, eb_narrow_font_xpm_size, + eb_narrow_font_gif_size, eb_narrow_font_bmp_size, + eb_wide_font_xbm_size, eb_wide_font_xpm_size, + eb_wide_font_gif_size, eb_wide_font_bmp_size): Fix bugs that + those functions always return EB_ERR_NO_SUCH_FONT, reported by + NISHIKAWA. + + * m4/Makefile.am: Install `eb3.m4' in `$(datadir)/aclocal', + rathar than `$(pkgdatadir)', suggested by Takashi NEMOTO. + + * eb/book.c (eb_load_catalog_epwing): Fix minor bugs, reported + by Takashi NEMOTO. + +2002-10-08 Motoyuki Kasahara + + * eb/subbook.c (eb_load_subbook_indexes): Get index location + using `subbook->index_page'. + +2002-10-07 Motoyuki Kasahara + + * eb/appsub.c (eb_set_appendix_subbook, eb_set_appendix_subbook_eb, + eb_set_appendix_subbook_epwing): Fix error recovery codes. + * eb/subbook.c (eb_set_subbook, eb_set_subbook_eb, + eb_set_subbook_epwing): Ditto. + * eb/narwfont.c (eb_load_narrow_font): Ditto. + * eb/font.c (eb_set_font): Ditto. + +2002-10-06 Motoyuki Kasahara + + * eb/defs.h.in (EB_Subbook_Struct): add the `initialized' member. + * eb/font.c (eb_initialize_fonts): Reset `font->initialized'. + * eb/font.c (eb_load_fonts): New internal function. + * eb/narwfont.c (eb_load_narrow_font): Don't complain if it cannot + open a font file. Set `font->initialized' upon success. + * eb/subbook.c (eb_set_subbook): Call eb_load_fonts(). + + * eb/subbook.c (eb_set_subbook, eb_load_subbook): Set + `subbook->initialized' by eb_set_subbook(). + +2002-09-28 Motoyuki Kasahara + + * Version 3.3beta1. + + * eb/book.c (eb_load_catalog_epwing): Don't complain when it fails + to read extended information block. + + * configure.ac (AC_INIT): Set version to `3.3beta1'. + +2002-09-26 Motoyuki Kasahara + + * configure.ac (AM_CONFIG_HEADER): Use `AC_CONFIG_HEADER' instead. + * configure.ac (AC_CYGWIN, AC_MINGW32): Removed. + * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Package name and version + are set with AC_INIT, not AM_INIT_AUTOMAKE. + +2002-09-08 Motoyuki Kasahara + + * eb/defs.h.in (EB_Text_Context): Rename `text_end_flag' to + `text_status'. + * eb/defs.h.in (EB_Text_Status_Code): Define the type and its + possible values. + * eb/readtext.c (eb_forward_text): Fix a bug that eb_forward_text() + doesn't return EB_ERR_END_OF_CONTENT when the current file pointer + is at 1f03. + +2002-09-05 Motoyuki Kasahara + + * eb/appsub.c (eb_load_appendix_subbook): Fix a bug that the function + resets alt-text data for local characters if the appendix doesn't + define stop code. + +2002-08-30 Motoyuki Kasahara + + * eb/multi.c (eb_multi_label): Generate labels written in ASCII + if the book is written in ISO 8859-1. + +2002-08-24 Motoyuki Kasahara + + * Version 3.3beta0. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to `3.3beta0'. + * configure.ac (EB_VERSION_MINOR): Set to 3. + * configure.ac (LIBEB_VERSION_INFO): Set to 7:0:1. + + * samples/font.c: New sample program. + * samples/Makefile.am (noinst_PROGRAMS): Add `font'. + * doc-ja/Makefile.am (eb_ja_TEXINFOS): add `font-c.texi'. + +2002-08-23 Motoyuki Kasahara + + * decomp, install-sh, mkinstalldirs, missing: Imported from + Automake-1.6.3. + + * eb/text.h: add EB_HOOK_BEGIN_IN_COLOR_BMP and + EB_HOOK_BEGIN_IN_COLOR_JPEG. + * eb/text.c: support those hooks for handling of inline color graphic. + +2002-08-21 Motoyuki Kasahara + + * eb/refile.c (refile_catalog): Fix a bug that extended information + blocks of eliminated subbooks are copied to `catalogs.new'. + +2002-08-20 Motoyuki Kasahara + * eb/binary.c (eb_set_binary_mono_graphic, eb_set_binary_gray_graphic): + Don't read data from `honmong', but `honmon' or `honmon2' when + the book is EPWING. + + * eb/defs.h.in (EB_SIZE_EBZIP_HEADER): Removed. + +2002-08-17 Motoyuki Kasahara + + * eb/defs.h.in (EB_Book_Struct): Delete `version'. + * eb/defs.h.in (EB_Subook_Struct): Add `text_hint_zio_code', + `graphic_hint_zio_code' and `sound_hint_zio_code'. + + * eb/book.c (eb_load_catalog): Revised. + Get text, graphic and sound file names from the `catalogs' file, + if the book is EPWING. + * eb/subbook.c (eb_set_subbook_epwing): Likewise. + * eb/filename.c (eb_find_file_name): `target_file_name' can be + equal to `found_file_name'. + + * eb/build-post.h.in (EB_FILE_NAME_START, EB_FILE_NAME_HONMON, + EB_FILE_NAME_APPENDIX, EB_FILE_NAME_FUROKU): Defined. + * eb/defs.h.in (EB_SIZE_EB_CATALOG, EB_SIZE_EPWING_CATALOG): + Moved to `eb/built-post.h.in'. + + * eb/build-post.h.in (EB_MAX_SEARCH_TITLES): Defined. + * eb/defs.h.in (EB_MAX_MULTI_SEARCHES): Change the value from 8 + to 10. + * eb/defs.h.in (EB_MAX_MULTI_TITLE_LENGTH): Defined. + * eb/defs.h.in (EB_Subbook_Struct): Add `search_title_page'. + * eb/defs.h.in (EB_Multi_Search_Struct): Add `title'. + * eb/multi.c (eb_load_multi_titles, eb_multi_title): New functions. + * eb/ebinfo.c (output_multi_information): Also output search titles. + +2002-08-16 Motoyuki Kasahara + + * Version 3.2.3. + + * eb/subbook.c (eb_set_subbook_epwing): Open `honmon2' for + sound or graphic file if `honmong' or `honmons' doesn't exist. + * eb/binary.c (eb_set_binary_wave): Fix a bug that the function + composes broken WAVE header. + + * eb/text.h, eb/readtext.c: Define `EB_HOOK_BEGIN_DECORATION' and + `EB_HOOK_END_DECORATION', requested from Kenichi SUTO. + +2002-06-10 Motoyuki Kasahara + + * Version 3.2.2. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.2.2. + * configure.ac (LIBEB_VERSION_INFO): Change the version info from + 6:1:0 to 6:2:0. + + * eb/appsub.c (eb_load_appendix_subbook): Fix a bug that EB Library + complains about absenseof alternation text definition. + + * missing, install-sh, mkinstalldirs, depcomp, doc/mdate-sh, + doc-ja/mdate-sh: Imported from automake-1.6.1. + + * libebutils/ebutils.c (output_version): Shorten the version info + massage. + +2002-03-21 Motoyuki Kasahara + + * ebzip/copyfile.c (ebzip_copy_file): fix type of the variable + `in_length'. + +2002-03-13 Motoyuki Kasahara + + * Version 3.2.1. + + * Import zlib-1.1.4. + + * eb/readtext.c (eb_is_stop_code): Fix a bug that it cannot + find stop-code when using appendix. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.2.1. + * configure.ac (LIBEB_VERSION_INFO): Change it from 6:0:0 to 6:1:0. + +2002-02-09 Motoyuki Kasahara + + * Version 3.2. + + * configure.ac(AM_INIT_AUTOMAKE): Set version to 3.2. + +2002-01-23 Motoyuki Kasahara + + * Version 3.2beta3. + + * po-eb/Makefile.in, po-ebutil/Makefile.in (DESTDIR): + Don't set DESTDIR in those files. + + * eb/filename.c (eb_find_file_name): Return a filename with highest + preference. + + * eb/zio.h (ZIO_P): Defined. + * eb/zio.c (LOG): Generate log codes if EB_BUILD_LIBRARY is defined. + + * eb/bitmap.c, eb/binary.c, eb/readtest.c: Supress warnings by + "gcc -Wconversion". + +2002-01-22 Motoyuki Kasahara + + * m4/eb3.m4 (AC_REQUIRE): Also AC_FUNC_VPRINTF is required. + + * eb/memmove.c (memmove): The function name should be eb_memmove(). + * eb/strcasecmp.c (eb_strcasecmp, eb_strncasecmp): Revised. + * libebutils/strcasecmp.c (strcasecmp, strncasecmp): Revised. + + * eb/build-post.h.in, eb/eb.h: Move declation of eb_enable_log() + and eb_disable_log() from `eb/build-post.h.in' to `eb/eb.h'. + * eb/log.c (eb_log_stderr): Do noting if the system doesn't have + vprintf() or dopront(). + * eb/log.c (eb_initialize_log): New function. + Definition of the EB_DEBUG environment variable is checked here. + * eb/log.c (eb_set_log_function, eb_enable_log, eb_disable_log): + Call eb_initialize_log() if not initialized yet. + + * config.guess: Use "2002-01-02". + * config.sub: Use "2002-01-10". + * depcomp, missing, mkinstalldirs: Import from Automake-1.5b. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.2beta3. + + * filename.c (eb_canonicalze_path_name): Delete "./" and "." + at the beginning of a given path name. + +2002-01-19 Motoyuki Kasahara + + * libebutils/getopt.c, libebutils/getopt.h: Delete `optreset' support + that is local extension to POSIX2. + + * Version 3.2beta2. + + * ebfont/ebfont.c (main): Stop parsing command line options when + getopt_long() returns -1 not EOF. + * ebinfo/ebinfo.c (main): Ditto. + * ebrefile/ebrefile.c (main): Ditto. + * ebzip/ebzip.c (main): Ditto. + * libebutils/getopt.c, libebutils/getopt.h, libebutils/getopt1.c: + Use getopt_long() taken from NetBSD, not from GLIBC. + * libebutils/Makefile.am (libebutils_a_SOURCES): Delete getopt1.c. + + * eb/hook.c, eb/search.c, eb/subbook.c, eb/zio.c, ebrefile/ebrefile.c, + ebzip/sebxa.c, ebzip/unzipfile.c, ebzip/zipfile.c, + libebutils/getumask.c: Supress warnings by "gcc -Wconversion". + +2002-01-18 Motoyuki Kasahara + + + * configure.ac (AM_INIT_AUTOMAKE): Set version to "3.2beta2". + + * eb/zio.c (zio_unzip_slice_ebzip1): Fix a decompression bug. + + * eb/defs.h (EB_MULTI_ENTRY_INVALID): Deleted. + + * configure.ac (EB_VERSION_MAJOR, EB_VERSION_MINOR): AC_SUBST + variables. + * eb/Makefile.am (nodist_pkginclude_HEADERS): Add defs.h. + * eb/Makefile.am (pkginclude_HEADERS): use dist_pkginclude_HEADERS + instead. + * eb/defs.h: Now this file is generated from eb/defs.h.in by Makefile. + * eb/defs.h.in: New file. + * eb/Makefile.am (BUILT_SOURCES): Add defs.h. + * eb/Makefile.am (EXTRA_DIST): Add defs.h.in. + * eb/Makefile.am (CLEANFILES): Add stamp-defs-h and defs.h. + * eb/Makefile.am (defs.h, stamp-defs-h): New targets. + + * eb/Makefile.am (nodist_libeb_la_SOURCES): Add widealt.c and + widefont.c. + * eb/Makefile.am (libeb_la_SOURCES): use dist_libeb_la_SOURCES instead. + + * eb/Makefile.am (dist_noinst_HEADERS): Add ebutils.h. + * eb/Makefile.am (noinst_HEADERS): use nodist_noinst_HEADERS instead. + + * configure.ac (AC_ARG_ENABLE): Delete --enable-debug option. + * eb/build-post.h.in (LOG): Revised. + * eb/build-post.h.in (eb_log_flag): New global variable. + * eb/log.c (eb_enable_log, eb_disable_log): New functions. + * eb/log.c (eb_set_log_function): Also set zio log function. + * eb/log.c (eb_log, eb_log_stderr): Mutx lock with `log_mutex' is + done by eb_log_stderr(), not eb_log(). + * eb/zio.c (zio_log_function, zio_log_flag): New variables. + * eb/zio.c (zio_enable_log, zio_disable_log, zio_set_log_function, + * eb/zio.c (LOG): Revised. + zio_log): New functions. + + * eb/hook.c (eb_set_hooks): Log debug messages if `eb_log_flag' + is not 0. + * eb/keyword.c (eb_search_keyword): Ditto. + * eb/multi.c (eb_search_multi): Ditto. + + * eb/eb.c (eb_initialize_library): Enable debug mode if the + EB_DEBUG environment variable is defined. + +2002-01-01 Motoyuki Kasahara + + * Version 3.2beta1. + + * po-eb/Makefile.in, po-ebutils/Makefile.in (CATALOGS): Renamed + to `MOFILES'. + * po-eb/Makefile.in, po-ebutils/Makefile.in (POFILES): Added. + * po-eb/Makefile.in, po-ebutils/Makefile.in (DISTFILES): Add POFILES. + + * eb/text.h (EB_HOOK_BEGIN_IN_COLOR_BMP, EB_HOOK_BEGIN_IN_COLOR_JPEG, + EB_HOOK_END_IN_COLOR_GRAPHIC): Removed. + * eb/text.h (EB_HOOK_BEGIN_GRAPHIC_REFERENCE, + EB_HOOK_END_GRAPHIC_REFERENCE, EB_HOOK_GRAPHIC_REFERENCE): Added. + * eb/readtext.c (eb_read_text_internal): Add handling of 1f4c and 1f6c + control sequences. + + * eb/zio.c (eb_read_ebzip, eb_unzip_slice_ebzip): Uncompress data + with small buffer. + * eb/zio.h (ZIO_MAX_EBZIP_LEVEL): Changed from 3 to 5. + +2001-12-16 Motoyuki Kasahara + + * eb/zio.c (zio_unzip_slice_ebzip1): Fix a memory leak bug. + +2001-11-25 Motoyuki Kasahara + + * eb/readtext.c (eb_read_rawtext): Fix a bug in handling of context + code, reported by Takashi NEMOTO. + + * eb/bitmap.c (eb_narrow_font_bmp_size, eb_wide_font_bmp_size, + eb_bitmap_to_bmp): New functions. + + * eb/font.c (main): `error_code' was used uninitialized. Fixed. + +2001-11-16 Motoyuki Kasahara + + * eb/ebzip1.c (ebzip1_slice): We must call deflateEnd() even when + deflate() doesn't succeed. + * eb/subbook.c (eb_set_subbook_epwing): We assume that "honmons" + in EPWING6 CD-ROM has been compressed, not plain. + +2001-11-11 Motoyuki Kasahara + + * eb/ebzip.c (eb_unzip_slice_epwing6): Fix a bug that it cannot + uncompress a page of compression_type != 0, reported by ISHIKAWA + Naoya. + +2001-11-05 Motoyuki Kasahara + + * eb/binary.c (eb_unset_binary): Fix typo in a log message. + * eb/subbook.c (eb_unset_subbook): Ditto. + + * eb/subbook.c (eb_set_subbook): Fix a bug that the library + opens a directory with open() if there isn't "honmons" but "honmon2". + This problem is reported by Yamagata san. + +2001-11-01 Motoyuki Kasahara + + * eb/binary.c (eb_set_binary_mono_graphic): For Kanjigen (EB), + allow the 0x1f31 escape sequence with arguments of 8 bytes, + reported by Yamagata san. + +2001-10-27 Motoyuki Kasahara + + * Version 3.2beta0. + + * doc-ja/Makefile.am (info_TEXINFOS): List in one line to avoid + a bug of GNU automake-1.5. + + * configure.ac (AC_ARG_ENABLE): Add `--enable-samples'. + * Makefile.am (SAMPLES_SUBDIR): New variable. + * Makefile.am (SUBDIRS): Add $(SAMPLES_SUBDIR). + * samples/Makefile.am, samples/disctype.c, samples/subbook.c, + samples/word.c: Revised. + * samples/initexit.c, samples/text.c: New files. + + * configure.ac (LIBEB_VERSION_INFO): Set to `6:0:0'. + +2001-10-26 Motoyuki Kasahara + + * m4/libtool.m4, ltmain.sh: Import libtool-1.4.2. + +2001-10-25 Motoyuki Kasahara + + * eb/error.h (EB_ERR_TEXT_END): Renamed to `EB_ERR_END_OF_CONTENT'. + + * doc-ja/Makefile.am (info_TEXINFOS): Add `eb-ja.texi'. + * doc-ja/Makefile.am (eb_ja_TEXINFOS): Defined. + * doc-ja/Makefile.am (C2TEXI): Defined. + * doc-ja/eb-ja.texi: Added. + * doc-ja/Makefile.am (EXTRA_DIST): Add `c2texi'. + + * doc-ja/c2texi: Delete copyright notice, #ifdef and #endif lines. + +2001-10-23 Motoyuki Kasahara + + * eb/build-post.h.in (EB_TEXT_NONE): Renamed to EB_TEXT_SEEKED. + * eb/error.h (EB_ERR_NO_PREV_SEEK): New error code. + * eb/readtext.c (eb_read_text, eb_read_heading, eb_read_rawtext, + eb_forward_text, eb_backward_text): If text_context code is + EB_TEXT_INVALID, return EB_ERR_NO_PREV_SEEK. + + * eb/readtext.c (eb_backward_text): Fix a bug that it misses + detecting the backward location. + +2001-10-22 Motoyuki Kasahara + + * eb/defs.h (EB_Appendix_Subbook_Struct): Rename `stop0' to + `stop_code0', and `stop1' to `stop_code1' respectively. + + * eb/text.c, eb/readtext.c: Rename text.c to readtext.c, and + create text.c, again. + * eb/Makefile.am (libeb_la_SOURCES): Add `readtext.c'. + + * eb/readtext.c (eb_backward_text): New function. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.2beta0. + +2001-10-20 Motoyuki Kasahara + + * eb/text.h (EB_HOOK_STOP_CODE): Removed. + * eb/error.h (EB_ERR_STOP_CODE): Removed. + * eb/hook.c: (eb_hook_stop_code): Removed. + * eb/text.c (eb_is_stop_code): New function. + * eb/text.c (eb_reset_text_context): Don't reset `location'. + * eb/text.c (eb_seek_text, eb_read_text, eb_read_heading, + eb_read_rawtext, eb_forward_text, eb_forward_heading): Use + eb_reset_text_context(). + * eb/error.h (EB_ERR_STOP_CODE): Removed. + * eb/error.h (EB_ERR_TEXT_END): New error code. + + * eb/text.c (eb_read_text_internal): Add the `forward_only' argument. + * eb/text.c (eb_forward_text): Remove the `hookset' argument. + * eb/text.c (eb_forward_text, eb_forward_heading): Revised. + * eb/defs.h (EB_Text_Context_Struct): Delete `in_step'. + + * eb/search.c (eb_reset_search_context): Fix log format. + * eb/search.c (eb_initialize_default_hookset): Ditto. + +2001-10-11 Motoyuki Kasahara + + * eb/narwfont.c (eb_load_narrow_font): Check range of character + numbers strictly. + * eb/appsub.c (eb_load_appendix_subbook): Likewise. + + * eb/narwfont.c (eb_load_narrow_font): Close a font file if the + number of local character is 0. + +2001-10-05 Motoyuki Kasahara + + * eb/text.c (eb_is_text_stopped): New function. + +2001-10-03 Motoyuki Kasahara + + * m4/Makefile.am (EXTRA_DIST, pkgdata_DATA): Remove `ssizet.m4'. + + * eb/filename.c (eb_path_name_zio_code): Fix a bug in path name + adjustment. + + * eb/hook.c (eb_hook_newline): Use `EB_SUCCESS', not `0'. + + * eb/narwfont.c (eb_load_narrow_font): Log on exit. + +2001-10-01 Motoyuki Kasahara + + * eb/log.c (eb_log): Add missing va_end() call. + + * eb/defs.h (EB_MAX_KEYWORDS, EB_NUMBER_OF_SEARCH_CONTEXTS): They + are now aliases of EB_MAX_MULTI_ENTRIES. + +2001-09-27 Motoyuki Kasahara + + * m4/eb3.m4 (AC_REQUIRE): Don't request `AC_TYPE_SSIZE_T'. + Check with AC_CHECK_TYPE(ssize_t, int), instead. + * m4/ssizet.m4: Removed. + * configure.ac (AC_TYPE_SSIZE_T): Removed. Use AC_CHECK_TYPE instead. + +2001-09-24 Motoyuki Kasahara + + * eb/subbook.c (eb_load_all_subbooks): Upon return, unset subbook. + + * eb/defs.h: Include . + * eb/defs.h (EB_MAX_PATH_LENGTH): New macro. + * eb/build-pre.h (PATH_MAX): Removed. Use EB_MAX_PATH_LENGTH instead. + + * m4/eb3.m4 (AC_CHECK_HEADERS): Defined. Check `limits.h'. + + * eb/multi.c (eb_multi_entry_count): New function. + * eb/multi.c (eb_multi_entry_list): Revised. + New implementation is based on eb_multi_entry_count(). + * ebinfo/ebinfo.c (output_multi_information): + Use eb_multi_entry_count() instead of eb_multi_entry_list(). + +2001-09-20 Motoyuki Kasahara + + * ebfont/ebfont.c, ebinfo/ebinfo.c, ebrefile/ebrefile.c, + ebzip/ebzip.c (main): Check return value of eb_initialize_library(). + +2001-09-08 Motoyuki Kasahara + + * ebzip/copyfile.c, ebzip/sebxa.c, ebzip/unzipbook.c, + ebzip/unzipfile.c, ebzip/zipbook.c, ebzip/zipfile.c, + ebzip/zipinfobook.c, ebzip/zipinfofile.c: Don't include "eb.h", + "error.h", "font.h" nor "build-post.h", reported by satomii. + * ebzip/ebzip.h: Include "build-post.h", reported by satomii. + + * ebrefile/ebrefile.c (main): Fix the bug of the order of + arguments passed to refile_book(), reported by satomii. + + * ebzip/ebzip1.c, eb/defs.h: Don't use `EB_SIZE_EBZIP_MARGIN'. + + * eb/binary.h: Delete declaration of eb_initialize_binary(), reported + by Takashi NEMOTO. + * eb/log.c: Include instead of if `WIN32' is + defined, requested by satomii. + * eb/zio.h: In function declaration, describe types of arguments if + `WIN32' is defined, requested by satomii. + + * libebutils/ebutils.c (canonicalize_path): Add DOS version. + +2001-08-30 Motoyuki Kasahara + + * Version 3.1. + + * configure.ac (AC_INIT): Don't pass unique file as an argument. + Use AC_CONFIG_SRCDIR instead. + * configure.ac (AC_PREREQ): Set to 2.52. + +2001-08-29 Motoyuki Kasahara + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1. + + * eb/zio.c (zio_open_plain): Set `slice_size'. + * eb/zio.c (zio_unzip_slice_sebxa): If copy offset is out of range, + fill 0x00. + + * po-ebutils/Makefile.am (POTFILES): Add `ebzip/sebxa.c'. + * ebzip/Makefile.am (ebzip_SOURCES): Add `sebxa.c'. + * ebzip/sebxa.c: New file. + + * ebzip/copyfile.c: Include "eb.h", "error.h" and "build-post.h". + * ebzip/unzipbook.c (ebzip_unzip_book_eb): Fix START file after + compression. + + * ebzip/unzipfile.c (ebzip_unzip_file): Splited into + ebzip_unzip_file() ebzip_unzip_start_file() and + ebzip_unzip_file_internal(). + * ebzip/zipfile.c (ebzip_zip_file): Splited into + ebzip_zip_file() ebzip_zip_start_file() and + ebzip_zip_file_internal(). + * ebzip/zipinfofile.c (ebzip_zipinfo_file): Splited into + ebzip_zipinfo_file() ebzip_zipinfo_start_file() and + ebzip_zipinfo_file_internal(). + + * ebzip/zipinfobook.c (ebzip_zipinfo_book_eb): + Call ebzip_zipinfo_start_file() rather than ebzip_zipinfo_file() to + inspect START file. + * ebzip/zipbook.c (ebzip_zip_book_eb): + Call ebzip_zip_start_file() rather than ebzip_zip_file() to + compress START file. + * ebzip/unzipbook.c (ebzip_unzip_book_eb): + Call ebzip_unzip_start_file() rather than ebzip_unzip_file() + to uncompress START file. + +2001-08-28 Motoyuki Kasahara + + * eb/zio.c (zio_unzip_slice_sebxa): Fix a critical bug that any + uncompression requests cannot be performed correctly. + +2001-08-14 Motoyuki Kasahara + + * eb/match.c (eb_match_word_latin, eb_exact_match_word_latin): + The function names ware exchanged by mistake, reported by + HASEGAWA Masafumi. Fixed. + * eb/appendix.h (eb_load_all_appendix_subbooks): Add missing + function declaration, reported by HASEGAWA Masafumi. + * eb/defs.h (EB_VERSION_MINOR): Set the macro to `1', reported + by HASEGAWA Masafumi. + + * configure.ac (AC_ARG_ENABLE, AC_ARG_WITH): Use AC_HELP_STRING. + * m4/gettext.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Likewise. + * m4/eb3.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Likewise. + * configure.ac (AC_OUTPUT): Use AC_CONFIG_FILES to specify + configuration file names. Call AC_OUTPUT with no argument. + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1beta2. + +2001-08-13 Motoyuki Kasahara + + * eb/configure.ac (AC_ARG_ENABLE): Disable `--enable-debug' by + default, reported by Kazu TAKAGI. + +2001-08-07 Motoyuki Kasahara + + * Version 3.1beta1. + + * eb/configure.ac (LIBEB_VERSION_INFO): Set the varaible to 5:0:0. + + * eb/ebconfig.h: Renamed to `eb/build-pre.h'. + * eb/internal.h.in: Renamed to `eb/build-post.h'. + + * ebrefile/ebrefile.c: Include "*.h" not "eb/*.h". + * ebrefile/Makefile.am (INCLUDES): Delete `-I$(top_srcdir)' and + add `-I../eb -I$(top_srcdir)/eb' instead. + +2001-08-06 Motoyuki Kasahara + + * missing: Import from Automake 1.4j. + + * eb/defs.h (EB_Lock_Struct, EB_Lock): Define the types + if ENABLE_PTHREAD or EBCONF_ENABLE_PTHREAD is defined. + +2001-08-04 Motoyuki Kasahara + + * ebzip/common.c, ebzip/copyfile.c, ebzip/ebzip.c, + ebzip/unzipbook.c, ebzip/unzipfile.c, ebzip/zipbook.c, + ebzip/zipfile.c, ebzip/zipinfobook.c, ebzip/zipinfofile.c, + ebzip/ebzip.h: Inclusions of header files and definitions of missing + macros in *.c are moved to `ebzip/ebzip.h'. + + * configure.ac (AC_CHECK_HEADERS): Add `pthread.h'. + +2001-08-03 Motoyuki Kasahara + + * eb/ebconfig.h, eb/memmove.c, eb/zio.c, libebutils/memset.c: + lib/memset.c: Don't define VOID if it has been defined. + * eb/ebconfig.h, eb/defs.h: Don't define EB_P if WIN32 is defined. + * configure.ac (AC_CHECK_HEADERS): Add `sys/utime.h'. + * win32/config.h, win32/dirent.h, win32/dirent.c, win32/funcname.h, + win32/unistd.h, win32/zconfig.h: Add new directory `win32' and put + new files on the directory. + + * eb/ebconfig.h (F_): Delete the macro. + * eb/filename.c (eb_canonicalize_path_name): In DOS version, replace + all '/' in the given path with `\\'. + * eb/filename.c (eb_canonicalize_path_name): Use strchr() to check + if the given path name represents root. + * eb/filename.c (eb_compose_path_name, eb_compose_path_name2, + eb_compose_path_name3): Revised. + +2001-08-01 Motoyuki Kasahara + + * eb/search.c (eb_initialize_search, eb_finalize_search): + Delete the first argument `EB_Book *'. + + * eb/bitmap.c, eb/narwalt.c, eb/font.c. eb/narwfont.c, eb/setword.c, + eb/subbook.c, eb/text.c: + Add debug codese. + + * eb/book.c (eb_bind): Assign a book code at first. + * eb/appendix (eb_bind_appendix): Likewise. + + * eb/multi.c (eb_finalie_multi_searches): Revised. + + * eb/narwfont.c (eb_narrow_font_size2): Fix a bug. Add missing + `return' statement. + + * eb/log.c (log_mutex): New variable. + * eb/log.c (eb_log): Lock `log_mutex' at invoking log function. + + * eb/text.c (eb_invalidate_text_context): New function. + * eb/text.c (eb_read_text, eb_read_heading, eb_read_rawtext, + eb_forward_text, eb_forward_heading): Call eb_invalidate_text_context() + upon failure return. + +2001-07-31 Motoyuki Kasahara + + * eb/binary.c (eb_set_binary_mpeg): Fix a critical bug in file name + composition. + + * eb/book.c (eb_finalize_book): Revised. + + * eb/binary.c, eb/book.c, eb/copyright.c, eb/eb.c eb/endword.c, + eb/exactword.c, eb/hook.c, eb/keyword.c, eb/menu.c, eb/multi.c, + eb/stopcode.c, eb/subbook.c, eb/word.c: Add debug codes. + + * eb/subbook.c: Include "binary.h". + + * eb/zio.c (ZIO_ID_NONE): Defined. + * eb/zio.c (cache_file): Renamed to `cache_zio_id'. + * eb/zio.c (cache_mutex): Renamed to `zio_mutex'. + * eb/zio.c (zio_open): Initialize `zio' again if file descriptor + the given `zio' holds is active. + * eb/zio.c (zio_open_plain, zio_open_ebzip, zio_open_epwing, + zio_open_epwing6): Assign ID to `zio'. + +2001-07-30 Motoyuki Kasahara + + * eb/appendix.c (eb_initialize_appendix_catalog): Renamed to + eb_load_appendix_catalog(). + * eb/appendix.c (eb_initialize_alt_cache): Renamed to + eb_initialize_alt_caches(). + * eb/appendix.c (eb_initialize_appendix): Initialize all members + in EB_Appendix. + * eb/appendix.c (eb_finalize_appendix): Revised. + + * eb/appendix.h (eb_initialize_all_appendix_subbooks): Define the + macro for backward compatibility. + + * eb/appsub.c (eb_initialize_appendix_subbook): Renamed to + eb_load_appendix_subbook(). + * eb/appsub.c (eb_finalize_appendix_subbooks): New function. + * eb/appsub.c (eb_initialize_appendix_subbooks): New function. + * eb/appsub.c (eb_load_all_appendix_subbooks): New function. + + * eb/binary.c (eb_initialize_binary): Renamed to + eb_initialize_binary_context(). Initialize all members in + EB_Binary_Context. + * eb/binary.c (eb_finalize_binary_context): New function. + * eb/binary.c (eb_reset_binary_context): New function. + + * eb/book.c (eb_initialize_catalog): Renamed to eb_load_catalog(). + * eb/book.c (eb_initialize_language): Renamed to eb_load_language(). + * eb/book.c (eb_initialize_book): Initialize all members to EB_Book. + * eb/book.c (eb_finalize_book): Revised. + + * eb/book.h (eb_initialize_all_subbooks): Define the macro for + backward compatibility. + + * eb/font.c (eb_initialize_fonts): New function. + * eb/font.c (eb_finalize_fonts): New function. + + * eb/hook.c (eb_finalize_hookset): Reset all the hooks. + + * eb/internal.h.in (EB_ARRANGE_INVALID): New macro. + + * eb/multi.c (eb_initialize_multi_searches): New function. + * eb/multi.c (eb_finalize_multi_searches): New function. + * eb/multi.c (eb_initialize_multi_search): Renamed to + eb_load_multi_search(). + + * eb/narwfont.c (eb_initialize_narrow_font): Renamed to + eb_load_narrow_font(). + + * eb/search.c (eb_initialize_search): Renamed to + eb_initialize_search_contexts(). Initialize all members in + EB_Search_Context. + * eb/search.c (eb_finalize_search_contexts): New function. + * eb/search.c (eb_reset_search_contexts): New function. + * eb/search.c (eb_initialize_search): New function. + * eb/search.c (eb_finalize_search): New function. + * eb/search.c (eb_initialize_searches): New function. + * eb/search.c (eb_finalize_searches): New function. + + * eb/subbook.c (eb_initialize_subbook): Renamed to eb_load_subbook(). + * eb/subbook.c (eb_initialize_indexes): Renamed to + eb_load_subbook_indexes(). + * eb/subbook.c (eb_load_subbook_indexes): Call eb_initialize_search() + to initialize EB_Search. + + * eb/text.c (eb_initialize_text): Renamed to + eb_initialize_text_context(). Initialize all members in + EB_Text_Context. + * eb/text.c (eb_finalize_text_context): New function. + * eb/text.c (eb_reset_text_context): New function. + + * eb/appendix.c, eb/appsub.c: Add debug codes. + * eb/defs.h (EB_Appendix_Struct): Add member `code'. + * eb/appendix.c (appendix_counter): New static variable. + + * eb/log.c: Include "internal.h". + +2001-07-25 Motoyuki Kasahara + + * eb/search.c (eb_presearch_word): Don't set `context->entry_length' + to 0 at successful return. + +2001-07-24 Motoyuki Kasahara + + * eb/zio.h (Zio_Struct): Add `id'. + * eb/zio.c (zio_counter): New static variable. + * eb/zio.c (zio_initialize): manage zio_counter, and assign the + counter value to `zio->id'. + * eb/zio.c (LOG): Defile this macro if ENABLE_DEBUG. + + * eb/log.c (eb_quoted_string): Prepare multiple static buffers. + * eb/log.c (eb_quoted_string): Accept NULL pattern. + * eb/log.c (eb_quoted_string): Encode '=' character as `=3D'. + +2001-07-22 Motoyuki Kasahara + + * eb/Makefile.am (libeb_la_SOURCES): Add `log.c'. + * eb/eb.h: Include if __STDC__ is defined. + * eb/error.c (error_strings): New static variable. + * eb/error.c (eb_error_string): New function. + * eb/error.c (unknown): Deleted. + * eb/internal.h.in (LOG): New macro. + * eb/match.c, eb/search.c: Output log messages. + +2001-07-18 Motoyuki Kasahara + + * ebzip/zipfile.c (ebzip_zip_file): Don't call utime() if + HAVE_STRUCT_UTIMBUF is not defined. + * ebzip/unzipfile.c (ebzip_unzip_file): Ditto. + * ebzip/copyfile.c (ebzip_copy_file): Ditto. + * ebzip/ebzip.c (parse_skip_content_argument): Defined as `static' + function. + * ebzip/copyfile.c (ebzip_copy_files_in_directory): Fix a bug that + the function always returns -1. + +2001-07-17 Motoyuki Kasahara + + * Version 3.1beta0. + + * eb/text.c (eb_read_text_internal): Suppose that area of user + defined characters in EPWING and EB* is 0xa121 ... 0xfe7f. + + * eb/configure.ac (LIBEB_VERSION_INFO): Set the varaible to 4:2:0. + * eb/configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1.0beta0. + + * Makefile.am (EXTRA_DIST): Add `ChangeLog.1'. + +2001-07-16 Motoyuki Kasahara + + * eb/filename.c (eb_canonicalize_font_file_name): Renamed to + eb_canonicalize_file_name(). + + * eb/zio.h (ZIO_NONE): Renamed to ZIO_PLAIN. + * eb/zio.c (zio_open_none): Renamed to zio_open_plain(). + +2001-07-13 Motoyuki Kasahara + + * eb/match.c (eb_match_word, eb_match_exactword): + Renamed to eb_match_canonicalized_word() and + eb_exact_match_canonicalized_word(). + * eb/match.c (eb_match_word_latin, eb_match_word_jis, + eb_exact_match_word_latin, eb_exact_match_word_jis): New functions. + * eb/defs.h (EB_Search_Context_Struct): split `compare' into + `compare_pre' and `compare_hit'. + * eb/word.c (eb_search_word): Change policy of choosing search + function. + * eb/exactword.c (eb_search_exactword): Ditto. + * eb/endword.c (eb_search_endword): Ditto. + * eb/keyword.c (eb_search_keyword): Ditto. + * eb/multi.c (eb_search_multi): Ditto. + +2001-07-12 Motoyuki Kasahara + + * eb/defs.h (EB_Subbook_Struct): Add the member `text'. + * eb/subbook.c (eb_initialize_indexes): Revise S-EBXA compression + support code. + * eb/zio.c (zio_set_sebxa_mode): New function. + * eb/zio.c (zio_read_sebxa, zio_unzip_slice_sebxa): Revised and + Enabled. + * eb/zio.c (zio_read): Enable S-EBXA support code. + +2001-07-09 Motoyuki Kasahara + + * eb/filename.c (eb_find_file_name, eb_find_file_name2, + eb_find_file_name3): Change API of the internal functions. + * eb/filename.c (eb_path_name_zio_code): New function. + + * eb/appendix.c (EB_HINT_INDEX_CATALOG, EB_HINT_INDEX_CATALOGS, + catalog_hint_list): Deleted. + * eb/appsub.c (EB_HINT_INDEX_APPENDIX, EB_HINT_INDEX_APPENDIX_EBZ, + appendix_hint_list, EB_HINT_INDEX_FUROKU, EB_HINT_INDEX_FUROKU_EBZ, + furoku_hint_list): Deleted. + * eb/book.c (EB_HINT_INDEX_CATALOG, EB_HINT_INDEX_CATALOGS, + catalog_hint_list, EB_HINT_INDEX_LANGUAGE, EB_HINT_INDEX_LANGUAGE_EBZ, + language_hint_list): Deleted. + * eb/subbook.c (EB_HINT_INDEX_START, EB_HINT_INDEX_START_EBZ, + start_hint_list): Deleted. + * eb/subbook.c (EB_HINT_INDEX_HONMON_EBZ, EB_HINT_INDEX_HONMON2, + EB_HINT_INDEX_HONMON2_EBZ, EB_HINT_INDEX_HONMON2_ORG, + honmon_hint_list, EB_HINT_INDEX_HONMONG, EB_HINT_INDEX_HONMONG_EBZ, + EB_HINT_INDEX_HONMONG_ORG, honmong_hint_list, EB_HINT_INDEX_HONMONS, + EB_HINT_INDEX_HONMONS_EBZ, EB_HINT_INDEX_HONMONS_ORG, + honmons_hint_list): Deleted. + + * ebrefile/ebrefile.c (HINT_INDEX_CATALOG, HINT_INDEX_CATALOGS, + catalog_hint_list): Deleted. + + * ebzip/unzipbook.c (catalog_hint_list, language_hint_list, + catalogs_hint_list): Deleted. + * ebzip/zipbook.c (catalog_hint_list, language_hint_list, + catalogs_hint_list): Deleted. + * ebzip/zipinfobook.c (catalog_hint_list, language_hint_list, + catalogs_hint_list): Deleted. + +2001-06-25 Motoyuki Kasahara + + * Version 3.0.1. + + * configure.ac (LIBEB_VERSION_INFO): Set version to 4:1:0. + +2001-06-22 Motoyuki Kasahara + + * configure.ac (AM_INIT_AUTOMAKE): Set version to 3.0.1. + + * eb/text.c (eb_read_text_internal): Fix a bug of handling BG 2312 + character. + * eb/text.c (eb_read_text_internal): Add code to process escape + sequence 0x1f53. + +2001-06-12 Motoyuki Kasahara + + * eb/book.c (eb_initialize_language): Don't return a value, since + this is `void' function. + + * ebrefile/ebrefile.c: Don't include . + * ebrefile/ebrefile.c: Fix definition of `_' and `N_' macros. + +2001-06-11 Motoyuki Kasahara + + * libebutils/memset.c: Internally convert the 2nd argument (copy + value) to unsigned char, as ISO/IEC 9899:1990 says. diff --git a/lib/ebu/INSTALL b/lib/ebu/INSTALL new file mode 100644 index 0000000..2e1837d --- /dev/null +++ b/lib/ebu/INSTALL @@ -0,0 +1,203 @@ +$BI,MW$J%=%U%H%&%'%"(B +================== + +$BK\%=%U%H%&%'%"$r%$%s%9%H!<%k$9$k$K$O!"A0$b$C$F(B zlib $B$r%$%s%9%H!<%k$7$F(B +$B$*$/I,MW$,$"$j$^$9!#(Bzlib $B$Ol=j$+$iF~l9g$b$"$j$^(B +$B$9!#(B + + +$B4pK\E*$J%$%s%9%H!<%kJ}K!(B +======================== + +$BK\%=%U%H%&%'%"$N:G$bC1=c$J%3%s%Q%$%kJ}K!$O/!9;~4V$,(B + $B$+$+$j$^$9!#(B + + $Bl9g$O!"(B + `make check' $B$rC$9$3$H$,$G$-$^$9!#(B $B0l=o$K(B `configure' $B$,@8@.$7$?%U%!%$%k$b>C$9(B + $B$K$O(B ($B$3$&$9$k$3$H$G!"JL$N(B +============== + + $B%G%U%)%k%H$G$O!"(B`make install' $B$r$l0[$J$C(B +$B$?%$%s%9%H!<%k@h$K%$%s%9%H!<%k$9$k$3$H$b2DG=$G$9!#(B `configure' $B$KBP$7(B +$B$F(B `--exec-prefix=$B%Q%9(B' $B$r;XDj$9$k$H!"%W%m%0%i%`$d%i%$%V%i%j$J$I$N%$%s(B +$B%9%H!<%k@h$,!V%Q%9!W$KJQ$o$j$^$9!#%I%-%e%a%s%H$d!"%G!<%?%U%!%$%k$J$I$O!"(B +$BDL>o$N%$%s%9%H!<%k@h$K%$%s%9%H!<%k$5$l$^$9!#(B + + $B2C$($F!"$"$J$?$,DL>o$H$O0[$J$C$?%G%#%l%/%H%j%l%$%"%&%H$r:NMQ$7$F$$$k(B +$B>l9g$O!"(B`--bindir=$B%Q%9(B' $B$H$$$C$?%*%W%7%g%s$r;XDj$9$k$3$H$G!"FCDj$N$K@\F,<-$d@\Hx<-$rIU2C$9$k$3$H$,$G$-$^$9!#(B + +`configure' $B$NF0:n$N@)8f(B +======================== + + `configure' $B$Oo(B + `./config.cache' $B$G$9$,!"Be$o$j$K!V%U%!%$%k!W$rMQ$$$^$9!#(B + `configure' $B$r%G%P%C%0$9$k$H$-$O!"%U%!%$%k(B $B$K(B `/dev/null' $B$r;XDj(B + $B$9$k$3$H$G!"%-%c%C%7%e$rM^@)$9$k$3$H$,$G$-$^$9!#(B + +`--help' + `configure' $B$N%*%W%7%g%s$N0lMw$rI=<($7$F!"=*N;$7$^$9!#(B + +`--quiet' +`--silent' +`-q' + $B$I$N%A%'%C%/9`L\$r9T$C$F$$$k$N$+$r<($9%a%C%;!<%8$r=PNO$7$^$;$s!#(B + $BDL>o$N%a%C%;!<%8=PNO$r$9$Y$FM^@)$9$k$K$O!"(B`/dev/null' $B$X%j%@%$%l(B + $B%/%H$7$F2<$5$$(B ($B$?$@$7!"%(%i!<%a%C%;!<%8$K$D$$$F$O=PNO$5$l$F$7$^(B + $B$$$^$9$,(B)$B!#(B + +`--srcdir=$B%G%#%l%/%H%j(B' + $B%=%U%H%&%'%"$N%=!<%9%3!<%I$rC5$7=P$9:]$K!"!V%G%#%l%/%H%j!W$rC5$7$^(B + $B$9!#DL>o!"(B`configure' $B$O<+F0E*$K%G%#%l%/%H%j$r7hDj$7$^$9!#(B + +`--version' + `configure' $B%9%/%j%W%H$,$I$N%P!<%8%g%s$N(B Autoconf $B$K$h$C$F@8@.$5(B + $B$l$?$N$+$rI=<($7!"=*N;$7$^$9!#(B + +$BLr$KN)$D>lLL$O8B$i$l$^$9$,!"(B`configure' $B$K$OB>$K$b$$$/$D$+$N%*%W%7%g%s(B +$B$,MQ0U$5$l$F$$$^$9!#(B + +$BA*Br2DG=$J5!G=$N0lMw(B +==================== + + $BK\%=%U%H%&%'%"$N(B `configure' $B$O0J2<$K5-$7$?(B `--enable-' $B$*$h$S(B +`--with-' $B%*%W%7%g%s$rG'<1$7$^$9!#(B + +`--enable-ebnet' + $B1s3V%"%/%;%9BP1~$rM-8z$K$7$^$9!#L5;XDj;~$O(B `yes' $B$G$9!#(B + +`--enable-ipv6' + $B1s3V%"%/%;%9$G$N(B IPv6 $BBP1~$rM-8z$K$7$^$9!#(BIPv6 $B$KBP1~$7$?%7%9%F%`(B + $B$G$O!"L5;XDj;~$O(B `yes' $B$,;XDj$5$l$?$b$N$H$_$J$5$l$^$9!#(B`yes' $B$r;X(B + $BDj$7$?$K$b$+$+$o$i$:!"(B`configure' $B$,(B IPv6 $B$r;H$C$?%5%s%W%k%W%m%0%i(B + $B%`$N%3%s%Q%$%k$K<:GT$9$k$H!"%(%i!<$,Js9p$5$l$^$9!#(B`--enable-ebnet= + no' $B$r;XDj$7$?>l9g!"$3$N%*%W%7%g%s$OL5;k$5$l$^$9!#(B + +`--enable-pthread' + $B%3%s%Q%$%k$5$l$?(B EB $B%i%$%V%i%j$K(B pthread $BBP1~%3!<%I$,IU2C$5$^$9!#(B + $BL5;XDj;~$O(B `no' $B$G$9!#(B`yes' $B$r;XDj$7$?$K$b$+$+$o$i$:!"(B`configure' + $B$,(B pthread $B$r;H$C$?%5%s%W%k%W%m%0%i%`$N%3%s%Q%$%k$dH$7$^$9!#(B + +`--with-zlib-libraries=DIR' + DIR $B%G%#%l%/%H%j$K%$%s%9%H!<%k$5$l$F$$$k(B zlib $B$N%i%$%V%i%j%U%!%$(B + $B%k$r;2>H$7$^$9!#(B + +`--enable-nls' + $B%a%C%;!<%8$N9q:]2=5!G=(B ($B@53N$K$O(B NLS $B$O(B Native/National Language + Support)$B!#(BEB $B%i%$%V%i%j$*$h$S%f!<%F%#%j%F%#$O!"%a%C%;!<%8$N9q:]2=(B + $B5!G=$,M-8z$K$J$k$h$&$K%3%s%Q%$%k$5$l$^$9!#(B + + $B$3$N5!G=$r;H$&$K$O(B GNU gettext $B$,I,MW$G$9!#%7%9%F%`$K(B GNU gettext + $B$,$J$1$l$P!"$3$N%=%U%H%&%'%"$r%$%s%9%H!<%k$9$kA0$K(B GNU gettext $B$r%$(B + $B%s%9%H!<%k$7$F2<$5$$!#K\%=%U%H%&%'%"$O!"$?$H$($P(B Solaris $B$NH$7$^$9!#%a%C%;!<%8$N9q:]2=5!G=$,L58z$K$J$C$F$$$k>l9g!"$3$N(B + $B%*%W%7%g%s$O0UL#$r;}$A$^$;$s!#(B + +`--with-gettext-libraries=DIR' + DIR $B%G%#%l%/%H%j$K%$%s%9%H!<%k$5$l$F$$$k(B gettext $B$N%i%$%V%i%j%U%!(B + $B%$%k$r;2>H$7$^$9!#%a%C%;!<%8$N9q:]2=5!G=$,L58z$K$J$C$F$$$k>l9g!"(B + $B$3$N%*%W%7%g%s$O0UL#$r;}$A$^$;$s!#(B + +`--with-iconv-includes=DIR' + DIR $B%G%#%l%/%H%j$K%$%s%9%H!<%k$5$l$F$$$k(B iconv $B$N%X%C%@%U%!%$%k(B + $B$r;2>H$7$^$9!#%a%C%;!<%8$N9q:]2=5!G=$,L58z$K$J$C$F$$$k>l9g!"$"$k(B + $B$$$O%7%9%F%`>e$N(B gettext() $B4X?t$,(B iconv() $B$r;HMQ$7$J$$>l9g!"$3$N(B + $B%*%W%7%g%s$O0UL#$r;}$A$^$;$s!#(B + +`--with-iconv-libraries=DIR' + DIR $B%G%#%l%/%H%j$K%$%s%9%H!<%k$5$l$F$$$k(B iconv $B$N%i%$%V%i%j%U%!(B + $B%$%k$r;2>H$7$^$9!#%a%C%;!<%8$N9q:]2=5!G=$,L58z$K$J$C$F$$$k>l9g!"(B + $B$"$k$$$O%7%9%F%`>e$N(B gettext() $B4X?t$,(B iconv() $B$r;HMQ$7$J$$>l9g!"(B + $B$3$N%*%W%7%g%s$O0UL#$r;}$A$^$;$s!#(B + +`--enable-shared' + $B6&M-%i%$%V%i%jHG$N(B EB $B%i%$%V%i%j$r:n@.$7$^$9!#L5;XDj;~$O(B `yes' $B$G(B + $B$9!#(B + +`--enable-static' + $B@EE*%i%$%V%i%jHG$N(B EB $B%i%$%V%i%j$r:n@.$7$^$9!#L5;XDj;~$O(B `yes' $B$G(B + $B$9!#(B + +`--with-gnu-ld' + C $B%3%s%Q%$%i$,(B GNU ld $B$r;HMQ$7$F$$$k$H2>Dj$7$^$9!#(B + $BL5;XDj;~$O!"(B`no' $B$G$9!#(B + +`--disable-libtool-lock' + $B%m%C%/$7$J$$$h$&$K$7$^$9!#(B($BJBNs%3%s%Q%$%k$O!"@5$7$/9T$o$l$J$$2DG=(B + $B@-$,$"$j$^$9!#(B) + +`--enable-samples' + $B%5%s%W%k%W%m%0%i%`$b%3%s%Q%$%k$9$k$h$&$K$7$^$9!#L5;XDj;~$O(B `no' $B$G(B + $B$9!#%3%s%Q%$%k$7$F$b!"%5%s%W%k%W%m%0%i%`$O2?=h$K$b%$%s%9%H!<%k$5$l(B + $B$^$;$s!#(B + +`--enable-largefile' + 2GB $B$rD6$($k!"Bg$-$J%U%!%$%k$r07$($k$h$&$K$7$^$9!#%7%9%F%`B&$GBP1~(B + $B$7$F$$$J$$$H!";XDj$7$F$b8z2L$O$"$j$^$;$s!#L5;XDj;~$O(B `yes' $B$G$9!#(B diff --git a/lib/ebu/Makefile b/lib/ebu/Makefile new file mode 100644 index 0000000..bc0411b --- /dev/null +++ b/lib/ebu/Makefile @@ -0,0 +1,782 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure $(top_srcdir)/po-eb/Makefile.in \ + $(top_srcdir)/po-ebutils/Makefile.in AUTHORS COPYING ChangeLog \ + INSTALL NEWS config.guess config.sub depcomp install-sh \ + ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = po-eb/Makefile po-ebutils/Makefile +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(appendixdir)" "$(DESTDIR)$(sysconfdir)" +appendixDATA_INSTALL = $(INSTALL_DATA) +sysconfDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appendix_DATA) $(sysconf_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = ebu libebutils ebappendix ebfont ebinfo ebrefile \ + ebstopcode ebzip doc po-eb po-ebutils m4 samples +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . +ACLOCAL_AMFLAGS = -I m4 +SAMPLES_SUBDIR = +#SAMPLES_SUBDIR = samples +SUBDIRS = ebu libebutils ebappendix ebfont ebinfo ebrefile ebstopcode ebzip \ + doc po-eb po-ebutils m4 $(SAMPLES_SUBDIR) + +EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 move-if-change \ + ebu.conf.in misc/ebfixlog misc/ebdump README.org + +CLEANFILES = ebu.conf +appendixdir = $(pkgdatadir)/appendix +appendix_DATA = +sysconf_DATA = ebu.conf +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +po-eb/Makefile: $(top_builddir)/config.status $(top_srcdir)/po-eb/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +po-ebutils/Makefile: $(top_builddir)/config.status $(top_srcdir)/po-ebutils/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-appendixDATA: $(appendix_DATA) + @$(NORMAL_INSTALL) + test -z "$(appendixdir)" || $(MKDIR_P) "$(DESTDIR)$(appendixdir)" + @list='$(appendix_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appendixDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appendixdir)/$$f'"; \ + $(appendixDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appendixdir)/$$f"; \ + done + +uninstall-appendixDATA: + @$(NORMAL_UNINSTALL) + @list='$(appendix_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appendixdir)/$$f'"; \ + rm -f "$(DESTDIR)$(appendixdir)/$$f"; \ + done +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ + $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(appendixdir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-appendixDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-sysconfDATA + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-appendixDATA uninstall-sysconfDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-appendixDATA install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-sysconfDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-appendixDATA \ + uninstall-sysconfDATA + + +ebu.conf: ebu.conf.in Makefile + rm -f $@ + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@EBCONF_EBINCS\@;$(EBCONF_EBINCS);' \ + -e 's;\@EBCONF_EBLIBS\@;$(EBCONF_EBLIBS);' \ + -e 's;\@EBCONF_ZLIBINCS\@;$(EBCONF_ZLIBINCS);' \ + -e 's;\@EBCONF_ZLIBLIBS\@;$(EBCONF_ZLIBLIBS);' \ + -e 's;\@ENABLE_PTHREAD\@;$(ENABLE_PTHREAD);' \ + -e 's;\@PTHREAD_CPPFLAGS\@;$(PTHREAD_CPPFLAGS);' \ + -e 's;\@PTHREAD_CFLAGS\@;$(PTHREAD_CFLAGS);' \ + -e 's;\@PTHREAD_LDFLAGS\@;$(PTHREAD_LDFLAGS);' \ + -e 's;\@ENABLE_NLS\@;$(ENABLE_NLS);' \ + -e 's;\@EBCONF_INTLINCS\@;$(EBCONF_INTLINCS);' \ + -e 's;\@EBCONF_INTLLIBS\@;$(EBCONF_INTLLIBS);' \ + -e 's;\@ENABLE_EBNET\@;$(ENABLE_EBNET);' \ + $(srcdir)/$@.in > $@.tmp + cp $@.tmp $@ + chmod 644 $@ + rm -f $@.tmp + +gttest.mo: gttest.po + $(MSGFMT) -o gttest.mo gttest.po +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/Makefile.am b/lib/ebu/Makefile.am new file mode 100644 index 0000000..ec0c54c --- /dev/null +++ b/lib/ebu/Makefile.am @@ -0,0 +1,41 @@ +ACLOCAL_AMFLAGS = -I m4 + +if ENABLE_SAMPLES +SAMPLES_SUBDIR = samples +else +SAMPLES_SUBDIR = +endif + +SUBDIRS = ebu libebutils ebappendix ebfont ebinfo ebrefile ebstopcode ebzip \ + doc po-eb po-ebutils m4 $(SAMPLES_SUBDIR) + +EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 move-if-change \ + ebu.conf.in misc/ebfixlog misc/ebdump README.org +CLEANFILES = ebu.conf + +appendixdir = $(pkgdatadir)/appendix +appendix_DATA = +sysconf_DATA = ebu.conf + +ebu.conf: ebu.conf.in Makefile + rm -f $@ + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@EBCONF_EBINCS\@;$(EBCONF_EBINCS);' \ + -e 's;\@EBCONF_EBLIBS\@;$(EBCONF_EBLIBS);' \ + -e 's;\@EBCONF_ZLIBINCS\@;$(EBCONF_ZLIBINCS);' \ + -e 's;\@EBCONF_ZLIBLIBS\@;$(EBCONF_ZLIBLIBS);' \ + -e 's;\@ENABLE_PTHREAD\@;$(ENABLE_PTHREAD);' \ + -e 's;\@PTHREAD_CPPFLAGS\@;$(PTHREAD_CPPFLAGS);' \ + -e 's;\@PTHREAD_CFLAGS\@;$(PTHREAD_CFLAGS);' \ + -e 's;\@PTHREAD_LDFLAGS\@;$(PTHREAD_LDFLAGS);' \ + -e 's;\@ENABLE_NLS\@;$(ENABLE_NLS);' \ + -e 's;\@EBCONF_INTLINCS\@;$(EBCONF_INTLINCS);' \ + -e 's;\@EBCONF_INTLLIBS\@;$(EBCONF_INTLLIBS);' \ + -e 's;\@ENABLE_EBNET\@;$(ENABLE_EBNET);' \ + $(srcdir)/$@.in > $@.tmp + cp $@.tmp $@ + chmod 644 $@ + rm -f $@.tmp + +gttest.mo: gttest.po + $(MSGFMT) -o gttest.mo gttest.po diff --git a/lib/ebu/Makefile.in b/lib/ebu/Makefile.in new file mode 100644 index 0000000..8aa9e36 --- /dev/null +++ b/lib/ebu/Makefile.in @@ -0,0 +1,782 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure $(top_srcdir)/po-eb/Makefile.in \ + $(top_srcdir)/po-ebutils/Makefile.in AUTHORS COPYING ChangeLog \ + INSTALL NEWS config.guess config.sub depcomp install-sh \ + ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = po-eb/Makefile po-ebutils/Makefile +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(appendixdir)" "$(DESTDIR)$(sysconfdir)" +appendixDATA_INSTALL = $(INSTALL_DATA) +sysconfDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appendix_DATA) $(sysconf_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = ebu libebutils ebappendix ebfont ebinfo ebrefile \ + ebstopcode ebzip doc po-eb po-ebutils m4 samples +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +@ENABLE_SAMPLES_FALSE@SAMPLES_SUBDIR = +@ENABLE_SAMPLES_TRUE@SAMPLES_SUBDIR = samples +SUBDIRS = ebu libebutils ebappendix ebfont ebinfo ebrefile ebstopcode ebzip \ + doc po-eb po-ebutils m4 $(SAMPLES_SUBDIR) + +EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 move-if-change \ + ebu.conf.in misc/ebfixlog misc/ebdump README.org + +CLEANFILES = ebu.conf +appendixdir = $(pkgdatadir)/appendix +appendix_DATA = +sysconf_DATA = ebu.conf +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +po-eb/Makefile: $(top_builddir)/config.status $(top_srcdir)/po-eb/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +po-ebutils/Makefile: $(top_builddir)/config.status $(top_srcdir)/po-ebutils/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-appendixDATA: $(appendix_DATA) + @$(NORMAL_INSTALL) + test -z "$(appendixdir)" || $(MKDIR_P) "$(DESTDIR)$(appendixdir)" + @list='$(appendix_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appendixDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appendixdir)/$$f'"; \ + $(appendixDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appendixdir)/$$f"; \ + done + +uninstall-appendixDATA: + @$(NORMAL_UNINSTALL) + @list='$(appendix_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appendixdir)/$$f'"; \ + rm -f "$(DESTDIR)$(appendixdir)/$$f"; \ + done +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ + $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(appendixdir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-appendixDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-sysconfDATA + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-appendixDATA uninstall-sysconfDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-appendixDATA install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-sysconfDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-appendixDATA \ + uninstall-sysconfDATA + + +ebu.conf: ebu.conf.in Makefile + rm -f $@ + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@EBCONF_EBINCS\@;$(EBCONF_EBINCS);' \ + -e 's;\@EBCONF_EBLIBS\@;$(EBCONF_EBLIBS);' \ + -e 's;\@EBCONF_ZLIBINCS\@;$(EBCONF_ZLIBINCS);' \ + -e 's;\@EBCONF_ZLIBLIBS\@;$(EBCONF_ZLIBLIBS);' \ + -e 's;\@ENABLE_PTHREAD\@;$(ENABLE_PTHREAD);' \ + -e 's;\@PTHREAD_CPPFLAGS\@;$(PTHREAD_CPPFLAGS);' \ + -e 's;\@PTHREAD_CFLAGS\@;$(PTHREAD_CFLAGS);' \ + -e 's;\@PTHREAD_LDFLAGS\@;$(PTHREAD_LDFLAGS);' \ + -e 's;\@ENABLE_NLS\@;$(ENABLE_NLS);' \ + -e 's;\@EBCONF_INTLINCS\@;$(EBCONF_INTLINCS);' \ + -e 's;\@EBCONF_INTLLIBS\@;$(EBCONF_INTLLIBS);' \ + -e 's;\@ENABLE_EBNET\@;$(ENABLE_EBNET);' \ + $(srcdir)/$@.in > $@.tmp + cp $@.tmp $@ + chmod 644 $@ + rm -f $@.tmp + +gttest.mo: gttest.po + $(MSGFMT) -o gttest.mo gttest.po +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/NEWS b/lib/ebu/NEWS new file mode 100644 index 0000000..b2df1b6 --- /dev/null +++ b/lib/ebu/NEWS @@ -0,0 +1,535 @@ +バージョン 4.4.3 における主な変更点: + +* バージョン4.4.2で、共有ライブラリのバージョンが正しくなかったため、 + 本バージョンで修正した。 +* 細かな不具合を修正した。 + +バージョン 4.4.2 における主な変更点: + +* 図版メニューに関する処理で、初期化処理が一部抜けていたのを修正した。 +* ebzip 伸長時に、正常終了時も終了コードが1になってしまう不具合を修正 + した。 +* ebzip テストモード時も、ファイルのコピーが実行されてしまう不具合を + 修正した。 +* ebzip のメモリ開放忘れを直した。 + +バージョン 4.4.1 における主な変更点: + +* 画像、音声データを扱う際に、データが格納されているファイルの大きさが + 2GB を正しく扱えなかったので修正した。 + +バージョン 4.4 における主な変更点: + +* 2GB を超える大きさのファイルを扱えるようにした。ただし、システム側で + 対応していることが前提条件。 +* EBZIP形式の圧縮ファイルで、4294967296〜1099511627775バイト (4GB〜1TB) + のファイルの表現方法を規定した。ebzip, ebunzip はこの規定に沿って圧縮 + および伸張を行なう。 +* ebzip, ebunzip がディレクトリ作成に失敗したとき、何もエラーメッセージ + を出さずに終了する不具合を修正した。 + +バージョン 4.3.4 における主な変更点: + +* 環境によっては、ebinfo の出力する副本の題名が文字化けするのを修正した。 +* 注: ライブラリ本体には変更がないので、共有ライブラリのバージョンは更新 + してしない。 + +バージョン 4.3.3 における主な変更点: + +* Cygwin, MinGW で DLL を作成できるようにした。 +* Windows で ebzipinfo が異常終了する不具合を修正した。 + +バージョン 4.3.2 における主な変更点: + +* バージョン 4.3.1 で、共有ライブラリの番号付けが間違っていたので修正した。 +* ebinfo の日本語メッセージに、空白文字が抜けているものがあったので修正した。 + +バージョン 4.3.1 における主な変更点: + +* 動画ファイル名に英大文字が使われると、動画データを読み込めない不具合 + を修正した。 +* 電子ブックリーダー Panasonic KX-EBP2 付属品に対応した。 +* ebnet でバッファオーバーランが起きる不具合を修正した。 + +バージョン 4.3 における主な変更点: + +* EPWING で複数の副本がディレクトリを共有している場合、正しくアクセス + できない不具合を修正した。 +* `ebunzip --test' が、電子ブックの本文ファイルを上書きしてしまう不具合 + を修正した。 +* ebappendix が、`catalogs.app' を読み込んでも電子ブック形式の appendix + を生成してしまう不具合を修正した。 +* 参照先付きカラー図版に対応した。 + API として、eb_have_image_menu() と eb_image_menu() が追加された。 + テキストのフックとして、EB_HOOK_BEGIN_IMAGE_PAGE, EB_HOOK_END_IMAGE_PAGE, + EB_HOOK_BEGIN_CLICKABLE_AREA, EB_HOOK_END_CLICKABLE_AREA の 4つが追加 + された。 + +バージョン 4.2.2 における主な変更点: + +* 4.2.1 で混入した、一部の EPWING が正しく扱えない不具合を修正した。 +* eb.conf の EBCONF_ENABLE_NLS の値が正しくセットされない不具合を修正 + した。 +* 音声ファイルの取り出しがうまくいかない不具合を終始した。 +* 一部の Linux 環境で configure 時に NLS (Native/National Language + Support) が有効にならない不具合を修正した。 +* 細かな不具合をいくつか修正した。 + +バージョン 4.2.1 における主な変更点: + +* 不具合をいくつか修正した。 + +バージョン 4.2 における主な変更点: + +* クロス検索に対応した。 + 関数 eb_have_cross_search(), eb_search_cross() をライブラリに追加した。 + また、ebinfo は、クロス検索の情報を出力するようになった。 +* 動画ファイル名の絶対パス名を返す関数 eb_compose_movie_path_name() を + ライブラリに追加した。 +* ebrefile は、カタログファイルを上書きするようにした。 + 上書き前のカタログファイルは、".old" という接尾子の付いたファイル名で + 保存される。 +* zlib を添付しないようにした。 + configure から --with-included-zlib オプションを削除した。 +* 不具合をいくつか修正した。 + +バージョン 4.1.3 における主な変更点: + +* バージョン 4.1.2 で、共有ライブラリの番号付けが間違っていたので修正した。 +* `make install' が失敗する不具合を修正した。 + +バージョン 4.1.2 における主な変更点: + +* 特定の書籍で、EB ライブラリが書籍に載っている単語を検索できない + 不具合を修正した。 +* FreeBSD-5.3-RELEASE で make が失敗する不具合を修正した。 +* Windows 環境において、ebzip コマンドの起動時のコマンド名 (ebunzip.exe, + ebzipinfo.exe など) をもとに、正しく動作を決定できない不具合を修正 + した。 + +バージョン 4.1.1 における主な変更点: + +* ユーティリティコマンドで、引数を取る長いオプション (例: ebzip の + --level) に対して引数を渡さないと、コマンドが異常終了する不具合を + 修正した。 +* eb_write_text_byte2() がおかしなデータを書き込む不具合を修正した。 +* ドキュメントの HTML ファイルのスタイルを変更した。 + +バージョン 4.1 における主な変更点: + +* BSD ライセンスを採用するようにした。 +* ebfont が PNG 形式の画像ファイルを生成できるようにした。 + ebfont の --image-format オプションに `png' を指定できるようにした。 +* ライブラリに eb_narrow_font_png_size(), eb_wide_font_png_size(), + eb_bitmap_to_png() を加えた。 +* eb_bitmap_to_xbm(), eb_bitmap_to_xpm(), eb_bitmap_to_gif(), + eb_bitmap_to_bmp() は EB_Error_Code を返すようにた。 +* ライブラリが、非圧縮ブロックデータのキャッシュをより効率的に行う + ようにした。 +* `ebzip' が START/HONMON ファイルの部分圧縮に対応した。 + これにより、前方一致検索が速くなった。 +* 日本語ドキュメントを HTML 形式で配布するようにした。 +* 英語のドキュメントを削除した。 + +バージョン 4.0.1 における主な変更点: + +* ヘッダファイル内の EB_P, ZIO_P マクロの定義を修正した。 +* `ebzipinfo' は `--skip-content movie' オプションを指定しない限り、 + 動画ファイルの情報も表示するようにした。 +* `ebzip', `ebunzip' の進行状況メッセージは、標準出力ではなく標準エラー + 出力に表示するようにした。 + +バージョン 4.0 における主な変更点: + +* EB_BookList 関連の API を改良した。 +* EB_ERR_UNBOUND_BOOKLIST, EB_ERR_NO_SUCH_BOOK という 2 つのエラー + コードを追加した。 +* `eb3.m4' を `eb4.m4' に改名した。 +* `configure' に `--enable-ebnet' オプションを追加した。 +* `eb/flags.h' をインストールするようにした。 + このファイルは、`eb/defs.h' から自動的に include される。 +* 重大および軽度の不具合をいくつか修正した。 + +バージョン 4.0beta3 における主な変更点: + +* EUC-JP 以外の日本語のエンコーディングに対応した。 +* Windows 対応のためのコードをいくつか付加した。 + Windows 上で EB ライブラリのビルドを行うには、`eb-win32' パッケージ + を使用して下さい。 +* `ebstopcode' に `--text-position' (`-p') オプションを追加した。 + +バージョン 4.0beta2 における主な変更点: + +* 検索メソッドの重大な不具合を修正した。 + +バージョン 4.0beta1 における主な変更点: + +* `ebstopchk' を `ebstopcode' に改名した。 + コマンドの `--stop-code' オプションも `--code' に改名した。 +* `ebappendix' の `--case', `--suffix' オプションを削除した。 +* `ebappendix' の日本語版ドキュメントを用意した。 +* `ebinfo' に `--book-list' オプションを追加した。 +* `ebdump', `ebfixlog' を `misc' サブディレクトリに入れた。 +* 不具合をいくつか修正した。 + +バージョン 4.0beta0 における主な変更点: + +* 遠隔アクセスに対応した。 +* `ebstopchk' コマンドを追加した。 + +バージョン 3.3.2 における主な変更点: + +* 共有ライブラリのバージョン番号を修正した。 +* 「日英仏辞典」(YRRS-059) に対応した。 + +バージョン 3.3.1 における主な変更点: + +* EPWING 版「ジーニアス英和大辞典」に対応した。 +* 複合検索の処理の不具合を修正した。 +* デバッグモードの不具合を修正した。 + +バージョン 3.3 における主な変更点: + +* eb_read_binary_mpeg() の不具合を修正した。 + +バージョン 3.3beta3 における主な変更点: + +* 複合検索を修正した。 +* 軽度の不具合をいくつか修正した。 + +バージョン 3.3beta2 における主な変更点: + +* 重大および軽度の不具合をいくつか修正した。 +* `eb3.m4' は `$(datadir)/aclocal' にインストールするようにした。 + +バージョン 3.3beta1 における主な変更点: + +* 不具合をいくつか修正した。 + +バージョン 3.3beta0 における主な変更点: + +* EPWING のファイル名や圧縮タイプを見分けるコードを大幅に書き改めた。 +* 関数 eb_multi_title() を追加した。 + この関数は、特定の複合検索の題名を取得する。この関数の使用によって、 + `ebinfo' コマンドで `--multi-search' (`-m') を指定した際に、複合検索 + の題名を表示するようになった。 +* `ebrefile' の不具合を修正した。 +* インライン画像に対応するため、テキストデータへのフックを 2 種類追加 + した。 + +バージョン 3.2.3 における主な変更点: + +* PCM 音声データの処理における不具合を修正した。 +* テキストのフックを 2 種類追加した。 + +バージョン 3.2.2 における主な変更点: + +* appendix の処理における不具合を修正した。 +* gettext のメッセージカタログを修正した。 + +バージョン 3.2.1 における主な変更点: + +* テキストの読み込みルーチンを修正した。 +* zlib-1.1.4 を取り込んだ。 + +バージョン 3.2 における主な変更点: + +* 特になし。 + +バージョン 3.2beta3 における主な変更点: + +* インストールの際に起こる不具合をいくつか修正した。 + +バージョン 3.2beta2 における主な変更点: + +* 環境変数 EB_DEBUG が定義されていると、EB ライブラリがデバッグ + メッセージを出力するようにした。 + `configure' の `--enable-debug' オプションを削除した。 +* EBZIP 圧縮形式データの伸長における致命的な不具合を修正した。 + +バージョン 3.2beta1 における主な変更点: + +* `ebzip' の最高圧縮レベルを 3 から 5 に変更した。 +* 不具合をいくつか修正した。 + +バージョン 3.2beta0 における主な変更点: + +* eb_backward_text() を実装し、eb_forward_text() を改良した。 +* EB ライブラリのプログラミングドキュメント (日本語版) を復活させた。 +* サンプルプログラムを復活させた。 + +バージョン 3.1 における主な変更点: + +* 圧縮された S-EBXA へのサポートにおける不具合を修正した。 + +バージョン 3.1beta1 における主な変更点: + +* デバッグコードを付加した。 + このコードは `configure --enable-debug' とすると、有効になる。 +* eb_initialize_all_subbooks() を eb_load_all_subbooks() に改名した。 + eb_initialize_all_appendix_subbooks() も eb_load_all_appendix_subbooks() + に改名した。 + 後方互換性のため、これまでの名前は CPP マクロとして定義するように + した。 +* "DUDEN" (EBG) への対応が復活した。 +* ルートディレクトリにマウントされた CD-ROM の処理における不具合を + 修正した。 +* EB ライブラリ内の初期化および後始末ルーチンのオーバーホールを + 行った。 +* 軽度の不具合をいくつか修正した。 + +バージョン 3.1beta0 における主な変更点: + +* 圧縮された S-EBXA に対応した。 +* ソニーデータディスクマン DP-S1000 付属の「日本大百科全書」に対応した。 + +バージョン 3.0.1 における主な変更点: + +* 不具合をいくつか修正した。 + +バージョン 3.0 における主な変更点: + +* EB の LANGUAGE データへの対応をやめた。 + +バージョン 3.0beta1 における主な変更点: + +* `ebrefile' を C で書き直した。 + 日本語のメッセージカタログも用意した。 +* 不具合をいくつか修正した。 + +バージョン 3.0beta0 における主な変更点: + +* GNU gettext 0.10.36 の libintl に対応した。 + 本パッケージのユーティリティツール群は、libiconv が利用可能なら + リンクするようになった。 + `configure' に `--with-iconv-includes', `--with-iconv-libraries' + オプションを追加した。 +* libintl のソースコードを削除した。 + `configure' の `--with-included-gettext' オプションも削除した。 + libintl がシステムになければ、NLS (Native/National Language Support) + は無効になる。 +* EPWING および EB のモノクロ画像データに対応した。 +* `ebzip' は動画、画像、音声の各データファイルに対応するようになった。 + `ebzip' に `--skip-content' (`-s') オプションを追加した。 +* 軽度の不具合をたくさん修正した。 + +バージョン 3.0alpha4 における主な変更点: + +* EPWING の動画データ、カラー画像データに対応した。 +* EB ライブラリを利用したアプリケーション向けに、M4 マクロファイル + `eb3.m4' を用意した。(Autoconf 2.49 が必要。) + +バージョン 3.0alpha3 における主な変更点: + +* テキストのフック関連の API を改めた。 + +バージョン 3.0alpha2 における主な変更点: + +* たくさんの不具合を修正した。 + +バージョン 3.0alpha1 における主な変更点: + +* EPWING V6 の圧縮形式に対応したい。 +* ファイル名やディレクトリ名における、大文字/小文字や接尾子の一貫性 + の欠如を無視するようにした。 +* `ebzip' の `--suffix', `--case' オプションを削除した。 +* フォント関連の API を若干ながら変更した。 +* 軽度の不具合を、かなり色々と修正した。 + +バージョン 3.0alpha0 における主な変更点: + +* 複合検索に対応した。 +* 条件検索に対応した。 +* GNU gettext を用いた NLS (Native/National Language Support)。 + 日本語のメッセージカタログを用意した。 +* 実験的ながら Pthread に対応した。 + `configure' に `--enable-pthreads' オプションを追加した。 +* `configure' が、自動的に zlib を見つけ出すようにした。 +* API を変更した。 + バージョン 2.x の API とは、非互換な点がいくつかある。 +* 軽度の不具合をたくさん修正した。 + +バージョン 2.3.7 における主な変更点: + +* "DUDEN Die sinn-und sachverwandten Worter" (EBG) と "DUDEN Das + Fremdworterbuch" に対応した。 + +バージョン 2.3.6 における主な変更点: + +* 「日本語語彙大系」 (EPWING, 岩波書店) で顕在化する不具合を修正した。 +* "EDICT" (JIS X 4081, フリーの辞書) で顕在化する不具合を修正した。 + +バージョン 2.3.5 における主な変更点: + +* 特になし。 + +バージョン 2.3.4 における主な変更点: + +* EPWING の伸長ルーチンの不具合を修正した。 +* 軽度の不具合をいくつか修正した。 + +バージョン 2.3.3 における主な変更点: + +* 共有ライブラリのバージョン番号を修正した。 + +バージョン 2.3.2 における主な変更点: + +* 軽度な不具合を修正した。 + +(バージョン 2.3.1 はリリースしていない。) + +バージョン 2.3 における主な変更点: + +* 特になし。 + +バージョン 2.3beta3 における主な変更点: + +* 特になし。 + +バージョン 2.3beta2 における主な変更点: + +* 特になし。 + +バージョン 2.3beta1 における主な変更点: + +* 実験的ながら EBXA-C に対応した。 +* 実験的ながら、区切り文字 (stop-code) の自動検出に対応した。 + +バージョン 2.3beta0 における主な変更点: + +* EPWING 圧縮形式で圧縮された CD-ROM 書籍に対応した。 +* `ebzip' の情報通知メッセージを変更した。 +* `ebrefile' の不具合を修正した。 + `ebrefile' は `ebzip' と同じ順序でカタログファイルを探しに行って + いなかった。 + +バージョン 2.2.1 における主な変更点: + +* samples と samples-ja を統合した。 +* `configure' に `--enable-samples' オプションを追加した。 +* DOS, Windows, OS/2 への対応を改善した。 + +バージョン 2.2 における主な変更点: + +* EB ライブラリのドキュメントを追加した。 + +バージョン 2.1.2 における主な変更点: + +* 共有ライブラリのバージョン番号を修正した。 +* FreeBSD-ELF に対応した libtool を使うようにした。 + +バージョン 2.1.1 における主な変更点: + +* Windows VC++ 向けのコードをいくつか追加した。 +* 不具合を修正した。 + +バージョン 2.1 における主な変更点: + +* 不具合を修正した。 + +バージョン 2.1beta2 における主な変更点: + +* `ebzip' に圧縮レベル 3 を新設した。 +* 新たに `ebrefile' コマンドを追加した。 + +バージョン 2.1beta1 における主な変更点: + +* 不具合を修正した。 + +バージョン 2.1beta0 における主な変更点: + +* `ebfont' のドキュメントを追加した。 +* 日本語のドキュメントを追加した。 +* `configure' に `--with-zlib', `--with-zlib-includes', + `--with-zlib-libraries' オプションを追加した。 +* CD-ROM 書籍の圧縮/伸長に対応した。 +* 新たに `ebzip' コマンドを追加した。 +* `ebappendix' の `--filename-case' オプションを `--case' に改名した。 +* `ebappendix' の `--no-catalogs' オプションを再追加した。 +* `ebfont' に `--subbook' (`-S') オプションを足した。 +* `ebfont' が生成するディレクトリの構造を変更した。 +* zlib ソースコードを取り込むようにした。 +* 不具合を修正した。 + +バージョン 2.0.3 における主な変更点: + +* 不具合を修正した。 + +バージョン 2.0.2 における主な変更点: + +* 不具合を修正した。 + +バージョン 2.0.1 における主な変更点: + +* 特になし。 + +バージョン 2.0 における主な変更点: + +* 不具合を修正した。 + +バージョン 2.0beta1 における主な変更点: + +* `ebappendix' のオプション `--filename-cases' を `--filename-case' に + 改名した。 +* 不具合を修正した。 + +バージョン 2.0beta0 における主な変更点: + +* GNU libtool の利用により、EB ライブラリの共有ライブラリ版をコンパイ + ルできるようにした。 +* 関数のインターフェースを変更した。 + EB ライブラリ 1.0.x と 2.0 で、いくつか非互換な箇所が生じた。 +* `ebinfo' の Texinfo ドキュメントを追加した。 +* JIS X 4081-1996 のほとんどの記述に対応した。 +* ソースコード配布パッケージのディレクトリ構成を変更した。 +* `ebappendix' の `--no-catalogs' オプションを削除した。 +* 不具合を修正した。 + +バージョン 1.0.6 における主な変更点: + +* 不具合を修正した。 + +バージョン 1.0.5 における主な変更点: + +* 不具合を修正した。 + +バージョン 1.0.4 における主な変更点: + +* 特になし。 + +バージョン 1.0.3 における主な変更点: + +* "Concise Oxford dicitionary" に対応した。 +* 複数のアーキテクチャ上でのコンパイルに関する Makefile.am の不具合 + を修正した。 + 複数の種類のコンピュータ上で、同時に本パッケージをコンパイルできる + ようになった。 +* ビットマップの変換関数のインターフェースを変更した。 +* 不具合を修正した。 + +バージョン 1.0.2 における主な変更点: + +* EB ライブラリに関数をいくつか追加した。 + これらの関数は、CD-ROM 書籍が定義している外字の画像ファイルを生成 + する。対応している画像形式は、XBM, XPM と GIF。 +* 不具合を修正した。 + +バージョン 1.0.1 における主な変更点: + +* JIS X 4081-1996 に記されている表示制御記述子を認識するようにした。 +* いくつかの EPWING 書籍で、漢字による前方一致検索ができるようにした。 +* EPWING 版リーダーズ英和辞典に対応した。 +* 不具合を修正した。 + +バージョン 1.0 における主な変更点: + +* 不具合を修正した。 + +バージョン 1.0beta2 における主な変更点: + +* 不具合を修正した。 + +バージョン 1.0beta1 における主な変更点: + +* appendix データファイルの形式を変更した。 +* 不具合を修正した。 diff --git a/lib/ebu/README b/lib/ebu/README new file mode 100644 index 0000000..fb22c88 --- /dev/null +++ b/lib/ebu/README @@ -0,0 +1,11 @@ +EB Library with UTF-8 support +http://green.ribbon.to/~ikazuhiro/dic/ebu.html + + Kazuhiro Ito + +JIS X 4081 UTF-8 extension に準拠した書籍に対応する、EB Library の +改造版です。 + +ドキュメント類は EB Library から更新していません。 +使用方法等は配布ページを参照してください。 +EB Library の README は README.org にあります。 diff --git a/lib/ebu/README.org b/lib/ebu/README.org new file mode 100644 index 0000000..39c55e0 --- /dev/null +++ b/lib/ebu/README.org @@ -0,0 +1,71 @@ + + EB $B%i%$%V%i%j(B + CD-ROM $B=q@R$K%"%/%;%9$9$k$?$a$N(B C $B$N%i%$%V%i%j(B + + +EB $B%i%$%V%i%j$O(B CD-ROM $B=q@R$K%"%/%;%9$9$k$?$a$N(B C $B$N%i%$%V%i%j$G$9!#(B +UNIX $B7O(B OS $B$*$h$S(B Windows (2000$B0J9_(B) $B$N%7%9%F%`>e$GF0:n$5$;$k$3$H$,$G(B +$B$-$^$9!#(B($B$?$@$7!"(BWindows $B$G%3%s%Q%$%k$9$k$K$O!"JL%Q%C%1!<%8$,I,MW$G$9!#(B) + +EB $B%i%$%V%i%j$O(B EB, EBG, EBXA, EBXA-C, S-EBXA $B$*$h$S(B EPWING $B7A<0$N(B +CD-ROM $B=q@R$KBP1~$7$F$$$^$9!#$3$l$i$O!"(B +$B$N(B ISO 9660 $B7A<0$HF1$8MWNN$G%^%&%s%H$9$k$3$H$,$G$-$^$9!#(B + +$B$^$?!"(BEB $B%i%$%V%i%j$O4v$D$+$N%f!<%F%j%F%#%3%^%s%I$bDs6!$7$F$$$^$9!#(B + + ebappendix appendix ($BIUO?(B) $B%G!<%?$r@07A$9$k(B + ebfont CD-ROM $B=q@RFb$N30;z$N%U%)%s%H%G!<%?$rpJs$r=PNO$9$k(B + ebrefile CD-ROM $B=q@R$N%+%?%m%0%U%!%$%k$r9=@.$7D>$9(B + ebstopcode CD-ROM $B=q@R$NK\J8$N6h@Z$j%3!<%I$r8!::$9$k(B + ebunzip CD-ROM $B=q@R$r?-D9$9$k(B + ebzip CD-ROM $B=q@R$r05=L$9$k(B + ebzipinfo CD-ROM $B=q@R$N05=L>pJs$r=PNO$9$k(B + + +$B%P!<%8%g%s(B 4.0 $B$+$i!"(BEB $B%i%$%V%i%j$OB>$N%[%9%H$N=q@R$K%"%/%;%9$G$-$k(B +$B$h$&$K$J$j$^$7$?!#1s3V%"%/%;%9MQ$N<1JL;R$r;H$&$3$H$G!"B>%[%9%H>e$N(B +CD-ROM $B=q@R$r;XDj$9$k$3$H$,$G$-$^$9!#$3$N<1JL;R$O!":<$B%]!<%H(B>/<$B=q@RL>(B> (CD-ROM $B=q@RK\BN(B) + ebnet://<$B%[%9%H(B>:<$B%]!<%H(B>/<$B=q@RL>(B>.app ($BIUO?%Q%C%1!<%8(B) + +<$B%[%9%H(B> $B$O1s3V%[%9%H$N(B IP $B%"%I%l%9$b$7$/$O%[%9%HL>$G$9!#$?$@$7!"(BIPv6 +$B%"%I%l%9$r;XDj$9$k>l9g$O!"%"%I%l%9$r(B `[' $B$H(B `]' $B$G0O$`I,MW$,$"$j$^$9!#(B +<$B%]!<%H(B> $B$O!"$=$N%[%9%H$,BT$A' $B$NItJ,$O>JN,2D(B +$BG=$G$9!#(B + +$B0J2<$KNc$r5-$7$^$9!#(B + ebnet://eb.example.com/dict + ebnet://eb.example.com:22010/dict.app + ebnet://192.168.1.1/dict.app + ebnet://192.168.1.1:22010/dict + ebnet://[fe80::290:27ff:fe3]/dict.app + ebnet://[fe80::290:27ff:fe3]:22010/dict + +$B1s3V%"%/%;%9$r9T$&$K$O!"(BEBNETD $B$r(B <$B%[%9%H(B> $B>e$K%$%s%9%H!<%k$9$kI,MW$,(B +$B$"$j$^$9!#(BEBNETD $B$O!"(BEB Library $BMQ$N1s3V%"%/%;%9%5!<%P$N%=%U%H%&%'%"(B +$B$G$9!#(B + +EB $B%i%$%V%i%j$O%U%j!<%=%U%H%&%'%"$G$9!#%=!<%9%3!<%I$*$h$S%P%$%J%j$r!"(B +$B$$$o$f$k(B Modified BSD $B%i%$%;%s%9(B $B$N2<$G;HMQ$9$k$3$H$,2DG=$G$9!#(B +($B%P!<%8%g%s(B 4.1$B$h$j$bA0$N$b$N$O!"(BGPL $B$r:NMQ$7$F$$$^$7$?!#(B) +$B%i%$%;%s%9$K4X$7$F!">\$7$/$O(B COPYING $B$H$$$&1QJ8$N%U%!%$%k$r;2>H$7$F(B +$B2<$5$$!#(B + +$B:G?7$N(B EB $B%i%$%V%i%j$OpJs$O sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 13 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/gettext.m4]) +m4_include([m4/in6addr.m4]) +m4_include([m4/largefile.m4]) +m4_include([m4/lcmessage.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/sockaddrin6.m4]) +m4_include([m4/sockinttypes.m4]) diff --git a/lib/ebu/config.guess b/lib/ebu/config.guess new file mode 100644 index 0000000..dc84c68 --- /dev/null +++ b/lib/ebu/config.guess @@ -0,0 +1,1501 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ebu/config.h b/lib/ebu/config.h new file mode 100644 index 0000000..a7e5fcf --- /dev/null +++ b/lib/ebu/config.h @@ -0,0 +1,231 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Use DOS style pathnames */ +/* #undef DOS_FILE_PATH */ + +/* Define if build with ebnet support */ +#define ENABLE_EBNET 1 + +/* Define if build with IPv6 support */ +#define ENABLE_IPV6 1 + +/* Define if libdeflate support is enabled. */ +/* #undef ENABLE_LIBDEFLATE */ + +/* Define if NLS is requested */ +#define ENABLE_NLS 1 + +/* Define if pthread support is enabled. */ +/* #undef ENABLE_PTHREAD */ + +/* Define if build with Winsock2 */ +/* #undef ENABLE_WINSOCK2 */ + +/* Define if command names have the suffix \`.exe' */ +/* #undef EXEEXT_EXE */ + +/* Define to 1 if you have the `atoll' function. */ +#define HAVE_ATOLL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DIRECT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `gai_strerror' function. */ +#define HAVE_GAI_STRERROR 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getnameinfo' function. */ +#define HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if you have the `iconv_open' function. */ +#define HAVE_ICONV_OPEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `LC_MESSAGES' locale category */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the `bind' library (-lbind). */ +/* #undef HAVE_LIBBIND */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBCHARSET_H */ + +/* Define to 1 if you have the `libiconv_open' function. */ +/* #undef HAVE_LIBICONV_OPEN */ + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#define HAVE_LIBNSL 1 + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +/* #undef HAVE_LIBRESOLV */ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +/* #undef HAVE_LIBWS2_32 */ + +/* Define to 1 if you have the `locale_charset' function. */ +/* #undef HAVE_LOCALE_CHARSET */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MBSTRING_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if defines `struct in6_addr' */ +#define HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if defines `struct sockaddr_in6' */ +#define HAVE_STRUCT_SOCKADDR_IN6 1 + +/* Define to 1 if defines `struct sockaddr_storage' */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the `_atoi64' function. */ +/* #undef HAVE__ATOI64 */ + +/* Define to 1 if you have the `_getdcwd' function. */ +/* #undef HAVE__GETDCWD */ + +/* Define to 1 if `in6addr_any' is declared by */ +#define IN6ADDR_ANY_DECLARED 1 + +/* Define to 1 if `in6addr_loopback' is declared by */ +#define IN6ADDR_LOOPBACK_DECLARED 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Mailing address */ +#define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" + +/* Name of package */ +#define PACKAGE "ebu" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ebu" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ebu 4.5-20200413" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ebu" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "4.5-20200413" + +/* Define to `1' if printf() recognizes "I64" modifier for __int64 */ +/* #undef PRINTF_I64_MODIFIER */ + +/* Define to `1' if printf() recognizes "ll" modifier for long long */ +#define PRINTF_LL_MODIFIER 1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "4.5-20200413" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to `unsigned char', `unsigned short', `unsigned int' or `unsigned + long' according with size of `sin_port' in `struct sockaddr_in', if + , or does not define + `in_port_t'. */ +/* #undef in_port_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `unsigned char', `unsigned short', `unsigned int' or `unsigned + long' according with size of `sa_family' in `struct sockaddr', if + or does not define `sa_family_t'. */ +/* #undef sa_family_t */ + +/* Define to `int' if or does not define. */ +/* #undef socklen_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ diff --git a/lib/ebu/config.h.in b/lib/ebu/config.h.in new file mode 100644 index 0000000..388b6fa --- /dev/null +++ b/lib/ebu/config.h.in @@ -0,0 +1,230 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Use DOS style pathnames */ +#undef DOS_FILE_PATH + +/* Define if build with ebnet support */ +#undef ENABLE_EBNET + +/* Define if build with IPv6 support */ +#undef ENABLE_IPV6 + +/* Define if libdeflate support is enabled. */ +#undef ENABLE_LIBDEFLATE + +/* Define if NLS is requested */ +#undef ENABLE_NLS + +/* Define if pthread support is enabled. */ +#undef ENABLE_PTHREAD + +/* Define if build with Winsock2 */ +#undef ENABLE_WINSOCK2 + +/* Define if command names have the suffix \`.exe' */ +#undef EXEEXT_EXE + +/* Define to 1 if you have the `atoll' function. */ +#undef HAVE_ATOLL + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `gai_strerror' function. */ +#undef HAVE_GAI_STRERROR + +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `getnameinfo' function. */ +#undef HAVE_GETNAMEINFO + +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getopt_long' function. */ +#undef HAVE_GETOPT_LONG + +/* Define to 1 if you have the header file. */ +#undef HAVE_ICONV_H + +/* Define to 1 if you have the `iconv_open' function. */ +#undef HAVE_ICONV_OPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LANGINFO_H + +/* Define to 1 if you have the `LC_MESSAGES' locale category */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if you have the `bind' library (-lbind). */ +#undef HAVE_LIBBIND + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBCHARSET_H + +/* Define to 1 if you have the `libiconv_open' function. */ +#undef HAVE_LIBICONV_OPEN + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + +/* Define to 1 if you have the `locale_charset' function. */ +#undef HAVE_LOCALE_CHARSET + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MBSTRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `nl_langinfo' function. */ +#undef HAVE_NL_LANGINFO + +/* Define to 1 if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PTHREAD_H + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if defines `struct in6_addr' */ +#undef HAVE_STRUCT_IN6_ADDR + +/* Define to 1 if defines `struct sockaddr_in6' */ +#undef HAVE_STRUCT_SOCKADDR_IN6 + +/* Define to 1 if defines `struct sockaddr_storage' */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + +/* Define to 1 if you have the `_atoi64' function. */ +#undef HAVE__ATOI64 + +/* Define to 1 if you have the `_getdcwd' function. */ +#undef HAVE__GETDCWD + +/* Define to 1 if `in6addr_any' is declared by */ +#undef IN6ADDR_ANY_DECLARED + +/* Define to 1 if `in6addr_loopback' is declared by */ +#undef IN6ADDR_LOOPBACK_DECLARED + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Mailing address */ +#undef MAILING_ADDRESS + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to `1' if printf() recognizes "I64" modifier for __int64 */ +#undef PRINTF_I64_MODIFIER + +/* Define to `1' if printf() recognizes "ll" modifier for long long */ +#undef PRINTF_LL_MODIFIER + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `unsigned char', `unsigned short', `unsigned int' or `unsigned + long' according with size of `sin_port' in `struct sockaddr_in', if + , or does not define + `in_port_t'. */ +#undef in_port_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to `unsigned char', `unsigned short', `unsigned int' or `unsigned + long' according with size of `sa_family' in `struct sockaddr', if + or does not define `sa_family_t'. */ +#undef sa_family_t + +/* Define to `int' if or does not define. */ +#undef socklen_t + +/* Define to `int' if does not define. */ +#undef ssize_t diff --git a/lib/ebu/config.log b/lib/ebu/config.log new file mode 100644 index 0000000..d81c655 --- /dev/null +++ b/lib/ebu/config.log @@ -0,0 +1,2501 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by ebu configure 4.5-20200413, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ ./configure + +## --------- ## +## Platform. ## +## --------- ## + +hostname = sagan-panda +uname -m = x86_64 +uname -r = 4.4.0-19041-Microsoft +uname -s = Linux +uname -v = #488-Microsoft Mon Sep 01 13:43:00 PST 2020 + +/usr/bin/uname -p = x86_64 +/bin/uname -X = unknown + +/bin/arch = x86_64 +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/local/sbin +PATH: /usr/local/bin +PATH: /usr/sbin +PATH: /usr/bin +PATH: /sbin +PATH: /bin +PATH: /usr/games +PATH: /usr/local/games +PATH: /mnt/c/Program Files/VanDyke Software/SecureFX/ +PATH: /mnt/c/Program Files/Common Files/Oracle/Java/javapath +PATH: /mnt/c/WINDOWS/system32 +PATH: /mnt/c/WINDOWS +PATH: /mnt/c/WINDOWS/System32/Wbem +PATH: /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/ +PATH: /mnt/c/WINDOWS/System32/OpenSSH/ +PATH: /mnt/c/Program Files/nodejs/ +PATH: /mnt/c/Program Files (x86)/ZeroTier/One/ +PATH: /mnt/c/Program Files/Go/bin +PATH: /mnt/c/Users/root/AppData/Local/Programs/Python/Python39/Scripts/ +PATH: /mnt/c/Users/root/AppData/Local/Programs/Python/Python39/ +PATH: /mnt/c/Users/root/AppData/Local/Microsoft/WindowsApps +PATH: /mnt/c/Users/root/AppData/Roaming/npm +PATH: /mnt/c/Users/root/go/bin +PATH: /mnt/c/Program Files/Bandizip/ +PATH: /mnt/c/files/scripts +PATH: /mnt/c/files/bin +PATH: /mnt/c/Users/root/files/apps/Ubuntu_2004 +PATH: /mnt/c/files/apps/SuperCMD +PATH: /mnt/c/files/apps/iperf-3.1.3-win64 +PATH: /mnt/c/Program Files/Git/cmd +PATH: /mnt/c/files/apps/PSTools +PATH: /mnt/c/Users/root/AppData/Local/Programs/Python/Python39/Scripts/ +PATH: /mnt/c/Users/root/AppData/Local/Programs/Python/Python39/ +PATH: /mnt/c/Users/root/AppData/Local/Microsoft/WindowsApps +PATH: /mnt/c/Users/root/AppData/Roaming/npm +PATH: /mnt/c/Users/root/go/bin +PATH: /mnt/c/Program Files/Bandizip/ +PATH: /snap/bin + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:2397: checking for a BSD-compatible install +configure:2465: result: /usr/bin/install -c +configure:2476: checking whether build environment is sane +configure:2513: result: yes +configure:2640: checking for a thread-safe mkdir -p +configure:2679: result: /usr/bin/mkdir -p +configure:2692: checking for gawk +configure:2708: found /usr/bin/gawk +configure:2719: result: gawk +configure:2730: checking whether make sets $(MAKE) +configure:2752: result: yes +configure:2897: checking for gcc +configure:2913: found /usr/bin/gcc +configure:2924: result: gcc +configure:3153: checking for C compiler version +configure:3162: gcc --version >&5 +gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0 +Copyright (C) 2019 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:3173: $? = 0 +configure:3162: gcc -v >&5 +Using built-in specs. +COLLECT_GCC=gcc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) +configure:3173: $? = 0 +configure:3162: gcc -V >&5 +gcc: error: unrecognized command line option '-V' +gcc: fatal error: no input files +compilation terminated. +configure:3173: $? = 1 +configure:3162: gcc -qversion >&5 +gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? +gcc: fatal error: no input files +compilation terminated. +configure:3173: $? = 1 +configure:3193: checking whether the C compiler works +configure:3215: gcc conftest.c >&5 +configure:3219: $? = 0 +configure:3267: result: yes +configure:3270: checking for C compiler default output file name +configure:3272: result: a.out +configure:3278: checking for suffix of executables +configure:3285: gcc -o conftest conftest.c >&5 +configure:3289: $? = 0 +configure:3311: result: +configure:3333: checking whether we are cross compiling +configure:3341: gcc -o conftest conftest.c >&5 +configure:3345: $? = 0 +configure:3352: ./conftest +configure:3356: $? = 0 +configure:3344: result: no +configure:3349: checking for suffix of object files +configure:3371: gcc -c conftest.c >&5 +configure:3375: $? = 0 +configure:3396: result: o +configure:3400: checking whether we are using the GNU C compiler +configure:3419: gcc -c conftest.c >&5 +configure:3419: $? = 0 +configure:3428: result: yes +configure:3437: checking whether gcc accepts -g +configure:3457: gcc -c -g conftest.c >&5 +configure:3457: $? = 0 +configure:3498: result: yes +configure:3515: checking for gcc option to accept ISO C89 +configure:3578: gcc -c -g -O2 conftest.c >&5 +configure:3578: $? = 0 +configure:3591: result: none needed +configure:3622: checking for style of include used by make +configure:3650: result: GNU +configure:3675: checking dependency style of gcc +configure:3785: result: gcc3 +configure:3829: checking build system type +configure:3843: result: x86_64-unknown-linux-gnu +configure:3863: checking host system type +configure:3876: result: x86_64-unknown-linux-gnu +configure:3917: checking how to print strings +configure:3944: result: printf +configure:3965: checking for a sed that does not truncate output +configure:4029: result: /usr/bin/sed +configure:4047: checking for grep that handles long lines and -e +configure:4105: result: /usr/bin/grep +configure:4110: checking for egrep +configure:4172: result: /usr/bin/grep -E +configure:4177: checking for fgrep +configure:4239: result: /usr/bin/grep -F +configure:4274: checking for ld used by gcc +configure:4341: result: /usr/bin/ld +configure:4348: checking if the linker (/usr/bin/ld) is GNU ld +configure:4363: result: yes +configure:4375: checking for BSD- or MS-compatible name lister (nm) +configure:4429: result: /usr/bin/nm -B +configure:4559: checking the name lister (/usr/bin/nm -B) interface +configure:4566: gcc -c -g -O2 conftest.c >&5 +configure:4569: /usr/bin/nm -B "conftest.o" +configure:4572: output +0000000000000000 B some_variable +configure:4573: result: BSD nm +configure:4576: checking whether ln -s works +configure:4580: result: yes +configure:4588: checking the maximum length of command line arguments +configure:4719: result: 1572864 +configure:4767: checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format +configure:4807: result: func_convert_file_noop +configure:4814: checking how to convert x86_64-unknown-linux-gnu file names to toolchain format +configure:4834: result: func_convert_file_noop +configure:4841: checking for /usr/bin/ld option to reload object files +configure:4848: result: -r +configure:4922: checking for objdump +configure:4938: found /usr/bin/objdump +configure:4949: result: objdump +configure:4981: checking how to recognize dependent libraries +configure:5181: result: pass_all +configure:5266: checking for dlltool +configure:5296: result: no +configure:5326: checking how to associate runtime and link libraries +configure:5353: result: printf %s\n +configure:5414: checking for ar +configure:5430: found /usr/bin/ar +configure:5441: result: ar +configure:5478: checking for archiver @FILE support +configure:5495: gcc -c -g -O2 conftest.c >&5 +configure:5495: $? = 0 +configure:5498: ar cru libconftest.a @conftest.lst >&5 +ar: `u' modifier ignored since `D' is the default (see `U') +configure:5501: $? = 0 +configure:5506: ar cru libconftest.a @conftest.lst >&5 +ar: `u' modifier ignored since `D' is the default (see `U') +ar: conftest.o: No such file or directory +configure:5509: $? = 1 +configure:5508: result: @ +configure:5566: checking for strip +configure:5582: found /usr/bin/strip +configure:5593: result: strip +configure:5665: checking for ranlib +configure:5681: found /usr/bin/ranlib +configure:5692: result: ranlib +configure:5794: checking command to parse /usr/bin/nm -B output from gcc object +configure:5947: gcc -c -g -O2 conftest.c >&5 +configure:5950: $? = 0 +configure:5954: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:5957: $? = 0 +configure:6023: gcc -o conftest -g -O2 conftest.c conftstm.o >&5 +configure:6026: $? = 0 +configure:6064: result: ok +configure:6111: checking for sysroot +configure:6141: result: no +configure:6148: checking for a working dd +configure:6186: result: /usr/bin/dd +configure:6190: checking how to truncate binary pipes +configure:6205: result: /usr/bin/dd bs=4096 count=1 +configure:6341: gcc -c -g -O2 conftest.c >&5 +configure:6344: $? = 0 +configure:6534: checking for mt +configure:6550: found /usr/bin/mt +configure:6561: result: mt +configure:6584: checking if mt is a manifest tool +configure:6590: mt '-?' +configure:6598: result: no +configure:7275: checking how to run the C preprocessor +configure:7306: gcc -E conftest.c +configure:7306: $? = 0 +configure:7320: gcc -E conftest.c +conftest.c:12:10: fatal error: ac_nonexistent.h: No such file or directory + 12 | #include + | ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:7320: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| /* end confdefs.h. */ +| #include +configure:7345: result: gcc -E +configure:7365: gcc -E conftest.c +configure:7365: $? = 0 +configure:7379: gcc -E conftest.c +conftest.c:12:10: fatal error: ac_nonexistent.h: No such file or directory + 12 | #include + | ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:7379: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| /* end confdefs.h. */ +| #include +configure:7408: checking for ANSI C header files +configure:7428: gcc -c -g -O2 conftest.c >&5 +configure:7428: $? = 0 +configure:7501: gcc -o conftest -g -O2 conftest.c >&5 +configure:7501: $? = 0 +configure:7501: ./conftest +configure:7501: $? = 0 +configure:7512: result: yes +configure:7525: checking for sys/types.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for sys/stat.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for stdlib.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for string.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for memory.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for strings.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for inttypes.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for stdint.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7525: checking for unistd.h +configure:7525: gcc -c -g -O2 conftest.c >&5 +configure:7525: $? = 0 +configure:7525: result: yes +configure:7539: checking for dlfcn.h +configure:7539: gcc -c -g -O2 conftest.c >&5 +configure:7539: $? = 0 +configure:7539: result: yes +configure:7795: checking for objdir +configure:7810: result: .libs +configure:8074: checking if gcc supports -fno-rtti -fno-exceptions +configure:8092: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 +cc1: warning: command line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C +configure:8096: $? = 0 +configure:8109: result: no +configure:8467: checking for gcc option to produce PIC +configure:8474: result: -fPIC -DPIC +configure:8482: checking if gcc PIC flag -fPIC -DPIC works +configure:8500: gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 +configure:8504: $? = 0 +configure:8517: result: yes +configure:8546: checking if gcc static flag -static works +configure:8574: result: yes +configure:8589: checking if gcc supports -c -o file.o +configure:8610: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 +configure:8614: $? = 0 +configure:8636: result: yes +configure:8644: checking if gcc supports -c -o file.o +configure:8691: result: yes +configure:8724: checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries +configure:9983: result: yes +configure:10020: checking whether -lc should be explicitly linked in +configure:10028: gcc -c -g -O2 conftest.c >&5 +configure:10031: $? = 0 +configure:10046: gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1 +configure:10049: $? = 0 +configure:10063: result: no +configure:10223: checking dynamic linker characteristics +configure:10804: gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 +configure:10804: $? = 0 +configure:11041: result: GNU/Linux ld.so +configure:11163: checking how to hardcode library paths into programs +configure:11188: result: immediate +configure:11736: checking whether stripping libraries is possible +configure:11741: result: yes +configure:11776: checking if libtool supports shared libraries +configure:11778: result: yes +configure:11781: checking whether to build shared libraries +configure:11806: result: yes +configure:11809: checking whether to build static libraries +configure:11813: result: yes +configure:8642: checking whether ln -s works +configure:8646: result: yes +configure:8663: checking for gcc option to support OpenMP +configure:8678: gcc -o conftest -g -O2 conftest.c >&5 +conftest.c:26:2: error: unknown type name 'choke' + 26 | choke me + | ^~~~~ +conftest.c:26:10: error: expected ';' before 'typedef' + 26 | choke me + | ^ + | ; +configure:8678: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| +| #ifndef _OPENMP +| choke me +| #endif +| #include +| int main () { return omp_get_num_threads (); } +| +configure:8696: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:8696: $? = 0 +configure:8710: result: -fopenmp +configure:8725: checking for perl +configure:8743: found /usr/bin/perl +configure:8756: result: /usr/bin/perl +configure:8777: checking for special C compiler options needed for large files +configure:8822: result: no +configure:8828: checking for _FILE_OFFSET_BITS value needed for large files +configure:8853: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:8853: $? = 0 +configure:8885: result: no +configure:8971: checking for ll modifier of printf +configure:8995: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:8995: $? = 0 +configure:8995: ./conftest +configure:8995: $? = 0 +configure:9005: result: yes +configure:9007: checking for I64 modifier of printf +configure:9031: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +conftest.c: In function 'main': +conftest.c:30:36: error: expected ')' before '__int64' + 30 | sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + | ~ ^~~~~~~~ + | ) +conftest.c:30:48: warning: left shift count >= width of type [-Wshift-count-overflow] + 30 | sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + | ^~ +conftest.c:30:23: warning: 'I' flag used with '%x' gnu_printf format [-Wformat=] + 30 | sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + | ^ +configure:9031: $? = 1 +configure: program exited with status 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| +| #include +| #include +| #include +| int main() { +| char buffer[128]; +| sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); +| return (strcmp(buffer, "100000000") == 0) ? 0 : 1; +| } +| +configure:9041: result: no +configure:9064: checking locale.h usability +configure:9064: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:9064: $? = 0 +configure:9064: result: yes +configure:9064: checking locale.h presence +configure:9064: gcc -E conftest.c +configure:9064: $? = 0 +configure:9064: result: yes +configure:9064: checking for locale.h +configure:9064: result: yes +configure:9064: checking nl_types.h usability +configure:9064: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:9064: $? = 0 +configure:9064: result: yes +configure:9064: checking nl_types.h presence +configure:9064: gcc -E conftest.c +configure:9064: $? = 0 +configure:9064: result: yes +configure:9064: checking for nl_types.h +configure:9064: result: yes +configure:9076: checking for setlocale +configure:9076: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:9076: $? = 0 +configure:9076: result: yes +configure:9087: checking for LC_MESSAGES +configure:9103: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:9103: $? = 0 +configure:9111: result: yes +configure:9170: checking for iconv_open in -liconv +configure:9195: gcc -o conftest -g -O2 -fopenmp conftest.c -liconv >&5 +/usr/bin/ld: cannot find -liconv +collect2: error: ld returned 1 exit status +configure:9195: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char iconv_open (); +| int +| main () +| { +| return iconv_open (); +| ; +| return 0; +| } +configure:9204: result: no +configure:9209: checking for libiconv_open in -liconv +configure:9234: gcc -o conftest -g -O2 -fopenmp conftest.c -liconv >&5 +/usr/bin/ld: cannot find -liconv +collect2: error: ld returned 1 exit status +configure:9234: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char libiconv_open (); +| int +| main () +| { +| return libiconv_open (); +| ; +| return 0; +| } +configure:9243: result: no +configure:9254: checking for iconv_open +configure:9254: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:9254: $? = 0 +configure:9254: result: yes +configure:9254: checking for libiconv_open +configure:9254: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +/usr/bin/ld: /tmp/ccgUHSdg.o: in function `main': +/mnt/d/files/projects/ebclient/lib/ebu/conftest.c:64: undefined reference to `libiconv_open' +collect2: error: ld returned 1 exit status +configure:9254: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| /* end confdefs.h. */ +| /* Define libiconv_open to an innocuous variant, in case declares libiconv_open. +| For example, HP-UX 11i declares gettimeofday. */ +| #define libiconv_open innocuous_libiconv_open +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char libiconv_open (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef libiconv_open +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char libiconv_open (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_libiconv_open || defined __stub___libiconv_open +| choke me +| #endif +| +| int +| main () +| { +| return libiconv_open (); +| ; +| return 0; +| } +configure:9254: result: no +configure:9254: checking for locale_charset +configure:9254: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +/usr/bin/ld: /tmp/ccjYzMSF.o: in function `main': +/mnt/d/files/projects/ebclient/lib/ebu/conftest.c:64: undefined reference to `locale_charset' +collect2: error: ld returned 1 exit status +configure:9254: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| /* end confdefs.h. */ +| /* Define locale_charset to an innocuous variant, in case declares locale_charset. +| For example, HP-UX 11i declares gettimeofday. */ +| #define locale_charset innocuous_locale_charset +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char locale_charset (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef locale_charset +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char locale_charset (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_locale_charset || defined __stub___locale_charset +| choke me +| #endif +| +| int +| main () +| { +| return locale_charset (); +| ; +| return 0; +| } +configure:9254: result: no +configure:9266: checking iconv.h usability +configure:9266: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:9266: $? = 0 +configure:9266: result: yes +configure:9266: checking iconv.h presence +configure:9266: gcc -E conftest.c +configure:9266: $? = 0 +configure:9266: result: yes +configure:9266: checking for iconv.h +configure:9266: result: yes +configure:9266: checking libcharset.h usability +configure:9266: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c:64:10: fatal error: libcharset.h: No such file or directory + 64 | #include + | ^~~~~~~~~~~~~~ +compilation terminated. +configure:9266: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:9266: result: no +configure:9266: checking libcharset.h presence +configure:9266: gcc -E conftest.c +conftest.c:31:10: fatal error: libcharset.h: No such file or directory + 31 | #include + | ^~~~~~~~~~~~~~ +compilation terminated. +configure:9266: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| /* end confdefs.h. */ +| #include +configure:9266: result: no +configure:9266: checking for libcharset.h +configure:9266: result: no +configure:9288: checking for NLS support +configure:9323: gcc -o conftest -g -O2 -fopenmp conftest.c -lintl -liconv >&5 +/usr/bin/ld: cannot find -lintl +/usr/bin/ld: cannot find -liconv +collect2: error: ld returned 1 exit status +configure:9323: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| /* end confdefs.h. */ +| +| #include +| #ifdef ENABLE_NLS +| #undef ENABLE_NLS +| #endif +| #define ENABLE_NLS 1 +| #ifdef HAVE_LOCALE_H +| #include +| #endif +| #include +| +| int +| main() +| { +| #ifdef HAVE_SETLOCALE +| setlocale(LC_ALL, ""); +| #endif +| bindtextdomain("gttest", ".locale"); +| textdomain("gttest"); +| gettext("foo"); +| return 0; +| } +| +configure:9365: gcc -o conftest -g -O2 -fopenmp conftest.c -lintl >&5 +/usr/bin/ld: cannot find -lintl +collect2: error: ld returned 1 exit status +configure:9365: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| /* end confdefs.h. */ +| +| #include +| #ifdef ENABLE_NLS +| #undef ENABLE_NLS +| #endif +| #define ENABLE_NLS 1 +| #ifdef HAVE_LOCALE_H +| #include +| #endif +| #include +| +| int +| main() +| { +| #ifdef HAVE_SETLOCALE +| setlocale(LC_ALL, ""); +| #endif +| bindtextdomain("gttest", ".locale"); +| textdomain("gttest"); +| gettext("foo"); +| return 0; +| } +| +configure:9408: gcc -o conftest -g -O2 -fopenmp conftest.c -liconv >&5 +/usr/bin/ld: cannot find -liconv +collect2: error: ld returned 1 exit status +configure:9408: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| /* end confdefs.h. */ +| +| #include +| #ifdef ENABLE_NLS +| #undef ENABLE_NLS +| #endif +| #define ENABLE_NLS 1 +| #ifdef HAVE_LOCALE_H +| #include +| #endif +| #include +| +| int +| main() +| { +| #ifdef HAVE_SETLOCALE +| setlocale(LC_ALL, ""); +| #endif +| bindtextdomain("gttest", ".locale"); +| textdomain("gttest"); +| gettext("foo"); +| return 0; +| } +| +configure:9451: gcc -o conftest -g -O2 -fopenmp conftest.c >&5 +configure:9451: $? = 0 +configure:9473: result: yes +configure:9497: checking for gmsgfmt +configure:9530: result: no +configure:9497: checking for msgfmt +configure:9530: result: no +configure:9543: checking for gxgettext +configure:9576: result: no +configure:9543: checking for xgettext +configure:9576: result: no +configure:9658: checking for pthread +configure:9694: result: no +configure:9755: checking for libdeflate +configure:9774: gcc -o conftest -g -O2 -fopenmp conftest.c -ldeflate >&5 +conftest.c:33:10: fatal error: libdeflate.h: No such file or directory + 33 | #include + | ^~~~~~~~~~~~~~ +compilation terminated. +configure:9774: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| /* end confdefs.h. */ +| +| #include +| +| int +| main() +| { +| struct libdeflate_compressor *c; c = libdeflate_alloc_compressor(12); +| return 0; +| } +| +configure:9783: result: no +configure:9828: checking for zlib +configure:9847: gcc -o conftest -g -O2 -fopenmp conftest.c -lz >&5 +configure:9847: $? = 0 +configure:9856: result: yes +configure:9909: checking direct.h usability +configure:9909: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c:65:10: fatal error: direct.h: No such file or directory + 65 | #include + | ^~~~~~~~~~ +compilation terminated. +configure:9909: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:9909: result: no +configure:9909: checking direct.h presence +configure:9909: gcc -E conftest.c +conftest.c:32:10: fatal error: direct.h: No such file or directory + 32 | #include + | ^~~~~~~~~~ +compilation terminated. +configure:9909: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| /* end confdefs.h. */ +| #include +configure:9909: result: no +configure:9909: checking for direct.h +configure:9909: result: no +configure:9909: checking langinfo.h usability +configure:9909: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:9909: $? = 0 +configure:9909: result: yes +configure:9909: checking langinfo.h presence +configure:9909: gcc -E conftest.c +configure:9909: $? = 0 +configure:9909: result: yes +configure:9909: checking for langinfo.h +configure:9909: result: yes +configure:9909: checking mbstring.h usability +configure:9909: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c:66:10: fatal error: mbstring.h: No such file or directory + 66 | #include + | ^~~~~~~~~~~~ +compilation terminated. +configure:9909: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:9909: result: no +configure:9909: checking mbstring.h presence +configure:9909: gcc -E conftest.c +conftest.c:33:10: fatal error: mbstring.h: No such file or directory + 33 | #include + | ^~~~~~~~~~~~ +compilation terminated. +configure:9909: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| /* end confdefs.h. */ +| #include +configure:9909: result: no +configure:9909: checking for mbstring.h +configure:9909: result: no +configure:9909: checking pthread.h usability +configure:9909: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:9909: $? = 0 +configure:9909: result: yes +configure:9909: checking pthread.h presence +configure:9909: gcc -E conftest.c +configure:9909: $? = 0 +configure:9909: result: yes +configure:9909: checking for pthread.h +configure:9909: result: yes +configure:9921: checking for res_query in -lresolv +configure:9946: gcc -o conftest -g -O2 -fopenmp conftest.c -lresolv >&5 +/usr/bin/ld: /tmp/cc2Tbhzc.o: in function `main': +/mnt/d/files/projects/ebclient/lib/ebu/conftest.c:45: undefined reference to `res_query' +collect2: error: ld returned 1 exit status +configure:9946: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char res_query (); +| int +| main () +| { +| return res_query (); +| ; +| return 0; +| } +configure:9955: result: no +configure:9967: checking for res_query in -lbind +configure:9992: gcc -o conftest -g -O2 -fopenmp conftest.c -lbind >&5 +/usr/bin/ld: cannot find -lbind +collect2: error: ld returned 1 exit status +configure:9992: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char res_query (); +| int +| main () +| { +| return res_query (); +| ; +| return 0; +| } +configure:10001: result: no +configure:10013: checking for gethostname in -lnsl +configure:10038: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10038: $? = 0 +configure:10047: result: yes +configure:10058: checking for socket in -lsocket +configure:10083: gcc -o conftest -g -O2 -fopenmp conftest.c -lsocket -lnsl >&5 +/usr/bin/ld: cannot find -lsocket +collect2: error: ld returned 1 exit status +configure:10083: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char socket (); +| int +| main () +| { +| return socket (); +| ; +| return 0; +| } +configure:10092: result: no +configure:10107: checking for nl_langinfo +configure:10107: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10107: $? = 0 +configure:10107: result: yes +configure:10107: checking for _getdcwd +configure:10107: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +/usr/bin/ld: /tmp/ccA1ZuaW.o: in function `main': +/mnt/d/files/projects/ebclient/lib/ebu/conftest.c:70: undefined reference to `_getdcwd' +collect2: error: ld returned 1 exit status +configure:10107: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| /* end confdefs.h. */ +| /* Define _getdcwd to an innocuous variant, in case declares _getdcwd. +| For example, HP-UX 11i declares gettimeofday. */ +| #define _getdcwd innocuous__getdcwd +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char _getdcwd (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef _getdcwd +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char _getdcwd (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub__getdcwd || defined __stub____getdcwd +| choke me +| #endif +| +| int +| main () +| { +| return _getdcwd (); +| ; +| return 0; +| } +configure:10107: result: no +configure:10107: checking for atoll +configure:10107: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10107: $? = 0 +configure:10107: result: yes +configure:10107: checking for _atoi64 +configure:10107: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +/usr/bin/ld: /tmp/cc3vOvrL.o: in function `main': +/mnt/d/files/projects/ebclient/lib/ebu/conftest.c:71: undefined reference to `_atoi64' +collect2: error: ld returned 1 exit status +configure:10107: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| #define HAVE_ATOLL 1 +| /* end confdefs.h. */ +| /* Define _atoi64 to an innocuous variant, in case declares _atoi64. +| For example, HP-UX 11i declares gettimeofday. */ +| #define _atoi64 innocuous__atoi64 +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char _atoi64 (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef _atoi64 +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char _atoi64 (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub__atoi64 || defined __stub____atoi64 +| choke me +| #endif +| +| int +| main () +| { +| return _atoi64 (); +| ; +| return 0; +| } +configure:10107: result: no +configure:10116: checking for strcasecmp +configure:10116: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +conftest.c:60:6: warning: conflicting types for built-in function 'strcasecmp'; expected 'int(const char *, const char *)' [-Wbuiltin-declaration-mismatch] + 60 | char strcasecmp (); + | ^~~~~~~~~~ +configure:10116: $? = 0 +configure:10116: result: yes +configure:10131: checking for mode_t +configure:10131: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10131: $? = 0 +configure:10131: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c: In function 'main': +conftest.c:74:21: error: expected expression before ')' token + 74 | if (sizeof ((mode_t))) + | ^ +configure:10131: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| #define HAVE_ATOLL 1 +| #define HAVE_STRCASECMP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((mode_t))) +| return 0; +| ; +| return 0; +| } +configure:10131: result: yes +configure:10142: checking for ssize_t +configure:10142: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10142: $? = 0 +configure:10142: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c: In function 'main': +conftest.c:74:22: error: expected expression before ')' token + 74 | if (sizeof ((ssize_t))) + | ^ +configure:10142: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| #define HAVE_ATOLL 1 +| #define HAVE_STRCASECMP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((ssize_t))) +| return 0; +| ; +| return 0; +| } +configure:10142: result: yes +configure:10174: checking ws2tcpip.h usability +configure:10174: gcc -c -g -O2 -fopenmp conftest.c >&5 +conftest.c:71:10: fatal error: ws2tcpip.h: No such file or directory + 71 | #include + | ^~~~~~~~~~~~ +compilation terminated. +configure:10174: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| #define HAVE_ATOLL 1 +| #define HAVE_STRCASECMP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:10174: result: no +configure:10174: checking ws2tcpip.h presence +configure:10174: gcc -E conftest.c +conftest.c:38:10: fatal error: ws2tcpip.h: No such file or directory + 38 | #include + | ^~~~~~~~~~~~ +compilation terminated. +configure:10174: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "ebu" +| #define PACKAGE_TARNAME "ebu" +| #define PACKAGE_VERSION "4.5-20200413" +| #define PACKAGE_STRING "ebu 4.5-20200413" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "ebu" +| #define VERSION "4.5-20200413" +| #define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define PRINTF_LL_MODIFIER 1 +| #define HAVE_LOCALE_H 1 +| #define HAVE_NL_TYPES_H 1 +| #define HAVE_SETLOCALE 1 +| #define HAVE_LC_MESSAGES 1 +| #define HAVE_ICONV_OPEN 1 +| #define HAVE_ICONV_H 1 +| #define ENABLE_NLS 1 +| #define HAVE_LANGINFO_H 1 +| #define HAVE_PTHREAD_H 1 +| #define HAVE_LIBNSL 1 +| #define HAVE_NL_LANGINFO 1 +| #define HAVE_ATOLL 1 +| #define HAVE_STRCASECMP 1 +| /* end confdefs.h. */ +| #include +configure:10174: result: no +configure:10174: checking for ws2tcpip.h +configure:10174: result: no +configure:10174: checking sys/socket.h usability +configure:10174: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10174: $? = 0 +configure:10174: result: yes +configure:10174: checking sys/socket.h presence +configure:10174: gcc -E conftest.c +configure:10174: $? = 0 +configure:10174: result: yes +configure:10174: checking for sys/socket.h +configure:10174: result: yes +configure:10207: checking for Winsock2 support +configure:10217: result: no +configure:10222: checking getopt.h usability +configure:10222: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10222: $? = 0 +configure:10222: result: yes +configure:10222: checking getopt.h presence +configure:10222: gcc -E conftest.c +configure:10222: $? = 0 +configure:10222: result: yes +configure:10222: checking for getopt.h +configure:10222: result: yes +configure:10234: checking for getopt_long +configure:10234: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10234: $? = 0 +configure:10234: result: yes +configure:10257: checking for in_port_t +configure:10275: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10275: $? = 0 +configure:10282: result: yes +configure:10411: checking for sa_family_t +configure:10428: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10428: $? = 0 +configure:10435: result: yes +configure:10560: checking for socklen_t +configure:10577: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10577: $? = 0 +configure:10584: result: yes +configure:10591: checking for struct in6_addr +configure:10609: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10609: $? = 0 +configure:10616: result: yes +configure:10623: checking for struct sockaddr_in6 +configure:10641: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10641: $? = 0 +configure:10648: result: yes +configure:10655: checking for struct sockaddr_storage +configure:10673: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10673: $? = 0 +configure:10680: result: yes +configure:10691: checking for in6addr_any declaration in netinet/in.h or ws2tcpip.h +configure:10715: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10715: $? = 0 +configure:10722: result: yes +configure:10734: checking for in6addr_loopback declaration in netinet/in.h or ws2tcpip.h +configure:10758: gcc -c -g -O2 -fopenmp conftest.c >&5 +configure:10758: $? = 0 +configure:10765: result: yes +configure:10836: checking for getaddrinfo +configure:10836: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10836: $? = 0 +configure:10836: result: yes +configure:10836: checking for getnameinfo +configure:10836: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10836: $? = 0 +configure:10836: result: yes +configure:10836: checking for gai_strerror +configure:10836: gcc -o conftest -g -O2 -fopenmp conftest.c -lnsl >&5 +configure:10836: $? = 0 +configure:10836: result: yes +configure:10854: checking for IPv6 support +configure:10867: result: yes +configure:10872: checking for DOS style pathnames +configure:10885: result: no +configure:11051: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by ebu config.status 4.5-20200413, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on sagan-panda + +config.status:1154: creating Makefile +config.status:1154: creating ebu/Makefile +config.status:1154: creating libebutils/Makefile +config.status:1154: creating ebappendix/Makefile +config.status:1154: creating ebfont/Makefile +config.status:1154: creating ebinfo/Makefile +config.status:1154: creating ebrefile/Makefile +config.status:1154: creating ebstopcode/Makefile +config.status:1154: creating ebzip/Makefile +config.status:1154: creating doc/Makefile +config.status:1154: creating po-eb/Makefile +config.status:1154: creating po-ebutils/Makefile +config.status:1154: creating m4/Makefile +config.status:1154: creating samples/Makefile +config.status:1154: creating config.h +config.status:1383: executing depfiles commands +config.status:1383: executing libtool commands + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_build=x86_64-unknown-linux-gnu +ac_cv_c_compiler_gnu=yes +ac_cv_decl_in6addr_any=yes +ac_cv_decl_in6addr_loopback=yes +ac_cv_env_CC_set= +ac_cv_env_CC_value= +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_LT_SYS_LIBRARY_PATH_set= +ac_cv_env_LT_SYS_LIBRARY_PATH_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_func__atoi64=no +ac_cv_func__getdcwd=no +ac_cv_func_atoll=yes +ac_cv_func_gai_strerror=yes +ac_cv_func_getaddrinfo=yes +ac_cv_func_getnameinfo=yes +ac_cv_func_getopt_long=yes +ac_cv_func_iconv_open=yes +ac_cv_func_libiconv_open=no +ac_cv_func_locale_charset=no +ac_cv_func_nl_langinfo=yes +ac_cv_func_printf_i64=no +ac_cv_func_printf_ll=yes +ac_cv_func_setlocale=yes +ac_cv_func_strcasecmp=yes +ac_cv_header_direct_h=no +ac_cv_header_dlfcn_h=yes +ac_cv_header_getopt_h=yes +ac_cv_header_iconv_h=yes +ac_cv_header_inttypes_h=yes +ac_cv_header_langinfo_h=yes +ac_cv_header_libcharset_h=no +ac_cv_header_locale_h=yes +ac_cv_header_mbstring_h=no +ac_cv_header_memory_h=yes +ac_cv_header_nl_types_h=yes +ac_cv_header_pthread_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_socket_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_header_ws2tcpip_h=no +ac_cv_host=x86_64-unknown-linux-gnu +ac_cv_lib_bind_res_query=no +ac_cv_lib_iconv_iconv_open=no +ac_cv_lib_iconv_libiconv_open=no +ac_cv_lib_nsl_gethostname=yes +ac_cv_lib_resolv_res_query=no +ac_cv_lib_socket_socket=no +ac_cv_objext=o +ac_cv_path_EGREP='/usr/bin/grep -E' +ac_cv_path_FGREP='/usr/bin/grep -F' +ac_cv_path_GREP=/usr/bin/grep +ac_cv_path_PERL=/usr/bin/perl +ac_cv_path_SED=/usr/bin/sed +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_lt_DD=/usr/bin/dd +ac_cv_path_mkdir=/usr/bin/mkdir +ac_cv_prog_AWK=gawk +ac_cv_prog_CPP='gcc -E' +ac_cv_prog_ac_ct_AR=ar +ac_cv_prog_ac_ct_CC=gcc +ac_cv_prog_ac_ct_MANIFEST_TOOL=mt +ac_cv_prog_ac_ct_OBJDUMP=objdump +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_ac_ct_STRIP=strip +ac_cv_prog_c_openmp=-fopenmp +ac_cv_prog_cc_c89= +ac_cv_prog_cc_g=yes +ac_cv_prog_make_make_set=yes +ac_cv_struct_in6_addr=yes +ac_cv_struct_sockaddr_in6=yes +ac_cv_struct_sockaddr_storage=yes +ac_cv_sys_file_offset_bits=no +ac_cv_sys_largefile_CC=no +ac_cv_type_in_port_t=yes +ac_cv_type_mode_t=yes +ac_cv_type_sa_family_t=yes +ac_cv_type_socklen_t=yes +ac_cv_type_ssize_t=yes +am_cv_CC_dependencies_compiler_type=gcc3 +am_cv_val_LC_MESSAGES=yes +lt_cv_ar_at_file=@ +lt_cv_archive_cmds_need_lc=no +lt_cv_deplibs_check_method=pass_all +lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_ld_reload_flag=-r +lt_cv_nm_interface='BSD nm' +lt_cv_objdir=.libs +lt_cv_path_LD=/usr/bin/ld +lt_cv_path_NM='/usr/bin/nm -B' +lt_cv_path_mainfest_tool=no +lt_cv_prog_compiler_c_o=yes +lt_cv_prog_compiler_pic='-fPIC -DPIC' +lt_cv_prog_compiler_pic_works=yes +lt_cv_prog_compiler_rtti_exceptions=no +lt_cv_prog_compiler_static_works=yes +lt_cv_prog_gnu_ld=yes +lt_cv_sharedlib_from_linklib_cmd='printf %s\n' +lt_cv_shlibpath_overrides_runpath=yes +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_global_symbol_to_import= +lt_cv_sys_max_cmd_len=1572864 +lt_cv_to_host_file_cmd=func_convert_file_noop +lt_cv_to_tool_file_cmd=func_convert_file_noop +lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10' +AMDEPBACKSLASH='\' +AMDEP_FALSE='#' +AMDEP_TRUE='' +AMTAR='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar' +AR='ar' +AUTOCONF='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf' +AUTOHEADER='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader' +AUTOMAKE='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10' +AWK='gawk' +CC='gcc' +CCDEPMODE='depmode=gcc3' +CFLAGS='-g -O2 -fopenmp' +CPP='gcc -E' +CPPFLAGS='' +CYGPATH_W='echo' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +DLLTOOL='false' +DSYMUTIL='' +DUMPBIN='' +EBCONF_EBINCS='-I$(includedir)' +EBCONF_EBLIBS='-L$(libdir) -lebu' +EBCONF_INTLINCS='' +EBCONF_INTLLIBS='' +EBCONF_ZLIBINCS='' +EBCONF_ZLIBLIBS='-lz' +EB_VERSION_MAJOR='4' +EB_VERSION_MINOR='5' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +EGREP='/usr/bin/grep -E' +ENABLE_EBNET='yes' +ENABLE_EBNET_FALSE='#' +ENABLE_EBNET_TRUE='' +ENABLE_LIBDEFLATE='no' +ENABLE_NLS='yes' +ENABLE_PTHREAD='no' +ENABLE_SAMPLES_FALSE='' +ENABLE_SAMPLES_TRUE='#' +ENABLE_WINSOCK2_FALSE='' +ENABLE_WINSOCK2_TRUE='#' +EXEEXT='' +EXEEXT_EXE_FALSE='' +EXEEXT_EXE_TRUE='#' +FGREP='/usr/bin/grep -F' +GREP='/usr/bin/grep' +HAVE_GETOPT_LONG_FALSE='' +HAVE_GETOPT_LONG_TRUE='#' +ICONVINCS='' +ICONVLIBS='' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +INTLINCS='' +INTLLIBS='' +LD='/usr/bin/ld -m elf_x86_64' +LDFLAGS='' +LIBEB_VERSION_INFO='17:0:0' +LIBOBJS='' +LIBS='-lnsl ' +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIPO='' +LN_S='ln -s' +LTLIBOBJS='' +LT_SYS_LIBRARY_PATH='' +MAILING_ADDRESS='kzhr@d1.dion.ne.jp' +MAKEINFO='${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo' +MANIFEST_TOOL=':' +MKDIR_P='/usr/bin/mkdir -p' +MSGFMT=':' +MSGMERGE='msgmerge' +NM='/usr/bin/nm -B' +NMEDIT='' +OBJDUMP='objdump' +OBJEXT='o' +OPENMP_CFLAGS='-fopenmp' +OTOOL64='' +OTOOL='' +PACKAGE='ebu' +PACKAGE_BUGREPORT='' +PACKAGE_NAME='ebu' +PACKAGE_STRING='ebu 4.5-20200413' +PACKAGE_TARNAME='ebu' +PACKAGE_URL='' +PACKAGE_VERSION='4.5-20200413' +PATH_SEPARATOR=':' +PERL='/usr/bin/perl' +PTHREAD_CFLAGS='' +PTHREAD_CPPFLAGS='' +PTHREAD_LDFLAGS='' +RANLIB='ranlib' +SED='/usr/bin/sed' +SET_MAKE='' +SHELL='/bin/bash' +STRIP='strip' +VERSION='4.5-20200413' +XGETTEXT=':' +ZLIBDEPS='' +ZLIBINCS='' +ZLIBLIBS='-lz' +ac_ct_AR='ar' +ac_ct_CC='gcc' +ac_ct_DUMPBIN='' +am__fastdepCC_FALSE='#' +am__fastdepCC_TRUE='' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__quote='' +am__tar='${AMTAR} chof - "$$tardir"' +am__untar='${AMTAR} xf -' +bindir='${exec_prefix}/bin' +build='x86_64-unknown-linux-gnu' +build_alias='' +build_cpu='x86_64' +build_os='linux-gnu' +build_vendor='unknown' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host='x86_64-unknown-linux-gnu' +host_alias='' +host_cpu='x86_64' +host_os='linux-gnu' +host_vendor='unknown' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='$(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localedir='$(datadir)/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +mkdir_p='/usr/bin/mkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +pkgdocdir='${datadir}/ebu/doc' +prefix='/usr/local' +program_transform_name='s,x,x,' +psdir='${docdir}' +runstatedir='${localstatedir}/run' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "ebu" +#define PACKAGE_TARNAME "ebu" +#define PACKAGE_VERSION "4.5-20200413" +#define PACKAGE_STRING "ebu 4.5-20200413" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_URL "" +#define PACKAGE "ebu" +#define VERSION "4.5-20200413" +#define MAILING_ADDRESS "kzhr@d1.dion.ne.jp" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define PRINTF_LL_MODIFIER 1 +#define HAVE_LOCALE_H 1 +#define HAVE_NL_TYPES_H 1 +#define HAVE_SETLOCALE 1 +#define HAVE_LC_MESSAGES 1 +#define HAVE_ICONV_OPEN 1 +#define HAVE_ICONV_H 1 +#define ENABLE_NLS 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_PTHREAD_H 1 +#define HAVE_LIBNSL 1 +#define HAVE_NL_LANGINFO 1 +#define HAVE_ATOLL 1 +#define HAVE_STRCASECMP 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETOPT_LONG 1 +#define ENABLE_EBNET 1 +#define HAVE_STRUCT_IN6_ADDR 1 +#define HAVE_STRUCT_SOCKADDR_IN6 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define IN6ADDR_ANY_DECLARED 1 +#define IN6ADDR_LOOPBACK_DECLARED 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETNAMEINFO 1 +#define HAVE_GAI_STRERROR 1 +#define ENABLE_IPV6 1 + +configure: exit 0 diff --git a/lib/ebu/config.status b/lib/ebu/config.status new file mode 100644 index 0000000..a4d5a9b --- /dev/null +++ b/lib/ebu/config.status @@ -0,0 +1,2037 @@ +#! /bin/bash +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/bash} +export SHELL +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by ebu $as_me 4.5-20200413, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" Makefile ebu/Makefile libebutils/Makefile ebappendix/Makefile ebfont/Makefile ebinfo/Makefile ebrefile/Makefile ebstopcode/Makefile ebzip/Makefile doc/Makefile po-eb/Makefile po-ebutils/Makefile m4/Makefile samples/Makefile" +config_headers=" config.h" +config_commands=" depfiles libtool" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +ac_cs_config="" +ac_cs_version="\ +ebu config.status 4.5-20200413 +configured by ./configure, generated by GNU Autoconf 2.69, + with options \"$ac_cs_config\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/mnt/d/files/projects/ebclient/lib/ebu' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/usr/bin/mkdir -p' +AWK='gawk' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 + CONFIG_SHELL='/bin/bash' + export CONFIG_SHELL + exec "$@" +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="." + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +double_quote_subst='s/\(["`\\]\)/\\\1/g' +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +macro_version='2.4.6' +macro_revision='2.4.6' +enable_shared='yes' +enable_static='yes' +pic_mode='default' +enable_fast_install='needless' +shared_archive_member_spec='' +SHELL='/bin/bash' +ECHO='printf %s\n' +PATH_SEPARATOR=':' +host_alias='' +host='x86_64-unknown-linux-gnu' +host_os='linux-gnu' +build_alias='' +build='x86_64-unknown-linux-gnu' +build_os='linux-gnu' +SED='/usr/bin/sed' +Xsed='/usr/bin/sed -e 1s/^X//' +GREP='/usr/bin/grep' +EGREP='/usr/bin/grep -E' +FGREP='/usr/bin/grep -F' +LD='/usr/bin/ld -m elf_x86_64' +NM='/usr/bin/nm -B' +LN_S='ln -s' +max_cmd_len='1572864' +ac_objext='o' +exeext='' +lt_unset='unset' +lt_SP2NL='tr \040 \012' +lt_NL2SP='tr \015\012 \040\040' +lt_cv_to_host_file_cmd='func_convert_file_noop' +lt_cv_to_tool_file_cmd='func_convert_file_noop' +reload_flag=' -r' +reload_cmds='$LD$reload_flag -o $output$reload_objs' +OBJDUMP='objdump' +deplibs_check_method='pass_all' +file_magic_cmd='$MAGIC_CMD' +file_magic_glob='' +want_nocaseglob='no' +DLLTOOL='false' +sharedlib_from_linklib_cmd='printf %s\n' +AR='ar' +AR_FLAGS='cru' +archiver_list_spec='@' +STRIP='strip' +RANLIB='ranlib' +old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' +old_postuninstall_cmds='' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' +lock_old_archive_extraction='no' +CC='gcc' +CFLAGS='-g -O2 -fopenmp' +compiler='gcc' +GCC='yes' +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_global_symbol_to_import='' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' +lt_cv_nm_interface='BSD nm' +nm_file_list_spec='@' +lt_sysroot='' +lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' +objdir='.libs' +MAGIC_CMD='file' +lt_prog_compiler_no_builtin_flag=' -fno-builtin' +lt_prog_compiler_pic=' -fPIC -DPIC' +lt_prog_compiler_wl='-Wl,' +lt_prog_compiler_static='-static' +lt_cv_prog_compiler_c_o='yes' +need_locks='no' +MANIFEST_TOOL=':' +DSYMUTIL='' +NMEDIT='' +LIPO='' +OTOOL='' +OTOOL64='' +libext='a' +shrext_cmds='.so' +extract_expsyms_cmds='' +archive_cmds_need_lc='no' +enable_shared_with_static_runtimes='no' +export_dynamic_flag_spec='$wl--export-dynamic' +whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' +compiler_needs_object='no' +old_archive_from_new_cmds='' +old_archive_from_expsyms_cmds='' +archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' +module_cmds='' +module_expsym_cmds='' +with_gnu_ld='yes' +allow_undefined_flag='' +no_undefined_flag='' +hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' +hardcode_libdir_separator='' +hardcode_direct='no' +hardcode_direct_absolute='no' +hardcode_minus_L='no' +hardcode_shlibpath_var='unsupported' +hardcode_automatic='no' +inherit_rpath='no' +link_all_deplibs='unknown' +always_export_symbols='no' +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' +include_expsyms='' +prelink_cmds='' +postlink_cmds='' +file_list_spec='' +variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' +need_lib_prefix='no' +need_version='no' +version_type='linux' +runpath_var='LD_RUN_PATH' +shlibpath_var='LD_LIBRARY_PATH' +shlibpath_overrides_runpath='yes' +libname_spec='lib$name' +library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' +soname_spec='$libname$release$shared_ext$major' +install_override_mode='' +postinstall_cmds='' +postuninstall_cmds='' +finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' +finish_eval='' +hardcode_into_libs='yes' +sys_lib_search_path_spec='/usr/lib/gcc/x86_64-linux-gnu/9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib ' +configure_time_dlsearch_path='/lib /usr/lib /usr/local/lib /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /lib32 /usr/lib32 /libx32 /usr/libx32 ' +configure_time_lt_sys_library_path='' +hardcode_action='immediate' +enable_dlopen='unknown' +enable_dlopen_self='unknown' +enable_dlopen_self_static='unknown' +old_striplib='strip --strip-debug' +striplib='strip --strip-unneeded' + +LTCC='gcc' +LTCFLAGS='-g -O2' +compiler='gcc' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag OBJDUMP deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob DLLTOOL sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_import lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix lt_cv_nm_interface nm_file_list_spec lt_cv_truncate_bin lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec configure_time_dlsearch_path configure_time_lt_sys_library_path; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +ac_aux_dir='.' + +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='ebu' + VERSION='4.5-20200413' + RM='rm -f' + ofile='libtool' + + + + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "ebu/Makefile") CONFIG_FILES="$CONFIG_FILES ebu/Makefile" ;; + "libebutils/Makefile") CONFIG_FILES="$CONFIG_FILES libebutils/Makefile" ;; + "ebappendix/Makefile") CONFIG_FILES="$CONFIG_FILES ebappendix/Makefile" ;; + "ebfont/Makefile") CONFIG_FILES="$CONFIG_FILES ebfont/Makefile" ;; + "ebinfo/Makefile") CONFIG_FILES="$CONFIG_FILES ebinfo/Makefile" ;; + "ebrefile/Makefile") CONFIG_FILES="$CONFIG_FILES ebrefile/Makefile" ;; + "ebstopcode/Makefile") CONFIG_FILES="$CONFIG_FILES ebstopcode/Makefile" ;; + "ebzip/Makefile") CONFIG_FILES="$CONFIG_FILES ebzip/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "po-eb/Makefile") CONFIG_FILES="$CONFIG_FILES po-eb/Makefile" ;; + "po-ebutils/Makefile") CONFIG_FILES="$CONFIG_FILES po-ebutils/Makefile" ;; + "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["LTLIBOBJS"]="" +S["EBCONF_EBLIBS"]="-L$(libdir) -lebu" +S["EBCONF_EBINCS"]="-I$(includedir)" +S["EBCONF_INTLLIBS"]="" +S["EBCONF_INTLINCS"]="" +S["PTHREAD_LDFLAGS"]="" +S["PTHREAD_CFLAGS"]="" +S["PTHREAD_CPPFLAGS"]="" +S["ENABLE_PTHREAD"]="no" +S["EBCONF_ZLIBLIBS"]="-lz" +S["EBCONF_ZLIBINCS"]="" +S["ENABLE_LIBDEFLATE"]="no" +S["HAVE_GETOPT_LONG_FALSE"]="" +S["HAVE_GETOPT_LONG_TRUE"]="#" +S["ENABLE_WINSOCK2_FALSE"]="" +S["ENABLE_WINSOCK2_TRUE"]="#" +S["EXEEXT_EXE_FALSE"]="" +S["EXEEXT_EXE_TRUE"]="#" +S["LIBOBJS"]="" +S["ENABLE_EBNET_FALSE"]="#" +S["ENABLE_EBNET_TRUE"]="" +S["ENABLE_EBNET"]="yes" +S["ZLIBDEPS"]="" +S["ZLIBLIBS"]="-lz" +S["ZLIBINCS"]="" +S["pkgdocdir"]="${datadir}/ebu/doc" +S["ENABLE_SAMPLES_FALSE"]="" +S["ENABLE_SAMPLES_TRUE"]="#" +S["MSGMERGE"]="msgmerge" +S["XGETTEXT"]=":" +S["MSGFMT"]=":" +S["INTLLIBS"]="" +S["INTLINCS"]="" +S["ENABLE_NLS"]="yes" +S["ICONVLIBS"]="" +S["ICONVINCS"]="" +S["PERL"]="/usr/bin/perl" +S["OPENMP_CFLAGS"]="-fopenmp" +S["CPP"]="gcc -E" +S["LT_SYS_LIBRARY_PATH"]="" +S["OTOOL64"]="" +S["OTOOL"]="" +S["LIPO"]="" +S["NMEDIT"]="" +S["DSYMUTIL"]="" +S["MANIFEST_TOOL"]=":" +S["RANLIB"]="ranlib" +S["ac_ct_AR"]="ar" +S["AR"]="ar" +S["DLLTOOL"]="false" +S["OBJDUMP"]="objdump" +S["LN_S"]="ln -s" +S["NM"]="/usr/bin/nm -B" +S["ac_ct_DUMPBIN"]="" +S["DUMPBIN"]="" +S["LD"]="/usr/bin/ld -m elf_x86_64" +S["FGREP"]="/usr/bin/grep -F" +S["EGREP"]="/usr/bin/grep -E" +S["GREP"]="/usr/bin/grep" +S["SED"]="/usr/bin/sed" +S["host_os"]="linux-gnu" +S["host_vendor"]="unknown" +S["host_cpu"]="x86_64" +S["host"]="x86_64-unknown-linux-gnu" +S["build_os"]="linux-gnu" +S["build_vendor"]="unknown" +S["build_cpu"]="x86_64" +S["build"]="x86_64-unknown-linux-gnu" +S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__quote"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="gcc" +S["CPPFLAGS"]="" +S["LDFLAGS"]="" +S["CFLAGS"]="-g -O2 -fopenmp" +S["CC"]="gcc" +S["MAILING_ADDRESS"]="kzhr@d1.dion.ne.jp" +S["EB_VERSION_MINOR"]="5" +S["EB_VERSION_MAJOR"]="4" +S["LIBEB_VERSION_INFO"]="17:0:0" +S["am__untar"]="${AMTAR} xf -" +S["am__tar"]="${AMTAR} chof - \"$$tardir\"" +S["AMTAR"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="gawk" +S["mkdir_p"]="/usr/bin/mkdir -p" +S["MKDIR_P"]="/usr/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="strip" +S["install_sh"]="$(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh" +S["MAKEINFO"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo" +S["AUTOHEADER"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader" +S["AUTOMAKE"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10" +S["AUTOCONF"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf" +S["ACLOCAL"]="${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10" +S["VERSION"]="4.5-20200413" +S["PACKAGE"]="ebu" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]="-lnsl " +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="$(datadir)/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["runstatedir"]="${localstatedir}/run" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="" +S["PACKAGE_BUGREPORT"]="" +S["PACKAGE_STRING"]="ebu 4.5-20200413" +S["PACKAGE_VERSION"]="4.5-20200413" +S["PACKAGE_TARNAME"]="ebu" +S["PACKAGE_NAME"]="ebu" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/bash" +_ACAWK +cat >>"$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"ebu\"" +D["PACKAGE_TARNAME"]=" \"ebu\"" +D["PACKAGE_VERSION"]=" \"4.5-20200413\"" +D["PACKAGE_STRING"]=" \"ebu 4.5-20200413\"" +D["PACKAGE_BUGREPORT"]=" \"\"" +D["PACKAGE_URL"]=" \"\"" +D["PACKAGE"]=" \"ebu\"" +D["VERSION"]=" \"4.5-20200413\"" +D["MAILING_ADDRESS"]=" \"kzhr@d1.dion.ne.jp\"" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["HAVE_DLFCN_H"]=" 1" +D["LT_OBJDIR"]=" \".libs/\"" +D["PRINTF_LL_MODIFIER"]=" 1" +D["HAVE_LOCALE_H"]=" 1" +D["HAVE_NL_TYPES_H"]=" 1" +D["HAVE_SETLOCALE"]=" 1" +D["HAVE_LC_MESSAGES"]=" 1" +D["HAVE_ICONV_OPEN"]=" 1" +D["HAVE_ICONV_H"]=" 1" +D["ENABLE_NLS"]=" 1" +D["HAVE_LANGINFO_H"]=" 1" +D["HAVE_PTHREAD_H"]=" 1" +D["HAVE_LIBNSL"]=" 1" +D["HAVE_NL_LANGINFO"]=" 1" +D["HAVE_ATOLL"]=" 1" +D["HAVE_STRCASECMP"]=" 1" +D["HAVE_SYS_SOCKET_H"]=" 1" +D["HAVE_GETOPT_H"]=" 1" +D["HAVE_GETOPT_LONG"]=" 1" +D["ENABLE_EBNET"]=" 1" +D["HAVE_STRUCT_IN6_ADDR"]=" 1" +D["HAVE_STRUCT_SOCKADDR_IN6"]=" 1" +D["HAVE_STRUCT_SOCKADDR_STORAGE"]=" 1" +D["IN6ADDR_ANY_DECLARED"]=" 1" +D["IN6ADDR_LOOPBACK_DECLARED"]=" 1" +D["HAVE_GETADDRINFO"]=" 1" +D["HAVE_GETNAMEINFO"]=" 1" +D["HAVE_GAI_STRERROR"]=" 1" +D["ENABLE_IPV6"]=" 1" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&$(datadir)/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# The names of the tagged configurations supported by this script. +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain=$ac_aux_dir/ltmain.sh + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 diff --git a/lib/ebu/config.sub b/lib/ebu/config.sub new file mode 100644 index 0000000..2a55a50 --- /dev/null +++ b/lib/ebu/config.sub @@ -0,0 +1,1705 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ebu/configure b/lib/ebu/configure new file mode 100644 index 0000000..18c8682 --- /dev/null +++ b/lib/ebu/configure @@ -0,0 +1,16474 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for ebu 4.5-20200413. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='ebu' +PACKAGE_TARNAME='ebu' +PACKAGE_VERSION='4.5-20200413' +PACKAGE_STRING='ebu 4.5-20200413' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="ebu/eb.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +EBCONF_EBLIBS +EBCONF_EBINCS +EBCONF_INTLLIBS +EBCONF_INTLINCS +PTHREAD_LDFLAGS +PTHREAD_CFLAGS +PTHREAD_CPPFLAGS +ENABLE_PTHREAD +EBCONF_ZLIBLIBS +EBCONF_ZLIBINCS +ENABLE_LIBDEFLATE +HAVE_GETOPT_LONG_FALSE +HAVE_GETOPT_LONG_TRUE +ENABLE_WINSOCK2_FALSE +ENABLE_WINSOCK2_TRUE +EXEEXT_EXE_FALSE +EXEEXT_EXE_TRUE +LIBOBJS +ENABLE_EBNET_FALSE +ENABLE_EBNET_TRUE +ENABLE_EBNET +ZLIBDEPS +ZLIBLIBS +ZLIBINCS +pkgdocdir +ENABLE_SAMPLES_FALSE +ENABLE_SAMPLES_TRUE +MSGMERGE +XGETTEXT +MSGFMT +INTLLIBS +INTLINCS +ENABLE_NLS +ICONVLIBS +ICONVINCS +PERL +OPENMP_CFLAGS +CPP +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAILING_ADDRESS +EB_VERSION_MINOR +EB_VERSION_MAJOR +LIBEB_VERSION_INFO +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_openmp +enable_largefile +enable_nls +with_gettext_includes +with_gettext_libraries +with_iconv_includes +with_iconv_libraries +enable_samples +enable_pthread +with_pthread_cppflags +with_pthread_cflags +with_pthread_ldflags +with_pkgdocdir +enable_libdeflate +with_libdeflate_includes +with_libdeflate_libraries +with_zlib_includes +with_zlib_libraries +enable_ebnet +enable_ipv6 +enable_winsock2 +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +LT_SYS_LIBRARY_PATH +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures ebu 4.5-20200413 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/ebu] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of ebu 4.5-20200413:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-openmp do not use OpenMP + --disable-largefile omit support for large files + --enable-nls Native Language Support [[yes]] + --enable-samples compile sample programs default=no + --enable-pthread build pthread safe libraries [[no]] + --enable-libdeflate build with libdeflate library [[no]] + --enable-ebnet EBNET support [[yes]] + --enable-ipv6 IPv6 support for EBNET [[yes]] (if the system + supports IPv6) + --enable-winsock2 Use Winsock2 for EBNET [[auto]] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). + --with-gettext-includes=DIR + gettext include files are in DIR + --with-gettext-libraries=DIR + gettext library files are in DIR + --with-iconv-includes=DIR + iconv include files are in DIR + --with-iconv-libraries=DIR + iconv library files are in DIR + --with-pthread-cppflags=FLAGS + additional CPPFLAGS for pthread support + --with-pthread-cflags=FLAGS + additional CFLAGS for pthread support + --with-pthread-ldflags=FLAGS + additional LDFLAGS for pthread support + --with-pkgdocdir=DIR HTML documents in DIR [[default=DATADIR/ebu/doc]] + --with-libdeflate-includes=DIR + libdeflate include files are in DIR + --with-libdeflate-libraries=DIR + libdeflate library files are in DIR + --with-zlib-includes=DIR + zlib include files are in DIR + --with-zlib-libraries=DIR + zlib library files are in DIR + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +ebu configure 4.5-20200413 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by ebu $as_me 4.5-20200413, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +am__api_version='1.10' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='ebu' + VERSION='4.5-20200413' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +LIBEB_VERSION_INFO=17:0:0 + + +EB_VERSION_MAJOR=4 +EB_VERSION_MINOR=5 + + + +MAILING_ADDRESS='kzhr@d1.dion.ne.jp' + + +cat >>confdefs.h <<_ACEOF +#define MAILING_ADDRESS "$MAILING_ADDRESS" +_ACEOF + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n "$lt_cv_sys_max_cmd_len"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + pic_mode=default +fi + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + export_dynamic_flag_spec='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + + + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen=shl_load +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen=dlopen +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report what library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + + + + OPENMP_CFLAGS= + # Check whether --enable-openmp was given. +if test "${enable_openmp+set}" = set; then : + enableval=$enable_openmp; +fi + + if test "$enable_openmp" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 +$as_echo_n "checking for $CC option to support OpenMP... " >&6; } +if ${ac_cv_prog_c_openmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp='none needed' +else + ac_cv_prog_c_openmp='unsupported' + for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do + ac_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $ac_option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp=$ac_option +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ac_save_CFLAGS + if test "$ac_cv_prog_c_openmp" != unsupported; then + break + fi + done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 +$as_echo "$ac_cv_prog_c_openmp" >&6; } + case $ac_cv_prog_c_openmp in #( + "none needed" | unsupported) + ;; #( + *) + OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; + esac + fi + + +CFLAGS="$CFLAGS $OPENMP_CFLAGS" + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$PERL" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found" >&5 +$as_echo "$as_me: WARNING: perl not found" >&2;} + PERL=/usr/bin/perl +fi + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ll modifier of printf" >&5 +$as_echo_n "checking for ll modifier of printf... " >&6; } +if ${ac_cv_func_printf_ll+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + int main() { + char buffer[128]; + sprintf(buffer, "%llx", (unsigned long long) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_printf_ll=yes +else + ac_cv_func_printf_ll=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_printf_ll" >&5 +$as_echo "$ac_cv_func_printf_ll" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for I64 modifier of printf" >&5 +$as_echo_n "checking for I64 modifier of printf... " >&6; } +if ${ac_cv_func_printf_i64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + int main() { + char buffer[128]; + sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_printf_i64=yes +else + ac_cv_func_printf_i64=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_printf_i64" >&5 +$as_echo "$ac_cv_func_printf_i64" >&6; } +if test "$ac_cv_func_printf_ll" = yes; then + +$as_echo "#define PRINTF_LL_MODIFIER 1" >>confdefs.h + +fi +if test "$ac_cv_func_printf_i64" = yes; then + +$as_echo "#define PRINTF_I64_MODIFIER 1" >>confdefs.h + +fi + + INTLINCS= + INTLDEPS= + INTLLIBS= + + + + + for ac_header in locale.h nl_types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for ac_func in setlocale +do : + ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETLOCALE 1 +_ACEOF + +fi +done + + + if test $ac_cv_header_locale_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if ${am_cv_val_LC_MESSAGES+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int +main() +{ + return LC_MESSAGES; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_val_LC_MESSAGES=yes +else + am_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 +$as_echo "$am_cv_val_LC_MESSAGES" >&6; } + if test $am_cv_val_LC_MESSAGES = yes; then + +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + fi + + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; ENABLE_NLS=$enableval +else + ENABLE_NLS=auto +fi + + + +# Check whether --with-gettext-includes was given. +if test "${with_gettext_includes+set}" = set; then : + withval=$with_gettext_includes; gettext_includes="-I${withval}" +else + gettext_includes='' +fi + + + +# Check whether --with-gettext-libraries was given. +if test "${with_gettext_libraries+set}" = set; then : + withval=$with_gettext_libraries; gettext_libraries="-L${withval}" +else + gettext_libraries='' +fi + + + +# Check whether --with-iconv-includes was given. +if test "${with_iconv_includes+set}" = set; then : + withval=$with_iconv_includes; iconv_includes="-I${withval}" +else + iconv_includes='' +fi + + + +# Check whether --with-iconv-libraries was given. +if test "${with_iconv_libraries+set}" = set; then : + withval=$with_iconv_libraries; iconv_libraries="-L${withval}" +else + iconv_libraries='' +fi + + + ICONVINCS= + ICONVLIBS= + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$save_CPPFLAGS $iconv_includes" + LIBS="$save_LIBS $iconv_libraries" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5 +$as_echo_n "checking for iconv_open in -liconv... " >&6; } +if ${ac_cv_lib_iconv_iconv_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char iconv_open (); +int +main () +{ +return iconv_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_iconv_iconv_open=yes +else + ac_cv_lib_iconv_iconv_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5 +$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; } +if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then : + ICONVLIBS="$iconv_libraries -liconv"; LIBS="$LIBS -liconv" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5 +$as_echo_n "checking for libiconv_open in -liconv... " >&6; } +if ${ac_cv_lib_iconv_libiconv_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char libiconv_open (); +int +main () +{ +return libiconv_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_iconv_libiconv_open=yes +else + ac_cv_lib_iconv_libiconv_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5 +$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; } +if test "x$ac_cv_lib_iconv_libiconv_open" = xyes; then : + ICONVLIBS="$iconv_libraries -liconv"; LIBS="$LIBS -liconv" +fi + +fi + + for ac_func in iconv_open libiconv_open locale_charset +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + for ac_header in iconv.h libcharset.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test $ac_cv_func_iconv_open != no; then + ICONVINCS="$iconv_includes" + fi + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + + + + INTLINCS= + INTLLIBS= + try_nls=no + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLS support" >&5 +$as_echo_n "checking for NLS support... " >&6; } + + if test $ENABLE_NLS != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + + CPPFLAGS="$save_CPPFLAGS $gettext_includes" + LIBS="$save_LIBS $gettext_libraries -lintl $iconv_libraries -liconv" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_nls=yes +else + try_nls=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "$try_nls" = yes; then + INTLINCS="$gettext_includes" + INTLLIBS="$gettext_libraries -lintl $iconv_libraries -liconv" + fi + + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS $gettext_includes" + LIBS="$save_LIBS $gettext_libraries -lintl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_nls=yes +else + try_nls=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "$try_nls" = yes; then + INTLINCS="$gettext_includes" + INTLLIBS="$gettext_libraries -lintl" + fi + fi + + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS $iconv_libraries -liconv" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_nls=yes +else + try_nls=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "$try_nls" = yes; then + INTLINCS= + INTLLIBS="$iconv_libraries -liconv" + fi + fi + + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_nls=yes +else + try_nls=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "$try_nls" = yes; then + INTLINCS= + INTLLIBS= + fi + fi + + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + fi + + if test $ENABLE_NLS = auto; then + ENABLE_NLS=$try_nls + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_nls" >&5 +$as_echo "$try_nls" >&6; } + + if test $ENABLE_NLS = yes; then + if test $try_nls = no; then + as_fn_error $? "gettext not available" "$LINENO" 5 + fi + fi + + + + + localedir='$(datadir)/locale' + + if test $ENABLE_NLS = yes; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + fi + + for ac_prog in gmsgfmt msgfmt +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MSGFMT" && break +done +test -n "$MSGFMT" || MSGFMT=":" + + for ac_prog in gxgettext xgettext +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XGETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XGETTEXT=$ac_cv_path_XGETTEXT +if test -n "$XGETTEXT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$XGETTEXT" && break +done +test -n "$XGETTEXT" || XGETTEXT=":" + + MSGMERGE=msgmerge + + + +# Check whether --enable-samples was given. +if test "${enable_samples+set}" = set; then : + enableval=$enable_samples; case "${enableval}" in + yes) samples=true ;; + no) samples=false ;; + *) as_fn_error $? "invalid argument to --enable-samples" "$LINENO" 5 ;; +esac +else + samples=false +fi + + if test ${samples} = true; then + ENABLE_SAMPLES_TRUE= + ENABLE_SAMPLES_FALSE='#' +else + ENABLE_SAMPLES_TRUE='#' + ENABLE_SAMPLES_FALSE= +fi + + +# Check whether --enable-pthread was given. +if test "${enable_pthread+set}" = set; then : + enableval=$enable_pthread; case "${enableval}" in + yes) ENABLE_PTHREAD=yes ;; + no) ENABLE_PTHREAD=no ;; + *) as_fn_error $? "invalid argument to --enable-pthread" "$LINENO" 5 ;; +esac +else + ENABLE_PTHREAD=no +fi + + + +# Check whether --with-pthread-cppflags was given. +if test "${with_pthread_cppflags+set}" = set; then : + withval=$with_pthread_cppflags; PTHREAD_CPPFLAGS="${withval}" +else + PTHREAD_CPPFLAGS='' +fi + + + +# Check whether --with-pthread-cflags was given. +if test "${with_pthread_cflags+set}" = set; then : + withval=$with_pthread_cflags; PTHREAD_CFLAGS="${withval}" +else + PTHREAD_CFLAGS='' +fi + + + +# Check whether --with-pthread-ldflags was given. +if test "${with_pthread_ldflags+set}" = set; then : + withval=$with_pthread_ldflags; PTHREAD_LDFLAGS="${withval}" +else + PTHREAD_LDFLAGS='' +fi + + + +# Check whether --with-pkgdocdir was given. +if test "${with_pkgdocdir+set}" = set; then : + withval=$with_pkgdocdir; pkgdocdir="${withval}" +else + pkgdocdir='${datadir}/ebu/doc' +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread" >&5 +$as_echo_n "checking for pthread... " >&6; } +if test $ENABLE_PTHREAD = no; then + try_pthread=no +else + save_CPPFLAGS=$CPPFLAGS + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +static pthread_mutex_t m=PTHREAD_MUTEX_INITIALIZER; + +int +main() +{ + pthread_mutex_lock(&m); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_pthread=yes +else + try_pthread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_pthread" >&5 +$as_echo "$try_pthread" >&6; } +if test $ENABLE_PTHREAD = yes; then + if test $try_pthread = no; then + as_fn_error $? "pthread not available" "$LINENO" 5 + fi +fi + +if test $ENABLE_PTHREAD = yes; then + +$as_echo "#define ENABLE_PTHREAD 1" >>confdefs.h + + CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS" +fi + +# Check whether --enable-libdeflate was given. +if test "${enable_libdeflate+set}" = set; then : + enableval=$enable_libdeflate; case "${enableval}" in + yes) ENABLE_LIBDEFLATE=yes ;; + no) ENABLE_LIBDEFLATE=no ;; + *) as_fn_error $? "invalid argument to --enable-libdeflate" "$LINENO" 5 ;; +esac +else + ENABLE_LIBDEFLATE=no +fi + + + +# Check whether --with-libdeflate-includes was given. +if test "${with_libdeflate_includes+set}" = set; then : + withval=$with_libdeflate_includes; libdeflate_includedir="${withval}" +else + libdeflate_includedir='' +fi + + +if test "X$libdeflate_includedir" != X; then + LIBDEFLATEINCS="-I$libdeflate_includedir" +else + LIBDEFLATEINCS='' +fi + + +# Check whether --with-libdeflate-libraries was given. +if test "${with_libdeflate_libraries+set}" = set; then : + withval=$with_libdeflate_libraries; libdeflate_libdir="${withval}" +else + libdeflate_libdir='' +fi + + +if test "X$libdeflate_libdir" != X; then + LIBDEFLATELIBS="-L$libdeflate_libdir -ldeflate" + LIBDEFLATEDEPS='' +else + LIBDEFLATELIBS='-ldeflate' + LIBDEFLATEDEPS='' +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdeflate" >&5 +$as_echo_n "checking for libdeflate... " >&6; } +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $LIBDEFLATEINCS" +LIBS="$LIBS $LIBDEFLATELIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main() +{ + struct libdeflate_compressor *c; c = libdeflate_alloc_compressor(12); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_libdeflate=yes +else + try_libdeflate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_libdeflate" >&5 +$as_echo "$try_libdeflate" >&6; } +if test $try_libdeflate = no; then + if test $ENABLE_LIBDEFLATE = yes; then + as_fn_error $? "libdeflate not found" "$LINENO" 5 + fi +fi +if test $ENABLE_LIBDEFLATE = yes; then + +$as_echo "#define ENABLE_LIBDEFLATE 1" >>confdefs.h + +fi + + +# Check whether --with-zlib-includes was given. +if test "${with_zlib_includes+set}" = set; then : + withval=$with_zlib_includes; z_includedir="${withval}" +else + z_includedir='' +fi + + +if test "X$z_includedir" != X; then + ZLIBINCS="-I$z_includedir" +else + ZLIBINCS='' +fi + + +# Check whether --with-zlib-libraries was given. +if test "${with_zlib_libraries+set}" = set; then : + withval=$with_zlib_libraries; z_libdir="${withval}" +else + z_libdir='' +fi + + +if test "X$z_libdir" != X; then + ZLIBLIBS="-L$z_libdir -lz" + ZLIBDEPS='' +else + ZLIBLIBS='-lz' + ZLIBDEPS='' +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 +$as_echo_n "checking for zlib... " >&6; } +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $ZLIBINCS" +LIBS="$LIBS $ZLIBLIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main() +{ + z_stream stream; inflate(&stream, Z_FINISH); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_zlib=yes +else + try_zlib=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_zlib" >&5 +$as_echo "$try_zlib" >&6; } +if test $try_zlib = no; then + if test $try_libdeflate = no; then + as_fn_error $? "zlib not found" "$LINENO" 5 + fi +fi +if test $ENABLE_LIBDEFLATE = yes; then + ZLIBINCS=$LIBDEFLATEINCS + ZLIBLIBS=$LIBDEFLATELIBS + ZLIBDEPS=$LIBDEFLATEDEPS +fi + + + + +# Check whether --enable-ebnet was given. +if test "${enable_ebnet+set}" = set; then : + enableval=$enable_ebnet; ENABLE_EBNET="${enableval}" +else + ENABLE_EBNET='yes' +fi + + + if test X$ENABLE_EBNET = Xyes; then + ENABLE_EBNET_TRUE= + ENABLE_EBNET_FALSE='#' +else + ENABLE_EBNET_TRUE='#' + ENABLE_EBNET_FALSE= +fi + + +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; ENABLE_IPV6="${enableval}" +else + ENABLE_IPV6='auto' +fi + + +# Check whether --enable-winsock2 was given. +if test "${enable_winsock2+set}" = set; then : + enableval=$enable_winsock2; ENABLE_WINSOCK2="${enableval}" +else + ENABLE_WINSOCK2='auto' +fi + + + +for ac_header in direct.h langinfo.h mbstring.h pthread.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5 +$as_echo_n "checking for res_query in -lresolv... " >&6; } +if ${ac_cv_lib_resolv_res_query+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char res_query (); +int +main () +{ +return res_query (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv_res_query=yes +else + ac_cv_lib_resolv_res_query=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5 +$as_echo "$ac_cv_lib_resolv_res_query" >&6; } +if test "x$ac_cv_lib_resolv_res_query" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF + + LIBS="-lresolv $LIBS" + +fi + +if test "$ac_cv_lib_resolv_res_query" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lbind" >&5 +$as_echo_n "checking for res_query in -lbind... " >&6; } +if ${ac_cv_lib_bind_res_query+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbind $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char res_query (); +int +main () +{ +return res_query (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bind_res_query=yes +else + ac_cv_lib_bind_res_query=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_query" >&5 +$as_echo "$ac_cv_lib_bind_res_query" >&6; } +if test "x$ac_cv_lib_bind_res_query" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBIND 1 +_ACEOF + + LIBS="-lbind $LIBS" + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in -lnsl" >&5 +$as_echo_n "checking for gethostname in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_gethostname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostname (); +int +main () +{ +return gethostname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostname=yes +else + ac_cv_lib_nsl_gethostname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostname" >&6; } +if test "x$ac_cv_lib_nsl_gethostname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_socket=yes +else + ac_cv_lib_socket_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + +for ac_func in nl_langinfo _getdcwd atoll _atoi64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi + + + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + + + + + if test X$ac_exeext = Xyes; then + EXEEXT_EXE_TRUE= + EXEEXT_EXE_FALSE='#' +else + EXEEXT_EXE_TRUE='#' + EXEEXT_EXE_FALSE= +fi + +if test X$ac_exeext = X.exe; then + +$as_echo "#define EXEEXT_EXE 1" >>confdefs.h + +fi + +if test "$ENABLE_EBNET" = yes; then + for ac_header in ws2tcpip.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "$ENABLE_WINSOCK2" = auto; then + if test "$ac_cv_header_ws2tcpip_h" = yes; then + if test "$ac_cv_header_sys_socket_h" = no; then + ENABLE_WINSOCK2=yes + else + ENABLE_WINSOCK2=no + fi + else + ENABLE_WINSOCK2=no + fi + fi + + if test "$ENABLE_WINSOCK2" = yes; then + if test "$ac_cv_header_ws2tcpip_h" = no; then + as_fn_error $? "Winsock2 not available" "$LINENO" 5 + fi + +$as_echo "#define ENABLE_WINSOCK2 1" >>confdefs.h + + fi +else + ENABLE_WINSOCK2=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Winsock2 support" >&5 +$as_echo_n "checking for Winsock2 support... " >&6; } + if test X$ENABLE_WINSOCK2 = Xyes; then + ENABLE_WINSOCK2_TRUE= + ENABLE_WINSOCK2_FALSE='#' +else + ENABLE_WINSOCK2_TRUE='#' + ENABLE_WINSOCK2_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_WINSOCK2" >&5 +$as_echo "$ENABLE_WINSOCK2" >&6; } + +for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + +fi + +done + +for ac_func in getopt_long +do : + ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + +fi +done + + if test X$HAVE_GETOPT_LONG = Xyes; then + HAVE_GETOPT_LONG_TRUE= + HAVE_GETOPT_LONG_FALSE='#' +else + HAVE_GETOPT_LONG_TRUE='#' + HAVE_GETOPT_LONG_FALSE= +fi + + +if test "$ENABLE_EBNET" = yes; then + +$as_echo "#define ENABLE_EBNET 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5 +$as_echo_n "checking for in_port_t... " >&6; } +if ${ac_cv_type_in_port_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +in_port_t in_port; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_in_port_t=yes +else + ac_cv_type_in_port_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_in_port_t" >&5 +$as_echo "$ac_cv_type_in_port_t" >&6; } +if test "$ac_cv_type_in_port_t" != yes; then + ac_cv_sin_port_size=unknown + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(long)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sin_port_size=long +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(int)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sin_port_size=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(short)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sin_port_size=short +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(char)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sin_port_size=char +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$ac_cv_sin_port_size" = unknown; then + as_fn_error $? "Failed to get size of sin_port in struct sockaddr_in." "$LINENO" 5 + fi + +cat >>confdefs.h <<_ACEOF +#define in_port_t unsigned $ac_cv_sin_port_size +_ACEOF + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5 +$as_echo_n "checking for sa_family_t... " >&6; } +if ${ac_cv_type_sa_family_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#endif +sa_family_t sa_family; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_sa_family_t=yes +else + ac_cv_type_sa_family_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_sa_family_t" >&5 +$as_echo "$ac_cv_type_sa_family_t" >&6; } +if test "$ac_cv_type_sa_family_t" != yes; then + ac_cv_sa_family_size=unknown + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(long)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sa_family_size=long +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(int)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sa_family_size=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(short)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sa_family_size=short +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(char)) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sa_family_size=char +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$ac_cv_sa_family_size" = unknown; then + as_fn_error $? "Failed to get size of sa_family in struct sockaddr." "$LINENO" 5 + fi + +cat >>confdefs.h <<_ACEOF +#define sa_family_t unsigned $ac_cv_sa_family_size +_ACEOF + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } +if ${ac_cv_type_socklen_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#endif +socklen_t socklen; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_socklen_t=yes +else + ac_cv_type_socklen_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } +if test "$ac_cv_type_socklen_t" != yes; then + +$as_echo "#define socklen_t int" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5 +$as_echo_n "checking for struct in6_addr... " >&6; } +if ${ac_cv_struct_in6_addr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct in6_addr address; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_in6_addr=yes +else + ac_cv_struct_in6_addr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_in6_addr" >&5 +$as_echo "$ac_cv_struct_in6_addr" >&6; } +if test "$ac_cv_struct_in6_addr" = yes; then + +$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5 +$as_echo_n "checking for struct sockaddr_in6... " >&6; } +if ${ac_cv_struct_sockaddr_in6+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct sockaddr_in6 address; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_sockaddr_in6=yes +else + ac_cv_struct_sockaddr_in6=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_in6" >&5 +$as_echo "$ac_cv_struct_sockaddr_in6" >&6; } +if test "$ac_cv_struct_sockaddr_in6" = yes; then + +$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5 +$as_echo_n "checking for struct sockaddr_storage... " >&6; } +if ${ac_cv_struct_sockaddr_storage+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct sockaddr_storage address; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_sockaddr_storage=yes +else + ac_cv_struct_sockaddr_storage=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 +$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } +if test "$ac_cv_struct_sockaddr_storage" = yes; then + +$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h + +fi + +if test $ac_cv_struct_in6_addr = no; then + ac_cv_decl_in6addr_any=no +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any declaration in netinet/in.h or ws2tcpip.h" >&5 +$as_echo_n "checking for in6addr_any declaration in netinet/in.h or ws2tcpip.h... " >&6; } +if ${ac_cv_decl_in6addr_any+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif + +void +testfunc() +{ + unsigned char *address; + address = (char *)&in6addr_any; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_decl_in6addr_any=yes +else + ac_cv_decl_in6addr_any=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_in6addr_any" >&5 +$as_echo "$ac_cv_decl_in6addr_any" >&6; } + if test "$ac_cv_decl_in6addr_any" = yes; then + +$as_echo "#define IN6ADDR_ANY_DECLARED 1" >>confdefs.h + + fi +fi + +if test $ac_cv_struct_in6_addr = no; then + ac_cv_decl_in6addr_loopback=no +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback declaration in netinet/in.h or ws2tcpip.h" >&5 +$as_echo_n "checking for in6addr_loopback declaration in netinet/in.h or ws2tcpip.h... " >&6; } +if ${ac_cv_decl_in6addr_loopback+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif + +int +testfunc() +{ + unsigned char *address; + address = (char *)&in6addr_loopback; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_decl_in6addr_loopback=yes +else + ac_cv_decl_in6addr_loopback=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_in6addr_loopback" >&5 +$as_echo "$ac_cv_decl_in6addr_loopback" >&6; } + if test "$ac_cv_decl_in6addr_loopback" = yes; then + +$as_echo "#define IN6ADDR_LOOPBACK_DECLARED 1" >>confdefs.h + + fi +fi + + if test "$ENABLE_WINSOCK2" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lws2_32" >&5 +$as_echo_n "checking for getaddrinfo in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_getaddrinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getaddrinfo (); +int +main () +{ +return getaddrinfo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_getaddrinfo=yes +else + ac_cv_lib_ws2_32_getaddrinfo=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_getaddrinfo" >&5 +$as_echo "$ac_cv_lib_ws2_32_getaddrinfo" >&6; } +if test "x$ac_cv_lib_ws2_32_getaddrinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" + +fi + + for ac_func in getaddrinfo getnameinfo +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + else + for ac_func in getaddrinfo getnameinfo gai_strerror +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + if test "$ENABLE_IPV6" = auto; then + if test "$ac_cv_struct_in6_addr$ac_cv_func_getaddrinfo" = yesyes; then + ENABLE_IPV6=yes + else + ENABLE_IPV6=no + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5 +$as_echo_n "checking for IPv6 support... " >&6; } + if test "$ENABLE_IPV6" = yes; then + if test "$ac_cv_struct_in6_addr" = no; then + as_fn_error $? "IPv6 not available" "$LINENO" 5 + fi + if test "${ac_cv_func_getaddrinfo}" = no; then + as_fn_error $? "IPv6 not available" "$LINENO" 5 + fi + +$as_echo "#define ENABLE_IPV6 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_IPV6" >&5 +$as_echo "$ENABLE_IPV6" >&6; } +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOS style pathnames" >&5 +$as_echo_n "checking for DOS style pathnames... " >&6; } + +dos_file_path="no" +case ${host_os} in + *djgpp | *mingw* | *emx*) dos_file_path="yes" ;; +esac + +if test "$dos_file_path" = yes; then + +$as_echo "#define DOS_FILE_PATH 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dos_file_path" >&5 +$as_echo "$dos_file_path" >&6; } + + +EBCONF_ZLIBINCS=$ZLIBINCS +EBCONF_ZLIBLIBS=$ZLIBLIBS + + + + + + + + +EBCONF_INTLINCS=$INTLINCS +EBCONF_INTLLIBS=$INTLLIBS + + + +EBCONF_EBINCS='-I$(includedir)' +if test "$ENABLE_WINSOCK2" = yes; then + EBCONF_EBLIBS='-L$(libdir) -lebu -lws2_32' +else + EBCONF_EBLIBS='-L$(libdir) -lebu' +fi + + + +ac_config_headers="$ac_config_headers config.h" + +ac_config_files="$ac_config_files Makefile ebu/Makefile libebutils/Makefile ebappendix/Makefile ebfont/Makefile ebinfo/Makefile ebrefile/Makefile ebstopcode/Makefile ebzip/Makefile doc/Makefile po-eb/Makefile po-ebutils/Makefile m4/Makefile samples/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_SAMPLES_TRUE}" && test -z "${ENABLE_SAMPLES_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_SAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_EBNET_TRUE}" && test -z "${ENABLE_EBNET_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EBNET\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EXEEXT_EXE_TRUE}" && test -z "${EXEEXT_EXE_FALSE}"; then + as_fn_error $? "conditional \"EXEEXT_EXE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_WINSOCK2_TRUE}" && test -z "${ENABLE_WINSOCK2_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_WINSOCK2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_GETOPT_LONG_TRUE}" && test -z "${HAVE_GETOPT_LONG_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GETOPT_LONG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by ebu $as_me 4.5-20200413, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +ebu config.status 4.5-20200413 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' + +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "ebu/Makefile") CONFIG_FILES="$CONFIG_FILES ebu/Makefile" ;; + "libebutils/Makefile") CONFIG_FILES="$CONFIG_FILES libebutils/Makefile" ;; + "ebappendix/Makefile") CONFIG_FILES="$CONFIG_FILES ebappendix/Makefile" ;; + "ebfont/Makefile") CONFIG_FILES="$CONFIG_FILES ebfont/Makefile" ;; + "ebinfo/Makefile") CONFIG_FILES="$CONFIG_FILES ebinfo/Makefile" ;; + "ebrefile/Makefile") CONFIG_FILES="$CONFIG_FILES ebrefile/Makefile" ;; + "ebstopcode/Makefile") CONFIG_FILES="$CONFIG_FILES ebstopcode/Makefile" ;; + "ebzip/Makefile") CONFIG_FILES="$CONFIG_FILES ebzip/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "po-eb/Makefile") CONFIG_FILES="$CONFIG_FILES po-eb/Makefile" ;; + "po-ebutils/Makefile") CONFIG_FILES="$CONFIG_FILES po-ebutils/Makefile" ;; + "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# The names of the tagged configurations supported by this script. +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain=$ac_aux_dir/ltmain.sh + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/lib/ebu/configure.ac b/lib/ebu/configure.ac new file mode 100644 index 0000000..e3b2f77 --- /dev/null +++ b/lib/ebu/configure.ac @@ -0,0 +1,488 @@ +dnl * +dnl * Process this file with autoconf to produce a configure script. +dnl * +AC_INIT(ebu, 4.5-20200413) +AC_CONFIG_SRCDIR(ebu/eb.c) +AC_PREREQ(2.54) +AM_INIT_AUTOMAKE + +dnl * +dnl * Library version info. +dnl * +LIBEB_VERSION_INFO=17:0:0 +AC_SUBST(LIBEB_VERSION_INFO) + +EB_VERSION_MAJOR=4 +EB_VERSION_MINOR=5 +AC_SUBST(EB_VERSION_MAJOR) +AC_SUBST(EB_VERSION_MINOR) + +dnl * +dnl * Set mailing address. +dnl * +MAILING_ADDRESS='kzhr@d1.dion.ne.jp' +AC_SUBST(MAILING_ADDRESS) +AC_DEFINE_UNQUOTED(MAILING_ADDRESS, "$MAILING_ADDRESS", [Mailing address]) + +dnl * +dnl * Programs +dnl * +AC_PROG_CC +AC_PROG_LIBTOOL +AC_PROG_LN_S +AC_PROG_INSTALL + +AC_OPENMP +CFLAGS="$CFLAGS $OPENMP_CFLAGS" + +AC_PATH_PROG(PERL, perl, no) +if test "$PERL" = no; then + AC_MSG_WARN(perl not found) + PERL=/usr/bin/perl +fi + +dnl * +dnl * large file support. +dnl * +eb_SYS_LARGEFILE + +dnl * +dnl * GNU gettext +dnl * +eb_GNU_GETTEXT(external) + +dnl * +dnl * --enable-samples option. +dnl * +AC_ARG_ENABLE(samples, +[ --enable-samples compile sample programs [default=no]], +[case "${enableval}" in + yes) samples=true ;; + no) samples=false ;; + *) AC_MSG_ERROR(invalid argument to --enable-samples) ;; +esac], samples=false) +AM_CONDITIONAL(ENABLE_SAMPLES, test ${samples} = true) + +dnl * +dnl * --enable-pthread option. +dnl * +AC_ARG_ENABLE(pthread, +AC_HELP_STRING([--enable-pthread], [build pthread safe libraries [[no]]]), +[case "${enableval}" in + yes) ENABLE_PTHREAD=yes ;; + no) ENABLE_PTHREAD=no ;; + *) AC_MSG_ERROR(invalid argument to --enable-pthread) ;; +esac], ENABLE_PTHREAD=no) + +dnl * +dnl * --with-pthread-cppflags option. +dnl * +AC_ARG_WITH(pthread-cppflags, +AC_HELP_STRING([--with-pthread-cppflags=FLAGS], + [additional CPPFLAGS for pthread support]), +[PTHREAD_CPPFLAGS="${withval}"], [PTHREAD_CPPFLAGS='']) + +dnl * +dnl * --with-pthread-cflags option. +dnl * +AC_ARG_WITH(pthread-cflags, +AC_HELP_STRING([--with-pthread-cflags=FLAGS], + [additional CFLAGS for pthread support]), +[PTHREAD_CFLAGS="${withval}"], [PTHREAD_CFLAGS='']) + +dnl * +dnl * --with-pthread-ldflags option. +dnl * +AC_ARG_WITH(pthread-ldflags, +AC_HELP_STRING([--with-pthread-ldflags=FLAGS], + [additional LDFLAGS for pthread support]), +[PTHREAD_LDFLAGS="${withval}"], [PTHREAD_LDFLAGS='']) + +dnl * +dnl * --with-pkgdocdir option. +dnl * +AC_ARG_WITH(pkgdocdir, +AC_HELP_STRING([--with-pkgdocdir=DIR], + [HTML documents in DIR [[default=DATADIR/ebu/doc]]]), +[pkgdocdir="${withval}"],[pkgdocdir='${datadir}/ebu/doc']) +AC_SUBST(pkgdocdir) + +dnl * +dnl * Check for pthread. +dnl * +AC_MSG_CHECKING(for pthread) +if test $ENABLE_PTHREAD = no; then + try_pthread=no +else + save_CPPFLAGS=$CPPFLAGS + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +static pthread_mutex_t m=PTHREAD_MUTEX_INITIALIZER; + +int +main() +{ + pthread_mutex_lock(&m); + return 0; +} +])], + try_pthread=yes, try_pthread=no) + CPPFLAGS=$save_CPPFLAGS + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS +fi +AC_MSG_RESULT($try_pthread) +if test $ENABLE_PTHREAD = yes; then + if test $try_pthread = no; then + AC_MSG_ERROR(pthread not available) + fi +fi + +if test $ENABLE_PTHREAD = yes; then + AC_DEFINE(ENABLE_PTHREAD, 1, [Define if pthread support is enabled.]) + CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS" +fi + +dnl * +dnl * --enable-libdeflate option. +dnl * +AC_ARG_ENABLE(libdeflate, +AC_HELP_STRING([--enable-libdeflate], [build with libdeflate library [[no]]]), +[case "${enableval}" in + yes) ENABLE_LIBDEFLATE=yes ;; + no) ENABLE_LIBDEFLATE=no ;; + *) AC_MSG_ERROR(invalid argument to --enable-libdeflate) ;; +esac], ENABLE_LIBDEFLATE=no) + +dnl * +dnl * --with-libdeflate-includes option. +dnl * +AC_ARG_WITH(libdeflate-includes, +AC_HELP_STRING([--with-libdeflate-includes=DIR], [libdeflate include files are in DIR]), +[libdeflate_includedir="${withval}"], [libdeflate_includedir='']) + +if test "X$libdeflate_includedir" != X; then + LIBDEFLATEINCS="-I$libdeflate_includedir" +else + LIBDEFLATEINCS='' +fi + +dnl * +dnl * --with-libdeflate-libraries option. +dnl * +AC_ARG_WITH(libdeflate-libraries, +AC_HELP_STRING([--with-libdeflate-libraries=DIR], [libdeflate library files are in DIR]), +[libdeflate_libdir="${withval}"], [libdeflate_libdir='']) + +if test "X$libdeflate_libdir" != X; then + LIBDEFLATELIBS="-L$libdeflate_libdir -ldeflate" + LIBDEFLATEDEPS='' +else + LIBDEFLATELIBS='-ldeflate' + LIBDEFLATEDEPS='' +fi + +dnl * +dnl * Check for libdeflate. +dnl * +AC_MSG_CHECKING(for libdeflate) +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $LIBDEFLATEINCS" +LIBS="$LIBS $LIBDEFLATELIBS" +AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include + +int +main() +{ + struct libdeflate_compressor *c; c = libdeflate_alloc_compressor(12); + return 0; +} +])], + try_libdeflate=yes, try_libdeflate=no) +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS +AC_MSG_RESULT($try_libdeflate) +if test $try_libdeflate = no; then + if test $ENABLE_LIBDEFLATE = yes; then + AC_MSG_ERROR(libdeflate not found) + fi +fi +if test $ENABLE_LIBDEFLATE = yes; then + AC_DEFINE(ENABLE_LIBDEFLATE, 1, [Define if libdeflate support is enabled.]) +fi + +dnl * +dnl * --with-zlib-includes option. +dnl * +AC_ARG_WITH(zlib-includes, +AC_HELP_STRING([--with-zlib-includes=DIR], [zlib include files are in DIR]), +[z_includedir="${withval}"], [z_includedir='']) + +if test "X$z_includedir" != X; then + ZLIBINCS="-I$z_includedir" +else + ZLIBINCS='' +fi + +dnl * +dnl * --with-zlib-libraries option. +dnl * +AC_ARG_WITH(zlib-libraries, +AC_HELP_STRING([--with-zlib-libraries=DIR], [zlib library files are in DIR]), + [z_libdir="${withval}"], [z_libdir='']) + +if test "X$z_libdir" != X; then + ZLIBLIBS="-L$z_libdir -lz" + ZLIBDEPS='' +else + ZLIBLIBS='-lz' + ZLIBDEPS='' +fi + +dnl * +dnl * Check for zlib. +dnl * +AC_MSG_CHECKING(for zlib) +save_CPPFLAGS=$CPPFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $ZLIBINCS" +LIBS="$LIBS $ZLIBLIBS" +AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include + +int +main() +{ + z_stream stream; inflate(&stream, Z_FINISH); + return 0; +} +])], + try_zlib=yes, try_zlib=no) +CPPFLAGS=$save_CPPFLAGS +LIBS=$save_LIBS +AC_MSG_RESULT($try_zlib) +if test $try_zlib = no; then + if test $try_libdeflate = no; then + AC_MSG_ERROR(zlib not found) + fi +fi +if test $ENABLE_LIBDEFLATE = yes; then + ZLIBINCS=$LIBDEFLATEINCS + ZLIBLIBS=$LIBDEFLATELIBS + ZLIBDEPS=$LIBDEFLATEDEPS +fi +AC_SUBST(ZLIBINCS) +AC_SUBST(ZLIBLIBS) +AC_SUBST(ZLIBDEPS) + +dnl * +dnl * --enable-ebnet option. +dnl * +AC_ARG_ENABLE(ebnet, +AC_HELP_STRING([--enable-ebnet], [EBNET support [[yes]]]), +[ENABLE_EBNET="${enableval}"], [ENABLE_EBNET='yes']) +AC_SUBST(ENABLE_EBNET) +AM_CONDITIONAL(ENABLE_EBNET, test X$ENABLE_EBNET = Xyes) + +dnl * +dnl * --enable-ipv6 option. +dnl * +AC_ARG_ENABLE(ipv6, +AC_HELP_STRING([--enable-ipv6], + [IPv6 support for EBNET [[yes]] (if the system supports IPv6)]), +[ENABLE_IPV6="${enableval}"], [ENABLE_IPV6='auto']) + +dnl * +dnl * --enable-winsock option. +dnl * +AC_ARG_ENABLE(winsock2, +AC_HELP_STRING([--enable-winsock2], + [Use Winsock2 for EBNET [[auto]]]), +[ENABLE_WINSOCK2="${enableval}"], [ENABLE_WINSOCK2='auto']) + +dnl * +dnl * Compiler Characteristics. +dnl * + +dnl * +dnl * Header Files. +dnl * +AC_CHECK_HEADERS(direct.h langinfo.h mbstring.h pthread.h) + +dnl * +dnl * Structures. +dnl * + +dnl * +dnl * Libraries. +dnl * +AC_CHECK_LIB(resolv, res_query) +if test "$ac_cv_lib_resolv_res_query" = no; then + AC_CHECK_LIB(bind, res_query) +fi +AC_CHECK_LIB(nsl, gethostname) +AC_CHECK_LIB(socket, socket) + +dnl * +dnl * Library Functions. +dnl * +AC_CHECK_FUNCS(nl_langinfo _getdcwd atoll _atoi64) +AC_REPLACE_FUNCS(strcasecmp) + +dnl * +dnl * Typedefs. +dnl * +AC_TYPE_MODE_T +AC_CHECK_TYPE(ssize_t, int) + +dnl * +dnl * System services +dnl * +AC_EXEEXT +AC_OBJEXT +AM_CONDITIONAL(EXEEXT_EXE, test X$ac_exeext = Xyes) +if test X$ac_exeext = X.exe; then + AC_DEFINE(EXEEXT_EXE, 1, [Define if command names have the suffix \`.exe']) +fi + +dnl * +dnl * Check for Winsock2 +dnl * +if test "$ENABLE_EBNET" = yes; then + AC_CHECK_HEADERS(ws2tcpip.h sys/socket.h) + if test "$ENABLE_WINSOCK2" = auto; then + if test "$ac_cv_header_ws2tcpip_h" = yes; then + if test "$ac_cv_header_sys_socket_h" = no; then + ENABLE_WINSOCK2=yes + else + ENABLE_WINSOCK2=no + fi + else + ENABLE_WINSOCK2=no + fi + fi + + if test "$ENABLE_WINSOCK2" = yes; then + if test "$ac_cv_header_ws2tcpip_h" = no; then + AC_MSG_ERROR(Winsock2 not available) + fi + AC_DEFINE(ENABLE_WINSOCK2, 1, [Define if build with Winsock2]) + fi +else + ENABLE_WINSOCK2=no +fi +AC_MSG_CHECKING(for Winsock2 support) +AM_CONDITIONAL(ENABLE_WINSOCK2, test X$ENABLE_WINSOCK2 = Xyes) +AC_MSG_RESULT($ENABLE_WINSOCK2) + +dnl * +dnl * Check for getopt_long +dnl * +AC_CHECK_HEADERS(getopt.h) +AC_CHECK_FUNCS(getopt_long) +AM_CONDITIONAL(HAVE_GETOPT_LONG, test X$HAVE_GETOPT_LONG = Xyes) + +dnl * +dnl * ebnet support +dnl * +if test "$ENABLE_EBNET" = yes; then + AC_DEFINE(ENABLE_EBNET, 1, [Define if build with ebnet support]) + + AC_TYPE_IN_PORT_T + AC_TYPE_SA_FAMILY_T + AC_TYPE_SOCKLEN_T + AC_STRUCT_IN6_ADDR + AC_STRUCT_SOCKADDR_IN6 + AC_STRUCT_SOCKADDR_STORAGE + AC_DECL_IN6ADDR_ANY + AC_DECL_IN6ADDR_LOOPBACK + + if test "$ENABLE_WINSOCK2" = yes; then + AC_CHECK_LIB(ws2_32, getaddrinfo) + AC_CHECK_FUNCS(getaddrinfo getnameinfo) + else + AC_CHECK_FUNCS(getaddrinfo getnameinfo gai_strerror) + fi + if test "$ENABLE_IPV6" = auto; then + if test "$ac_cv_struct_in6_addr$ac_cv_func_getaddrinfo" = yesyes; then + ENABLE_IPV6=yes + else + ENABLE_IPV6=no + fi + fi + + AC_MSG_CHECKING(for IPv6 support) + if test "$ENABLE_IPV6" = yes; then + if test "$ac_cv_struct_in6_addr" = no; then + AC_MSG_ERROR(IPv6 not available) + fi + if test "${ac_cv_func_getaddrinfo}" = no; then + AC_MSG_ERROR(IPv6 not available) + fi + AC_DEFINE(ENABLE_IPV6, 1, [Define if build with IPv6 support]) + fi + AC_MSG_RESULT($ENABLE_IPV6) +fi + +dnl * +dnl * DOS style path support +dnl * +AC_CANONICAL_HOST +AC_MSG_CHECKING(for DOS style pathnames) + +dos_file_path="no" +case ${host_os} in + *djgpp | *mingw* | *emx*) dos_file_path="yes" ;; +esac + +if test "$dos_file_path" = yes; then + AC_DEFINE(DOS_FILE_PATH, 1, [Use DOS style pathnames]) +fi +AC_MSG_RESULT($dos_file_path) + +dnl * +dnl * Substitusion for eb.conf. +dnl * +AC_SUBST(ENABLE_LIBDEFLATE) +EBCONF_ZLIBINCS=$ZLIBINCS +EBCONF_ZLIBLIBS=$ZLIBLIBS +AC_SUBST(EBCONF_ZLIBINCS) +AC_SUBST(EBCONF_ZLIBLIBS) + +AC_SUBST(ENABLE_PTHREAD) +AC_SUBST(PTHREAD_CPPFLAGS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LDFLAGS) + +EBCONF_INTLINCS=$INTLINCS +EBCONF_INTLLIBS=$INTLLIBS +AC_SUBST(EBCONF_INTLINCS) +AC_SUBST(EBCONF_INTLLIBS) + +EBCONF_EBINCS='-I$(includedir)' +if test "$ENABLE_WINSOCK2" = yes; then + EBCONF_EBLIBS='-L$(libdir) -lebu -lws2_32' +else + EBCONF_EBLIBS='-L$(libdir) -lebu' +fi +AC_SUBST(EBCONF_EBINCS) +AC_SUBST(EBCONF_EBLIBS) + +dnl * +dnl * Output Files. +dnl * +AC_CONFIG_HEADER(config.h) +AC_CONFIG_FILES([Makefile ebu/Makefile libebutils/Makefile ebappendix/Makefile + ebfont/Makefile ebinfo/Makefile ebrefile/Makefile ebstopcode/Makefile + ebzip/Makefile doc/Makefile po-eb/Makefile po-ebutils/Makefile + m4/Makefile samples/Makefile]) +AC_OUTPUT diff --git a/lib/ebu/depcomp b/lib/ebu/depcomp new file mode 100644 index 0000000..aeba4e8 --- /dev/null +++ b/lib/ebu/depcomp @@ -0,0 +1,632 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/doc/Makefile b/lib/ebu/doc/Makefile new file mode 100644 index 0000000..bae0679 --- /dev/null +++ b/lib/ebu/doc/Makefile @@ -0,0 +1,572 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# doc/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgdocdir)" +pkgdocDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgdoc_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/doc +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/doc +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +pkgdoc_DATA = eb.html ebappendix.html ebfont.html ebinfo.html ebrefile.html \ + ebstopcode.html ebzip.html + +EXTRA_DIST = eb.html.in ebappendix.html.in ebfont.html.in ebinfo.html.in \ + ebrefile.html.in ebstopcode.html.in ebzip.html.in eb.css ebutils.css \ + c2html html-include html-index html-split html-toc + +CLEANFILES = *.html +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgdocDATA: $(pkgdoc_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdocdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdocdir)" + @list='$(pkgdoc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + $(pkgdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done + +uninstall-pkgdocDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgdoc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdocdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgdocDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgdocDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgdocDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-hook \ + uninstall-pkgdocDATA + + +install-data-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + for j in $$base-[0-9][0-9].html; do \ + test -r $$j || continue; \ + echo " $(INSTALL_DATA) '$$j' '$(DESTDIR)$(pkgdocdir)/$$j'"; \ + $(INSTALL_DATA) "$$j" "$(DESTDIR)$(pkgdocdir)/$$j"; \ + done; \ + done + +uninstall-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + rm -f "$(DESTDIR)$(pkgdocdir)"/$$base-*.html; \ + done + +version.html: + rm -f $@ + echo $(VERSION) > version.html + +splitted: eb-splitted ebappendix-splitted ebfont-splitted ebinfo-splitted \ + ebrefile-splitted ebstopcode-splitted ebzip-splitted + +eb.html: eb-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p eb -w 2 eb-cat.html + +ebappendix.html: ebappendix-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebappendix -w 2 ebappendix-cat.html + +ebfont.html: ebfont-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebfont -w 2 ebfont-cat.html + +ebinfo.html: ebinfo-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebinfo -w 2 ebinfo-cat.html + +ebrefile.html: ebrefile-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebrefile -w 2 ebrefile-cat.html + +ebstopcode.html: ebstopcode-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebstopcode -w 2 ebstopcode-cat.html + +ebzip.html: ebzip-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebzip -w 2 ebzip-cat.html + +eb-cat.html: eb.html.in version.html eb-toc.html eb-sample-appendix.html \ + eb-sample-booklist.html eb-sample-disctype.html eb-sample-font.html \ + eb-sample-initexit.html eb-sample-subbook.html eb-sample-text.html \ + eb-sample-word.html eb-index-type.html eb-index-func.html \ + eb-index-const.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/eb.html.in + +ebappendix-cat.html: $(srcdir)/ebappendix.html.in version.html \ +ebappendix-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebappendix.html.in + +ebfont-cat.html: $(srcdir)/ebfont.html.in version.html ebfont-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebfont.html.in + +ebinfo-cat.html: $(srcdir)/ebinfo.html.in version.html ebinfo-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebinfo.html.in + +ebrefile-cat.html: $(srcdir)/ebrefile.html.in version.html ebrefile-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebrefile.html.in + +ebstopcode-cat.html: $(srcdir)/ebstopcode.html.in version.html \ +ebstopcode-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebstopcode.html.in + +ebzip-cat.html: $(srcdir)/ebzip.html.in version.html ebzip-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebzip.html.in + +eb-toc.html: $(srcdir)/eb.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/eb.html.in > $@ + +ebappendix-toc.html: $(srcdir)/ebappendix.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebappendix.html.in > $@ + +ebfont-toc.html: $(srcdir)/ebfont.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebfont.html.in > $@ + +ebinfo-toc.html: $(srcdir)/ebinfo.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebinfo.html.in > $@ + +ebrefile-toc.html: $(srcdir)/ebrefile.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebrefile.html.in > $@ + +ebstopcode-toc.html: $(srcdir)/ebstopcode.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebstopcode.html.in > $@ + +ebzip-toc.html: $(srcdir)/ebzip.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebzip.html.in > $@ + +eb-sample-appendix.html: $(top_srcdir)/samples/appendix.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/appendix.c > $@ + +eb-sample-booklist.html: $(top_srcdir)/samples/booklist.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/booklist.c > $@ + +eb-sample-disctype.html: $(top_srcdir)/samples/disctype.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/disctype.c > $@ + +eb-sample-font.html: $(top_srcdir)/samples/font.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/font.c > $@ + +eb-sample-initexit.html: $(top_srcdir)/samples/initexit.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/initexit.c > $@ + +eb-sample-subbook.html: $(top_srcdir)/samples/subbook.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/subbook.c > $@ + +eb-sample-text.html: $(top_srcdir)/samples/text.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/text.c > $@ + +eb-sample-word.html: $(top_srcdir)/samples/word.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/word.c > $@ + +eb-index-type.html eb-index-func.html eb-index-const.html: \ +$(srcdir)/eb.html.in + $(PERL) $(srcdir)/html-index -h -p eb-index $(srcdir)/eb.html.in +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/doc/Makefile.am b/lib/ebu/doc/Makefile.am new file mode 100644 index 0000000..4656b79 --- /dev/null +++ b/lib/ebu/doc/Makefile.am @@ -0,0 +1,160 @@ +pkgdoc_DATA = eb.html ebappendix.html ebfont.html ebinfo.html ebrefile.html \ + ebstopcode.html ebzip.html + +EXTRA_DIST = eb.html.in ebappendix.html.in ebfont.html.in ebinfo.html.in \ + ebrefile.html.in ebstopcode.html.in ebzip.html.in eb.css ebutils.css \ + c2html html-include html-index html-split html-toc + +CLEANFILES = *.html + +install-data-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + for j in $$base-[0-9][0-9].html; do \ + test -r $$j || continue; \ + echo " $(INSTALL_DATA) '$$j' '$(DESTDIR)$(pkgdocdir)/$$j'"; \ + $(INSTALL_DATA) "$$j" "$(DESTDIR)$(pkgdocdir)/$$j"; \ + done; \ + done + +uninstall-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + rm -f "$(DESTDIR)$(pkgdocdir)"/$$base-*.html; \ + done + +version.html: + rm -f $@ + echo $(VERSION) > version.html + +splitted: eb-splitted ebappendix-splitted ebfont-splitted ebinfo-splitted \ + ebrefile-splitted ebstopcode-splitted ebzip-splitted + +eb.html: eb-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p eb -w 2 eb-cat.html + +ebappendix.html: ebappendix-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebappendix -w 2 ebappendix-cat.html + +ebfont.html: ebfont-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebfont -w 2 ebfont-cat.html + +ebinfo.html: ebinfo-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebinfo -w 2 ebinfo-cat.html + +ebrefile.html: ebrefile-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebrefile -w 2 ebrefile-cat.html + +ebstopcode.html: ebstopcode-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebstopcode -w 2 ebstopcode-cat.html + +ebzip.html: ebzip-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebzip -w 2 ebzip-cat.html + + +eb-cat.html: eb.html.in version.html eb-toc.html eb-sample-appendix.html \ + eb-sample-booklist.html eb-sample-disctype.html eb-sample-font.html \ + eb-sample-initexit.html eb-sample-subbook.html eb-sample-text.html \ + eb-sample-word.html eb-index-type.html eb-index-func.html \ + eb-index-const.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/eb.html.in + +ebappendix-cat.html: $(srcdir)/ebappendix.html.in version.html \ +ebappendix-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebappendix.html.in + +ebfont-cat.html: $(srcdir)/ebfont.html.in version.html ebfont-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebfont.html.in + +ebinfo-cat.html: $(srcdir)/ebinfo.html.in version.html ebinfo-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebinfo.html.in + +ebrefile-cat.html: $(srcdir)/ebrefile.html.in version.html ebrefile-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebrefile.html.in + +ebstopcode-cat.html: $(srcdir)/ebstopcode.html.in version.html \ +ebstopcode-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebstopcode.html.in + +ebzip-cat.html: $(srcdir)/ebzip.html.in version.html ebzip-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebzip.html.in + + +eb-toc.html: $(srcdir)/eb.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/eb.html.in > $@ + +ebappendix-toc.html: $(srcdir)/ebappendix.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebappendix.html.in > $@ + +ebfont-toc.html: $(srcdir)/ebfont.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebfont.html.in > $@ + +ebinfo-toc.html: $(srcdir)/ebinfo.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebinfo.html.in > $@ + +ebrefile-toc.html: $(srcdir)/ebrefile.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebrefile.html.in > $@ + +ebstopcode-toc.html: $(srcdir)/ebstopcode.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebstopcode.html.in > $@ + +ebzip-toc.html: $(srcdir)/ebzip.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebzip.html.in > $@ + +eb-sample-appendix.html: $(top_srcdir)/samples/appendix.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/appendix.c > $@ + +eb-sample-booklist.html: $(top_srcdir)/samples/booklist.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/booklist.c > $@ + +eb-sample-disctype.html: $(top_srcdir)/samples/disctype.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/disctype.c > $@ + +eb-sample-font.html: $(top_srcdir)/samples/font.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/font.c > $@ + +eb-sample-initexit.html: $(top_srcdir)/samples/initexit.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/initexit.c > $@ + +eb-sample-subbook.html: $(top_srcdir)/samples/subbook.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/subbook.c > $@ + +eb-sample-text.html: $(top_srcdir)/samples/text.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/text.c > $@ + +eb-sample-word.html: $(top_srcdir)/samples/word.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/word.c > $@ + + +eb-index-type.html eb-index-func.html eb-index-const.html: \ +$(srcdir)/eb.html.in + $(PERL) $(srcdir)/html-index -h -p eb-index $(srcdir)/eb.html.in diff --git a/lib/ebu/doc/Makefile.in b/lib/ebu/doc/Makefile.in new file mode 100644 index 0000000..e9ace62 --- /dev/null +++ b/lib/ebu/doc/Makefile.in @@ -0,0 +1,572 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgdocdir)" +pkgdocDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgdoc_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pkgdoc_DATA = eb.html ebappendix.html ebfont.html ebinfo.html ebrefile.html \ + ebstopcode.html ebzip.html + +EXTRA_DIST = eb.html.in ebappendix.html.in ebfont.html.in ebinfo.html.in \ + ebrefile.html.in ebstopcode.html.in ebzip.html.in eb.css ebutils.css \ + c2html html-include html-index html-split html-toc + +CLEANFILES = *.html +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgdocDATA: $(pkgdoc_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdocdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdocdir)" + @list='$(pkgdoc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + $(pkgdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done + +uninstall-pkgdocDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgdoc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdocdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdocdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdocdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgdocDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgdocDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgdocDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-hook \ + uninstall-pkgdocDATA + + +install-data-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + for j in $$base-[0-9][0-9].html; do \ + test -r $$j || continue; \ + echo " $(INSTALL_DATA) '$$j' '$(DESTDIR)$(pkgdocdir)/$$j'"; \ + $(INSTALL_DATA) "$$j" "$(DESTDIR)$(pkgdocdir)/$$j"; \ + done; \ + done + +uninstall-hook: + for i in $(pkgdoc_DATA); do \ + base="`echo $$i | sed -e 's/\.html//'`"; \ + rm -f "$(DESTDIR)$(pkgdocdir)"/$$base-*.html; \ + done + +version.html: + rm -f $@ + echo $(VERSION) > version.html + +splitted: eb-splitted ebappendix-splitted ebfont-splitted ebinfo-splitted \ + ebrefile-splitted ebstopcode-splitted ebzip-splitted + +eb.html: eb-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p eb -w 2 eb-cat.html + +ebappendix.html: ebappendix-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebappendix -w 2 ebappendix-cat.html + +ebfont.html: ebfont-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebfont -w 2 ebfont-cat.html + +ebinfo.html: ebinfo-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebinfo -w 2 ebinfo-cat.html + +ebrefile.html: ebrefile-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebrefile -w 2 ebrefile-cat.html + +ebstopcode.html: ebstopcode-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebstopcode -w 2 ebstopcode-cat.html + +ebzip.html: ebzip-cat.html + rm -f $@ + $(PERL) $(srcdir)/html-split -Z -p ebzip -w 2 ebzip-cat.html + +eb-cat.html: eb.html.in version.html eb-toc.html eb-sample-appendix.html \ + eb-sample-booklist.html eb-sample-disctype.html eb-sample-font.html \ + eb-sample-initexit.html eb-sample-subbook.html eb-sample-text.html \ + eb-sample-word.html eb-index-type.html eb-index-func.html \ + eb-index-const.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/eb.html.in + +ebappendix-cat.html: $(srcdir)/ebappendix.html.in version.html \ +ebappendix-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebappendix.html.in + +ebfont-cat.html: $(srcdir)/ebfont.html.in version.html ebfont-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebfont.html.in + +ebinfo-cat.html: $(srcdir)/ebinfo.html.in version.html ebinfo-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebinfo.html.in + +ebrefile-cat.html: $(srcdir)/ebrefile.html.in version.html ebrefile-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebrefile.html.in + +ebstopcode-cat.html: $(srcdir)/ebstopcode.html.in version.html \ +ebstopcode-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebstopcode.html.in + +ebzip-cat.html: $(srcdir)/ebzip.html.in version.html ebzip-toc.html + rm -f $@ + $(PERL) $(srcdir)/html-include -o $@ $(srcdir)/ebzip.html.in + +eb-toc.html: $(srcdir)/eb.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/eb.html.in > $@ + +ebappendix-toc.html: $(srcdir)/ebappendix.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebappendix.html.in > $@ + +ebfont-toc.html: $(srcdir)/ebfont.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebfont.html.in > $@ + +ebinfo-toc.html: $(srcdir)/ebinfo.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebinfo.html.in > $@ + +ebrefile-toc.html: $(srcdir)/ebrefile.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebrefile.html.in > $@ + +ebstopcode-toc.html: $(srcdir)/ebstopcode.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebstopcode.html.in > $@ + +ebzip-toc.html: $(srcdir)/ebzip.html.in + rm -f $@ + $(PERL) $(srcdir)/html-toc -m h2 -M h3 $(srcdir)/ebzip.html.in > $@ + +eb-sample-appendix.html: $(top_srcdir)/samples/appendix.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/appendix.c > $@ + +eb-sample-booklist.html: $(top_srcdir)/samples/booklist.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/booklist.c > $@ + +eb-sample-disctype.html: $(top_srcdir)/samples/disctype.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/disctype.c > $@ + +eb-sample-font.html: $(top_srcdir)/samples/font.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/font.c > $@ + +eb-sample-initexit.html: $(top_srcdir)/samples/initexit.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/initexit.c > $@ + +eb-sample-subbook.html: $(top_srcdir)/samples/subbook.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/subbook.c > $@ + +eb-sample-text.html: $(top_srcdir)/samples/text.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/text.c > $@ + +eb-sample-word.html: $(top_srcdir)/samples/word.c + rm -f $@ + $(PERL) $(srcdir)/c2html $(top_srcdir)/samples/word.c > $@ + +eb-index-type.html eb-index-func.html eb-index-const.html: \ +$(srcdir)/eb.html.in + $(PERL) $(srcdir)/html-index -h -p eb-index $(srcdir)/eb.html.in +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/doc/c2html b/lib/ebu/doc/c2html new file mode 100644 index 0000000..a11c5a4 --- /dev/null +++ b/lib/ebu/doc/c2html @@ -0,0 +1,51 @@ +#! /usr/bin/perl + +require 5.005; +use Getopt::Std; + +# +# Usage +# +my $usage = "Usage: $0 [-t tab-width] [input-file...]\n"; + +# +# Variables +# +my $tab_width = 8; +my $out_file_name = '-'; + +# +# Parse command line arguments. +# +getopts(':t:', \%options) or die $usage; +$tab_width = $options{t} if (defined($options{t})); + +# +# Convert C to HTML. +# +print "
\n"; +print "
\n";
+
+while (<>) {
+    s/^([ \t]*)//;
+    my $spaces = $1;
+
+    my $col = 0;
+    foreach my $c (unpack('C*', $spaces)) {
+	if ($c eq ord(' ')) {
+	    $col++;
+	} else {
+	    $col = ($col + $tab_width) - ($col % $tab_width);
+	}
+	
+    }
+    print ' ' x $col;
+
+    s|&|&|g;
+    s|<|<|g;
+    s|>|>|g;
+    print;
+}
+
+print "
\n"; +print "
\n"; diff --git a/lib/ebu/doc/eb-01.html b/lib/ebu/doc/eb-01.html new file mode 100644 index 0000000..5941b6a --- /dev/null +++ b/lib/ebu/doc/eb-01.html @@ -0,0 +1,132 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+EB 饤֥ CD-ROM Ҥ˥뤿 C Υ饤֥Ǥ +UNIX OS Windows (2000ʹ) Υƥư뤳Ȥ +Ǥޤ +

+ +

+EB 饤֥ EB, EBG, EBXA, EBXA-C, S-EBXA EPWING +CD-ROM ҤбƤޤ +ϡܤ䤵Ƥ뼭˻ȤƤޤ +CD-ROM ҼΤ ISO 9660 ˤʤäƤޤΤǡ¾ ISO 9660 +ƱΤǥޥȤ뤳ȤǤޤ +

+ +

+ܽϡEB 饤֥Ȥäƥץꥱץ +ȯԸˡ饤֥λͤ⤷ʸǤ +ơ饤֥θʻȥޥ˥奢Ǥ⤢ޤ +ɤ߿ʤˤäơɼԤ EB 饤֥ꤪ CD-ROM Ҥ¤ +ˤĤΤäƤɬפϤޤ󤬡Żҥ֥å EPWING Ѥơ +ºݤ CD-ROM ҤɤΤ褦ʤΤ򤷤ƤȤᤷޤ +ޤC ˤץߥ󥰤ˤĤƤϡʬ򤷤Ƥ뤳Ȥ +Ȥޤ +

+ +

+ܽƤ˱ä EB 饤֥Ȥäץꥱץ +ˤϡѤΥƥ EB 饤֥ C ѥ +󥹥ȡ뤷ƤƲ +ʤܽǤϼ UNIX OS ѤˤĤơҤƤޤ +

+ +

+EB 饤֥ϥե꡼եȥǤɤӥХʥ + Modified BSD 饤󥹤βǻѤ뤳ȤǽǤ +(С 4.1 ΤΤϡGPL ѤƤޤ) +ܤϡɤ°Ƥ COPYING ȤʸΥե򻲾 +Ʋ +

+ + +

Żҥ֥å EPWING ˤĤ

+ +

+Żҥ֥å EPWING ϡܤǻȤƤŻҽҤ +ǡ̾ΤǡCD-ROM ˼᤿ǿνҤΤƤޤ +CD-ROM ISO 9660 ʤΤǡCD-ROM ɥ饤֤륷ƥǤС +ưפ˥뤳ȤǤޤ +ŻҽҤΥǡȤϤäƤ⡢ºݤϼò¤Ȥʤä +ꡢΤƤҤ⼭बŪ¿褦Ǥ +

+ +

+Żҥ֥åEPWING Ȥˡǡ˴ؤ뵬ʤƤϰ̸ +ޤ󤬡EPWING ĤƤϵʤΰܹȵ JIS X 4081 +ŻҽǸǡ¤פȤƸƤޤ +ˡEPWING Żҥ֥åΥǡϡƤ뤳ȤΤ +ޤ +

+ +

+EB 饤֥γȯԤ⡢Żҥ֥åEPWING ʤƤΤޤ +EB 饤֥Ǥ JIS X 4081 εҤȤˡŻҥ֥åEPWING ɤ +褦ˤƤޤ +ʤ顢ʤƤʬʤ֤dzȯƤ뤿ᡢǰʤ +ɤʤҤ¸ߤޤ +

+ + +

ܽιˤĤ

+ +

+ϡEB 饤֥ħפǤϡEB 饤֥꤬бƤ뵡ǽб +ƤʤǽˤĤơñޤ +ޤ饤֥γά˴ؤơǽΤäƤۤɤȻפ +򤤤ĤƤޤ +

+ +

+˼ξϡ֥ץΥѥˡפǤϡEB 饤֥Ѥ +ץΥѥˡޤ +ܽΥץץ򥳥ѥ뤹뤿ɬפʾ⡢ξϤ +Ƥޤ +

+ +

+ơμξϡ֥饤֥νȸפ餬ºݤ +EB 饤֥Υץߥ󥰤βȤʤޤ +줾ξϤϡΤ褦ᤫ鹽Ƥޤ +ϤˤäƤϰ᤬ʤ⤢ޤ +

+ +
+
+
+ξϤDz⤹뵡ǽ䳵ǰˤĤƤδμEB 饤֥λͤ +פˤĤƲ⤷Ƥޤ + +
ץץ
+
+ֲפǤϥץҤ򼨤Ȥ¿Τǡưǽ +ץΥץ򤳤Ǽޤ + +
ǡξܺ
+
+ǡؿͤʤɤˤĤƤλȥޥ˥奢Ǥ +
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-02.html b/lib/ebu/doc/eb-02.html new file mode 100644 index 0000000..efb4429 --- /dev/null +++ b/lib/ebu/doc/eb-02.html @@ -0,0 +1,277 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

EB 饤֥ħ

+ +

+˽Ҥ٤褦ˡEB 饤֥ϡŻҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) + EPWING CD-ROM ҤбƤޤ +

+ +

+EB 饤֥ϡ CD-ROM ҤФơνԤȤ +Ǥޤ +

+ +
    +
  • ׸ +
  • ׸ +
  • ׸ +
  • ︡ +
  • ʣ縡 +
  • Фǡμ +
  • ʸǡμ +
  • ˥塼μ +
  • ɽμ +
  • 顼ǥǡμ ( EPWING Τ) +
  • Υǥǡμ +
  • ǡμ +
  • ưǡμ +
+ +

+ξϤǤϡEB 饤֥γפ˴ؤơ餫ΤäƤĺ +ۤɤȻפ뤽¾λˤĤơޤ +

+ + + +

إåե

+ +

+EB 饤֥ˤϡĤΥإåե뤬ѰդƤޤ +

+ +
+
appendix.h
+
+appendix (Ͽ) ˴ϢԤ +
binary.h
+
+Хʥǡ˴ϢԤ +
eb.h
+
+EB 饤֥δܥإåե롣 +
error.h
+
+顼ɤ˴ϢԤ +
font.h
+
+˴ϢԤ +
text.h
+
+ƥȥǡ (ʸФʤ) ˴ϢԤ +
+ +

+ʳˤ⤤ĤΥե뤬󥹥ȡ뤵ޤ˵󤲤 +إåե뤫ɤ߹ޤΤǡץꥱץब +ľɤ߹ɬפϤޤ +

+ +

+ץꥱץϡEB 饤֥ȤݤˤΥإåե +եƬնɤ߹ߤޤ +

+ +
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+
+ +

+eb.h ǤϤʤeb/eb.h ɤ߹褦ˤƲ +

+ + +

ʸ

+ +

+EB 饤֥ǤϡCD-ROM Υǡʸˤƥץꥱ +ϤݤʸɤꤷƤޤ +

+ +

+EBG (Żҥ֥å) ˤĤƤϡǡ ISO 8859-1 (ƥʸ 1 +ʸ) ǽ񤫤Ƥ뤿ᡢǡΤ ISO 8859-1 +ǹԤޤ + 2 ХȤɽ0x0101 0x1efe ΰѤޤ +(ΰβ 16 ӥåȤ 0x01 0xfe ϰϤѤޤ) +

+ +

+EBG, EBXA-C Żҥ֥å EPWING ˤĤƤϡǡ +JIS X 0208 (ܸΤʴ) ǽ񤫤ƤꡢJIS X 0208 0x2121 +0x7e7e ˥ޥåԥ󥰤0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+
+
+
+娧
+
+
+
+ +

+EB 饤֥Ǥ JIS X 0208 ʬܸ EUC (EUC-JP) ˥󥳡 +ơץꥱȤΤܸ EUC ǹԤޤ +äơJIS X 0208 ʬ 0xa1a1 0xfefe ˥ޥåԥ󥰤ޤ +

+ +

+EBXA-C (漭Żҥ֥å) ˤĤƤϡǡ JIS X 0208 +(ܸΤʴ) GB 2312 (δλ) ǽ񤫤Ƥꡢ +JIS X 0208 0x2121 0x7e7e ˥ޥåԥ󥰡 +GB 2312 0x21a1 0x7efe ˥ޥåԥ󥰤 +0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+ǣ¡
+
+
+娧
+
+
+
+ +

+EB 饤֥ǤϡץꥱȤΤ˻Ȥʸɤϡ +ܸ EUC EUC (EUC-ZH) Ǥ +äơΤޤޤǤ JIS X 0208 GB 2312 0xa1a1 0xfefe +ޥåԥ󥰤졢ͤƤޤޤ +ɤ򤹤Τϡץꥱ¦Ƿɬפޤ +(ܤϡ֥եåʸɤδط 򻲾ȤΤ) +

+ +

+Żҥ֥åEPWING ȤˡˤĤƤϡץꥱ¦Ǥɤ +ɬפޤ +ˤĤƾܤ ֳ 򻲾ȤΤȡ +

+ + +

̤줿ҤˤĤ

+ +

+EB 饤֥ϡǡ򰵽̤ƼϿҤ򰷤ȤǤޤ +ΤȤ 4 ΰˡбƤޤ +

+ +
+
ebzip ̷
+
+EB 饤֥ȼΰ̷Ǥ +° ebzip ޥɤȤȡηǰ̤Ҥޤ + +
EPWING V4, V5
+
+Τ EPWING V4, V5 νҤΰˡηǰ̤Τޤ + +
EPWING V6
+
+Τ EPWING V6 νҤΰˡηǰ̤Τޤ +EPWING V4, V5 βɷǤ + +
S-EBXA
+
+Τ S-EBXA νҤΰˡηǰ̤Τޤ +
+ +

+ǡοĹ EB 饤֥¦ǼưŪ˹Ԥ뤿ᡢ +ץꥱץफϡƤҤ̤Ƥ뤫 +ɤʬޤ +ץꥱץϡҤ̤Ƥ뤫ɤǽѤ +ɬפϤޤ +

+ + +

֥ۥȾνҤˤĤ

+ +

+С 4.0 顢EB 饤֥¾ΥۥȤνҤ˥Ǥ +褦ˤʤޤ +

+ +

+֥νϤ٤ EB 饤֥¦ǹԤޤΤǡ +ץꥱץϡҤʬΥۥȾˤ뤫ɤǡ +EB 饤֥θƤӽФѤɬפϤޤ +

+ +

+¾ΥۥȤ饢ȡ®٤٤ʤޤ +ΤᡢΨɤǤ褦ץꥱνˡפ٤ +뤳ȤϤ뤫Τޤ +

+ + +

ƥ׷

+ +

+ץꥱץΥѥѤ륳ѥˤϡ +ANSI (ANSI X3.159-1989, ISO/IEC 9899-1990) бΤΤоݤȤƤޤ +ޤƥˤ POSIX.1 (IEEE Std. 1003.2-1990, ISO/IEC 9945-1:1990) +ʤߴΤΤоݤȤƤޤ +

+ +

+ʤ餯 EB 饤֥ǤϡŤѥ UNIX ϥƥؤб +ʤ˹ԤƤޤС 4.1 бǤڤäƤޤ +ä ANSI бΥѥɬܤǤΤǡդ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-03.html b/lib/ebu/doc/eb-03.html new file mode 100644 index 0000000..911d2a0 --- /dev/null +++ b/lib/ebu/doc/eb-03.html @@ -0,0 +1,322 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

ץΥѥˡ

+ +

+ܾϤǤϡEB 饤֥ѤץΥѥλˤĤơ +2 ̤ˡޤ +

+ +

+ܤϡŪʡϤΥץ򥳥ѥ뤹ݤ˸Ƥ +ƤäȤ᤯ѥ뤹뤿ˡǤ +EB 饤֥λȤФŪǴñʥץȤݤϡ +ɤǤ礦 +

+ +

+ܤϡEB 饤֥Ȥ߹ץꥱե꡼եȥ +Ȥƥ꡼ݤ˸ƤˡǤ +EB 饤֥ˤϡGNU Autoconf, Automake, Libtool ʻѤȤߤ +ѰդƤޤΤǡȤäѥˡˤĤޤ +

+ + + +

ƤäȤᤤѥˡ

+ +

+ץꥱץ򥳥ѥ뤹ݤϡإåե +ǥ쥯ȥ֤ C ѥ˶Ƥɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-I ץǰ֤ +ޤ +

+ +
+
+cc -I/usr/local/include -c sample.c
+
+
+ +

+/usr/local/include/eb ǤϤʤΰľꤷޤ +(֥إåե 򻲾ȤΤ) +

+ +

+ˡ󥯤Ƽ¹ԥХʥ빩Ǥ +ʲ˵饤֥ΰ⤷󥯤ޤ +ϡ饤֥Υե̾Ǥ (.a +.so ȤäҤϾά) +

+ +
+
EB 饤֥ (libeb)
+
+EB 饤֥ΤǤΥ饤֥ɬܤǤ + +
zlib (libz)
+
+̤ȿĹԤ饤֥Ǥ +(ܤ @url{http://www.gzip.org/zlib/}) +ebzip ޥɤǰ̤򰷤˻Ȥޤ +Υ饤֥ɬܤǤ +EB 饤֥Υɤˤ zlib ϿƤޤ +ƥ zlib 󥹥ȡ뤵ƤʤСEB 饤֥ +󥹥ȡ뤹ݤˡzlib ⼫ưŪ˥󥹥ȡ뤵ޤ + +
gettext 饤֥ (libintl)
+
+åιݲǽ (NLS) 󶡤饤֥Ǥ +åιݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥ +ϡɬפˤʤ뤫Τޤ +gettext μϲफޤEB 饤֥ǻѤǤΤ +åη GNU gettext ߴΤΤǤ + +åιݲǽͭˤƤǤ⡢OS ɸ C 饤֥ +Ȥ glibc ѤƤ륷ƥǤϡꤹɬפϤޤ + +
iconv 饤֥
+
+ʸѴΥ饤֥Ǥ +gettext 饤֥󥯤硢ɬפȤʤ뤫Τޤ +iconv μⲿफꡢOS ˤäƤϺǽ餫źդƤޤ +
+ +

+ɬפʥ饤֥ե̾ΤC ѥ˻ꤷƤޤ +äơե֤Ƥǥ쥯ȥ֤C ѥ˶ +ɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-L ץǥǥ쥯ȥ +֤ꤷ-l ץǥ饤֥Υե̾ +ޤ +

+ +
+
+cc sample.o -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+ͭ饤֥󥯤ϡ¹Իˤ饤֥ +ѥ碌ƻꤹɬפ뤫Τޤ +

+ +
+
+cc sample.o -R/usr/local/lib -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+C ѥλȤ˴ؤƤξܺ٤ϡC ѥΥޥ˥奢򻲾 +Ʋ +

+ + +

Autoconf ʻѤѥˡ

+ +

+ȤˡAutoconf, Automake, Libtool ϡ餫ᥤ󥹥ȡ뤷 +Ʋ +Autoconf ϥС 2.50 ʹߤɬפǤ +

+ +

+ޤץꥱץ configure.ac +(⤷ configure.in) ˡιԤäޤ +

+ +
+
+eb_LIB_EB4
+
+
+ +

eb_LIB_EB4 ϡEB 饤֥λѤɬפʰڤ +åԤ configure ˼Υץɲ +ޤ +

+ +
+
+  --with-eb-conf=FILE     eb.conf file is FILE [SYSCONFDIR/eb.conf]
+
+
+ +

+eb.conf ϡEB 饤֥򥤥󥹥ȡ뤷ȤξϿ +եǡ饤֥Ȱ˥󥹥ȡ뤵ޤ +eb_LIB_EB4 ϤΥեɤ߹ǡC ѥ +ϤʤФʤץʤɤξޤ +--eb-conf-file ϡeb.conf Υե̾ +Ū˻ꤹ륪ץǤ +

+ +

eb_LIB_EB4 ϡeb4.m4 Ȥե +󶡤Ƥޤ +EB 饤֥ /usr/local ˥󥹥ȡ뤷ġΥե +Υ󥹥ȡѹƤʤС/usr/local/share/aclocal +˥󥹥ȡ뤵ޤ + eb4.m4 򥽡ɤŬʥǥ쥯ȥβ (Ȥ +m4) ˥ԡƲ +

+ +

+aclocal ޥɤ aclocal.m4 ݤϡ +-I ץǥޥեΥǥ쥯ȥꤷޤ +

+ +
+
+aclocal -I m4
+
+
+ +

+äơȥåץǥ쥯ȥ Makefile.am ˤ +aclocal Ϥץ񤤤Ƥޤ +

+ +
+
+ACLOCAL_AMFLAGS = -I m4
+
+
+ +

+ޤɤΥǥ쥯ȥ Libtool ѥåޤѰդ +ʤСѰդޤ +libtoolize ޥɤ¹ԤƲ +Libtool ѥåɤΥǥ쥯ȥ˥ԡޤ +

+ +
+
+libtoolize
+
+
+ +

+ǸˡѥԤǥ쥯ȥ Makefile.am ե + _LDFLAGS INCLUDES ˡΤ褦ͤɲ +ޤ +

+ +
+
+program_LDFLAGS = $(EBCONF_EBLIBS) $(EBCONF_ZLIBLIBS) $(EBCONF_INTLLIBS)
+INCLUDES = $(EBCONF_EBINCS)
+
+
+ +

+(program_LDFLAGS program ΤȤϡ +ץꥱץμºݤΥޥ̾ˤޤ) +

+ + +

EB 饤֥ΤΥǥХå

+ +

+ּʬäץꥱưʤΤϡҤäȤ +EB 饤֥ΥХǤϤʤ?פȤEB 饤֥ +εưǧȻפȤ뤫Τޤ +

+ +

+Τ褦ʾϡĶѿ EB_DEBUG 򥻥åȤ֤ +ץꥱ¹ԤƤߤƲ +EB 饤֥ɸ२顼ϤˡΤ褦ʥ (ʤ̤Ǥ) +Ϥ褦ˤʤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB] in: eb_load_narrow_font(book=0)
+[EB] out: eb_load_narrow_font()
+[EB] in: eb_load_wide_font(book=0)
+[EB] out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

+ΥϡؿθƤӽФΰ󡢤Ӵؿͤ +Ƥޤ +ebfixlog Ȥ Perl5 ץȤȤȡ뤳 +Ǥޤ +ΥץȤϡEB 饤֥Υɤ misc +ǥ쥯ȥ˼Ƥޤ +

+ +

+ebfixlog ϡޥɹԤΰȤͿ줿ե +(ꤵʤɸ) åǡɤ߹ߡ +Τ褦˻ƽϤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB]   in: eb_load_narrow_font(book=0)
+[EB]   out: eb_load_narrow_font()
+[EB]   in: eb_load_wide_font(book=0)
+[EB]   out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

ebfixlog ץȤϡzio ebnet ȸƤФ롢 +EB 饤֥ǥեϤĽΥɤ߼ΤƤ褦 +ʤäƤޤ +ˤꡢ̤ʤ긺ޤ +

+ +

+zio EB 饤֥٥Ϥνǡˤ˸ƤӽФޤ +θĴ٤ݤ⡢ޤɤ߼ΤƤ饤֥ư +䤹Ǥ礦 +

+ +

+ebfixlog -z ץȤȡzio +åɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ +

+ebnet ϱ֥Ϥʬǡzio ⤵ +̥٥˰֤ޤ +֥εưפȤʳϡɤ߼ΤƤɤȻפޤ +

+ +

+ebfixlog -n ץȤȡebnet, +zio ξΥåɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-04.html b/lib/ebu/doc/eb-04.html new file mode 100644 index 0000000..d17fe12 --- /dev/null +++ b/lib/ebu/doc/eb-04.html @@ -0,0 +1,190 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

饤֥νȸ

+ +

+ξϤϡEB 饤֥Υץߥ󥰤ˤĤƤβˤʤޤ +

+ +

+ޤץꥱץफ EB 饤֥Ѥˤϡ +ǽ˥饤֥ɬפޤ +

+ +

+饤֥νԤˤϡeb_initialize_library() +ȤؿƤӽФޤ +

+ +
+
+if (eb_initialize_library() != EB_SUCCESS) {
+    printf("eb_initialize_library() failed\n");
+    exit(1);
+}
+
+
+ +

+Ʊͤˡ饤֥Ȥä顢eb_finalize_library() +ȤؿƤӽФƸ򤷤ޤ +

+ +
+
+eb_finalize_library();
+
+
+ + + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2001-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     initexit
+ * :
+ *     initexit
+ * :
+ *     EB 饤֥ν򤷤Ƥߤޤ
+ *     ץγ¦鸫Сϲΰ̣ʤưǤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+
+    /* EB 饤֥*/
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        exit(1);
+    }
+
+    /* EB 饤֥Ѥλ*/
+    eb_finalize_library();
+    exit(0);
+}
+
+
+ + +

ؿξܺ

+ +

+ιƤؿȤˤϡeb/eb.h ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_initialize_library ()

+ +

+ؿ eb_initialize_library() ϡEB 饤֥ޤ +ץꥱץϡEB 饤֥¾δؿƤˡɬ +δؿƤɬפޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +硢eb_initialize_library() bindtextdomain() +ƤӽФޤ +äơץꥱץब setlocale() +ƤӽФΤϡδؿƤӽФǤɬפޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+饤֥ˡEB 饤֥¾δؿƤư +̤Ǥ +ޤǤ˽Ѥޤ֤ǡ eb_initialize_library() +ƤǤ⤤ޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_library ()

+ +

+ؿ eb_finalize_library() ϡEB 饤֥Ȥä +ݤθԤޤ +ץꥱץ¦ǻѤ +EB_BookEB_HooksetEB_Appendix ֥ȤθϹԤޤ +֥Ȥˤϡ줾Ѥδؿ +eb_finalize_book()eb_finalize_hookset() +eb_finalize_appendix() ƥ֥ȤФ +ƤǤɬפޤ +

+ +

+饤֥θ򤷤ϡEB 饤֥ΤʤؿƤǤ +ޤ +Ƥư̤Ǥ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-05.html b/lib/ebu/doc/eb-05.html new file mode 100644 index 0000000..d1213bb --- /dev/null +++ b/lib/ebu/doc/eb-05.html @@ -0,0 +1,561 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

CD-ROM Ҥ EB_Book ֥

+ +

+EB 饤֥ǤϡCD-ROM ҤؤΥϡ٤ EB_Book +Υ֥Ȥ𤷤ƹԤޤ +äơۤȤɤΥץꥱץϡܾϤǵҤƤ +ɬפȤϤǤ +

+ +

+ܾϤǤ EB_Book ֥ȤνȤäŪ +갷ˤĤޤ +

+ + + +

EB_Book ֥

+ +

+CD-ROM Ҥإˤϡޤ EB_Book Υ֥Ȥ +Ѱդޤ +Ʊʣ CD-ROM Ҥ˥ʤ顢Ұ˥֥Ȥ +ɬפޤ +

+ +
+
+EB_Book book;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Book *book_pointer;
+
+book_pointer = (EB_Book *) malloc(sizeof(EB_Book));
+
+
+ +

+EB_Book ֥Ȥ (ѿ book + book_pointer λؤΰ) ϤޤƤޤΤǡ +Τǥ֥Ȥޤ +

+ +
+
+eb_initialize_book(&book);
+eb_initialize_book(book_pointer);
+
+
+ +

+eb_initialize() Ϥ EB_Book ֥ +ؤΥݥ󥿤ǤäơEB_Book ֥ȤΤΤǤ +ʤȤդƲ +(EB 饤֥¾δؿ⡢٤ƥ֥Ȥݥ󥿤Ϥޤ) +

+ +

+CD-ROM ҤȤˤϡ³ EB_Book ֥Ȥ +CD-ROM ҤμΤ˷դޤ +ϡؿ eb_bind() ˤäƹԤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥ȡ
+
+
+⡲ʡˡ
+
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind(&book, "/mnt/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+eb_bind() ϤҤΥѥ (Ǥ /mnt/cdrom) +ϽҤΥȥåץǥ쥯ȥꡢĤޤ catalog ޤ +catalogs եΤǥ쥯ȥꤷޤ +

+ +

+EB_Book ֥ȤȤä顢 +eb_finalize_book() ƤǸ򤷤ޤ +֥ȤϽҤȤηդ򤫤줿֤ꡢdzƤ줿 +ϲ졢Ƥե⤹٤Ĥޤ +

+ +
+
+eb_finalize_book(&book);
+eb_finalize_book(book_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_book() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(book_pointer);
+
+
+ + +

֥ۥȤؤ eb_bind()

+ +

+ eb_bind() ѤơEB_Book +֥Ȥ֥ۥȤνҤ˷ӤĤ뤳ȤǤޤ +ˤϡҤΥѥˡ֥Ѥμ̻Ҥꤷޤ +̻ҤϡΤ褦ʷȤޤ +

+ +
+
+ebnet://ۥ:ݡ/̾
+
+
+ +

+ۥ ϱ֥ۥȤ IP ɥ쥹⤷ϥۥ̾Ǥ +IPv6 ɥ쥹ꤹϡɥ쥹 [ +] ǰϤɬפޤ +ݡ ϡΥۥȤԤƤݡȤֹǤ +ۥȤԤƤݡȤɸ 22010 ֤ǤС +ʬϾάǽǤ +

+ +

eb_bind() Υ򵭤ޤ +

+ +
+
+if (eb_bind(&book, "ebnet://localhost/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ + +

ץץ

+ +

+ΥץץǤϡCD-ROM ҤμĴ٤뤿ˡ +eb_disc_code() ȤؿѤƤޤ +δؿˤĤƤϡִؿξܺ١ 򻲾ȤΤȡ +

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     disctype <book-path>
+ * :
+ *     disctype /cdrom
+ * :
+ *     <book-path> ǻꤵ줿 CD-ROM ҤμबEB  EPWING 
+ *     Ĵ٤ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Disc_Code disc_code;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* `book' Ҥ˷դ롣Ԥ齪λ*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ҤμĴ٤ɽ*/
+    error_code = eb_disc_type(&book, &disc_code);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get disc type, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    if (disc_code == EB_DISC_EB) {
+        fputs("EB\n", stdout);
+    } else if (disc_code == EB_DISC_EPWING) {
+        fputs("EPWING\n", stdout);
+    } else {
+        fputs("unknown\n", stdout);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Book

+ +

+EB_Book ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Book ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Book ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Book ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

EB_Disc_Code

+ +

EB_Disc_Code ϡCD-ROM Ҥηɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_DISC_EB
+
+Żҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) Ǥ뤳Ȥɽޤ + +
EB_DISC_EPWING
+
+EPWING Ǥ뤳Ȥɽޤ + +
EB_DISC_INVALID
+
+ʷͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

EB_Character_Code

+ +

EB_Character_Code ϡCD-ROM ҤǻѤ +ʸɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_CHARCODE_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ѤƤ뤳Ȥɽޤ +Żҥ֥å EBG ϤǤ + +
EB_CHARCODE_JISX0208
+
+JIS X 0208 (ܸΤʴ) ѤƤ뤳Ȥɽޤ +EBG, EBXA-C ʳŻҥ֥å EPWING Ϥ٤ƤǤ + +
EB_CHARCODE_JISX0208_GB2312
+
+JIS X 0208 (ܸΤʴ) GB 2312 (δλ) ʻѤƤ +Ȥɽޤ +Żҥ֥å EBXA-C ϤǤ + +
EB_CHARCODE_INVALID
+
+ʸͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

void eb_initialize_book (EB_Book *book)

+ +

+ؿ eb_initialize_book() ϡbook λؤ +EB_Book ֥Ȥޤ +EB_Book ֥ȤФ EB 饤֥¾δؿƤˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_book() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind (EB_Book *book, const char *path)

+ +

+ؿ eb_bind() ϡbook λؤ EB_Book +֥Ȥ򡢥ѥ path ˤ CD-ROM Ҥ˷դޤ +ѥˤϡҤΥȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +ҤΥȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤ˽Ҥ˷դƤ硢νҤȤηդ +򤤤Ƥ顢path ˤҤ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥ȤҤȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤƤʤƤ +ʤޤ +ˡpath ХѥΤȤϡХѥѴ̤Ĺ +˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

void eb_finalize_book (EB_Book *book)

+ +

+ؿ eb_finalize_book() ϡbook ؤ +EB_Book ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥ȤҤȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_is_bound (EB_Book *book)

+ +

+ؿ eb_is_bound() ϡbook Ҥ˷դƤ뤫 +ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_path (EB_Book *book const char *path)

+ +

+ؿ eb_path() ϡbook ˷դƤҤΥѥ +⤷ϱ֥̻Ҥpath λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡeb_bind() +ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_disc_type (EB_Book *book, EB_Disc_Code *disc_code)

+ +

+ؿ eb_disc_type() ϡbook Υǥη +disc_code λؤΰ˽񤭹ߤޤ +񤭹ǥηͤϡEB_Disc_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdisc_code λؤΰ EB_DISC_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_character_code (EB_Book *book, EB_Character_Code *character_code)

+ +

+ؿ eb_character_code() ϡbook 񤫤Ƥ +ʸɤ character_code λؤΰ˽񤭹ߤޤ +񤭹ʸɤͤϡEB_Character_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡcharacter_code λؤΰ +EB_CHARCODE_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-06.html b/lib/ebu/doc/eb-06.html new file mode 100644 index 0000000..7f68623 --- /dev/null +++ b/lib/ebu/doc/eb-06.html @@ -0,0 +1,787 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

+ +

+EB 饤֥δؿθƤӽФϡȤϸ¤ޤ +ȤСEB_Book ֥ȤҤ˷ӤĤؿ +eb_bind() ˤϡȤƽҤΥȥåץǥ쥯ȥϤޤ +¸ߤʤǥ쥯ȥꤷ硢ϼԤ˽ޤ +

+ +

+̤ˤݤϡ桼äѥꤷȤ˵ޤ +­Τ褦ˡ桼ΥߥǤϤʤԤⵯꤨޤ +

+ +

+ܾϤǤϡؿθƤӽФԤνˤĤޤ +

+ + + +

顼ɤȥ顼å

+ +

+EB 饤֥δؿ¿ϡͤȤ EB_Error_Code +֤ͤޤ +Ȥ֤ͤ EB_SUCCESS ǤԤȤ +顼θ˱֤ͤ͡ޤ +ΤᡢEB 饤֥ǤϼΤ褦 EB_SUCCESS Ȥӽ +褯Ԥޤ +

+ +
+
+EB_Error_Code error_code;
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+顼ɤͤϡؿ eb_error_message() ˤä +顼åѴ뤳ȤǤޤ +뤳Ȥǡ顼θ򥢥ץꥱץΥ桼 +⤦ʬ䤹뤳ȤǤޤ +

+ +
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed, %s\n",
+        eb_error_message(error_code));
+    return;
+}
+
+
+ +

+error_code EB_ERR_TOO_LONG_FILENAME +åȤƤСΤ褦ʥ顼åϤޤ +

+ +
+
+too long filename
+
+
+ +

+뤤ϡΤ褦ܸΥåΤޤ +

+ +
+
+ե̾Ĺޤ
+
+
+ +

+åιݲǽ (NLS) ̵ˤ EB 饤֥򥳥ѥ +ϡ˱ѸΥå֤ޤ +ͭˤϡˤäƤɤθΥå +֤뤫ޤޤ +

+ +

+ܽǤϥץʷˤ뤿ˡ顼Ϻ¤Ԥä +ޤ +ɤ̤ΥץꥱץǤϡؿθƤӽФ +ɤ˥åԤݤϥ顼å +ơ桼˥顼θΤ˾ޤȤޤ +

+ + +

顼Ф봲Ƥ

+ +

+EB_Book ֥Ȥϡ֤˴ؤѥ᥿򤤤Ĥä +ޤ +֥Ȥ CD-ROM Ҥ˷դƤ뤫ɤ⡢ѥ᥿ +ΤΰĤǤ +

+ +

+ EB_Book ֥ȤؤΥݥ󥿤ؿˤϡ +餫ᥪ֥ȤΥѥ᥿åȤƤ뤳Ȥ +ƤΤ⤢ޤ +ȤСeb_path() ϡ֥ȤҤ˷դƤ뤳 +ȤƤޤ +Ǥϡ⤷Ҥ˷դƤʤ֥Ȥ eb_path() +ϤɤʤǤ礦 +

+ +
+
+EB_Book book;
+EB_Error_Code error_code;
+char path[EB_MAX_PATH_LENGTH + 1];
+
+eb_initialize_library();
+eb_initialize(&book);
+error_code = eb_path(&book, path);    /* ɤʤ? */
+
+
+ +

+ξ硢eb_path() EB_ERR_UNBOUND_BOOK +֤ޤ +EB 饤֥δؿϡɬפʥѥ᥿åȤƤʤ֥Ȥ +ΤƵ䤷ޤ +

+ +

+ʤ顢ȥޥ˥奢ƤơEB 饤֥ +δؿϡͿ줿ݥ󥿤 NULL ɤޤǤĴ٤ޤ +Τ褦ʤȤ򤹤ȡץ۾ェλƤޤޤ +

+ +
+
+eb_bind(NULL, "/mnt/cdrom");    /* ۾ェλ! */
+eb_bind(&book, NULL);           /* ۾ェλ! */
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_Error_Code

+ +

EB_Error_Code ϡEB 饤֥Υ顼ɤ +ɽޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_ERRORS Ĥ +եåɤƤޤ +顼ɤΰˤĤƤϡ + (֥顼ɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

顼ɤΰ

+ +

+Ƥ륨顼ɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_SUCCESS

+ +

+ +顼ϵƤʤ +

+ + +

EB_ERR_MEMORY_EXHAUSTED

+ +

+EB 饤֥꤬ malloc() ƤӽФNULL +֤äƤ +

+ + +

EB_ERR_TOO_LONG_FILE_NAME

+ +

+Ϳ줿ҤΥѥ̾Ĺ롣 +

+ + +

EB_ERR_BAD_FILE_NAME

+ +

+ҤΥѥ̾Ǥ롣 +

+ + +

EB_ERR_BAD_DIR_NAME

+ +

+ǥ쥯ȥ̾Ǥ롣 +(EB 饤֥ѤʤΤǡ +Υ顼ɤץꥱץ֤뤳ȤϤޤ) +

+ + +

EB_ERR_TOO_LONG_WORD

+ +

+Ϳ줿Ĺ롣 +

+ + +

EB_ERR_BAD_WORD

+ +

+Ϳ줿ʸޤޤƤ롣 +

+ + +

EB_ERR_EMPTY_WORD

+ +

+Ϳ줿϶Ǥ롣 +

+ + +

EB_ERR_FAIL_GETCWD

+ +

+getcwd()getwd() Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CAT

+ +

+EB 饤֥꤬ҤΥե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CATAPP

+ +

+EB 饤֥꤬appendix Υե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_TEXT

+ +

+EB 饤֥꤬Ҥʸե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_FONT

+ +

+EB 饤֥꤬Ҥγե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_APP

+ +

+EB 饤֥꤬appendix ե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_BINARY

+ +

+EB 饤֥꤬Хʥǡե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CAT

+ +

+EB 饤֥꤬ҤΥեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CATAPP

+ +

+EB 饤֥꤬appendix Υեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_TEXT

+ +

+EB 饤֥꤬ҤʸեɤळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_FONT

+ +

+EB 饤֥꤬Ҥγեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_APP

+ +

+EB 饤֥꤬appendix Υᥤեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CAT

+ +

+EB 饤֥꤬ҤΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CATAPP

+ +

+EB 饤֥꤬appendix ΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_TEXT

+ +

+EB 饤֥꤬ҤʸեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_FONT

+ +

+EB 饤֥꤬ҤγեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_APP

+ +

+EB 饤֥꤬appendix ΥᥤեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեΥ˼Ԥ +

+ + +

EB_ERR_UNEXP_CAT

+ +

+EB 饤֥꤬ҤΥեǡԤȤϰۤʤǡ +Ĥ +

+ + +

EB_ERR_UNEXP_CATAPP

+ +

+EB 饤֥꤬appendix Υեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_TEXT

+ +

+EB 饤֥꤬Ҥʸեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_FONT

+ +

+EB 饤֥꤬Ҥγեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_APP

+ +

+EB 饤֥꤬appendix Υᥤեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNBOUND_BOOK

+ +

+ƤӽФ줿 EB 饤֥δؿϡҤ˷դ줿 +EB_Book ֥ȤˤȤ뤬Ϳ줿֥Ȥ +Ҥ˷դƤʤä +

+ + +

EB_ERR_UNBOUND_APP

+ +

+ƤӽФ줿 EB 饤֥δؿϡappendix ˷դ줿 +EB_Appendix ֥ȤˤȤ뤬Ϳ줿 +֥Ȥ appendix ˷դ +ʤä +

+ + +

EB_ERR_NO_SUB

+ +

+ҤܤĤäƤʤ +

+ + +

EB_ERR_NO_APPSUB

+ +

+appendix ܤĤäƤʤ +

+ + +

EB_ERR_NO_FONT

+ +

+ܤϡäƤʤ +

+ + +

EB_ERR_NO_TEXT

+ +

+ܤϡʸǡäƤʤ +

+ + +

EB_ERR_NO_CUR_SUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Book +֥ȤȤƤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_APPSUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Appendix +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_FONT

+ +

+ƤӽФ줿ؿϡ򤵤Ƥ EB_Book +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_BINARY

+ +

+ƤӽФ줿ؿϡХʥǡɤ߹׵򥻥åȤƤ +EB_Book ֥ȤˤȤ뤬Ϳ줿֥ȤǤ +åȤƤʤä +

+ + +

EB_ERR_NO_SUCH_SUB

+ +

+EB_Book ֥ȤܥɤؿͿ줿 +EB_Book ֥Ȥ˷դƤҤϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_APPSUB

+ +

+EB_Appendix ֥ȤܥɤؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix ϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_FONT

+ +

+EB_Book ֥ȤȳνĤΥؿͿ줿 +EB_Book ֥Ȥ˷ӤĤƤҤܤϡ +ΥγäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_BMP

+ +

+EB_Book ֥Ȥʸֹ椬ؿͿ줿 +EB_Book ֥Ȥ˷դƤҤܤϡ +ֹγΥӥåȥޥåץǡäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_TEXT

+ +

+EB_Appendix ֥Ȥʸֹ椬ؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix +ܤϡֹγʸäƤʤ +

+ + +

EB_ERR_NO_SUCH_SEARCH

+ +

+ܤϡꤵ줿᥽åɤäƤʤΤǡϹԤʤ +

+ + +

EB_ERR_NO_SUCH_HOOK

+ +

+ʥեåɤؿϤ줿 +

+ + +

EB_ERR_NO_SUCH_BINARY

+ +

+ꤵ줿֤ˡꤵ줿ΥХʥǡ¸ߤʤ +

+ + +

EB_ERR_DIFF_CONTENT

+ +

+ץꥱץफƥȥǡμ׵ᤵ줿 +줿ƥȥǡμबꥯȤ줿ȤȰפƤʤ +

+ + +

EB_ERR_NO_PREV_SEARCH

+ +

+eb_hit_list() ƤӽФ줿ץꥱץ +äƸΥꥯȤʤƤʤ +

+ + +

EB_ERR_NO_SUCH_MULTI_ID

+ +

+EB_Book ֥Ȥʣ縡ɤؿϤ줿 +դ줿ҤܤϡΥɤ˰פʣ縡ä +ʤ +

+ + +

EB_ERR_NO_SUCH_ENTRY_ID

+ +

+EB_Book ֥Ȥʣ縡ȥꥳɤؿ +Ϥ줿դ줿ҤܤϡΥȥꥳɤ +פʣ縡ȥäƤʤ +

+ + +

EB_ERR_TOO_MANY_WORDS

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿θĿ¿롣 +

+ + +

EB_ERR_NO_WORD

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿줬٤ƶǤ롣 +

+ + +

EB_ERR_NO_CANDIDATES

+ +

+eb_multi_entry_candidates() ƤӽФ줿 +ꤵ줿ʣ縡ȥϡθǡäƤʤ +

+ + +

EB_ERR_END_OF_CONTENT

+ +

+eb_forward_text()eb_backward_text() +ʸƬФԤȤǤʸʤƬãƤơ +ʾ˿ʤळȤǤʤä +

+ + +

EB_ERR_NO_PREV_SEEK

+ +

+餫 eb_seek_text() ǥԤäƤʤ֤ǡ +ƥȥǡɤ߹ߤƬФԤȤ +

+ + +

EB_ERR_EBNET_UNSUPPORTED

+ +

+ EB 饤֥ϡ֥ۥȤؤΥˤбƤʤ +

+ + +

EB_ERR_EBNET_FAIL_CONNECT

+ +

+֥ۥȤؤΥߤ (EBNETD) ³Ǥʤä +

+ + +

EB_ERR_EBNET_SERVER_BUSY

+ +

+֥ۥȤؤ³ԤäҤ˥Ƥ륯饤Ȥο +Ǥ˾¤ãƤ뤿ᡢνҤѤǤʤä +

+ + +

EB_ERR_EBNET_NO_PERMISSION

+ +

+֥ۥȤؤ³ԤäνҤؤѸ¤ʤᡢ +饢ݤ줿 +

+ + +

EB_ERR_UNBOUND_BOOKLIST

+ +

+ƤӽФ줿 EB 饤֥δؿϡ֥ۥȤ˷դ줿 +EB_BookList ֥ȤˤȤ뤬Ϳ줿֥ +ϱ֥ۥȤ˷դƤʤä +

+ + +

EB_ERR_NO_SUCH_BOOK

+ +

+EB_BookList ֥ȤȽҤֹؿϤ줿 +EB_BookList ˷դ줿֥ۥȾˤϡֹ +Ҥ¸ߤʤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/error.h>
+
+
+ + +

const char *eb_error_string (EB_Error_Code error_code)

+ +

+ؿ eb_error_string() ϡ顼 error_code +ʸѴΤ֤ޤ +ʸʸɤϡASCII ˤʤޤ +ȤС顼 EB_SUCCESS Ϥʸ +"EB_SUCCESS" ֤ޤ +̤ΤΥ顼ɤϤȤϡ"EB_ERR_UNKNOWN" ֤ޤ +

+ + +

const char *eb_error_message (EB_Error_Code error_code)

+ +

+ؿ eb_error_message() ϡ顼 error_code +бåʸˤ֤ޤ +ؿ֤åϡѸ줫ܸˤʤޤ +

+ +

+ݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥʤϡ +ѸΥå֤ޤ +ΤȤΥåʸɤϡASCII ˤʤޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +ϡ˱ƤɤθΥå֤Τ +ޤޤ +ޤGNU gettext С 0.36 ʹߤǤ iconv() ϢȤ뤳Ȥˤꡢ +åʸɤ˱Ѳޤ +gettext iconv() ȤϢȤԤʤСѸΥå ASCII +ܸΥåܸ EUC ˤʤޤ +δؿθƤӽФˤäơgettext ΥƥȥɥᥤѲ +ޤ +

+ +

+̤ΤΥ顼ɤϤȤ֤åϡѸǤ +"unknown error"ܸǤ "̤ΤΥ顼Ǥ" +ˤʤޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-07.html b/lib/ebu/doc/eb-07.html new file mode 100644 index 0000000..562101f --- /dev/null +++ b/lib/ebu/doc/eb-07.html @@ -0,0 +1,550 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

+ +

+˰줿ܤǤ̡νҤˤʤäƤΤǤ⡢Żҥ֥å EPWING +Ǥ 1 CD-ROM ˤޤȤ뤳ȤǤޤ +

+ +

+ȤС CD-ROM Ҥϡ켭񡢱ѡŵɴʻŵȤ 3 + (줿ܤǸȤ) ֽҡפäƤ뤳Ȥ⤢ޤ +ʶ路򤱤뤿ˡEB 饤֥ǤϤǸֽҡפΤȤ + (subbook) ȸƤǤޤ +

+ +
+
+ãġݣңϣͽ
+
+ܣι켭ŵϡ
+ܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ +

+CD-ROM ҤǤϡ줾ܤϤ켫ΤΩҤˤʤäƤޤ +ޤܤΥǡ⡢̡Υե˼Ƥޤ +äơEB 饤֥Ǥ⡢ץꥱץμפʽ +Ǥñθʸǡμʤɤϡ٤ñ̤ǹԤ褦 +ʤäƤޤ +

+ +

+ܾϤǤϡEB 饤֥ǤܤΰˤĤޤ +

+ + + +

ܥ

+ +

+EB 饤֥Ǥϡ줾ܤФ ܥ (subbook code) +Ƥޤ +Υɤ EB 饤֥꤬ܤ̤뤿ѤޤΤǡġ +ܥɤϡƱΤʤ褦ˤʤäƤޤ +

+ +

+ʲΥɤϡeb_subbook_list() Ȥؿ +Ǥ +δؿϡΤ٤Ƥܤܥɤ뤳ȤǤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_list() ȡΤ٤Ƥܥɤ + sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+ġܤˤϡɬ̾դƤޤ +Ƭ (sub_codes[0]) ̾ϡΤ褦ˤ +뤳ȤǤޤ +

+ +
+
+char title[EB_MAX_TITLE_LENGTH + 1];
+
+if (eb_subbook_title2(&book, sub_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_subbook_title2() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_title2() θƤӽФȡ +title ̾ɽʸ󤬳Ǽޤ +

+ +

+­Ǥ(ܤǤϤʤ) CD-ROM ̾ؿϤޤ +ʤʤ顢̾򼨤ǡ CD-ROM ˤϲˤʤǤ +

+ + +

+ +

+EB_Book ֥ȤϡӤĤ줿 CD-ROM Ҥ +Ǥդܤǡ (current subbook) +Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ñθ䡢ʸǡμʤɡۤȤɤϡܤ +ФƤԤޤ +

+ +

+eb_bind() EB_Book ֥ȤҤ +դľϡܤ򤵤Ƥʤ֤ˤʤäƤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ʤ䨢ܣɴʻŵϡ
+
+
+
+ +

+ܤԤˤϡؿ eb_set_subbook() Ѥޤ +eb_set_subbook() ϡȤϤ줿ܥɤ +äܤ򤷤ޤ +ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+if (eb_set_subbook(&book, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+ȡΤ褦ܤ򤵤줿֤ˤʤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     subbook <book-path>
+ * :
+ *     subbook /cdrom
+ * :
+ *     <boook-path> ǻꤵ CD-ROM Ҥ˴ޤޤƤ뤹٤Ƥܤ
+ *     ̾ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    char title[EB_MAX_TITLE_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* Ҥ˴ޤޤƤܤ̾ϡ*/
+    for (i = 0; i < subbook_count; i++) {
+        error_code = eb_subbook_title2(&book, subbook_list[i], title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get the title, %s\n",
+                argv[0], eb_error_message(error_code));
+            continue;
+        }
+        printf("%d: %s\n", i, title);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Subbook_Code

+ +

EB_Subbook_Code ܥɤɽޤ +νҤܤϡ줾դܥɤäƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤܥͤɽ EB_SUBBOOK_INVALID Ȥ +̤ܥɤƤޤ +ѲǽܤФơܥɤƤ뤳ȤϤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_load_all_subbooks (EB_Book *book)

+ +

+ؿ eb_load_all_subbooks() ϡbook Τ٤Ƥ +ܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ˹Ԥޤ +δؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+δؿƤӽФȡbook ϡܤ򤷤Ƥʤ֤ˤʤޤ +

+ + +

EB_Error_Code eb_subbook_list (EB_Book *book, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_subbook_list() ϡbook Τ٤ܤ +ܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơҤϿƤܤθĿ subbook_count λؤ +ΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook (EB_Book *book, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_subbook() ϡbook ܤ +ܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title (EB_Book *book, char *title)

+ +

+ؿ eb_subbook_title() ϡbook ܤ +̾ title λؤΰʸȤƽ񤭹ߤޤ +̾ʸĹϡĹ EB_MAX_TITLE_LENGTH ХȤǤ +ĹϡΥʥʸޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢̾ɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡtitle λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title2 (EB_Book *book, EB_Subbook_Code subbook_code, char *title)

+ +

+eb_subbook_title() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory (EB_Book *book, char *directory)

+ +

+ؿ eb_subbook_directory() ϡbook Ǹ +ܤΥǡե᤿ǥ쥯ȥ̾directory +λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory2 (EB_Book *book, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_subbook_directory() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤΥǥ쥯ȥ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_set_subbook (EB_Book *book, EB_Subbook_Code code)

+ +

+ؿ eb_set_subbook() ϡbook +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ϽҤ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

void eb_unset_subbook (EB_Book *book)

+ +

+ؿ eb_unset_subbook() ϡbook 򤷤Ƥ +ܤ̤ξ֤ˤޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤϡ +⤷ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-08.html b/lib/ebu/doc/eb-08.html new file mode 100644 index 0000000..f8ddc4c --- /dev/null +++ b/lib/ebu/doc/eb-08.html @@ -0,0 +1,1218 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

+ +

+CD-ROM Ҥˤơ˽פʵǽǤ +EB 饤֥ǤϡΤ褦ʸ᥽åɤѤǤޤ +

+ +
    +
  • ׸ (word search) +
  • ׸ (end-word search) +
  • ׸ (exact-word search) +
  • ︡ (keyword search) +
  • (cross search) +
  • ʣ縡 (multi search) +
+ +

+٤Ƥ CD-ROM ҡ٤Ƥܤǡ˵󤲤٤Ƥ +᥽åɤѲǽʤ櫓ǤϤޤ +ܤˤϡθ᥽åɤ󶡤ʤΤ¸ߤޤ +

+ +

+EB 饤֥ǤϡԤȤǤΤϡܤФ +Ǥ +

+ +

+ξϤǤϡ줾θ᥽åɤδñȡEB 饤֥Ǥ +ˤĤޤ +

+ + + +

סס׸

+ +

+סס׸ϡĤϸ˰פ +ȥõФ᥽åɤǤ +

+ +

+׸ϡϸƬʬפ륨ȥ򸡺ޤ +ȤСֹ͡פȤϡֹ͡סֹͻסֹͤûҡפȤä +ȥ˰פޤ +

+ +

+׸ϡϸפ륨ȥ򸡺ޤ +ȤС`bye' Ȥϡ`bye'`good bye'`bye bye' Ȥä +ȥ˰פޤ +

+ +

+׸ϡĤθȴ˰פ륨ȥ򸡺ޤ +

+ +

+ʲϡ׸ΥץǤ +ܤ椫顢Ƭ librar ǻϤޤ륨ȥõ +ޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+#define MAX_HITS 50
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_search_word(&book, "librar") != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ +

+eb_search_word() ׸ꥯȤؿǤ +Ǥϡlibrar ȤʸͿƤޤ +δؿϰפȥ֤ȤϤޤ +

+ +

+פȥμϡ³ eb_hit_list() ؿ +ƤӽФݤ˹Ԥޤ +eb_hit_list() ϰפȥΰ +hits[] λؤΰ˽񤭹ߡĤäץȥθĿ + &hit_count λؤΰ˽񤭹ߤޤ +Ǥϡeb_hit_list() Ϻ MAX_HITS +(= 50) Υȥõޤ +(Ĥޤꡢ50 ĸĤä鸡ߤޤ) +

+ +

+⤷ܤѡŵȤȡʤȤ library + librarian Ȥ 2 ĤΥȥ˴ؤ +Ǥ礦 +ΤȤ hits[] ϼΤ褦ˤʤäƤޤ +(library librarian ȥ +ϡγȤϰۤʤäƤ뤫Τޤ) +

+ +
+
+
+
+
+ΣϡΣ
+
+
+ +

+hits[] ȤˤĤƤϡܾϤθǤ⤦ܤ +ޤ +

+ +

+ޤǤ׸ˤȤޤפξ +eb_search_word() eb_search_endword() +Ƥ֤褦ˤޤ +¾Ϥ٤ƱǤ +

+ +
+
+if (eb_search_endword(&book, "nalization") != EB_SUCCESS) {
+    printf("eb_search_endword() failed\n");
+    return;
+}
+
+
+ +

+פξƱͤǤ +eb_search_exactword() Ƥ֤褦ˤʳϡ٤Ʊ +Ǥ +

+ +
+
+if (eb_search_exactword(&book, "library") != EB_SUCCESS) {
+    printf("eb_search_exactword() failed\n");
+    return;
+}
+
+
+ + +

+ +

+︡ϡʣĤϸˤ٤ưפ륨ȥ򸡺ޤ +ȤСѡŵξ︡Ǥϡϸ򤹤٤ƴޤʸ򸡺 +褦ˤʤäƤ뤫Τޤ +

+ +

+ʲϡ︡ make, with Ȥ +פ륨ȥܤ椫õФץҤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+static const char *keywords[3] = {"make", "with", NULL};
+
+if (eb_search_word(&book, keywords) != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+
+
+ +

+︡Ԥؿϡeb_search_keyword() Ǥ +סס׸δؿȴŪ˰ϰǤ +ʣϸդ褦ˤʤäƤޤ +ؿˤϡϸʸ (ؤΥݥ) ˤΤϤޤ +κǸˤ NULL ֤νüɬפ +դƲ +

+ +

+סס׸Ʊͤˡeb_search_keyword() +⸡ΥꥯȤԤǡפȥμϹԤޤ +ȥμˤϡϤƱͤ eb_hit_list() ؿ +Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ + +

+ +

+ϡ︡ΰȤ٤᥽åɤǤ +EPWING Żҥ֥åߤƤ⡢ɤ롼ǻȤʬʤƤΤ +ʬʤξԤϼ¤ˤ褯Ƥޤ +

+ +

+EB 饤֥ǥԤؿ eb_search_cross() +ǤȤϾ︡δؿ eb_search_keyword() +ޤäƱǤ +Ȥξܺ٤ϡ־︡ +

+ + +

ʣ縡

+ +

+ʣ縡ϡ︡ƱʣĤϸˤ٤ưפ륨ȥ +ޤġϸˤ餫ܤդƤޤ +

+ +

+ޤססס︡Ϥ٤ơܤˤĤ +षޤ󤬡ʣ縡ϰĤܤʣμबѰ +Ƥ뤳Ȥޤ +ȤС̾ŵˤϡΤ褦˿̾ѤѽѸθ + 2 ʣ縡ѰդƤ뤫Τޤ +

+ +
+
+(ʣ縡 1: ̾򸡺)
+    ϸ 0: ϰ
+    ϸ 1: 
+    ϸ 2: 
+    ϸ 3: 
+    ϸ 4: 
+
+
+ +
+
+(ʣ縡 2: ѽѸ򸡺)
+    ϸ 0: Ѹ
+    ϸ 1: 
+    ϸ 2: 
+
+
+ +

+Τ褦ˡġʣ縡ϡϸܤǤʤϸο +ޤޤǤ +ޤݤϤ٤ƤϸɬפϤʤʤȤĤ +ϸ줬ǤʤСޤ +

+ +

+ʣ縡ϡ ʣ縡 (multi search code) +ˤäƼ̤ޤ +ؿ eb_multi_search_list() ȤȡܤѲǽ +ʣ縡ΰޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+EB_Multi_Search_Code multi_codes[EB_MAX_MULTI_SEARCHES];
+int multi_count;
+
+if (eb_multi_search_list(&book, multi_codes, &multi_count)
+    != EB_SUCCESS) {
+    printf("eb_multi_search_list() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡ɤϡʣ縡ΤδؿɬפȤʤޤ +ȤСeb_multi_title() ϡꤷʣ縡̾ +(:ֿ̾סѽѸ측) ؿǤΤȤ +ʣ縡λˤϡʣ縡ɤѤޤ +ʲǤϡƬ˺ܤäƤʣ縡 (multi_codes[0]) +ꤷƤޤ +

+ +
+
+char title[EB_MAX_MULTI_TITLE_LENGTH + 1];
+
+if (eb_multi_title(&book, multi_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_multi_title() failed\n");
+    return;
+}
+
+
+ +

+˴ؿˤäƤϡʣ縡ɤ˲äơܤϸ줫 +Ƥɬפޤ +ȤСϸܤؿ eb_multi_entry_label() +˳ޤ +0 ܤϸ (ĤޤƬϸ) ܤˤϡΤ褦 +ޤ +

+ +
+
+char label[EB_MAX_MULTI_LABEL_LENGTH + 1];
+
+if (eb_multi_entry_label(&book, multi_code[0], 0, label)
+    != EB_SUCCESS) {
+    printf("eb_multi_entry_label() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡Ԥؿϡeb_search_multi() Ǥ +ȤϾ︡ȤۤƱǡϸʸˤΤ +ȤϤκǸˤ NULL ֤Ʋ +ƤʤϸΤȤˤϡʸ֤ޤ +

+ +

+eb_search_multi() ⸡ΥꥯȤԤǡפ +ȥμϹԤޤ +ˤ eb_hit_list() Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ʤʣ縡ϸˤäƤ + (candidates) 餸ѰդƤ뤳Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +ˤĤƤϡξϤǤϤʤ֥ƥȥǡפξϤޤ +(ʣ縡θ 򻲾ȤΤ) +

+ + +

ץȥξ

+ +

+eb_hit_list() ϡꥯȤ줿 (סס +סʣ) ˰פȥξȸĤäȥ +Ŀ򡢤줾 EB_Hit ΰ褪 int +ΰ˽񤭹ߤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ˽Ҥ˷դ
+ * 졢ܤȲꤷƤޤ*/
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+EB_Hit θġǤˤϡפȥ +Ф (heading) ʸ (text) γϰ֤ +񤭹ޤƤޤ +

+ +
+
+Ф
+
+ţ¡ȣ
+
+稻ʸ
+
+
+ʣˣ
+ᡡ
+롥ʣˡ
+
+
+
+ +

+ФʸˤĤƤΤܤȼˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ +

+ + +

ĤäƤ륨ȥμ

+ +

+˽Ҥ٤褦ˡeb_hit_list() ƤӽФȤϡפ +ȥDzĤޤõΤǻꤷޤ +ޤeb_hit_list() Ͻȡºݤ˸Ĥä +ȥο򥢥ץꥱץ˶ޤ +

+ +
+
+error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+if (error_code == EB_SUCCESS)
+    printf("%d entries found\n", hit_count);
+
+
+ +

+ꤷĿ¿ΰץȥ꤬ܤ¸ߤƤϡ +eb_hit_list() 򷫤֤ƤӽФȤǡĤΥȥ +뤳ȤǤޤ +

+ +
+
+for (;;) {
+    if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+        != EB_SUCCESS) {
+        fprintf(stderr, "an error occurs.\n");
+        return;
+    }
+    if (hit_count == 0)
+        break;
+    /* ץȥν */
+}
+
+
+ +

+ץȥ꤬⤦ĤäƤʤСeb_hit_list() +&hit_count λؤΰ 0 񤭹ǡ +EB_SUCCESS ֤ޤ +

+ +

+ eb_hit_list() Ԥ +(EB_SUCCESS ʳ֤ͤ)ꥯȤ˴ؤ +ֵϿϥꥻåȤ뤿ᡢץȥμ򤽤ʾ³뤳Ȥ +Ǥޤ +

+ + +

ʣȥκ

+ +

+eb_hit_list() ѤưפȥȡȤ +¼ŪѤʤȥ꤬ʣޤޤƤ뤳Ȥޤ +EB 饤֥ϡʣȥκϹԤޤ +ɬפʤ顢ץꥱ¦ǹԤȤˤʤޤ +

+ +

+ʣ˼ʤ顢ʲΤ٤Ƥξ˰פ륨ȥ +ʣȥȤߤʤܰʹߤ˽иȥޤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸ (֤ǤϤʤʸ󤽤Τ) Ʊ +
+ +

+(ФʸμˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ) +

+ +

+ʣϡľΥȥФƤΤߵȤϸ¤ޤ +ȤСeb_hit_list() ǰץȥ꤬ 50 줿硢 +Ǹ 50 ܤ 49 ĤȽʣԤɬפޤ +äơΤǤϥȥƱΤӤ 1 + 2 + ... + 49 = 1225 +ԤȤˤʤޤ +

+ +

+ҤˤäƤϽʣȥ꤬꤭ʤǽ⤢ޤ⤦ +ñˡ⤤Ĥޤ +ñˤˡϡʣȥȽ򼡤Τ褦Ѥ +ȤǤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸΰ֤Ʊ +
+ +

+˽ñˤˤϡľ 1ĤΥȥФƤʣ +ԤȤˡ⤢ޤ +ʤ顢50 ĤΰץȥФơӤ 49 ǺѤߤޤ +ˡϡҤˤäƤϤޤä̤ޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     word <book-path> <subbook-index> <word>
+ * :
+ *     word /cdrom 0 apple
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤ椫 <word>
+ *     Ȥñ׸õҥåȤ٤ƤΥȥ
+ *     Фɽޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAX_HITS 50
+#define MAXLEN_HEADING 127
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    EB_Hit hits[MAX_HITS];
+    char heading[MAXLEN_HEADING + 1];
+    int subbook_count;
+    int subbook_index;
+    int hit_count;
+    ssize_t heading_length;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index word\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ñ측ΥꥯȤС*/
+    error_code = eb_search_exactword(&book, argv[3]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to search for the word, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[3]);
+        goto die;
+    }
+
+    for (;;) {
+        /* ĤäƤҥåȥȥ*/
+        error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get hit entries, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        if (hit_count == 0)
+            break;
+
+        for (i = 0; i < hit_count; i++) {
+            /* Фΰ֤ذư*/
+            error_code = eb_seek_text(&book, &(hits[i].heading));
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to seek the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+
+            /* Фɽ*/
+            error_code = eb_read_heading(&book, NULL, NULL, NULL,
+                MAXLEN_HEADING, heading, &heading_length);
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to read the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+            printf("%s\n", heading);
+        }
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hit

+ +

+EB_Hit ϡ˰פȥξǼ뤿 +ǡǤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hit_Struct EB_Hit;
+
+struct EB_Hit_Struct {
+    EB_Position heading;  /* Фΰ */
+    EB_Position text;     /* ʸΰ   */
+};
+
+
+ +

+ץꥱץϡľ EB_Hit ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Position

+ +

EB_Position ϡܤΥǡΰ֤ɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ڡֹ 1 ϤޤꡢڡΥեåȤ 0 2047 ϰϤ +ʤޤ +ץꥱץǡΤȤФƤ +ɬפϤޤ +

+ +

+ץꥱץϡľ EB_Position ֥ +ΥФ򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Multi_Search_Code

+ +

EB_Multi_Search_Code ʣ縡ɤɽޤ +ܤѰդƤʣ縡ϡ줾դʣ縡ɤ +äƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤʣ縡ͤɽ EB_MULTI_INVALID Ȥ +̤ܥɤƤޤ +Ѳǽʣ縡Фơʣ縡ɤƤ뤳Ȥ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

int eb_have_word_search (EB_Book *book)

+ +

int eb_have_endword_search (EB_Book *book)

+ +

int eb_have_exactword_search (EB_Book *book)

+ +

+ؿ eb_have_word_search() ϡbook +ܤ׸᥽åɤѲǽɤĴ٤ޤ +Ʊͤ eb_have_endword_search() ϸ׸᥽åɤ +Ĥơeb_have_exactword_search() ϴ׸᥽åɤ +ĤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_keyword_search (EB_Book *book)

+ +

+ؿ eb_have_keyword_search() ϡbook +ܤǾ︡᥽åɤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_multi_search (EB_Book *book)

+ +

+ؿ eb_have_multi_search() ϡbook +ܤʣ縡᥽åɤѲǽɤĴ٤ޤ +

+ +

+ 1 ǤѲǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

EB_Error_Code eb_multi_search_list (EB_Book *book, EB_Multi_Search_Code *multi_list, int *multi_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡Ĵ١ʣ縡ɤΰ +EB_Multi_Search_Code ˤơmulti_list +λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_MULTI_SEARCHES ĤǤޤ +äơʣ縡μ multi_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_count (EB_Book *book, EB_Multi_Search_Code multi_id, int *entry_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ϸ +Ŀ entry_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ񤭹ޤϸθĿϡ1 ʾ EB_MAX_MULTI_ENTRIES +ʲˤʤޤ +Ԥȡentry_count λؤΰˤ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_title (EB_Book *book, EB_Multi_Search_Code multi_id, char *title)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ̾ title +λؤΰ˽񤭹ߤޤ +ܤϺĹ EB_MAX_MULTI_TITLE_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ҤˤäƤϡʣ縡ѰդƤƤ⡢ʣ縡̾ǡä +ʤȤޤ +ξ硢EB 饤֥꤬դ̾ title +񤭹ޤޤ +

+ +

+Ҥʸɤ EB_CHARCODE_ISO8859_1 ʤ顢 +EB 饤֥꤬դ̾ϡ"Multi Search 1", "Multi Search 2", ... +ˤʤޤ +ʳʸɤǤСܸ̾ EUC ǽ񤫤줿ʣ縡 1 +ʣ縡 2... Ȥʸˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_label (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, char *label)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθܤ label λؤΰ +񤭹ߤޤ +entry_index ϡƬθ 0 ܤȿޤ +ܤϺĹ EB_MAX_MULTI_LABEL_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

int eb_multi_entry_have_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθ줬äƤ뤫ɤĴ٤ޤ +entry_index ϡƬθ 0 ܤȿޤ +

+ +

+äƤ 1 ֤ޤ +äƤʤ⤽ܤ򤵤Ƥʤ硢뤤 +multi_id, entry_index ͤä +0 ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, EB_Position *position)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθθΰ֤ position +λؤΰ˽񤭹ߤޤ +Ƭθ줬 0 ܤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpositin λؤΰˤ eb_seek_text() +ɬԤ־񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_search_word (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_endword (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_exactword (EB_Book *book, const char *input_word)

+ +

+ؿ eb_search_word() ϡbook ܤ +Ф׸ꥯȤޤ +Ʊͤ eb_search_endword() ϸ׸ +eb_search_exactword() ϴ׸ꥯȤޤ +

+ +

input_word ǻꤷޤ +δؿϸꥯȤǡפȥ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơ 1 ХȰʾ塢EB_MAX_WORD_LENGTH (= 255) +ХȰʲǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD +Ĺ 0 (ʸ) ξ EB_ERR_EMPTY_WORD ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_search_keyword (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_cross (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_multi (EB_Book *book, EB_Multi_Search_Code multi_id, const char * const input_words[])

+ +

+ؿ eb_search_keyword() ϡbook +ܤФ︡ꥯȤޤ +Ʊͤ eb_search_cross() ϥ +eb_search_multi() ʣ縡򤽤줾ꥯȤޤ +

+ +

input_words ǻꤷޤ +︡ʣ縡ϤʣĤθդޤΤǡ +ˤϤޤ +ΤȤǤˤ NULL ֤νü +ޤ +

+ +

+δؿ⸡ꥯȤǡפȥξ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơġθ EB_MAX_WORD_LENGTH (= 255) ХȰʲ +ǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD ֤ޤ +Ĺ 0 ХȤθ̵뤵ޤʤȤ 1 ĤθĹ + 1 ʾʤȤޤ +Ĺ 1 ʾθ줬 1 ĤʤȤϡEB_ERR_NO_WORD +֤ޤ +

+ +

+ NULL ǿϡ︡Ǥ EB_MAX_KEYWORDS +ʲǤ EB_MAX_CROSS_ENTRIES ʲ +ʣ縡Ǥ EB_MAX_MULTI_ENTRIES ʲǤʤƤ +ʤޤ +Ŀ¿ EB_ERRO_TOO_MANY_WORDS ֤ޤ +ʸǤ򺹤ĿǤϤʤñϤ줿ǿ¤ +ĶƤȥ顼ˤʤޤΤǡդɬפǤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_hit_list (EB_Book *book, int max_hit_count, EB_Hit *hit_list, int *hit_count)

+ +

+ؿ eb_hit_list() ϡ餫ʲΤ줫δؿ +ꥯȤ줿¹Ԥפȥޤ +

+ +
    +
  • eb_search_word() (׸) +
  • eb_search_endword() (׸) +
  • eb_search_exactword() (׸) +
  • eb_search_keyword() (︡) +
  • eb_search_cross() () +
  • eb_search_multi() (ʣ縡) +
+ +

+äơδؿƤˡ嵭Τ줫δؿθƤӽФ +ʤƤϤʤޤ +

+ +

+eb_hit_list() Ϻ max_hit_count Ĥ +ץȥ hit_list ˽񤭹ߤޤ +ơ񤭹ץȥο hit_count ؤΰ +񤭹ߤޤ +ʾθĿΰץȥ꤬¸ߤ硢Ĥäȥξϡ +δؿ򷫤֤ƤӽФȤ뤳ȤǤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡꥯȤ˴ؤֵϿ +ꥻåȤޤΤǡפȥμϷ³Ǥʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_search_word() +
  • eb_search_endword() +
  • eb_search_exactword() +
  • eb_search_keyword() +
  • eb_search_cross() +
  • eb_search_multi() +
+ +

+֤Ƥ⡢פȥξϤ hit_list +Ƭ񤭹ߡhit_count ؤΰ˽񤭹ͤ⡢β + eb_hit_list() θƤӽФǽ񤭹ץȥο +ʤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ȥפȥ꤬ʤƤ⡢˽λСؿ +EB_SUCCESS ֤ޤ +

+ +

+Ԥȡhit_count ؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +ξ硢ꥯȤƤξֵϿϥꥻåȤޤΤǡ +ʾ eb_hit_list() ƤǡĤäץȥ +뤳ȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤ˵󤲤ΥꥯȤƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_PREV_SEARCH ֤ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-09.html b/lib/ebu/doc/eb-09.html new file mode 100644 index 0000000..9fe39b7 --- /dev/null +++ b/lib/ebu/doc/eb-09.html @@ -0,0 +1,3001 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

ƥȥǡ

+ +

+ƥȥǡμϡ¤ֽפʵǽǤ +

+ +

ƥȥǡ (text data) ϡ +ʸ (text body) Ȥ̣ǤϤޤ +CD-ROM ҤˤϳΤʸ¸ߤޤʸƱǡѤ +񤫤줿ǡढޤ +ܽǤϡΥǡޤȤƥƥȥǡȸƤǤޤ +EB 饤֥꤬ƥȥǡμˤϡΤΤޤ +

+ +
    +
  • Ф +
  • ʸ +
  • ˥塼 +
  • ɽ +
  • ʣ縡ϸθ +
+ +

+ܾϤǤϡΥƥȥǡμȲùˡˤĤޤ +

+ + + +

ƥȥǡΥɤ߹

+ +

+UNIX ǥץȤиΤˤϡե뤫ǡɤ߹ +ݤѤ lseek(), read() Ȥƥॳ +¸¿Ǥ礦 +

+ +

+EB 饤֥Ǥ⡢ƥȥǡμˤϡ (seek) +ɤ߹ (read) Ȥ 2 ĤǹԤޤ +EB 饤֥Ǥϥեݥ󥿤ǥץϤʤ +EB_Book ֥Ȥ̤ƥɤ߹ߤԤޤ +

+ +

+ޤ˻ꤹ֤ off_t ǤϤʤ +EB_Position ([] ǡξܺ١ 򻲾ȤΤ) +Υ֥ȤѤޤ +ȤСʸƬ֤ϡeb_text() ȤؿȤä +Τ褦˼ǤޤΤȤ֥ǡ EB_Position +֥Ȥ˽񤭹ޤޤ +

+ +
+
+EB_Position position;
+
+/* ؿνȡposition ʸγϰ֤
+ * 񤭹ޤޤ */
+if (eb_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ͤޤǤˡEB_Position ¤ϡΤ褦ˤʤäƤޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ƸĤäץȥθФʸɤ߹ݤˤ⡢־ +λˤ EB_Position Ȥޤ +פȥξϡؿ eb_hit_list() ˤä +EB_Hit ȤΥ֥Ȥ˽񤭹ޤޤ +EB_Hit ϼΤ褦Ƥޤ +(ܤ [] ǡξܺ١ 򻲾ȤΤȡ) +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ĤޤꡢΤȤθФʸΰ֤⡢EB_Position +ɽƤΤǤ +

+ +

+ǤϡºݤΥץˤơɤ߹ߤԤäƤߤޤ +ޤϡǤ +ˤϴؿ eb_seek_text() Ѥޤ +ǤϤꡢ֤ EB_Position Ϥޤ +

+ +
+
+if (eb_seek_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ǡμ (Фʸ ...) ˤ餺ƥȥǡΥ +٤ eb_seek_text() ǹԤޤ +

+ +

+EB_Book ֥Ȥϡƥȥǡμ̤ +ɤ߹֤߰ФƤ櫓ǤϤʤΥƥȥǡǶͭ +־ijФƤǤ +ȤСʸɤ߹ǡ̤ΰ֤˥ƸФɤ߹ȡ +EB_Book ʸɤ߹֤߰ΤȤ˺Ƥޤޤ +

+ +

+ơä顢ǡɤ߹ߤޤ +ɤ߹⤦ȤƥȥǡμˤäơѤؿۤʤޤ +Ф eb_read_heading() ȤޤʳǤ +eb_read_text() Ȥޤ +

+ +

+ʲϡeb_read_text() λǤ +

+ +
+
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

text ˤϥƥȥǡ +text_length ˤϼºݤɤ߹Хȿ񤭹ޤޤ +ƥȤϺ MAX_LENGTH ХȽ񤭹ޤޤ +ƥȥǡϤ˥ʥʸǽüޤΤǡbuffer ˤ +⤦ 1 Хʬΰ褬ɬפˤʤޤ +

+ +

+eb_read_heading() θƤӽФ⡢eb_read_text() +ȤޤäѤޤ +

+ +
+
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() eb_read_heading() ɤ߹ +ƥȥǡʿʸΥƥȤˤʤäƤơʥʸǽüƤޤ +

+ +
+
+printf("%s\n", text);   /* ϤƤߤ */
+
+
+ +

+ɤ߹ߤƥȥǡĹơeb_read_text() +뤤 eb_read_heading() ƤӽФǤ +ɤ߹ʤäϡٸƤӽФȤ³Υǡɤ߹ळȤ +Ǥޤ +

+ + +

ƥȥǡ

+ +

+Ǥϡɤ߹ƥȥǡϡʿʸƥȤˤʤäƤޤ +ɤ⡢CD-ROM ʿʸƥȤΥǡΤޤ޼ϿƤ +櫓ǤϤޤ +

+ +

+ºݤΥƥȥǡ򡢰ʲ˼ޤ +¦Υ֥å 16 ʿǥפͻҤǡ¦Ϥ JIS X 0208 +(ܸΤʴ) ʸɽƤʬ [] Ȥ +ľΤǤ +

+ +
+
+     (16ʿˤ)            (ǽʬ򤫤ʴѴ)
+1f0900011f41010026321f611f042121   1f0900011f410100[]1f611f04[]
+212721211f053e704a734a541f0a1f04   [][]1f05[][][]1f0a1f04
+214e1f0525372530255e1f04214f2121   []1f05[][][]1f04[][]
+214a237323692367236d236121212370   [][][][][][][][]
+2372236f236a236523632374214b1f05   [][][][][][][]1f05
+
+
+ +

+¦Υ֥å򸫤ȡ褽ʿʸ˶ᤤǥƥȥǡ +뤳ȤʬޤȤɤˡʸפǤϤʤǡޤޤ +ޤ +

+ +

+ʸǤϤʤʬϡ٤ơ֥ץ󥹡פȸƤФΤǤ +ץ󥹤ȤϡƥȥǡϤݤˡԤζػߤ +ĴȤä뤿λȤߤǤ +16 ʿ 1f ץ󥹤γϤ̣ޤ +

+ +

+ͤޤǤˡΥƥȥǡǻȤƤ륨ץ󥹤 +٤󤹤ȡΤ褦ˤʤޤ +

+ +
+
1f09 0001
+
+ (ǥ) ̤ꡣ +( 0001 ʤΤǡ̤ 1) +
1f41 0100
+
+γϡ +( 0100 ΰ̣ˤĤƤϡJIS X 4081 ˵Ҥʤ) +
1f61
+
+νλ +
1f04
+
+Ⱦɽγϡ +
1f05
+
+Ⱦɽνλ +
1f0a
+
+ +
+ +

+Υץǡɤ߹ǡʿʸƥȤˤʤäƤΤϡ +¤ EB 饤֥꤬ù򤷤Ǥ +ĤޤꡢֲԡפΤ褦ʿʸƥȤǤɽǽʥץ +ˤĤƤϽָγϡפΤ褦ɽǤʤΤˤĤƤ +̵뤹褦ˤơʿʸƥȤˤʤ褦˲ùƤΤǤ +

+ +

+ʿʸƥȤɽϤ˳ΤǡΥǡˤϴޤޤƤ +ץ󥹤¿̵뤹뤳ȤˤʤäƤޤޤ +HTML Τ褦ˡäɽϤΤǽϤʤ顢̵뤻˺Ѥ +󥹤䤻Ǥ +ǤϡHTML ǥƥȥǡؿ EB 饤֥Ѱդ +뤫Ȥȡǰʤ餢ޤ +

+ +

+ˡʤ֤Ϥޤͳ˥ƥȥǡùǤ +λȤߤѰդƤޤ +줬 եå (hook) Ǥ +եåȤȤǡƥȥǡ˲ù뤳ȤǤޤ +

+ + +

եå

+ +

+ä˲ꤷʤСeb_read_text(), +eb_read_heading() ֤ƥȥǡβùϡ餫 +줿̤ˡǹԤޤ +ȤСֲԡפΥץ󥹤ФƤϡ\n +񤭹褦ˤʤäƤޤ +

+ +

+եå (hook) ȤȡùˡѤ뤳ȤǤޤ +եåϡ餫줿եå֤ФơեåؿϿ +뤳Ȥͭˤʤޤ +եåؿϿƤȡeb_read_text() +eb_read_heading() ϡ餫ޤäǥǡ +񤭹ˡեåؿƤӽФޤ +ƤӽФ줿եåؿǡν񤭹߽ԤȤǡ +eb_read_text() eb_read_heading() ֤ +ƥȥǡѲȤ櫓Ǥ +

+ +

+EB 饤֥ˤϡ¿Υեå֤ѰդƤޤ +ƥץ󥹤ˤϡ줾Ѥ˥եåѰդƤꡢ +ʳˤʸΤΥեå¸ߤޤ +(ɤΤ褦ʥեå֤뤫ܤ +֥եåɤΰ 򻲾ȤΤȡ) +

+ +

+줾Υեå֤ϡեå (hook code) +ƤФ륳ͤǼ̤ޤ +ȤСҤΡֲԡפΥץ󥹤бեå + EB_HOOK_NEWLINE ˤʤޤ +

+ +

+ץꥱץबեå򰷤ˤϡեåνǤ +եåå (hook set) Ѱդޤ +ϡEB 饤֥Ѳǽʤ٤ƤΥեå֤Фơɤ +եåؿȤΤϿ뤿Υ֥ȤǤ +

+ +

+ǤϡºݤˤɤäƥեååȤ򰷤ΤƤޤ礦 +եååȤ EB_Hookset Υ֥ȤɽޤΤǡ +ޤ EB_Hookset ֥ȤѰդޤ +

+ +
+
+EB_Hookset hookset;
+
+
+ +

+EB_Hookset ֥ȤϡEB_Book ֥ +Ʊͤˡɬɬפޤ +

+ +
+
+eb_initialize_hookset(&hookset);
+
+
+ +

+ºݤΥեåؿϡΤ褦ʤΤˤʤޤ +Ǥϡեåؿ eb_write_text_string() Ȥ +ؿƤӽФơ<br> Ȥʸƥȥǡ +Ȥƽ񤭹Ǥޤ +

+ +
+
+EB_Error_Code
+hook_newline(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv) {
+    eb_write_text_string(book, "<br>");
+    return 0;
+}
+
+
+ +

+ؿ eb_set_hook() Ѥ뤳ȤǡΥեåؿ +եååȤϿ뤳ȤǤޤ +ޤ EB_Hook ȤΥ֥Ȥˤä +եåɤȥեåؿꤷ eb_set_hook() +ϤƤɬפޤ +Ǥϡֲԡפɽץ󥹤Фơ嵭Υեåؿ +ϿƤߤޤ +

+ +
+
+EB_Hook hook;
+
+hook.code = EB_HOOK_NEWLINE;   # եåɤ򥻥å
+hook.function = hook_newline;  # եåؿ򥻥å
+eb_set_hook(&hookset, &hook);
+
+
+ +

+ʤƱեå (եå) ʣեåؿϿƤ⡢ +ͭˤʤΤϺǸϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ؿ eb_set_hooks()s դ) ȤС +ʣΥեåؿ٤ϿǤޤ +

+ +
+
+static const EB_Hook hooks[] = {
+    {EB_HOOK_NEWLINE,        hook_newline},
+    {EB_HOOK_SET_INDENT,     hook_set_indent},
+    {EB_HOOK_WIDE_JISX0208,  hook_set_jisx0208},
+    {EB_HOOK_NULL,           NULL}
+};
+
+eb_set_hooks(&hookset, &hooks);
+
+
+ +

+뤿ˡEB_HOOK_NULL Ȥü +եåɤ֤ޤ +դƲ +

+ +

+ƥեåؿϿեååȤeb_raed_text(), +eb_raed_heading() ؤΰȤϤޤ +ޤǤǤϡNULL ϤƤޤ +&hookset ϤƤߤޤ +

+ +
+
+if (eb_read_text(&book, NULL, &hookset, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ˤäơƥȥǡ˲Ԥɽץ󥹤ȡ +\n <br> Ȥʸ +񤭹ޤ褦ˤʤޤ +

+ +

+EB_Hookset ֥ȤȤä顢 +eb_finalize_hookset() ƤǸ򤷤ޤ +

+ +
+
+eb_finalize_hookset(&hookset);
+
+
+ + +

եåʸɤδط

+ +

+Ǥϡץ󥹤ФեåˤȤޤ¾ +ˤ⡢EB 饤֥ˤʸФեåѰդƤޤ +

+ +
+
EB_HOOK_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ʸؤΥեåʸޤ +ȤơISO 8859-1 ʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_JISX0208
+
+ȾѤ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_JISX0208
+
+Ѥ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_GB2312
+
+GB 2312 (δλ) ʸؤΥեå +Ȥơ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ +
+ +

+⡢ʸƥȥǡ˸٤ˡեåؿƤӽФ +ޤ +

+ +

+εҤ򸫤Ƥʬ褦ˡեåؿϤʸֹϡҤʸ +ɤ˱ơISO 8859-1, ܸ EUC EUC Τ줫ʸ +ɽ줿Τˤʤޤ +

+ +

+եåؿϿʤСʸֹ椬ƥȥǡȤƤΤޤ +񤭹ޤޤ +

+ +

+⤷ץꥱץबEB 饤֥ɤȤϰۤʤ +ʸɤѤϡΥեåΥեåؿϿơ +Ѵ򤹤ΤǤ +ʸ˥եåؿƤӽФΤǡ٤ޤ +

+ +

+ޤEBXA-C 򰷤ˤϡ̤ʽɬפǤ +EBXA-C ǤϡʸɤȤ GB 2312 JIS X 0208 Ȥޤ +(ʸɡ 򻲾ȤΤ)EB 饤֥ˤɸν +Ǥϡɤ 0xa1a1 0xfefe ˥ޥåԥ󥰤ƾͤ뤿ᡢ +Ǥɤ餫եåʸɽˡѤʤȡ +Ǥޤ +

+ + +

θ

+ +

ָ ξϤǽҤ٤褦ˡCD-ROM +ˤ׸׸Ȥäʣθ᥽åɤޤ +EB 饤֥ǸԤȡɤθ᥽åɤǤ⡢פȥ +ϡʲΤ褦 EB_Hit Υ֥ȤȤ +ޤ +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ǤϡEB_Hit θФʸΰ֤ +ޤäƱˤʤޤ +äơФʸΥƥȥǡɤ߹ˤϡ¾θ᥽å +Τ褦ˤ줾ΰ֤˥ɤ߹ȤǤϤޤ +ޤ +

+ +

+ʲˡθФʸɤ߹ץ򼨤ޤ +

+ +
+
+/* Ф֤ؤΥԤ */
+if (eb_seek_text(&book, &hits[0].heading) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* Фɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    heading, &heading_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ۤɤ߹ФΡʬ */
+if (eb_forward_heading(&book) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ʸɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+Ǥ⡢ФƤɤ߹ˡ¾θ᥽åɤѤ +Ϥʤeb_read_heading() Ȥޤ +ѤäƤΤϡʸɤ߹ߤǤ +eb_read_text() ǤϤʤeb_read_heading() +Ȥޤ +Фɤ߹िδؿ eb_read_heading() ʸ +ɤ߹ि˸Ƥ֤ȤΤϴ̯äǤϥʸ +ФƱˤʤäƤ뤿Ǥ +̾Фϰ٤񤫤Ƥޤ󤬡ºݤΤȤ +ʸ٤ޤ +

+ +

+ޤʸϸФΤ˽񤫤Ƥ뤿ᡢ嵭Τ褦˸Ф +ɤ߹ eb_forward_heading() ȤؿƤӡ +θʸɤ߹िˤ⤦ eb_read_heading() +Ƥ֤ȤѤäƧߤޤ +

+ +

+ʸɬפǸФפʤСľ +eb_forward_heading() Ƥ֤褦ˤޤ +θ eb_read_heading() Ƥ֤ȡʸɤ߹ߤޤ +

+ + +

ɽ

+ +

+˵褦ˡƥȥǡˤϲफꡢ +ɽ (copyright notice) ȤΤޤ +̤̾ꡢɽ˴ؤƥȥǡ᤿ΤǤ +

+ +

+̤ˡɽʸȤϤޤäΩǡȤѰդޤ +äơʸƬޤɤǤߤƤ⡢ɽϤɤˤ +Ĥޤ +

+ +

+ܤˤĤơɽγϰ֤Τˤ +eb_copyright() Ȥޤ +δؿϡܤɽäƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡɽ̵ͭ +Ʊʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_copyright() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_copyright(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ɽϤʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

˥塼

+ +

+ʸȤΩƥȥǡȤƤϡɽ¾ +˥塼 (menu) ȤΤޤ +˥塼ϡʸȤʤǡϿƤޤ +ɽŪʤΤǤϡ ()ספȤäΤ󤲤ޤ +

+ +

+˥塼Ǥϡ̹ܻȡפȤץ󥹤¿ѤơŪ +ʹ¤ˤʤäƤΤŪǤ +Υץ󥹤ˤϡΥƥȤΰ֤ϿƤޤ +

+ +

+ȤС CD-ROM ҤΥ˥塼Τ褦ˤʤäƤȤޤ +Ǥϡ˥塼ˤ 3 Ĥιܤޤ +

+ +
+
+ * ʸ
+ * ɽˤĤ
+ * 
+
+
+ +

+˥塼Τ줾ιܤˤϡ褬ޤ +ƥȥǡɽǤϡֽʸסɽˤĤơסֱաפ +줾ʸ̹ܻȳϤӽλץ󥹤 +դˤʤäƤޤ +Ūʬ褦˵ȡΤ褦ʷˤʤäƤޤ +

+ +
+
+ * <̹ܻȳϥ> "ʸ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "ɽ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "" <̹ܻȽλ>
+
+
+ +

+HTML νΤäƤʤ顢a ȸʬΤǤ +ʤȻפޤ +

+ +
+
+<a href="./index.html">EB 饤֥Υۡڡ</a>
+
+
+ +

+ΰ־Ͻλ¦˵ܤޤΤǡ +HTML Ȥϵդˤʤޤ +­Ǥֻ̰Ȥϥ˥塼ǤʤʸǤŪ˻Ѥޤ +

+ +

+̹ܻȳϤӽλ󥹤Фơ줾եå +EB_HOOK_BEGIN_REFERENCE EB_HOOK_END_REFERENCE +ѰդƤޤ +ΰ־ϡλ󥹤ؤΥեåؿФơȤ +Ϥޤ +ȤСEB_HOOK_END_REFERENCE ؤΥեåؿƬǤϡ +Τ褦ˤɤΤޤ +

+ +
+
+EB_Error_Code
+hook_end_ref(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv)
+{
+    EB_Position position;
+
+    position.page = argv[1];    # Υڡֹ
+    position.offset = argv[2];  # Υեå
+
+
+ +

+ϡ˥塼 2 ؤȤʤޤ +νҤΡֱաפλéä顢Τ褦ɽˤʤäƤޤ +

+ +
+
+ƲǼ 켭ŵ  2  (EPWING )
+ 1  ȯ 1988ǯ 2
+ 2  ȯ 1999ǯ 11
+ 2  (EPWING ) ȯ 2000ǯ 2
+
+
+ +

+ƱͤˡֽʸסɽդơפλˤĤƤ⡢ʸϥǡ +ѰդƤޤ +޼ȡ˥塼γؤϼΤ褦ˤʤޤ +

+ +
+
+
+裱ء˥塼
+
+
+
+
+
+裲ء˥塼˥塼˥塼
+
+
+
+ +

+μǤϡ˥塼ϤǽˤʤäƤޤҤˤäƤ + 3 ء 4 ؤ³⤢ޤ +ޤ˥塼ΤѰγؿˤʤäƤȤϸ¤ޤ +˥塼λ褬ʸɽˤʤäƤ뤳Ȥ⤢ޤ +

+ +

+ܤˤĤơ( 1 ؤ) ˥塼γϰ Τˤ +eb_menu() Ȥޤ +δؿϡܤ˥塼äƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡ˥塼̵ͭƱ +ʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_menu() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_menu(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ˥塼Ϥʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

ʣ縡θ

+ +

+ʣ縡(ʣ縡 򻲾ȤΤ) ΤȤǽҤ٤褦ˡ +ʣ縡Ǥϡϸ (candidates) ѰդƤ +Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +

+ +

+ȤС̾򸡺ΤˡΤ褦ʣ縡äȤޤ +

+ +
+
+ϸ 0: ϰ
+ϸ 1: 
+ϸ 2: 
+ϸ 3: 
+ϸ 4: 
+
+
+ +

+Τϸ 3 Ρ̡פˤϡϸȤͭʸϡˡפȡֽ + 2 ĤʤǤ礦 +Τ褦ˡϸȤͭʸ줬¤ƤˡѰ +Ƥ뤳Ȥޤ +

+ +

+ϸΤΥǡǤϤޤ¤ϥƥȥǡ +ΤΤǤ +桼ФƸ󵭤ƥȤ򼨤ΰĤ +Ƥ餦褦ˤʤäƤޤ +

+ +

+⡢Υǡ¤ϥ˥塼˻Ƥꡢ˥塼 +褦ʳع¤äƤޤ +(֥˥塼 򻲾ȤΤ) +ȤСʣ縡ϸ 2 ֹϰפˤΰߤ +顢ǽγؤϼΤ褦ˤʤ뤫Τޤ +

+ +
+
+*  ()
+* ܰʳΥ (ܺ)
+* 衼å (ܺ)
+* ̥ꥫ (ܺ)
+* ¾ (ܺ)
+
+
+ +

+ܡפ֤ȡϸ줬ꤵ줿Ȥˤʤޤ +ʳιܤˤĤƤϤ˺٤ʬव줿褬Ѱդ +ޤ +Ǥϡ̥ꥫפǤߤޤ礦 +ȡ˼Τ褦ʸΥǡ󼨤ޤ +

+ +
+
+* ꥫ ()
+* ʥ ()
+
+
+ +

+ǡ֥ꥫס֥ʥפ֤ȡϸ줬ꤵޤ +

+ +

+˼ºݤˡEB 饤֥ȤäƤ򰷤ˡˤĤ +ޤ +ޤץꥱץϡʣ縡ϸ줬ä +뤫ɤ򡢳ǧɬפǤ礦 +eb_multi_entry_candidates() Ȥȡǡγϰ +뤳ȤǤޤ +δؿϡäƤʤ EB_ERR_NO_CANDIDATES +֤ޤΤǡ̵ͭʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_multi_entry_have_candidates() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+/* mulit_id, entry_id ǡɤʣ縡
+ * ܤϸˤĤƳǧΤꤷޤ*/
+err = eb_multi_entry_candidates(&book, multi_id, entry_id, &position);
+if (err == EB_ERR_NO_CANDIDATES) {
+    /* ϸˤϡѰդƤʤ */
+   return;
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +ɤ߹ƥȤǤϡȤʤΤ줾줬䳫ϤȽλɽ +ץ󥹤˶ޤ줿ˤʤäƤޤ +

+ +
+
+* <䳫ϥ> "" <佪λ>
+* <䳫ϥ> "ܰʳΥ" <佪λ>
+* <䳫ϥ> "衼å" <佪λ>
+* <䳫ϥ> "̥ꥫ" <佪λ>
+* <䳫ϥ> "¾" <佪λ>
+
+
+ +

+䳫ϥ󥹤ФƤϡեåȤ +EB_HOOK_BEGIN_CANDIDATE ѰդƤޤ +λ󥹤Фեå 2 ढäơ˼γؤ³ +˸ƤФ EB_HOOK_END_CANDIDATE_GROUP ȡθ줬Τޤ +ϸθȤʤ˸ƤФ EB_HOOK_END_GROUP_LEAF +ʬƤޤ +

+ +

+γؤΥǡγϰ֤ϡλ󥹤ΥեåؿˡȤ +ϤäƤޤ +(˥塼ƱͤʤΤǡ˥塼β򻲹ͤˤƲ) +

+ +

+λ󥹤ФեåؿǤϡeb_current_candidate() +ȤؿȤޤ +δؿϡϥ󥹤Ƚλ󥹤δ֤˶ޤ줿ָפʸ +(ݥ) ֤ޤ +

+ +
+
+const char *candidate;
+
+candidate = eb_current_candidate(book);
+
+
+ + +

ڤꥳɤ

+ +

+ʸϡƬޤǰܤηҤäǡˤʤäƤޤ +Ѹ켭ŵʤ顢ǽñ `A' Ǹ `zzz' ޤǤ٤ưĤ +ʸפ˽񤫤뤳Ȥˤʤޤ +

+ +

+̤ˡץꥱץबñ򸡺ݤϡʸ椫 +ñʬȴФƽϤ뤳ȤˤʤǤ礦 +ȤС`dictionary' Ȥñ硢Τ褦ʸϤϤ +Ԥޤ +μ䡢μñޤDZ䡹ɽ뤳Ȥ򡢤餯Ⱦ +桼˾ޤʤȦǤ +

+ +
+
+dictionary [̾] (ʣ: dictionaries)
+ŵŵ
+[] lexicon, glossary (Ѹ켭ŵ), encyclopedia (ɴʻŵ)
+
+
+ +

+äȤ CD-ROM Ҥˤϡñν򼨤 +(ץ) Ƥޤ +ĤޤꡢʬΤȴФȤϡŻҥ֥å EPWING Ǥ +ԲǽʤΤǤ +

+ +

+ʤ顢ˤΤνҤ¿ˤϡñνλ֤ˤ +и롢ͭΥץ󥹤¸ߤޤ +󡢤Υץ󥹤ñνλפ򼨤 +ǤϤʤ̤ӤȤѤΤǤֽλ֡פȤѤǤ +Ȥ̣Ǥ +

+ +

+EB 饤֥ǤϡΡֽλ֡פΰ˻Ȥ륨ץ󥹤 +Ȥڤꥳ (stop code) ȸƤǤޤ +EB 饤֥϶ڤꥳɤưȽꤹ뵡ǽäƤޤȽ +ǤϤʤΤdz뤳Ȥ⤢ޤ +ʸڤ줿ꡢʸ³䡹ȽϤ줿ꤷޤ +

+ +

+ξϡŪ appendix +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +Ƕڤꥳɤꤹ뤳ȤˤäƲǤҤ⤢ޤ +ǰʤڤꥳɤޤä¸ߤʤҤ⾯ʤ¸ߤޤ +ڤꥳɤʤҤФơͭнˡϺΤȤޤ +

+ +

+eb_read_text() ˤʸμǤϡڤꥳɤФ줿 +ɤ߹ߤߤޤ +˷֤ eb_read_text() ƤǤ⡢ڤꥳɤ +ʸɤ߹ޤ +

+ +

+ڤꥳɤ򸡽ФɤȽˤϡeb_is_text_stopped() +Ȥޤ +δؿϡǸɤ߹ߤԤäƥȥǡˡڤꥳɤ +ФƤ 1 ֤ޤ +

+ +

+ʸʳΥƥȥǡˤڤꥳɤγǰ¸ߤޤΤǡ +eb_is_text_stopped() Ȥäƶڤꥳɤ򸡽ФǤޤ +ʸʳǤ EB 饤֥꤬μ¤˶ڤȽ̤ǤޤΤǡ +Ƚϵޤ +

+ +

+Фˤڤϡ줾ñθФνλ֤Ȥʤޤ +˥塼ʣ縡θǤϡز줿ġΥ˥塼ǡ +νλ֤ǶڤȽꤵޤ +(Ʊ쳬ؤʣĤΥ˥塼ǡäƤ⡢ġΥ˥塼ǡ +ڤޤ) +ɽǤϡʸνλ֤ǶڤȽꤵޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     text <book-path> <subbook-index> <number>
+ * :
+ *     text /cdrom 0 10
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡʸ
+ *     Ƭ <number> ʬñϤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAXLEN_TEXT 1023
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    EB_Position text_position;
+    char text[MAXLEN_TEXT + 1];
+    ssize_t text_length;
+    int text_count;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index number\n",
+            argv[0]);
+        exit(1);
+    }
+    text_count = atoi(argv[3]);
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤγϰ֤*/
+    error_code = eb_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get text information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤ򥷡*/
+    error_code = eb_seek_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to seek text, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = 0;
+    while (i < text_count) {
+        /* ƥȤ*/
+        error_code = eb_read_text(&book, NULL, NULL, NULL, MAXLEN_TEXT,
+            text, &text_length);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        fputs(text, stdout);
+
+        if (!eb_is_text_stopped(&book))
+            continue;
+
+        fputs("\n----------------------------------------\n", stdout);
+
+        /* ñذư*/
+        error_code = eb_forward_text(&book, NULL);
+        if (error_code == EB_ERR_END_OF_CONTENT)
+            fputs("\n[END]\n", stdout);
+        else if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        i++;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hook_Code

+ +

EB_Hook_Hook ϡեå֥ɤɽޤ +

+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_HOOKS ĤΥեå +Ƥޤ +Ƥ֥ɤΰˤĤƤϡ + (֥եåɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

EB_Hook

+ +

EB_Hook ϡեåɤȤбեåؿ +Ȥɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hook_Struct EB_Hook;
+
+struct EB_Hook_Struct {
+    EB_Hook_Code code;
+    EB_Error_Code (*FUNC)(EB_Book *, EB_Appendix *, void *,
+        EB_Hook_Code, int, const unsigned int *);
+};
+
+
+ +

+ץꥱץϡľ EB_Hook ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Hookset

+ +

EB_Hookset ϡեå켰ɽޤ +EB 饤֥Ѳǽʤ٤ƤΥեå֤ФơɤΤ褦 +եåؿꤹΤϿ뤿ηǤ +

+ +

+EB_Hookiset ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Hookset ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Hookset ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_hookset() ƤǽʤƤ +ʤޤ +

+ + +

եåؿξܺ

+ +

+ǤϡեåؿλͤˤĤƵޤ +

+ +

+ޤեåؿƤӽФ eb_read_text() +eb_read_heading() ΥץȥפϼΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+eb_read_text(EB_Book *book, EB_Appendix *appendix,
+    EB_Hookset *hookset, void *container, size_t text_max_length,
+    char *text, ssize_t *text_length)
+
+
+ +

+եåؿΥץȥפϡΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+hook_function(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv);
+
+
+ +

+ book, appendix, container ϡ +eb_read_text()eb_read_heading() +Ϥ줿ͤΤޤޥեåؿˤϤäƤޤ +

+ +

+appendix ȤΤϡҤФǡ󶡤륪֥ +Ǥ +(appendix (Ͽ) ˤĤƾܤ +ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) + +

+ container ϡץꥱץफեåؿ +ǡϤȤ˻Ȥޤ +

+ +

argc argv ˤϡùΥƥȥǡ +Ϥޤ +ʸФեåǤϡʸֹ椬ϤäƤޤ +ץ󥹤ФեåǤϡΥ󥹼ΤΥ +(1f ǻϤޤ륳) ȡ⤷Хץ󥹤ؤ +ϤäƤޤ +ġΥեåˤơargc argv ˤɤ褦ͤ +ϤäƤΤܤ ֥եåɤΰ 򻲾ȤΤȡ +

+ +

+եåؿ椫鼡˵󤲤ؿƤӽФȤǡƥȥǡؤ +񤭹ߤԤȤǤޤ +

+ +
    +
  • eb_write_text() +
  • eb_write_text_string() +
  • eb_write_text_byte1() +
  • eb_write_text_byte2() +
+ +

+δؿλͤ˴ؤƾܤ +[ƥȥǡ] ؿξܺ١ 򻲾ȤΤȡ +

+ +

+եåؿ EB_SUCCESS ʳ֤ͤȡեåؿ +ƤӽФ eb_read_text(), eb_read_heading() +ϥ顼ȯΤȸʤΥ顼ɤ򤽤Τޤ +ץꥱץ֤ޤ +

+ +

+եåؿǤϡbook ФưʲδؿƤӽФƤ +ޤ +ƤӽФȤưϡ̤Ǥ +

+ +
    +
  • eb_seek_text() +
  • eb_read_text() +
  • eb_read_heading() +
  • eb_read_rawtext() +
  • eb_forward_text() +
  • eb_backward_text() +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbook() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_finalize_library() +
+ + +

եåɤΰ

+ +

+ƤեåɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/text.h>
+
+
+ + +

EB_HOOK_NULL

+ +

+EB_HOOK_NULL ϸ̩ˤϥեåǤϤʤ +eb_set_hooks() ʣΥեåؿϿݤˡ +EB_Hook Ǥ򼨤Ѥޤ +ΥեåɤФơեåؿϿǤޤ +

+ +

+ܤϡ[ƥȥǡ] եåؿξܺ١ 򻲾ȤΤȡ +

+ + +

EB_HOOK_INITIALIZE

+ +

+EB_HOOK_INITIALIZE ϡeb_seek_text() +ƤӽФľκǽ eb_read_text(), +eb_read_heading() θƤӽФ˽ޤ +򤷤ȤˡȤɤǤ礦 +

+ +

+ΥեåեåؿϤ argc 0 Ǥ +եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NARROW

+ +

EB_HOOK_END_NARROW

+ +

+EB_HOOK_BEGIN_NARROW EB_HOOK_END_NARROW +ϡȾɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NARROW ʤ 0x1f04 +EB_HOOK_END_NARROW ʤ 0x1f05 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_SUBSCRIPT

+ +

EB_HOOK_END_SUBSCRIPT

+ +

+EB_HOOK_BEGIN_SUBSCRIPT +EB_HOOK_END_SUBSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ͤϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUBSCRIPT ʤ 0x1f06 +EB_HOOK_END_SUBSCRIPT ʤ 0x1f07 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ +񤭹ߤޤ +

+ + +

EB_HOOK_SET_INDENT

+ +

+EB_HOOK_SET_INDENT ϡƥȥǡιƬλ +ɽץ󥹤ФեåǤ +

+ +

+ΥեåեåؿϤ argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f09 ˤʤޤ +argv[1] ̤ɽޤ +

+ +

+̤ñ̤ǤΤǤ +ޤ̤κǾͤϡ0 ξ 1 ξ̤꤬ޤ +ˤ 1 긺äꤷޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NEWLINE

+ +

+EB_HOOK_SET_NEWLINE ϡԤɽץ󥹤 +ФեåǤ +

+ +

+eb_read_heading() (Фɤ߹) ˤǤϡ +Ԥɽץ󥹤϶ڤꥳɤȤƤⰷޤ +Τᡢץ󥹤ĤäƤ⤳ΥեåνϹԤ줺 +ɤ߹߽Ͻλޤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f0a ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_newline() ưŪϿޤ +

+ + +

EB_HOOK_BEGIN_SUPERSCRIPT

+ +

EB_HOOK_END_SUPERSCRIPT

+ +

+EB_HOOK_BEGIN_SUPERSCRIPT +EB_HOOK_END_SUPERSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUPERSCRIPT ʤ 0x1f0e +EB_HOOK_END_SUPERSCRIPT ʤ 0x1f0f ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NO_NEWLINE

+ +

EB_HOOK_END_NO_NEWLINE

+ +

+EB_HOOK_BEGIN_NO_NEWLINE +EB_HOOK_END_NO_NEWLINE ϡԶػߤγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NO_NEWLINE ʤ 0x1f10 +EB_HOOK_END_NO_NEWLINE ʤ 0x1f11 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_EMPHASIS

+ +

EB_HOOK_END_EMPHASIS

+ +

+EB_HOOK_BEGIN_EMPHASIS EB_HOOK_END_EMPHASIS +ϡĴɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_EMPHASIS ʤ 0x1f12 +EB_HOOK_END_EMPHASIS ʤ 0x1f13 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CANDIDATE

+ +

EB_HOOK_END_CANDIDATE_LEAF

+ +

EB_HOOK_END_CANDIDATE_GROUP

+ +

+EB_HOOK_BEGIN_CANDIDATE ϡʣ縡θȤʤγϤ +ɽץ󥹤ФեåǤ +

+ +

+Фơλɽץ󥹤Фեå 2 +ޤ +Ĥ EB_HOOK_END_CANDIDATE_LEAF ǡȤʤ줬ºݤ +ϸȤƻȤΤǤ뤳Ȥ򼨤ޤ +⤦Ĥ EB_HOOK_END_CANDIDATE_GROUP ǡȤʤ +˺٤ʬƤ뤳Ȥ򼨤ޤ +(äơȤʤ򸡺ϸȤƻȤȤϤǤޤ) +

+ +

+եå EB_HOOK_BEGIN_CANDIDATES եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f43 ˤʤޤ +

+ +

+եå EB_HOOK_END_CANDIDATE_LEAF +EB_HOOK_END_CANDIDATE_GROUP եåؿϤ +argc 3 Ǥ +ɤΥեå⡢argv[0] ϥץ󥹤Υ +ΤΤǡ0x1f63 ˤʤޤ +եå EB_HOOK_END_CANDIDATE_GROUP argv[1] + argv[2] ϡγؤθǡγϥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +եå EB_HOOK_END_CANDIDATE_LEAF Ǥϡargv[1], +argv[2] 2 ĤȤ 0 ˤʤäƤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_REFERENCE

+ +

EB_HOOK_END_REFERENCE

+ +

+EB_HOOK_BEGIN_REFERENCE +EB_HOOK_END_REFERENCE ϡ̰֤ΥƥȥǡλȳϤ +λɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_REFERENCE եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f42 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_REFERENCE եåؿϤ argc + 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f62 ˤʤޤ +argv[1] argv[2] ϡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_KEYWORD

+ +

EB_HOOK_END_KEYWORD

+ +

+EB_HOOK_BEGIN_KEYWORD EB_HOOK_END_KEYWORD ϡ +γϤȽλɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_KEYWORD եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f41 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f61 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_DECORATION

+ +

EB_HOOK_END_DECORATION

+ +

+EB_HOOK_BEGIN_DECORATION +EB_HOOK_END_DECORATION ϡʸγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_DECORATION եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe0 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe1 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NARROW_FONT

+ +

EB_HOOK_WIDE_FONT

+ +

+EB_HOOK_NARROW_FONT EB_HOOK_WIDE_FONT ϡ +줾ȾѳѳФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡʸֹɽޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_narrow_character_text() +eb_hook_wide_character_text() ưŪϿޤ +

+ + +

EB_HOOK_ISO8859_1

+ +

+EB_HOOK_ISO8859_1 ϡISO 8859-1 (ƥʸ 1) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡISO 8859-1 ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ ISO 8859-1 Ȥơ1 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_ISO8859_1 ξǤ +

+ + +

EB_HOOK_NARROW_JISX0208

+ +

EB_HOOK_WIDE_JISX0208

+ +

+EB_HOOK_NARROW_JISX0208 EB_HOOK_WIDE_JISX0208 +ϡȾѤѤ JIS X 0208 (ܸΤʴ) ʸФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡJIS X 0208 ʸܸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤܸ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡ +νҤʸɤ EB_CHARCODE_JISX0208 +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_GB2312

+ +

+EB_HOOK_GB2312 ϡGB 2312 (δλ) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡGB 2312 ʸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_BEGIN_MONO_GRAPHIC

+ +

EB_HOOK_END_MONO_GRAPHIC

+ +

+EB_HOOK_BEGIN_MONO_GRAPHIC +EB_HOOK_END_MONO_GRAPIHC ϡΥǤγϤȽλ +ɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +argc 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f32 0x1f44 Τ줫ˤʤޤ +argv[2] argv[3] ϡǤι⤵ +(ԥ) ̣ޤ +Żҥ֥åΥΥ (ǽΰ 0x1f32 +) ˤϡǤι⤵ξ󤬷礱ƤΤǡͤϤɤ 0 +ʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MONO_GRAPHIC եåؿϤ +argc 3 Ǥ +argv[0] ϡץ󥹤ΥɤΤΤǤ +EB_HOOK_BEGIN_MONO_GRAPHIC argv[0] +0x1f32 ʤ顢EB_HOOK_END_MONO_GRAPHIC +argv[0] 0x1f52 ˤʤꡢ0x1f440x1f64 ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥Υǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_GRAY_GRAPHIC

+ +

EB_HOOK_END_GRAY_GRAPHIC

+ +

+Υեå̾Τϡ졼ǤΤͽ󤵤Ƥޤ +ܥС EB 饤֥ǤϤޤбƤޤ +

+ + +

EB_HOOK_BEGIN_COLOR_BMP

+ +

EB_HOOK_BEGIN_COLOR_JPEG

+ +

EB_HOOK_END_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_COLOR_BMP EB_HOOK_COLOR_JPEG +ϡ줾 BMP JPEG Υ顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_COLOR_BMP +EB_HOOK_COLOR_JPEG եåؿϤ argc +4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4d ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6d ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_IN_COLOR_BMP

+ +

EB_HOOK_BEGIN_IN_COLOR_JPEG

+ +

EB_HOOK_END_IN_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_IN_COLOR_BMP EB_HOOK_IN_COLOR_JPEG ϡ +줾 BMP JPEG Υ饤󥫥顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_IN_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_IN_COLOR_BMP +EB_HOOK_IN_COLOR_JPEG եåؿϤ argc + 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f3c ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_IN_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f5c ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CLICKABLE_AREA

+ +

EB_HOOK_END_CLICKABLE_AREA

+ +

+EB_HOOK_BEGIN_CLICKABLE_AREA ϡ顼Ǥӥ饤󥫥顼ΰФơɽϥץ󥹤ФեåǤ +ƱͤˡEB_HOOK_END_CLICKABLE_AREA Ͻλץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_CLICKABLE_AREA եåؿϤ +argc 7 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4f ˤʤޤ +argv[1] argv[2] ϡ줾ΰγ +x, y ɸɽޤ +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] Ǥαؤ +ȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +
+
+դ顼
+ʣ
+
+
+ʣˡ
+
+⤵
+
+ΰ衡
+
+
+
+
+
+
+
+
+
+
+ +

+EB_HOOK_END_CLICKABLE_AREA եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6f ˤʤޤ +

+ +

+μФˤĤƤϡ +ֻդ顼ǡ +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_WAVE

+ +

EB_HOOK_END_WAVE

+ +

+EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE ϡ +WAVE (PCM) βǡγϤȽλɽץ󥹤Ф +եåǤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4a ˤʤޤ +argv[2] argv[3] ϲǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤ򤽤줾ɽޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_WAVE եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6a ˤʤޤ +

+ +

+ǡμФˤĤƤϡWAVE +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_MPEG

+ +

EB_HOOK_END_MPEG

+ +

+EB_HOOK_BEGIN_MPEG EB_HOOK_END_MPEG ϡ +MPEG ưǡγϤȽλɽץ󥹤Фեå +Ǥ +

+ +

+եå EB_HOOK_BEGIN_MPEG եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f39 ˤʤޤ +argv[2] argv[5] ϡưǡΥե̾ +󥳡ɤˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MPEG եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f59 ˤʤޤ +

+ +

+ưǡμФˤĤƤϡMPEG ư +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

եååؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

void eb_initialize_hookset (EB_Hookset *hookset)

+ +

+ؿ initialize_hookset() ϡhookset λؤ +EB_Hookset ֥Ȥޤ +EB_Hookiset ֥ȤФ EB 饤֥¾δؿ +Ƥˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_hookset() ƤǤϤޤ +Ƥư̤Ǥ +

+ +

+δؿϡƥեåνͤ򼡤Τ褦˥åȤޤ +

+ + + + + + + + + + + + + + +
եå + եåؿ +
EB_HOOK_NARROW_JISX0208 + eb_hook_euc_to_ascii() +
EB_HOOK_NARROW_FONT + eb_hook_narrow_character_text() +
EB_HOOK_WIDE_FONT + eb_hook_wide_character_text() +
EB_HOOK_NEWLINE + eb_hook_newline() +
嵭ʳΥեå + NULL (եåؿʤ) +
+ + +

EB_Error_Code eb_finalize_hookset (EB_Hookset *hookset)

+ +

+ؿ eb_finalize_hookset() ϡhookset ؤ +EB_Hooksest ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϡ٤Ʋޤ +٤ƤΥեåˤϡեåؿȤ NULL åȤޤ +

+ +

+򤷤֥ȤФ eb_set_hook(), eb_set_hooks() +Ƥ֤Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_set_hook (EB_Hookset *hookset, const EB_Hook *hook)

+ +

+ؿ eb_set_hook() ϡhookset ؤ EB_Hooksest +֥ȤˡեåؿϿޤ +Ͽեåμȥեåؿϡhook ǻꤷޤ +

+ +

+ƱեåɤʣեåؿϿƤ⡢ͭˤʤΤϺǸ +ϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_set_hooks (EB_Hookset *hookset, const EB_Hook *hooks)

+ +

+δؿ eb_set_hook() ˻ƤޤǤդθĿ +եåؿ٤ϿǤۤʤޤ +

+ +

+Ͽեåμȥեåؿϡhooks ǻꤷޤ +hooks EB_Hook ֥Ȥ (Ƭ) +ؤƤʤФʤޤ +ޤˤϡեå EB_HOOK_NULL 򥻥å + EB_Hook ֥ȤǤȤ֤ɬפޤ +

+ +

+eb_set_hooks() ϡƬ֤ˡꤵ줿եå +ФƥեåؿϿƤޤ +顼ȯȡĤΥեåϿϤˡ򼨤顼 +򤿤֤ޤ +٤ƤΥեåؿϿȡEB_SUCCESS ֤ޤ +

+ + +

Ȥ߹ߥեåؿξܺ

+ +

+EB 饤֥ϡŪʥեåؿ򤤤ĤѰդƤޤ +ǤϡΥեåؿˤĤƤλͤ⤷ޤ +

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ +

+Υեåؿ⡢ appendix container +NULL ϤƤ⡢ư˻پϤʤ褦ˤʤäƤޤ +

+ + +

EB_Error_Code eb_hook_euc_to_ascii (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_euc_to_ascii() ϡեå +EB_HOOK_NARROW_JISX0208 (Ⱦ JIS X 0208 ʸ) Τ +եåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+Υեåؿϡargv[0] ȤϤ줿 JIS X 0208 ʸ +(󥳡ǥ󥰤ܸ EUC) Ĵ١б ASCII ʸ¸ߤ + ASCII ʸƥȥǡȤƽ񤭹ߡʤ JIS X 0208 +ʸ򤽤Τޤ޽񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_narrow_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

EB_Error_Code eb_hook_wide_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_character_text() ϡեå +EB_HOOK_NARROW_FONT (Ⱦѳ) ΤΥեåؿǤ +Ʊͤ eb_hook_wide_character_text() ϡեå +EB_HOOK_WIDE_FONT (ѳ) ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡappendix 椷Ƥܤ +argv[0] ȤϤ줿ʸäƤ뤫ɤ +Ĵ٤ޤ +äƤФʸƥȥǡȤƽ񤭹ߡäƤʤ +<?> Ȥʸ񤭹ߤޤ +

+ +

+appendix NULL ξ䡢Ͽܤ +ʤ⡢ʸäƤʤΤȤưޤ +

+ +

+δؿϡ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_newline (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_newline() ϡեå +EB_HOOK_NEWLINE () ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡƥȥǡ \n 񤭹ߤޤ + EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_empty (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_empty() ϡ⤷ʤեåؿǤ + EB_SUCCESS ֤ޤ +

+ + +

ƥȥǡؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

int eb_have_text (EB_Book *book)

+ +

int eb_have_menu (EB_Book *book)

+ +

int eb_have_copyright (EB_Book *book)

+ +

+ؿ eb_have_text() ϡbook 򤷤Ƥܤ +ʸäƤ뤫ɤĴ٤ޤ +Ʊͤˡeb_have_menu() ϥ˥塼äƤ뤫ɤ +eb_have_copyright() ɽäƤ뤫ɤĴ٤ޤ +

+ +

+δؿ⡢äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_text (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_menu (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_copyright (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_text() ϡbook 򤷤Ƥܤʸ +γϰ֤ position λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_menu() ϥ˥塼γϰ֤ +eb_have_copyright() ɽγϰ֤񤭹ߤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡposition ɬԤ֤񤭹ǡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤоݤȤʤƥȥǡäƤʤС +EB_ERR_NO_SUCH_SEARCH ֤ޤ +

+ + +

EB_Error_Code eb_seek_text (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡե򥷡ޤ +֤ position ǻꤷޤ +ΤȤposition Ͼ˥եƬΰ֤ȤƲ +ޤ +(а֤ؤΥǽϡEB 饤֥ˤϤޤ) +

+ +

+ԤȡޤǤ˹Ԥäɤ߹ߤξֵϿꥻåȤޤ +eb_read_text(), eb_read_heading(), +eb_read_rawtext() Ѥƥƥȥǡɤ߹ˤϡ +äƤδؿƤӽФƤɬפޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ +

+ʤҤˤäƤϡƥȥǡ᤿եˤ¾Υǡ +˳ǼƤ뤳ȤޤƥȰʳΥǡ˥ +Ƥ⡢ƥȥǡθ߰֡ɤ߹ߤ˴ؤֵϿѲޤ +

+ + +

EB_Error_Code eb_tell_text (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡեθߤΥ֤֤ޤ +

+ +

position λؤΰ˸ߤΥ֤񤭹ߡ +EB_SUCCESS ֤ޤ +ԤȡɬԤ֤񤭹ߡ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ + +

EB_Error_Code eb_read_text (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

EB_Error_Code eb_read_heading (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_text() eb_read_heading() ϡ +book +򤷤ƤܤΥƥȥǡեθߤΥ֤ǡ +ɤ߹ߤޤ +eb_read_heading() ϸФɤ߹ߤѤ +eb_read_text() ϤʳΥƥȥǡɤ߹ߤѤޤ +

+ +

+ɤ߹ޤ줿ƥȥǡϡɬפ˱ʸɤѴ +(ʸɡ 򻲾ȤΤ) Ԥ줿ˡhookset +λؤեååȤˤäƲùޤ +hookset NULL ΤȤϡ EB 饤֥¦ +ѰդƤ ɸΥեåå (default hookset) +Ѥޤ +ΥեååȤϡeb_initialize_hookset() ˤä +ΥեååȤǤ +

+ +

+եååȤˤäƲù줿ˡƥȥǡ text +ؤΰ˽񤭹ޤ졢񤭹Хȿ text_length λؤ +ΰ˽񤭹ޤޤ +text ϥʥʸǽüޤtext_length ˤ +ʥʸʬϴޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +text_max_length ˤʥʸʬϴäƤޤ +Τǡtext text_max_length + 1 ХʬΥǡ +ǼǤ礭ɬפǤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

eb_read_text() eb_read_heading() +ƤӽФˤϡ +餫 eb_seek_text() θƤӽФƥȥǡ +Υ֤åȤ줿֤ˤƤʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+դ˰٥СڤꥳɤФޤǤδ֤ʤ顢ؿ +֤Ƥ֤Ȥǥƥȥǡ³ɤ߹ळȤǤޤ +ڤꥳɤФȡؿƤӽФƤɤ߹ߤϹԤޤ +ξǤ⡢¾˥顼ȯʤ EB_SUCCESS ֤ꡢ +text ˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ eb_read_text() ƤӽФƥƥȥǡ +ɤ߹߻Ϥ᤿顢֤ƤӽФݤ⡢eb_read_text() +ȤʤФʤޤ +椫 eb_read_heading() ӸҤ +eb_read_rawtext() ڤؤƸƤӽФ +EB_ERR_DIFF_CONTENT 顼֤ޤ +ؿ eb_read_heading() ˤĤƤƱͤǤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ +

+Ϥ줿 appendix ڤꥳɤξäܤ +ǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ڤꥳɤưȽ̤ +ߤޤ +ȽϴʤΤǤϤʤΤǡҤˤäƤѤʰ֤ʸ +ڤƤޤΤޤ +(ʸʳΥƥȥǡ˴ؤƤϡΤ褦ϵޤ) +

+ +

+ container ϡץꥱץफեåؿ +ǡϤΤΤǤ +eb_read_text(), eb_read_heading() Ǥϡľ +ΰͤ򻲾Ȥ뤳ȤϤޤ +

+ +

+ appendix, container ϡΤޤޥեåؿ +Ϥޤ +ΰ NULL Ǥ⹽ޤ +(ƤӽФեåؿǻپ㤬ʤС) +

+ +

+ʤեåؿ eb_read_text(), eb_read_heading() +Ȥʸʤץ󥹰ʬФǡ񤭹⤦ +Ȥˡtext ˽ʬʶΰ褬ʤȤȤ +ޤ +ξ硢ؿޤ text ˽񤭹ळȤϤˡ +ä򽪤ޤ +äơޥХʸΥǡڤ줿ꤹ뤳ȤϤޤ +

+ +

+񤭹ʤäʬϡʤ text_length δˤ +ޤ +񤭹ʤäǡ book ¸ƤΤǡ +⤦ eb_read_text(), eb_read_heading() +ƤӽФȡθƤӽФǽ񤭹ʤäǡޤ text +Ƭ˽񤭹ޤޤ +񤭹ǡ text_length δޤ +

+ +

+book ¸ƤǡĹ +text_max_length ĶƤȡ񤭹ޤ˴ؿϽλ +ޤ +ΤȤ񤭹ʤäǡϰ³¸ޤ +Ĥޤꡢtext_max_length ޤ˾ݻƤ +ǡΤۤĹȡٸƤӽФƤ text ؤν񤭹ߤ +ʤߤޤΤǡդɬפǤ +

+ +

+eb_seek_text() ƤӽФeb_set_subbook() +ܤľȡ¸Ƥǡ˴ޤ +

+ + +

EB_Error_Code eb_read_rawtext (EB_Book *book, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_rawtext() ϡbook 򤷤Ƥ +ܤΥƥȥǡեθߤΥ֤ǡɤ߹ߤޤ +

+ +

+eb_read_text() ȻƤޤδؿϥեååȤˤ +ǡβùʸɤѴڹԤ鷺ǡɽΤޤ֤ޤ +ɤ߹ƥȥǡμϡǤäƤ⹽ޤ +

+ +

+ɤ߹ƥȥǡ text λؤΰ˽񤭹ޤ졢 +񤭹Хȿ text_length λؤΰ˽񤭹ޤޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +eb_read_text() Ȱۤʤꡢtext ϥʥʸ +ǽüޤ +ޥХʸ䥨ץ󥹤 text λĤΰ +­ʤʤä⡢ޤǤϽ񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+ޤδؿƤӽФˤϡ餫 eb_seek_text() +ƤӽФƥȥǡΥ֤åȤ줿֤ˤ +ʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ֤ƤӽФȤǡɤ߹ƥȥǡ³ +ɤ߹ळȤǤޤ +ڤꥳɤθФԤޤΤǡҤƤӽФ³ȡ +ƥȥǡեޤǹԤäƤޤޤ +

+ +

+ eb_read_rawtext() ƤӽФƥƥȥǡɤ߹ +Ϥ᤿顢֤ƤӽФݤ⡢eb_read_rawtext() +ȤʤФʤޤ +椫顢eb_read_text() eb_read_heading() +ڤؤȡ +EB_ERR_DIFF_CONTENT 顼֤ޤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ + +

int eb_is_text_stopped (EB_Book *book)

+ +

+ؿ eb_is_text_stopped() ϡǸɤ߹ƥȥǡ +ãɤȽꤷޤ +

+ +

+book ܤǡǸ eb_read_text()eb_read_heading() ǥƥȥǡɤ߹ݤˡ +ڤꥳɤ򸡽ФƥȥǡΤΰָΰ֤ã +ɤ߹ߤ򽪤ƤСδؿ 1 ֤ޤ +ʳΤȤϡ0 ֤ޤ +

+ +

+book ܤ򤷤Ƥʤ䡢ܤ˥ƥȥǡ +¸ߤʤ 0 ֤ޤ +

+ +

+eb_read_text() ޤ eb_read_heading() +ƥȥǡɤ߹Ǥʤ⡢Ʊͤ 0 ֤ޤ +ƥȥǡɤ߹ǤäƤ⡢ƥȥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤؿ (eb_read_text() ι򻲾) ƤǤޤȡ +ɤ߹ǤʤȸʤޤΤǡդƲ +

+ +

+̾ϤδؿȤʤƤ⡢eb_read_text() +eb_read_heading() 0 ֤顢ƥȥǡ +ãȤߤʤƺ٤ʤǤ礦 +κݤϡ text_max_length ͤʬ礭ä + +

+ + + +

EB_Error_Code eb_write_text_byte1 (EB_Book *book, int byte1)

+ +

EB_Error_Code eb_write_text_byte2 (EB_Book *book, int byte1, int byte2)

+ +

EB_Error_Code eb_write_text_string (EB_Book *book, const char *string)

+ +

EB_Error_Code eb_write_text (EB_Book *book, const char *stream, size_t stream_length)

+ +

+δؿϡեåؿ椫顢ƥȥǡ񤭹 +Ѥޤ +񤭹ǡμˤäơȤʬƲ +

+ +

+eb_write_text_byte1() ϡbyte1 ǻꤷ +1 ХȤͤ񤭹ߤޤ +eb_write_text_byte2() ϡbyte1, byte2 +ǻꤷ 2 ХȤ񤭹ߤޤ +eb_write_text_string() ϡstring ǻꤷ +ʸ񤭹ߤޤ +eb_write_text() ϡstream ϤޤĹ +stream_length ХȤΥХ񤭹ߤޤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥȸ +顼ɤ֤ޤ +

+ +

+ǽŪˡ񤭹ƥȥǡϡեåؿθƤӽФǤ +eb_read_text(), eb_read_heading() +ץꥱץϤޤ +

+ +

+եåؿȤƸƤӽФƤʤȤˡδؿƤӽФ +ư̤Ǥ +

+ + +

const char *eb_current_candidate (EB_Book *book)

+ +

+ؿ eb_current_candidate() ϡΥƥȥǡ +֤߰˽񤫤Ƥ롢ʣ縡θȤʤ֤ޤ +

+ +

+֤ʸĹϡĹ EB_MAX_WORD_LENGTH ХȤˤʤޤ +Ĺ˥ʥʸϴޤߤޤ +

+ +

+δؿüǡʣ縡θȤʤνλ̣ +ץ󥹤ؤΥեåǤ EB_HOOK_END_CANDIDATE_LEAF + EB_HOOK_END_CANDIDATE_GROUP Фեåؿ +Τ߸ƤӽФȤǤޤ +ʳξǸƤӽФȤưϡ̤Ǥ +

+ +

+δؿθƤӽФǤեåؿϤäƤ EB_Book +֥ (ؤΥݥ) 򡢤Τޤޤδؿ˰ȤϤ +ޤ +

+ +

+book ʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿ֤ʸ ISO 8859-1 +ˤʤꡢʳʸɤξܸ EUC ˤʤޤ +ؿ֤ʸϡ¾Υեåˤùαƶޤ +ʸɤѴԤʳϡǡ򤽤Τޤ֤ޤ +

+ +

+ʤδؿ֤ʸ򻲾ȤǤΤϡեåؿޤǤ +֤ǤΤǡդƲ +

+ + +

EB_Error_Code eb_forward_text (EB_Book *book, EB_Appendix *appendix)

+ +

EB_Error_Code eb_backward_text (EB_Book *book, EB_Appendix *appendix)

+ +

+ؿ eb_forward_text() eb_backward_text() ϡ +book 򤷤ƤܤʸΥ֤˰ư +ʸζڤꥳɤñ̤ȤƬФԤޤ +礦ɡ CD ζʤƬФƱǤ +

+ +

+eb_forward_text() ʸ˸äƥ֤ +ʤᡢeb_backward_text() Ƭ˸äƥ֤ +ᤷޤ +

+ +

+eb_forward_text() θƤӽФǤϡ֤ɬθ +γϰ֤ޤǰưޤ +Ф eb_backward_text() θƤӽФǤϡư褬 +ˤäưۤʤޤ +⤷ߤΥ֤ñƬˤȤϡ +eb_backward_text() θƤӽФˤäơñ +Ƭ˥֤ưޤ +֤ñˤȤϡñ +Ƭ˰ưޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+äơδؿƤӽФˤϡ餫 eb_seek_text() + eb_read_text() ƤӽФƤʤȤޤ +(eb_read_text() θƤӽФˤϡä +eb_seek_text() θƤӽФ뤳ȤȤʤޤ) +

+ +

+eb_read_text() ǤϤʤeb_read_heading() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+ʸǡƬãƤޤäơˤ⤦ʸʤȤϡ +EB_ERR_END_OF_CONTENT ֤ޤ +

+ +

+appendix NULL ǤϤʤڤꥳɤξ +äܤǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ƱˡǶڤꥳɤ +ưȽ̤ߤޤ +

+ +

+־ˤΤ˥塼ɽΤ褦ˡʸʳ +ƥȥǡǤäƤ⹽ޤ +ʸʳΥƥȥǡˤϡƬФ֤ǡ +Ƭ֤ˤޤΤǡδؿΩľϤۤȤ +ޤ +

+ +

+(˥塼ǤϡġγؤΥ˥塼ǡ줾Ω +ƥȥǡˤʤäƤ뤿ᡢƬФԤäƤΥ˥塼ǡؤ +ưǤޤ +ʣ縡θƱͤǤ) +

+ + +

EB_Error_Code eb_forward_heading (EB_Book *book)

+ +

+ؿ eb_forward_heading() ϡbook 򤷤Ƥ +ܤθФΥ֤˰ưФζڤñ̤ȤƬФ +Ԥޤ +

+ +

+ʸƬФԤؿ eb_forward_text() θФǤǤ +ФƬФԤϡʸ˸¤뤿ᡢ +eb_backward_heading() ȤؿѰդƤޤ +

+ +

+δؿƤ֤ȡ֤θФγϰ֤ޤǰưޤ +(ǤϡФΰˡָФפȡʸפߤ˽񤫤 +ޤǡ¤ʸפȡָФפ϶̤դޤ +֤θФΰξ硢δؿƤ֤ȺǤᤤ +ָФפ⤷ϡʸפγϰ֤ޤǰưޤ) +

+ +

+eb_read_heading() ǤϤʤeb_read_text() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+ʳθ᥽åɤθФγǼ֤Фơδؿ +Ƥ֤ȤǽǤΤ褦ɬפ뵡ϤʤǤ礦 +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-10.html b/lib/ebu/doc/eb-10.html new file mode 100644 index 0000000..770fa99 --- /dev/null +++ b/lib/ebu/doc/eb-10.html @@ -0,0 +1,1328 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

+ +

+ʸɤ˼ϿƤʤŪʸΤȤ¯ˡֳ +ȸޤ +Ȥġʸ̤뤿ˡʸɤ˼Ͽ줿 +ʸȤϽʣʤ֤ˡʸʸֹ˳꿶Τ̤Ǥ +(Ƥʸֹξܺ٤ˤĤƤϡʸɡ 򻲾ȤΤȡ) +

+ +

+ΤŻҥ֥åEPWING Ǥ⡢ۤȤɤȤäƤޤ +ϽƱΤǥХХǡޤä촶Ϥޤ +ĤޤꡢƱʸֹȤäƤƤ⡢Ƥ볰ϽҤˤä +㤤ޤ +뤳ȤǽǤĤ CD-ROM Ǥܤ +äۤʤ뤳Ȥޤ +ܤˤäƤϡɴγƤ뤳Ȥ⤢ޤ +

+ +

+CD-ROM ҤǤϡλǡ (Ĥޤե) Ѱդ +ޤ +եȤϥӥåȥޥåץǡǤꡢҤˤäƤ礭ΰۤʤ +ΥեȤѰդƤޤ +

+ +

+դ˸СФ󶡤ǡϡեȤǤ +ʸֹƤ줿ʤΤȯʤΤ +äŪʾѰդƤޤ +ץꥱץब򥵥ݡȤ뤿ˤϡΥե +򤽤ΤޤɽʳˡϤʤǤ礦 +

+ + + +

Ⱦѳѳ

+ +

+CD-ROM Ҥˤ볰ˤϡѳסȾѳפबޤ +ѳѰդƤեȤβȽĤĹ褽 1:1 ˤʤäƤꡢ +ȾѳǤ 1:2 ˤʤäƤޤ +

+ +
+
+ѳȾѳ
+ʣߣˡʣߣ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

+ƥȥǡˤϡȾɽγϤȽλɽץ󥹤 + (֥ƥȥǡ 򻲾ȤΤ) +ϤȽλδ֤֤줿ΤȾѳʳΤȤʤѳ +ʤޤ +

+ +

+ʸֹƱǤ⡢ѤȾѤǤϤޤäۤʤ뤳Ȥ⤢ޤ +Τǡʸֹ顢ѤȾѤΤɤ餫ȽǤ뤳Ȥ +Ǥޤ +ʤ餺ȾѳϤΥץ󥹤иƤɤ +Ȥ˴ŤȽǤʤȤޤ +

+ +

+ѤȾѤȽ EB 饤֥¦ǹԤޤΤǡ +ץꥱץबʸ̮βϤԤɬפϤޤ +

+ +

+CD-ROM ҤܤˤϡȾѳ뤤ѳΤɤ餫 +ƤΤ⤢ޤξȤƤΤ⤢ޤ +

+ + +

礭ȳ

+ +

+ܤˤϡƤ볰ΥեȤӥåȥޥå׷ǼϿ +ޤ +եȤ礭ϡĤΥԥˤ 16, 24, 30, 48 +4 बꡢѳȾѳ줾ΥեȤ礭 +(Υԥ߽ĤΥԥ) ϼ̤ˤʤޤ +

+ + + + + + + +
ĤΥԥ Ⱦѳ
16 16x16 8x16
24 24x24 16x24
30 32x30 16x30
48 48x48 24x48
+ +

+٤ƤܤǤ 4 ΥեȤѰդƤ櫓Ǥ +ޤ +Ĥ 16 ԥΤΤɬѰդƤޤʳϤʤȤ +ޤ +(ޤäƤʤС16 ԥΥեȤѰդ +ޤ) +

+ +

+EB 饤֥ǤϡΤ褦˽ΥԥĤޤ +եȤι⤵ (font height) ˡեȤ礭 +̤Ƥޤ +ơ줾ΥեȤι⤵ (16, 24, 30, 48) Фơ + (font code) ȤΤƤƤޤ +եȤι⤵ꤹݤϡɬγɤȤޤ +

+ + + + + + + +
ĤΥԥ
16 EB_FONT_16
24 EB_FONT_24
30 EB_FONT_30
48 EB_FONT_48
+ + +

γեȤι⤵

+ +

+EB_Book ֥ȤܤѰդƤ볰ե +ι⤵椫ǡ +γեȤι⤵ (current font height) Ȥƻꤹ +ȤǤޤ +EB 饤֥dzΥեȥǡ (ӥåȥޥåץǡ) Фˤϡ +եȤι⤵򤢤餫򤷤Ƥɬפޤ +

+ +

+򤹤ˤϡؿ eb_set_font() Ȥޤ +ʲΥץϡ⤵ 24 ԥΥեȤ򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+if (eb_set_font(&book, EB_FONT_24) != EB_SUCCESS) {
+    printf("eb_set_font_() failed\n");
+    return;
+}
+
+
+ +

+ΥץǤϡ⤵ 24 ԥΥեȤܤѰդ +ΤȲꤷƤޤºݤˤѰդƤʤܤޤ +⤷ܤ⤵ 24 ԥΥեȤѰդƤʤС +eb_set_font() EB_ERR_NO_SUCH_FONT ֤ޤ +

+ +

+򤹤ˡäƤܤѰդƤեȤ +ΤꤿȤ⤢ޤ +ˤϡ2 ̤ˡޤ +

+ +

+ޤ 1 ܤϡܤѰդƤեȤι⤵ΰ +eb_font_list() ǼˡǤ +ϡܥɤΰ eb_subbook_list() +ȤɤƤޤ +

+ +
+
+EB_Font_Code font_list[EB_MAX_FONTS];
+int font_count;
+int i;
+
+if (eb_font_list(&book, font_list, &font_count) != EB_SUCCESS) {
+    printf("eb_font_list() failed\n");
+    return;
+}
+
+for (i = 0; i < font_count; i++) {
+    if (font_list[i] == EB_FONT_24)
+        printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+2 ܤϡeb_have_font() ȤǤ +δؿϡι⤵ΥեȤܤѰդƤ뤫ɤ +Ĵ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_font(&book, EB_FONT_24)) {
+    printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+ޤܤȾѳѳƤ뤫ɤϡ줾 +eb_have_narrow_font(), eb_have_wide_font() +ȤäĴ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_narrow_font(&book))
+    printf("this subbook has narrow font\n");
+if (eb_have_wide_font(&book))
+    printf("this subbook has wide font\n");
+
+
+ +

+ʤ餫ܤ򤷤Ƥʤȡι⤵ǤʤΤ +դƲ +eb_set_subbook() ܤڤؤȡե +ι⤵Ͼ̤ξ֤ޤ +

+ + +

եȤμФ

+ +

+ι⤵򤷤֤ǤСΥեȥǡ +(ӥåȥޥåץǡ) ФȤǤޤ +

+ +

+եȥǡФؿϡ +ѳʤ eb_wide_font_character_bitmap() +Ⱦѳʤ eb_narrow_font_character_bitmap() Ǥ +

+ +

0xa121 ΥեȥǡФץϡ +Τ褦ˤʤޤ +ȾѳξϡƤӽФؿ̾ѤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȳι⤵ȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_48];
+
+if (eb_wide_font_character_bitmap(book, 0xa121, bitmap)
+    != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+Ǥϡbitmap ˥եȥǡǼƤޤ +bitmap ΰȤ EB_SIZE_WIDE_FONT_48 +ХȤݤƤޤϹ⤵ 48 ԥγǡǼ +ɬפʥɽޤ +

+ +

+եȥǡΥϡι⤵˱ưǤ +⤵ 48 ԥϳǤΥʤΤǡΥΰ +ѰդСɤι⤵γǤǼǤޤ +

+ +

+ǡϡӥåȥޥå׷ΥǡˤʤäƤޤ +طʿӥå 0, ʿӥå 1 Ȥơƥԥͤ¤٤ +ޤ +¤Ǥ夫ޤϱ˸äƥԥ򽦤äƤüޤ +褿IJʤ˹ߤơޤ˥ԥ򽦤ޤ +ʲֲʤޤǤ򷫤֤ޤ +

+ +

+ХǤϡ128, 64, 32, ...1 ην˥ӥåͤǼ +ޤ +Ĥޤꡢ128 ηϰֺΥԥ롢1 ηϰֱΥԥб +ޤ +

+ +

+ʲˡ16x16 ѳΥӥåȥޥåפȡΥХ򵭤ޤ +طʿʿǤ +

+ +
+
+0x00, 0x00,
+0x00, 0x00,
+0x1f, 0x88,
+0x00, 0xc8,
+0x09, 0x28,
+0x09, 0xf8,
+0x3e, 0x28,
+0x00, 0x28,
+0x10, 0x08,
+0x10, 0x08,
+0x1f, 0xf8,
+0x18, 0x08,
+0x18, 0x08,
+0x1f, 0xf8,
+0x00, 0x00,
+0x00, 0x00,
+
+
+ + +

եȤѴ

+ +

+EB 饤֥ˤϡΥӥåȥޥåץǡ XBM, XPM, GIF, BMP, PNG +γƲѴؿѰդƤޤ +ѴԤؿϡ 5 ĤǤ +

+ + + + + + + +
eb_bitmap_to_xbm() XBM ؤѴ
eb_bitmap_to_xpm() XPM ؤѴ
eb_bitmap_to_gif() GIF ؤѴ
eb_bitmap_to_bmp() BMP ؤѴ
eb_bitmap_to_png() PNG ؤѴ
+ +

+ɤδؿƤӽФƱǤǤ XBM ؤѴΥץ +򼨤ޤ +

+ +
+
+/* bitmap ˹⤵ 16 ѳΥӥåȥޥåץǡǼ
+ * ƤȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_16];
+char xbm[EB_SIZE_WIDE_FONT_16_XBM];
+size_t xbmsize;
+
+if (eb_wide_font_character_bitmap(bitmap, EB_WIDTH_WIDE_FONT_16,
+    EB_HEIGHT_FONT_16, xbm, &xbmsize) != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ƥγ

+ +

+ϥƥȥǡ (ʸ˥塼ʤ) ǻȤƤޤ +

+ +

+ץꥱץबƥȥǡ˽и볰̤ +ԤˤϡФեåꤷơեåؿǽ +Ȥˤʤޤ +

+ +

+ФեåϡѳФ EB_HOOK_WIDE_FONT +ȾѳФ EB_HOOK_NARROW_FONT बޤ +⡢и٤ˡꤷեåؿƤӽФޤ +

+ +

+եåΰˤĤƤϡ֥եåɤΰ 򻲾ȤΤȡ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Font_Code

+ +

+ɤϡι⤵ (ԥ) ɽޤ +ߤΤȤƤ⤵ϼ̤Ǥ +

+ +
    +
  • EB_FONT_16 +
  • EB_FONT_24 +
  • EB_FONT_30 +
  • EB_FONT_48 +
  • EB_FONT_INVALID +
+ +

+ɤμΤͤǤEB_FONT_16 ͤ 16 Ǥ +ޤ +¾ƱͤǤΤǡդƲ +

+ +

+EB_FONT_INVALID ̤ʳɤǡʳͤ +ɽѤޤ +

+ + +

ξܺ

+ +

+ƤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_WIDTH_NARROW_FONT_16

+ +

EB_WIDTH_NARROW_FONT_24

+ +

EB_WIDTH_NARROW_FONT_30

+ +

EB_WIDTH_NARROW_FONT_48

+ +

EB_WIDTH_WIDE_FONT_16

+ +

EB_WIDTH_WIDE_FONT_24

+ +

EB_WIDTH_WIDE_FONT_30

+ +

EB_WIDTH_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γ +ʬ (Υԥ) int ɽƤޤ +

+ + +

EB_HEIGHT_NARROW_FONT_16

+ +

EB_HEIGHT_NARROW_FONT_24

+ +

EB_HEIGHT_NARROW_FONT_30

+ +

EB_HEIGHT_NARROW_FONT_48

+ +

EB_HEIGHT_WIDE_FONT_16

+ +

EB_HEIGHT_WIDE_FONT_24

+ +

EB_HEIGHT_WIDE_FONT_30

+ +

EB_HEIGHT_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +νΥԥ int ɽƤޤ +

+ +

+EB_HEIGHT_NARROW_FONT_16 +EB_HEIGHT_WIDE_FONT_16 μºݤͤ 16 Ǥ +( EB_FONT_16 μºݤͤ 16 ǤϤޤΤǡ +դƲ) +

+ + +

EB_SIZE_NARROW_FONT_16

+ +

EB_SIZE_NARROW_FONT_24

+ +

EB_SIZE_NARROW_FONT_30

+ +

EB_SIZE_NARROW_FONT_48

+ +

EB_SIZE_WIDE_FONT_16

+ +

EB_SIZE_WIDE_FONT_24

+ +

EB_SIZE_WIDE_FONT_30

+ +

EB_SIZE_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +ΥӥåȥޥåץǡǼΤɬפΰ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XBM

+ +

EB_SIZE_NARROW_FONT_24_XBM

+ +

EB_SIZE_NARROW_FONT_30_XBM

+ +

EB_SIZE_NARROW_FONT_48_XBM

+ +

EB_SIZE_WIDE_FONT_16_XBM

+ +

EB_SIZE_WIDE_FONT_24_XBM

+ +

EB_SIZE_WIDE_FONT_30_XBM

+ +

EB_SIZE_WIDE_FONT_48_XBM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xbm() Ѥ XBM +ѴݤˡѴ XBM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XPM

+ +

EB_SIZE_NARROW_FONT_24_XPM

+ +

EB_SIZE_NARROW_FONT_30_XPM

+ +

EB_SIZE_NARROW_FONT_48_XPM

+ +

EB_SIZE_WIDE_FONT_16_XPM

+ +

EB_SIZE_WIDE_FONT_24_XPM

+ +

EB_SIZE_WIDE_FONT_30_XPM

+ +

EB_SIZE_WIDE_FONT_48_XPM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xpm() Ѥ XPM +ѴݤˡѴ XPM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_GIF

+ +

EB_SIZE_NARROW_FONT_24_GIF

+ +

EB_SIZE_NARROW_FONT_30_GIF

+ +

EB_SIZE_NARROW_FONT_48_GIF

+ +

EB_SIZE_WIDE_FONT_16_GIF

+ +

EB_SIZE_WIDE_FONT_24_GIF

+ +

EB_SIZE_WIDE_FONT_30_GIF

+ +

EB_SIZE_WIDE_FONT_48_GIF

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_gif() Ѥ GIF +ѴݤˡѴ GIF Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_BMP

+ +

EB_SIZE_NARROW_FONT_24_BMP

+ +

EB_SIZE_NARROW_FONT_30_BMP

+ +

EB_SIZE_NARROW_FONT_48_BMP

+ +

EB_SIZE_WIDE_FONT_16_BMP

+ +

EB_SIZE_WIDE_FONT_24_BMP

+ +

EB_SIZE_WIDE_FONT_30_BMP

+ +

EB_SIZE_WIDE_FONT_48_BMP

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_bmp() Ѥ BMP +ѴݤˡѴ BMP Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_PNG

+ +

EB_SIZE_NARROW_FONT_24_PNG

+ +

EB_SIZE_NARROW_FONT_30_PNG

+ +

EB_SIZE_NARROW_FONT_48_PNG

+ +

EB_SIZE_WIDE_FONT_16_PNG

+ +

EB_SIZE_WIDE_FONT_24_PNG

+ +

EB_SIZE_WIDE_FONT_30_PNG

+ +

EB_SIZE_WIDE_FONT_48_PNG

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_png() Ѥ PNG +ѴݤˡѴ PNG Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_Error_Code eb_font (EB_Book *book, EB_Font_Code *font_code)

+ +

+ؿ eb_font() ϡ򤷤Ƥܤˤơ +եȤι⤵ɽɤ font_code λؤΰ +񤭹ߤޤ +

+ +

+ȴؿ EB_SUCCESS ֤ޤ +Ԥ font_code λؤΰ EB_FONT_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢեȤι⤵򤵤ƤʤФʤޤ +򤵤ƤʤСEB_ERR_NO_CUR_FONT ֤ޤ +ܤΤΤ򤷤Ƥʤ⡢ƱͤǤ +

+ + +

EB_Error_Code eb_set_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_set_font() ϡܤˤ볰եȤ +⤵򥻥åȤޤ +åȤ볰եȤΡֹ⤵פϡб볰ɤ +font_code ǻꤷޤ +

+ +

+δؿϡ EB_SUCCESS ֤ꤷֹ⤵פ +γեȤι⤵פȤʤޤ +Ǥ˳եȤι⤵򤷤Ƥϡä̤ξ֤ +Ƥ餢餿 font_code 򤷤ޤ +

+ +

+Ԥȸ򼨤顼ɤ֤եȤι⤵̤ +֤ˤʤޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ޤܤäƤʤեȤι⤵ꤵȡ +EB_ERR_NO_SUCH_FONT ֤ޤ +

+ + +

void eb_unset_font (EB_Book *book)

+ +

+ؿ eb_unset_font() ϡγեȤι⤵̤ +ξ֤ᤷޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤ硢 +⤷ϳեȤι⤵򤵤Ƥʤϲ⤷ޤ +

+ + +

EB_Error_Code eb_font_list (EB_Book *book, EB_Font_Code *font_list, int *font_count)

+ +

+ؿ eb_font_list() ϡܤƤ볰 +⤵ΰ EB_Font_Code ˤơfont_list +λؤΰ˽񤭹ߤޤ +

+ +

EB_MAX_FONTS ĤǤޤ +äơҤϿƤܤθĿ font_count λؤΰ +񤭹ߤޤ +(ߤΥСǤ EB_MAX_FONTS ͤ 4 ˤʤäƤޤ +⤵ 16, 24, 30, 48 ԥ 4 Ǥ) +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡfont_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ + +

int eb_have_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_font() ϡfont_code ǻꤷ⤵ +եȤܤäƤ뤫ɤĴ٤ޤ +

+ +

+äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_font_height (EB_Book *book, int *height)

+ +

+ؿ eb_font_height() ϡbook +եȤι⤵ (Υԥ) height λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡheight λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_font_height2 (EB_Font_Code font_code, int *height)

+ +

+eb_font_height() ȻƤޤܤǤϤʤ +font_height ǻꤵ줿ɤι⤵ (Υԥ) +񤭹ۤʤޤ +

+ + +

int eb_have_narrow_font (EB_Book *book)

+ +

int eb_have_wide_font (EB_Book *book)

+ +

+ؿ eb_have_narrow_font() ϡܤȾѳ +Ƥ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_font() ϡѳƤ뤫 +ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width (EB_Book *book, int *width)

+ +

EB_Error_Code eb_wide_font_width (EB_Book *book, int *width)

+ +

+ؿ eb_narrow_font_width() ϡbook +եȤι⤵ˤȾѳ (Υԥ) +height λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_width() ѳ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡwidth λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳι⤵򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width2 (EB_Font_Code font_code, int *width)

+ +

EB_Error_Code eb_wide_font_width2 (EB_Font_Code font_code, int *width)

+ +

+eb_narrow_font_width(), eb_wide_font_width() +ƤޤܤǤϤʤfont_height ǻꤵ줿 +ɤ (Υԥ) 񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_size (EB_Book *book, size_t *size)

+ +

EB_Error_Code eb_wide_font_size (EB_Book *book, size_t *size)

+ +

+ؿ eb_narrow_font_size() ϡbook +եȤι⤵ˤȾѳʬΥǡ (Хȿ) +size λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_size() ѳΥ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

EB_Error_Code eb_wide_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

+eb_narrow_font_size(), eb_wide_font_size() +ƤޤܤǤϤʤ font_height ǻ +줿ɤγʬΥǡ񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_start (EB_Book *book, int *start)

+ +

EB_Error_Code eb_wide_font_start (EB_Book *book, int *start)

+ +

+ؿ eb_narrow_font_start() ϡbook +ܤˤȾѳƬʸֹ (ȾѳʸֹǺǾΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_font_end (EB_Book *book, int *end)

+ +

EB_Error_Code eb_wide_font_end (EB_Book *book, int *end)

+ +

+ؿ eb_narrow_font_end() ϡbook +ˤȾѳκǸʸֹ (ȾѳʸֹǺΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_end() ϡȾѳǤϤʤѳˤĤ +Ĵ٤Ȥơeb_narrow_font_end() ƱǤ +

+ + +

EB_Error_Code eb_narrow_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

EB_Error_Code eb_wide_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

+ؿ eb_narrow_font_character_bitmap() ϡbook +ܤƤ롢ȾѳΥӥåȥޥåץǡФޤ +Фʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿϥӥåȥޥåץǡ bitmap λؤΰ +񤭹ߡEB_SUCCESS ֤ޤ +Ԥȡbitmap λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +ܤȾѳƤʤ⡢Ϥ EB_ERR_NO_CUR_FONT +֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+ؿ eb_wide_font_character_bitmap() ϡȾѳǤϤʤ +ѳΥӥåȥޥåץǡФȤơ +eb_narrow_font_character_bitmap() ƱǤ +

+ +

+ӥåȥޥåץǡηˤĤƤϡ +ֳեȤμФ 򻲾ȤΤȡ +

+ + +

EB_Error_Code eb_forward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_forward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_font_character() ϡbook +ܤƤȾѳʸֹ character_number +n ĸ˰֤볰ʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳäƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_font_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_font_character() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_backward_narrow_font_character() +eb_forward_narrow_font_character() ȤϤ礦ɵդδؿǤ +book ܤƤȾѳʸֹ +character_number n ˰֤볰 +ʸֹޤ +

+ +

+Ʊͤˡeb_backward_wide_font_character() ϡѳ +Ĥ n γʸֹؿǡ +eb_forward_wide_font_character() ȿФδؿǤ +

+ +

+n ˤοꤹ뤳Ȥǽǡ줾켡θƤӽФ +ˤʤޤ +

+ +
+
+/* Ⱦѳξ (n < 0) */
+eb_forward_narrow_font_character (book, -n, character_number);
+
+/* ѳξ (n < 0) */
+eb_forward_wide_font_character (book, -n, character_number);
+
+
+ + +

EB_Error_Code eb_narrow_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_png_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_png_size (EB_Font_Code height, size_t *size)

+ +

+ǽ 5 Ĥδؿ +(eb_narrow_font_xbm_size() +eb_narrow_font_png_size()) ϡ height +ȾѳĤΥӥåȥޥåפ XBM, XPM, GIF, BMP, PNG ˤ줾Ѵ +ȤΥǡ size λؤΰ˽񤭹ߤޤ +

+ +

+Ʊͤˡ 5 Ĥδؿ +(eb_wide_font_xbm_size() +eb_wide_font_png_size()) ϡѳѴȤ +ǡ񤭹ߤޤ +

+ +

+δؿ⡢ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_bitmap_to_xbm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_xpm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_gif (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_bmp (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_png (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

+ 5 Ĥδؿϡeb_narrow_font_character() ޤ +eb_wide_font_character() ǼФΥӥåȥޥåפ +XBM, XPM, GIF, BMP, PNG ˤ줾Ѵޤ +

+ +

+ӥåȥޥåץǡλؤΰ bitmap ǻꤷӥåȥޥåפ +⤵ width, height Ϥޤ +

+ +

+ؿθƤӽФȡimage λؤΰѴΥǡ +񤭹ޤ졢image_length λؤΰѴΥǡ礭 +񤭹ޤޤ +

+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2002-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <book-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡ
+ *     ܤƤȾѳ (⤵ 16 ԥ) 򤹤٤ƥ
+ *     Ȥɽޤ
+ *
+ *     ܤ⤵ 16 ԥȾѳƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/font.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int font_start;
+    unsigned char bitmap[EB_SIZE_NARROW_FONT_16];
+    int i, j;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s book-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /*ָߤγ礭פꡣ*/
+    if (eb_set_font(&book, EB_FONT_16) < 0) {
+        fprintf(stderr, "%s: failed to set the font size, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_font_start(&book, &font_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = font_start;
+    for (;;) {
+        /* Υӥåȥޥåץǡ*/
+        error_code = eb_narrow_font_character_bitmap(&book, i,
+            (char *)bitmap);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ӥåȥޥåפ򥢥Ȥˤƽϡ*/
+        printf("code point=%04x\n", i);
+        for (j = 0; j < 16; j++) {
+            fputc((bitmap[j] & 0x80) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x40) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x20) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x10) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x08) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x04) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x02) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x01) ? '*' : ' ', stdout);
+            fputc('\n', stdout);
+        }
+        fputs("--------\n", stdout);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_font_character(&book, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-11.html b/lib/ebu/doc/eb-11.html new file mode 100644 index 0000000..728a6f7 --- /dev/null +++ b/lib/ebu/doc/eb-11.html @@ -0,0 +1,788 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

Хʥǡ

+ +

+Хʥǡ (binary data) Ȥϡ +Ǥư衢ȤäޥǥǡΤȤؤޤ +Хʥǡϡɬƥȥǡ +(֥ƥȥǡ 򻲾ȤΤ) +黲ȤѤޤ +

+ +

+ΤȤ EB 饤֥ǤϡΥХʥǡ갷Ȥ +Ǥ櫓ǤϤޤ +Żҥ֥åǰΤϡ2 ĴΥΥǤȡ顼 (JPEG) +Ǥ +EPWING ǤϡΥǡ顼 (BMP JPEG) ˲äơ +WAVE (PCM) MPEG ư򰷤ȤǤޤ +

+ +

+EB 饤֥꤬󶡤ƤΤϡХʥǡ +CD-ROM Ҥ뵡ǽǤ +ɽꤹ뵡ǽѰդƤޤΤǡդƲ +

+ +

+ץꥱϡ¼켭Ȥäоݤˤʤ顢 +ХʥǡɽˤбʤƤپϤޤ +Ǥϡ޴դɽ˥ΥǤȤäƤؼŵ +褦ˡбʤؤʤΤ⤢ޤ +Хʥǡɽεǽ뤫ɤϡץꥱ +оݼɤϰϤޤǤˤΤˤäƷɤǤ礦 +

+ +

+ʲξϤǤϼ̤˥ХʥǡΰˤĤޤ +

+ +

+Хʥǡμ˥ǡμФ̯˰ۤʤޤ ( +ǡμϿˡ̯˰ۤʤäƤ뤫¾ʤޤ)褽 +ϡΤ褦ʤΤˤʤޤ +

+ +
    +
  1. +ƥȥǡΥեåѤơХʥǡλȾ롣 + +
  2. +eb_binary_set_...() ؿƤӽФơꤷ֤ +Хʥǡ򤳤줫ɤ߹ݤ EB 饤֥롣 + +
  3. +eb_read_binary() Ǽºݤ˥ǡɤ߹ࡣ +
+ +

+ƥȥǡƱͤˡХʥǡܤ°ǡ +ǤΤǡܤ򤷤Ƥʤȼ뤳ȤϤǤޤ +Хʥǡɤ߹ߤˤϡƥȥǡȤ̤ +եǥץƤޤ +äơߤɤ߹Ǥ⡢ưˤϱƶϤޤ +

+ + + +

Υ

+ +

+2 ĴΥΥǤϡŻҥ֥åEPWING ¸ߤEB 饤֥ +ǤϤɤⰷȤǤޤ +(Żҥ֥å¸ߤ 16 ĴΥΥǤϡΤȤ EB 饤֥ +ǤбƤޤ) +

+ +

+ΥǥǡϳƱǤEB 饤֥Ǥϡ +1 ԥ 1bit Ƥ BMP Ѵƥץꥱ +Ϥ褦ˤƤޤ +äơץꥱ󤫤ϡ BMP οǥǡϿ +Ƥ褦ˤߤޤ +

+ +

+ƥȥǡ⤫ϡХʥǡǤΥǤ򻲾Ȥ +Ȥޤ +ΥǤФˤϡλȾɬפǤ +ȾμϡƥȥǡˡΥǤγϤȽλ +ɽץ󥹤ؤΥեå EB_HOOK_BEGIN_MONO_GRAPHIC + EB_HOOK_END_MONO_GRAPHIC ѤƹԤޤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +(argv) 4 ĤꡢΤ argv[2] +argv[3] Ǥȹ⤵ (ԥ) ̣ޤ +

+ +

+ޤեå EB_HOOK_END_MONO_GRAPHIC եåؿϤ + 3 Ĥǡargv[1] argv[2] +ǥǡΥڡֹȥեåȤˤʤޤ +

+ +

+ΥǤˤϡ嵭ΥեåǤΥڡֹ +եåȡȹ⤵򵭲Ƥޤ +

+ +

eb_set_binary_mono_graphic() ƤӽФơ줫 +ΥǤΥǡ뤳Ȥ EB 饤֥ޤ +eb_set_binary_mono_graphic() ؤΰˤϡ +EB_Book ֥ȤȡۤǤؤΥڡֹ桢 +եåȡ⤵Ϥޤ +EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥɬפޤ +

+ +
+
+/* eb_set_binary_mono_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_mono_graphic(EB_Book *book, EB_Position *position,
+    int width, int height);
+
+
+ +

+Żҥ֥åǤϡեåؿϤȹ⤵ͤ 0 ˤʤäƤޤ +Τޤ eb_set_binary_mono_graphic() Ϥޤ +(EPWING Ǥ 0 ϤƤϤޤ) +

+ +

+ʾǿǥǡμǤΤǡǡɤ߹ߤޤ +ˤϡeb_read_binary() Ȥޤ +

+ +
+
+#define MAX_LENGTH 1000
+char bitmap[MAX_LENGTH];
+ssize_t bitmap_length;
+
+if (eb_read_binary(&book, MAX_LENGTH, bitmap, &bitmap_length)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ȡɤ߹ǥǡ bitmap ˽񤭹ޤ졢 +ХȽ񤭹Τ bitmap_length ˽񤭹ޤޤ +񤭹ޤХȿϡ MAX_LENGTH ХȤǤ +

+ +

eb_read_binary() θƤӽФǿǥǡ +üޤɤ߹ɬפϤʤؿ򷫤֤ƤӽФС³ +ɤ߹ळȤǤޤ +eb_read_binary() ϡǥǡνüޤȤʾ +ǡɤ߹ߤޤΤǡeb_read_binary() 0 ֤ +ǿǥǡüȤǧǤޤ +

+ + +

+ +

+顼ǤϡŻҥ֥åǤ JPEG EPWING Ǥ JPEG BMP (DIB) +ΤΤѤƤޤ +EB 饤֥Ϥ򤹤٤ưȤǤޤŻҥ֥åؤб +ϸŪʤΤˤʤäƤޤ(ܤϸҤޤ) +

+ +

+顼ǤΥǡФˤϡΥǤƱͤ˥ƥȥǡ +饫顼ǤؤλȾեå̤Ƽ³Ƽºݤ +顼ǤΥǡɤ߹Ȥˤʤޤ +

+ +

+eb_set_binary_color_graphic() ƤӽФơ줫 +ץꥱ󤬥顼ǤΥǡ褦ȤƤ뤳Ȥ +EB 饤֥ޤ +eb_set_binary_color_graphic() ؤΰˤϡ +EB_Book ֥Ȥ˲äơ顼ǤΥڡֹ +եåȤϤޤ +

+ +
+
+/* eb_set_binary_color_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_color_graphic(EB_Book *book, EB_Position *position);
+
+
+ +

+EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥޤ + +顼ǤΥڡֹȥեåȤξϡ顼ǤγϤȽλɽ +ץ󥹤ؤΥեåޤ +եåϡ饤ɽѤ󥤥饤Ѥ 2 बꡢ +줾쳫ϥեå JPEG Ѥ BMP ѤʬƤޤ +

+ +
+
EB_HOOK_BEGIN_COLOR_BMP
+
EB_HOOK_BEGIN_COLOR_JPEG
+
+󥤥饤 BMP, JPEG γϥեå + +
EB_HOOK_END_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå + +
EB_HOOK_BEGIN_IN_COLOR_BMP
+
EB_HOOK_BEGIN_IN_COLOR_JPEG
+
+饤 BMP, JPEG γϥեå + +
EB_HOOK_END_IN_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå +
+ +

+󥤥饤Ѥνλեå EB_HOOK_END_GRAPHIC Ǥϡ +եåؿϤ argv[2] argv[3] +ǥǡΥڡֹȥեåȤˤʤޤΤǡ +eb_set_binary_color_graphic() ϤƤޤ +Ʊͤˡ饤Ѥνλեå EB_HOOK_END_IN_GRAPHIC +Ǥϡargv[2] argv[3] ڡֹ +եåȤǤΤǡϤޤ +

+ +

+ϡºݤ˥顼ǤΥǡФޤ +ˤϡΥǤƱͤ eb_read_binary() Ѥޤ +ȤϤޤäǤΤǡܤ +֥Υǡ 򻲾ȤƤ +

+ +

+Żҥ֥åΥ顼ǤˤĤƤϡǡνλ֤Ƥ +EB 饤֥ɤ߹ߤߤʤȤ»बޤ +ϡǡ礭˴ؤ󤬵Ƥʤǡǡ +ü֤ϡץꥱ JPEG ΥǡǥɤƳФ +ޤ +

+ + +

դ顼

+ +

+顼Ǥˤϡζΰ˻ξդäΤ +ޤ +HTML ˤ륯å֥롦᡼ (clickable image) ȤۤƱǡ +ΰ˥ޥݥ󥿤֤˥ޥ򥯥åȡ餫 +줿˲̤ܤȤųݤǤ +ȤʤΰϡĤФʣϿǤޤ +

+ +
+
+դ顼Ǥ
+
+
+
+ΰ裱ΰ裲
+
+
+
+
+
+ΰ裳ǡ
+
+
+
+
+
+ +

+դ顼Ǥμ갷ϡ̾Υ顼Ǥĥ +ʤޤ̾Υ顼ǤξǤϡȤ JPEG 󥤥饤 +ǤϡΤ褦ʽ֤ǥեåƤӽФޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ФƻդΥ顼ǤǤϡ2ĤΥեåδ֤ˡΰ +˴ؤեåޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ1 ) +
  3. EB_HOOK_END_CLICKABLE_AREA (ΰ1 λ) +
  4. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ2 ) +
  5. EB_HOOK_END_CLICKABLE_AREA (ΰ2 λ)
    + ʲΰ3ΰ4 ... ȶΰθĿʬ³ +
  6. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ΰ˴ؤŪʾϡEB_HOOK_BEGIN_CLICKABLE_AREA +(ϥեå) ΤۤǼޤ +եåؿϤ argv[1] argv[2] +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] ΰα +ؤȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +

+ץꥱ󤬻դ顼Ǥбʤϡΰ +ϾȽλ̵뤹뤳Ȥˤʤޤ +ˤꡢǤ̾ (ʤ) 顼ǤȤޤäƱ +ޤ +

+ + +

WAVE (PCM)

+ +

+WAVE (PCM) βǡ EPWING ˤ¸ߤޤ +(Żҥ֥åˤ CD-DA βǡޤEB 饤֥ +ǤбƤޤ) +

+ +

+WAVE βǡФˤϡޤƥȥǡ椫 WAVE +λȾޤ +ȳϤȽλɽץ󥹤ؤΥեå +EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE +줾줢ޤΤǡѤޤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤΤ +argv[2] argv[3] ǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤȤʤޤ +

+ +

+γϰ֤Ƚλ֤ؿ eb_set_binary_wave() Ϥơ +ΰ֤ˤ벻ǡ򤳤줫ФȤ EB 饤֥ޤ +

+ +
+
+/* eb_set_binary_wave() δؿץȥ */
+EB_Error_Code
+eb_set_binary_wave(EB_Book *book, EB_Position *start_position,
+EB_Position *end_position);
+
+
+ +

+Ƹϡºݤ˲ǡФޤ +ˤϡ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

MPEG1 ư

+ +

+MPEG1 ưǡ EPWING ˤ¸ߤޤ +ưǡ EPWING CD-ROM movie Ȥǥ쥯ȥβˡ +ư˰ĤΥեˤǼƤޤ +

+ +

+ƥȥǡ¸ߤ롢MPEG ǡλȳϤȽλɽ +ץ󥹤ؤΥեå EB_HOOK_BEGIN_MPEG +EB_HOOK_END_MPEG Ѥ뤳Ȥǡ MPEG +ե̾Ǥޤ +

+ +

+Ūˤϡեå EB_HOOK_BEGIN_MPEG եåؿϤ +Τargv[2] argv[5] 碌ư +Υե̾ɽ褦ˤʤäƤޤ +

+ +

+MPEG ưΥǡˤϡΥե̾ +eb_set_binary_mpeg() ϤơΥեưǡ +줫Фݤ EB 饤֥ޤ +ե̾ϡΤ褦ˤ argv + 2 +(&argv[2] ǤƱ) Ϥޤ +

+ +
+
+if (eb_set_binary_mpeg(&book, argv + 2) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ϡºݤưǡФޤ +ˤϡϤ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤˤĤƤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/binary.h>
+
+
+ + +

EB_Error_Code eb_set_binary_mono_graphic (EB_Book *book, const EB_Position *position, int width, height)

+ +

+ؿ eb_set_binary_mono_graphic() ϡΥǤΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֡width, height +ˤϿǤȹ⤵Ϥޤ +ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +Żҥ֥åǤȹ⤵ͤξ󤬥ƥȥǡ˵Ƥʤ +ᡢ0 ϤȤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֡⤵ͤ餫ˤ EB 饤֥꤬ȽǤ +ȤϡEB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +ΥǤΥǡϡ1 ԥ 1bit Ƥ BMP ˤʤä +ޤ +

+ + +

EB_Error_Code eb_set_binary_color_graphic (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_set_binary_color_graphic() ϡEPWING Υ顼Ǥ +ǡ򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֤Ϥޤ +֤ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +顼ǥǡϡJPEG BMP (DIB) ΤηˤʤäƤޤ +

+ + +

EB_Error_Code eb_set_binary_wave (EB_Book *book, const EB_Position *start_position, EB_Position *end_position)

+ +

+ؿ eb_set_binary_wave() ϡWAVE (PCM) βΥǡ +򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + start_position end_position ˤϲǡ +γϰ֤Ϥޤ +֤ξϡǡλȸǤƥȥǡ˵ܤƤꡢ +̾ϥեåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ǡΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˲ǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_set_binary_mpeg (EB_Book *book, const unsigned int *argv)

+ +

+ؿ eb_set_binary_mpeg() ϡMPEG1 ưΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + argv ˤưǡΥե̾Ϥޤ +Υե̾ʸǤϤʤեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 argv[2] + argv[5] ʬϤޤ +Ĥޤꡢեåؿΰ argv + 2 +eb_set_binary_mpeg() ؤΰ argv Ȥ +Ϥޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢưǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +¸ߤʤưե̾ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+δؿϡºݤưǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_read_binary (EB_Book *book, size_t binary_max_length, char *binary, ssize_t *binary_length)

+ +

+ؿ eb_read_binary() ϡХʥǡɤ߹ߤޤ +ɤ߹⤦ȤƤХʥǡϡ +

+ +
    +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+Τ줫δؿǡEB 饤֥ΤƤɬפޤ +

+ +

+ɤ߹ǡϰ binary λؤΰ˽񤭹ޤޤ +ޤΤȤ񤭹ޤ줿Хȿϡbinary_length λؤ +ΰ˥åȤޤ +񤭹ޤХȿϡĹǤ binary_max_length +˻ꤷͤޤǤȤʤޤ +

+ +

+δؿϡäɤ߹ǡνü˥ʥʸղä褦ʻ +ޤ +ɤ߹ޤǡХʥʤΤǡ˥ʥʸи +ޤ +

+ +

+δؿƤӽФǡХʥǡΤ쵤˼ +ɬפϤޤ +֤ƤӽФС³ǡɤ߹ޤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡХʥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤޤΤǡʾɤ߹ߤϤǤʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+eb_read_binary() 򷫤֤Ƥ硢Хʥǡ + binary Ƭ񤭹ޤ졢*binary_length +ͤ⡢β eb_read_binary() θƤӽФǽ񤭹ޤ줿 +Хȿˤʤޤ +

+ +

+ǡνüȡʾ夳δؿƤǤؿ binary +ˤϲ񤭹ޤ*binary_length 0 񤭹ߡ +EB_SUCCESS ֤ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡbinary_length ؤΰ -1 񤭹ߡ +顼ɤ֤ޤ +ξ硢Хʥǡɤ߹߾֤εϿꥻåȤޤΤǡ +ǡ³ɤ߹ळȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤƬ˵󤲤ؿθƤӽФƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_CUR_BINARY ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_file_name (const unsigned int *argv, char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡưǡΥե̾ +̾ʸѴޤ +

+ +

+EB 饤֥ǤϡưǡΥե̾ϥեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 4 Ĥ int +(argv[2] argv[5]) ˤäɽޤ +

+ +

+ưǡɤ߹ݤϡ򤽤Τޤ eb_set_binary_mpeg() +ϤɤΤǤե̾̾ʸϡδؿ +Ѥޤ +ȤСġư˰դ ID Τ褦ʤΤ򿶤ꤿϡե +̾ ID ȤƻȤɤΤޤ +ʤδؿѴե̾ˤϥѥޤޤƤޤ +

+ +

+եåؿΰ argv + 2 򤳤δؿؤΰ argv +ȤϤȡcomposed_file_name ؤΰˡʸ +Ѵ줿ե̾Ǽޤ +ե̾ϺĹ EB_MAX_DIRECTORY_NAME_LENGTH (= 8) Х +ˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ʤǼ줿ե̾ϡºݤ¸ߤե̾Ȥϼ㴳ۤʤä +ǽޤ +ȤСѻʸȾʸҤ̵ͭʤɤΰ㤤ޤ +δؿϡޤʸ˵ŪѴʤΤǡե뤬º +뤫ɤΥåϤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_path_name (EB_Book *book, const unsigned int *argv, char *composed_path_name)

+ +

+ؿ eb_compose_movie_path_name() ϡưǡΥե̾ +̾ʸѴޤ +ƯϡҤδؿ eb_compose_movie_file_name() ɤ +Ƥޤeb_compose_movie_path_name() ֤ե̾ +ϡХѥηˤʤäƤۤʤޤ +

+ +

eb_compose_movie_path_name() Ǥϡե̾º +뤫ɤΥåԤȤ⡢礭ʰ㤤Ǥ +ե̾ʸѴǡѻʸȾʸΰ㤤Ҥ +̵ͭϡºߤΥե˹碌ĴΤ֤ޤ +äơѥʬӤƤ⡢ +eb_compose_movie_file_name() ֤ե̾Ȥɬ +פޤ +

+ +

+ book ϡưեϿƤܤ򤷤 +ʤФʤޤ +ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB ֤ޤ +

+ +

+ argv ΰ̣ϡeb_compose_movie_file_name() +ƱǤ +

+ +

+ե̾Ѵȡؿ composed_path_name +ؤΰˡʸѴ줿ưե̾Ǽ +EB_SUCCESS ֤ޤ +ե̾ϺĹ EB_MAX_PATH_LENGTH ХȤˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ե̾ºߤʤȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ + +

EB_Error_Code eb_decompose_movie_file_name (unsigned int *argv, const char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡ +eb_compose_movie_file_name() Ȥ礦ɵդƯ򤷤ޤ +Ĥޤꡢ̾ʸѴ줿ưǡΥե̾ +composed_file_name 4 Ĥ int argv +ᤷޤ +äơargv λؤΰϡʤȤ int ͤ 4 +ǼǤ礭ɬפǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-12.html b/lib/ebu/doc/eb-12.html new file mode 100644 index 0000000..47f3380 --- /dev/null +++ b/lib/ebu/doc/eb-12.html @@ -0,0 +1,1031 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

appendix ǡ

+ +

+appendix (Ͽ) Ȥ CD-ROM Ҥǡ +ȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +ebappendix ޥɤѤޤ +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
    +
  • ʸζڤꥳ +
  • ʸ +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalog ⤷ +catalogs ե뤬¸ߤܤΥǡб +֥ǥ쥯ȥ֤Ƥޤ +

+ +

+ץꥱ appendix бʸζڤꥳɤξȤ +褦ˤ뤳Ȥᤷޤ +ʸˤĤƤϡΥեȤ򤽤ΤޤɽǤΤ +СбɬϤʤ˳Ǥʸζڤꥳɤϡ +ʤʸɽǤʤҤбǤޤ +(ڤꥳɤˤĤƤϡֶڤꥳɤ 򻲾ȤΤ) +

+ + + +

EB_Appendix ֥

+ +

+CD-ROM Τ򰷤ˤ EB_Book ֥Ȥ +Ѥޤappendix 򰷤ˤ EB_Appendix ֥ +Ȥޤ +EB_Appendix ֥Ȥ뤿δؿϡ +EB_Book ΤΤȤϰۤʤޤϤ褯Ƥޤ +

+ +

+EB_Appendix ֥Ȥϡġ appendix Ф 1 +ĺɬפޤ +

+ +
+
+EB_Appendix app;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Appendix *app_pointer;
+
+app_pointer = (EB_Appendix *) malloc(sizeof(EB_Appendix));
+
+
+ +

+֥ȤϡȤɬ eb_initialize_appendix() +ȤؿȤʤƤϤʤޤ +EB_Book ֥ȤǤ eb_initialize_book() +ǽɬפޤƱǤ +

+ +
+
+eb_initialize_appendix(&app);
+eb_initialize_appendix(app_pointer);
+
+
+ +

+³ơ֥Ȥ appendix μΤ˷դ뤿ˡ +eb_bind_appendix() ƤӽФޤ +ϡEB_Book ֥Ȥ eb_bind() +ޤ +

+ +
+
+ţ¡
+֥ȡ
+
+
+⡲䡡
+ʡˡ
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind_appendix(&app, "/mnt/dict") != EB_SUCCESS) {
+    printf("eb_bind_appendix() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() Ϥ appendix Υѥ +(Ǥ /mnt/dict) appendix Υȥåץǥ쥯ȥꡢ +Ĥޤ catalog ޤ catalogs եΤ +ǥ쥯ȥꤷޤ +ѥˤϡ֥̻ (: ebnet://localhost/dict.app) +ꤹ뤳ȤǽǤ +

+ +

+EB_Appendix ֥ȤȤä顢 +eb_finalize_appendix() ƤǸ򤷤ޤ +֥Ȥ appendix Ȥηդ򤫤줿֤ꡢ +dzƤ줿ϲ졢Ƥե⤹٤ +Ĥޤ +

+ +
+
+eb_finalize_appendix(&app);
+eb_finalize_appendix(app_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_appendix() ƤʤС֥Ȥ +ΰ˲뤳ȤǤޤ +

+ +
+
+free(app_pointer);
+
+
+ + +

+ +

+CD-ROM Ʊͤˡappendix ˤܤ¸ߤޤ +appendix ܤ⡢ܥɤȤäƼ̤ޤ +ġܥɤϡappendix ƱΤʤ褦ˤʤäƤޤ +

+ +

+CD-ROM Τ٤ƤܤܥɤؿȤ +eb_subbook_list() ޤappendix ˤ +eb_appendix_subbook_list() ȤƱͤδؿޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_appendix_subbook_list(&app, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_appendix_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_appendix_subbook_list() ȡΤ٤Ƥ +ܥɤ sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+EB_Book Ʊͤ EB_Appendix ֥ +Ǥ⡢ӤĤ줿 CD-ROM ҤǤդܤǡ + (current subbook) Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ڤꥳɤ䳰ʸȤä appendix ΥǡؤΥ +ϡܤФƤԤޤ +

+ +

+ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+if (eb_set_appendix_subbook(&app, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() EB_Appendix ֥ + appendix ˷դľϡܤ򤵤Ƥʤ֤ +ʤäƤޤ +

+ + +

ʸζڤꥳ

+ +

+CD-ROM ҤˤäƤϡEB 饤֥꤬ʸɽ֤ +ߤʤȤޤ +(ܤϡֶڤꥳɤ 򻲾ȤΤ) +ϡʸζڤꥳɤο¬ EB 饤֥꤬ä˵ +ΤǤappendix ǡȤȤǡڤꥳɤ EB 饤֥ +˶Ƥ뤳ȤǤޤ +

+ +

+CD-ROM Ҥʸؿ eb_read_text() + 2 EB_Appendix * ȤΤǤ appendix +֥ȤϤƤ褦ˤޤ +

+ +
+
+/* book, app ϡ줾 EB_Book
+ *  EB_Appendix Υ֥Ȥǡɤ⤹Ǥ
+ * ܤȲꤷƤޤ*/
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, &app, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() ϡϤ줿 appendix ֥Ȥܤ +ѤߤǡĶڤꥳɤξäƤСζڤꥳɤ +Ѥޤ +

+ + +

ʸ

+ +

+CD-ROM ҤϡƤ볰ξȤƥեȤΥǡѰդ +ޤ +ĤޤꡢγɤΤ褦ʸʤΤ桼ʬ褦ˤˤϡ +ץꥱ󤬥եȤɽ뤷ޤ +Ǥϡƥȥ󥿡եѤץꥱǤϡ +ʸγʬޤäʬޤ +¿ѤƤҤǤϡʸǽ˶ᤤ֤ˤʤ뤫Τޤ +

+ +

+ EB 饤֥ǤϡؤȤʤʸ appendix +Ǥ褦ˤƤޤ +appendix ѰդƤ˸¤ꡢץꥱϳΥե +褹ˤʸϤ뤳ȤˤС +ƥȥ󥿡եѤץꥱǤҤɤ߰פ +ʤޤ +

+ +

+appendix ƤʸФؿϡ2 Ĥޤ +ȾѳѤ eb_narrow_alt_character_text() ѳѤ +eb_wide_alt_character_text() Ǥ +ɤ⡢ȤѤޤ +

+ +

+ʲǤϡȾѳʸֹ 0xa121 Фʸ +buffer ˳ǼƤޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * ǤܤǤȲꤷƤޤ*/
+char buffer[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+
+if (eb_narrow_alt_character_text(&app, buffer, 0xa121)
+    != EB_SUCCESS) {
+    printf("eb_narrow_alt_character_text() failed\n");
+    return;
+}
+
+
+ +

+ϸġܤФƤΤǡʸФˤϡ +餫ܤ򤷤Ƥɬפޤ +ΥեȤФݤϡ˲äƳΡֹ⤵פ򤷤Ƥ +ɬפޤʸˤϹ⤵γǰʤΤɬפޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡbuffer +Ϥ⤦ 1 Хʬ;͵Ƥޤ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

EB_Appendix

+ +

+EB_Appendix ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Appendix ֥Ȥϡ٤ EB 饤֥꤬ +ѰդƤؿǹԤޤ +ץꥱץϡľ EB_Appendix ֥ +ΥФ򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Appendix ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

void eb_initialize_appendix (EB_Appendix *app)

+ +

+ؿ eb_initialize_appendix() ϡapp λؤ +EB_Appendix ֥Ȥޤ +EB_Appendix ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_appendix() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_appendix (EB_Appendix *app)

+ +

+ؿ eb_finalize_appendix() ϡapp ؤ +EB_Appendix ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ appendix ȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_appendix() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_bind_appendix (EB_Appendix *app, const char *path)

+ +

+ؿ eb_bind_appendix() ϡapp λؤ +EB_Appendix ֥Ȥ򡢥ѥ path ˤ +appendix ˷դޤ +ѥˤϡappendix Υȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +appendix Υȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤappendix ˷դƤ硢 appendix Ȥ +դ򤤤Ƥ顢path ˤ appendix ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥Ȥ appendix Ȥηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ˡpath ХѥΤȤϡХѥѴ̤ +Ĺ˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

int eb_is_appendix_bound (EB_Appendix *app)

+ +

+ؿ eb_is_appendix_bound() ϡapp appendix +դƤ뤫ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_appendix_path (EB_Appendix *app, char *path)

+ +

+ؿ eb_appendix_path() ϡapp ˷դƤ +appendix Υѥ⤷ϱ֥̻Ҥpath λؤΰ +˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡ +eb_bind_appendix() ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_load_all_appendix_subbooks (EB_Appendix *app)

+ +

+ؿ eb_load_all_appendix_subbooks() ϡapp +Τ٤Ƥܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ +ԤޤδؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ +

+δؿƤӽФȡapp ϡܤ򤷤Ƥʤ֤ +ʤޤ +

+ + +

EB_Error_Code eb_appendix_subbook_list (EB_Book *app, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_appendix_subbook_list() ϡapp +٤ܤܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơappendix ϿƤܤθĿ subbook_count +ؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook (EB_Book *app, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_appendix_subbook() ϡapp +ܤܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢapp Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory (EB_Book *app, char *directory)

+ +

+ؿ eb_appendix_subbook_directory() ϡapp +ǸܤΥǡե᤿ǥ쥯ȥ̾ +directory λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory2 (EB_Book *app, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_appendix_subbook_directory() ȻƤޤ +ܤǤϤʤ subbook_code ǻꤵ줿ܤ +ǥ쥯ȥ̾񤭹ۤʤޤ +

+ +

+app ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +appendix ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_set_appendix_subbook (EB_Book *app, EB_Subbook_Code code)

+ +

+ؿ eb_set_appendix_subbook() ϡapp +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp appendix ˷դƤʤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

void eb_unset_appendix_subbook (EB_Book *app)

+ +

+ؿ eb_unset_appendix_subbook() ϡapp +Ƥܤ̤ξ֤ˤޤ +app appendix ˷դƤʤܤ򤵤Ƥʤ +ϡ⤷ޤ +

+ + +

int eb_have_stop_code (EB_Book *app)

+ +

+ؿ eb_have_stop_code() ϡapp ܤ +ڤꥳɤƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 ֤ޤ +Ƥʤ⤽ܤ򤵤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_stop_code (EB_Book *app, int *stop_code)

+ +

+ؿ eb_stop_code() ϡapp ܤ +Ƥڤꥳɤ stop_code λؤΰ˽񤭹ߤޤ +stop_code[0], stop_code[1] ˡڤꥳɤ +ȤƤ줾 0x0000 0xffff 񤭹ޤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡؿ stop_code[0] stop_code[1] + -1 񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤڤꥳɤƤʤϡEB_ERR_NO_STOPCODE +֤ޤ +

+ + +

int eb_have_narrow_alt (EB_Book *app)

+ +

int eb_have_wide_alt (EB_Book *app)

+ +

+ؿ eb_have_narrow_alt() ϡܤȾѳФ +ʸƤ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_alt() ϡѳФ +ʸƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +app ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_alt_start (EB_Book *app, int *start)

+ +

EB_Error_Code eb_wide_alt_start (EB_Book *app, int *start)

+ +

+ؿ eb_narrow_alt_start() ϡapp +ˤȾѳФʸϰϤĴ١Ƭʸֹ +(ȾѳʸֹǺǾΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_end (EB_Book *app, int *end)

+ +

EB_Error_Code eb_wide_alt_end (EB_Book *app, int *end)

+ +

+ؿ eb_narrow_alt_end() ϡapp +ˤȾѳФʸϰϤĴ١Ǹʸֹ +(ȾѳʸֹǺΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

EB_Error_Code eb_wide_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

+ؿ eb_narrow_alt_character_text() ϡbook +ܤƤ롢ȾѳʸФޤ +ʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿʸ text λؤΰ˽񤭹ߡ +EB_SUCCESS ֤ޤ +Ԥȡtext λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡtext +ΰˤϤ⤦ 1 ХʬɬפǤ +

+ +

+ʸ󤬤ɤʸɤǽ񤫤Ƥ뤫ϡappendix ˤ +ϿƤޤ +appendix ɬνҤбƺΤʤΤǡҤ +ʸɤ鼡Τ褦ȽǤСʤǤ礦 +

+ +
    +
  • Ҥ ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +
  • ʳξ硢ʸܸ EUC +
+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+ܤȾѳФʸ (character_number ˸¤餺 +ޤä) ƤʤϡEB_ERR_NO_ALT ֤ޤ +ǤϤʤʸֹˤĤƤȾѳФʸ +ƤΤΡcharacter_number Фʸ +¸ߤʤ硢ؿ EB_SUCCESS ֤text +λؤΰˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ؿ eb_wide_alt_character_text() ϡȾѳǤϤʤ +ѳФʸФȤơ +eb_narrow_alt_character_text() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_alt_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_alt_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_alt_character() ϡapp +ܤˤƤ롢ȾѳФʸ +ʸֹ character_number n ĸ˰֤ +ʸʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_alt_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_alt_character() ƱǤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <appendix-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <appendix-path> ǻꤷ appendix ܤӡ
+ *     ܤƤȾѳʸ򤹤٤ɽޤ
+ *
+ *      appendix ȾѳʸƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/appendix.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Appendix app;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int alt_start;
+    char text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s appendix-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `app' */
+    eb_initialize_library();
+    eb_initialize_appendix(&app);
+
+    /* appendix  `app' ˷դ롣*/
+    error_code = eb_bind_appendix(&app, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the app, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_appendix_subbook_list(&app, subbook_list,
+        &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    if (eb_set_appendix_subbook(&app, subbook_list[subbook_index])
+        < 0) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_alt_start(&app, &alt_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = alt_start;
+    for (;;) {
+        /* ʸ*/
+        error_code = eb_narrow_alt_character_text(&app, i, text);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ʸϡ*/
+        printf("%04x: %s\n", i, text);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_alt_character(&app, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* appendix  EB 饤֥Ѥλ*/
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-13.html b/lib/ebu/doc/eb-13.html new file mode 100644 index 0000000..e95380d --- /dev/null +++ b/lib/ebu/doc/eb-13.html @@ -0,0 +1,474 @@ + + + + + + + +EB 饤֥ + + + +

+[] [] [ܼ] +

+
+

оνҰ

+ +

+EBNET Ф֥ԤݡФΥ饤ȤФ +ĤƤҤ appendix ǡΰ뤳Ȥ +Ǥޤ +

+ +

+ΤȤEBNET Фꤹ֥һҤˤϡνҤ +appendix ǡФ륢Ȥϰۤʤꡢ̾ϻꤷޤ +ʤ̷ϼΤ褦ˤʤޤ +

+ +
+
+ebnet://ۥ:ݡ/
+
+
+ +

+ `/' ϤʤƤ⹽ޤ +: Ȥ³ݡֹϾάǽǡξ +22010 ֥ݡȤѤ뤳Ȥ̣ޤ +

+ +

+ebinfo ޥɤ --book-list ץεưϡEB 饤֥ +ΤεǽˤäƼƤޤ +(ebinfo ˤĤƤξܺ٤ϡ +@pxref{Book list on EBNET server, , EBNET ФνҰ, ebinfo-ja, ebinfo-ja}) +

+ +
+
+% ebinfo --book-list ebnet://localhost
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

.app ˤʤäƤΤ appendix ǡǡ +¾ϽΤǤ +ν encycl Фƥʤ顢 +֥̻Ҥ ebnet://localhost/encycl ˤʤޤ +

+ +

+ʤ饤ȤФƥĤƤʤҤ appendix ǡ +ϡ¦ǰޤ +

+ + + +

EB_BookList ֥

+ +

+EBNET Ф󶡤Ҥ appendix ǡΰˤϡ +ޤ EB_BookList Υ֥ȤѰդɬפޤ +

+ +
+
+EB_BookList bl;
+
+
+ +

+֥Ȥΰϡmalloc() dzݤƤ⹽ޤ +

+ +
+
+EB_BookList *bl_pointer;
+
+bl_pointer = (EB_BookList *) malloc(sizeof(EB_BookList));
+
+
+ +

+EB_Book ֥ȤƱͤˡEB_BookList +֥ȤȤȤɬפޤ +ϡeb_initialize_booklist() ȤؿǹԤޤ +

+ +
+
+eb_initialize_booklist(&bl);
+eb_initialize_booklist(bl_pointer);
+
+
+ +

+λ顢ΥФȥ֥ȤӤĤޤ +ȤСebnet://localhost ɽ륵ФФơ +֥ȤӤĤˤϼΤ褦ˤޤ +

+ +
+
+if (eb_bind_booklist(&bl, "ebnet://localhost") != EB_SUCCESS) {
+    printf("eb_bind_booklist() failed\n");
+    return;
+}
+
+
+ +

+Ϥ礦ɡEB_Book ֥ȤФ +eb_bind() Ƥ֤ΤƱǤ +

+ +

+ơ褦䤯ҰξФȤǤޤ +ˤ eb_booklist_book_count(), +eb_booklist_book_name(), eb_booklist_book_title() +Ȥ 3 ĤδؿѤޤ +δؿϤ줾졢饤ȤǽʽҤοƽ + appendix ǡ̾ (̻ҤȤƻꤹ̾)ƽ + appendix ǡ̾뤳ȤǤޤ +

+ +
+
+char *name, *title;
+int count, i;
+
+count = eb_booklist_book_count(&bl);
+for (i = 0; i < count; i++) {
+    if (eb_booklist_book_name(&bl, i, &name) != EB_SUCCESS) {
+        printf("eb_booklist_book_name(%d) failed\n", i);
+        return;
+    }
+    if (eb_booklist_book_title(&bl, i, &title) != EB_SUCCESS) {
+        printf("eb_booklist_book_title(%d) failed\n", i);
+        return;
+    }
+    printf("name = %s, title = %s\n", name, title);
+}
+
+
+ +

+EB_BookList ֥ȤȤä顢ɬ +Ԥޤ +

+ +
+
+eb_finalize_booklist(&bl);
+eb_finalize_booklist(bl_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_booklist() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(bl_pointer);
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

EB_BookList

+ +

+EB_BookList ϡEBNET о夬ȤäƤҤ +appendix ΰݤѤ륪ȤηǤ +

+ +

+EB_BookList ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_booklist() Ƥǽɬפ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

void eb_initialize_booklist (EB_BookList *bl)

+ +

+ؿ eb_initialize_booklist() ϡbl λؤ +EB_BookList ֥Ȥޤ +EB_BookList ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_booklist() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind_booklist (EB_BookList *bl, const char *path)

+ +

+ؿ eb_bind_booklist() ϡapp λؤ +EB_BookList ֥Ȥ򡢱֥һ path +ǻꤵ줿 EBNET Ф˷դޤ +

+ +

+֥ȤǤ˥Ф˷դƤ硢ΥФȤηդ +򤤤Ƥ顢path ˤ륵Ф˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ֥Ȥ򥵡ФȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +ޤ̾ꤷƤʤ֥һҤǤʤФʤޤ +ʳηȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ +

+ѤƤ EB 饤֥ΥХʥ꤬֥бΤΤ +硢EB_ERR_EBNET_UNSUPPORTED ֤ޤ +

+ + +

void eb_finalize_booklist (EB_BookList *bl)

+ +

+ؿ eb_finalize_booklist() ϡbl ؤ +EB_BookList ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ EBNET ФȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_booklist() Ƥ +Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_booklist_book_count (EB_BookList *bl)

+ +

+ؿ eb_booklist_book_count() ϡEBNET Ф +饤ȤФƥĤƤҤ appendix ǡο +ޤ +

+ +

bl λؤ EB_BookList ֥Ȥϡ +餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +

+ + +

EB_Error_Code eb_booklist_book_name (EB_BookList *bl, int i, char **name)

+ +

EB_Error_Code eb_booklist_book_title (EB_BookList *bl, int i, char **title)

+ +

+ؿ eb_booklist_book_name() ϡEBNET ФνҤ +appendix ǡ̾Τޤ +Ǹ̾ΡפȤϡ֥̻Ҥǻꤹ̾ΤȤǤ +Ĥޤꡢebnet://localhost/dict dict ʬ +ؤޤ +Ʊͤˡؿ eb_booklist_book_title() ϡҤ appendix +̾ޤ +

+ +

+δؿ⡢EBNET оβܤνҤ⤷ appendix ξ +Τ򡢰 i ǻꤷޤ +Ƭ 1 ܤǤϤʤ 0 ܤˤʤޤ +

+ +

+ȡؿϽҤ̾Ρ̾ؤΥݥ󥿤 *name, +*title ˽񤭹ߡEB_SUCCESS ֤ޤ +ʤΥݥͤ ֥ bl ݻƤ +ʸؤ褦ˤʤäƤޤ +bl Ф eb_finalize_booklist() Ƥ +ޤȡʸ⻲ԲǽˤʤäƤޤޤΤǡդƲ +

+ +

bl λؤ EB_BookList ֥ +ϡ餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +ޤi 0 ʾ夫ĥФ󶡤ƤҤ appendix +̤ǤʤФʤޤ +ʳͤΤȤϡEB_ERR_NO_SUCH_BOOK ֤ޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     booklist <remote-access-ideintifier>
+ * :
+ *     booklist ebnet://localhost
+ * :
+ *     <remote-access-ideintifier> ǻꤷ EBNET Ф³
+ *     ơФ󶡤ҡappendix ΰɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/booklist.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_BookList bl;
+    int book_count;
+    char *name, *title;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path remote-access-identifier\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `bl' */
+    eb_initialize_library();
+    eb_initialize_booklist(&bl);
+
+    /* EBNET Ф `bl' ˷դ롣*/
+    error_code = eb_bind_booklist(&bl, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the EBNET server, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* оνҡappendix θĿ*/
+    error_code = eb_booklist_book_count(&bl, &book_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the number of books, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    for (i = 0; i < book_count; i++) {
+        /* ҡappendix ̾Τ*/
+        error_code = eb_booklist_book_name(&bl, i, &name);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book name #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ҡappendix ̾*/
+        error_code = eb_booklist_book_name(&bl, i, &title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book title #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        printf("%-20s  %s\n", name, title);
+    }
+        
+    /* `bl'  EB 饤֥Ѥλ*/
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-14.html b/lib/ebu/doc/eb-14.html new file mode 100644 index 0000000..2a5bb7f --- /dev/null +++ b/lib/ebu/doc/eb-14.html @@ -0,0 +1,419 @@ + + + + + + + +EB 饤֥ + + + +

+[] [ܼ] +

+
+

+ + +

ǡκ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ +
+
A +
Appendix +
B +
Book +
BookList +
D +
Disc_Code +
E +
EB_Character_Code +
Error_Code +
F +
Font_Code +
H +
Hit +
Hook +
Hook_Code +
Hookset +
M +
Multi_Search_Code +
P +
Position +
S +
Subbook_Code +
+ + +

ؿκ

+ +

+ؿ̾Ƭ eb_ ϾάƤޤ +

+ +
+
A +
appendix_path +
appendix_subbook +
appendix_subbook_directory +
appendix_subbook_directory2 +
appendix_subbook_list +
B +
backward_narrow_alt_character +
backward_narrow_font_character +
backward_text +
backward_wide_alt_character +
backward_wide_font_character +
bind +
bind_appendix +
bind_booklist +
bitmap_to_bmp +
bitmap_to_gif +
bitmap_to_png +
bitmap_to_xbm +
bitmap_to_xpm +
booklist_book_count +
booklist_book_name +
booklist_book_title +
C +
character_code +
compose_movie_file_name +
compose_movie_path_name +
copyright +
current_candidate +
D +
decompose_movie_file_name +
disc_type +
E +
error_message +
error_string +
F +
finalize_appendix +
finalize_book +
finalize_booklist +
finalize_hookset +
finalize_library +
font +
font_height +
font_height2 +
font_list +
forward_heading +
forward_narrow_font_character +
forward_text +
forward_wide_font_character +
H +
have_copyright +
have_endword_search +
have_exactword_search +
have_font +
have_keyword_search +
have_menu +
have_multi_search +
have_narrow_alt +
have_narrow_font +
have_stop_code +
have_text +
have_wide_alt +
have_wide_font +
have_word_search +
hit_list +
hook_empty +
hook_euc_to_ascii +
hook_narrow_character_text +
hook_newline +
hook_wide_character_text +
I +
initialize_appendix +
initialize_book +
initialize_booklist +
initialize_hookset +
initialize_library +
is_appendix_bound +
is_bound +
is_text_stopped +
L +
load_all_appendix_subbooks +
load_all_subbooks +
M +
menu +
multi_entry_candidates +
multi_entry_count +
multi_entry_have_candidates +
multi_entry_label +
multi_search_list +
multi_title +
N +
narrow_alt_character_text +
narrow_alt_end +
narrow_alt_start +
narrow_font_bmp_size +
narrow_font_character_bitmap +
narrow_font_end +
narrow_font_gif_size +
narrow_font_png_size +
narrow_font_size +
narrow_font_size2 +
narrow_font_start +
narrow_font_width +
narrow_font_width2 +
narrow_font_xbm_size +
narrow_font_xpm_size +
P +
path +
R +
read_binary +
read_heading +
read_rawtext +
read_text +
S +
search_cross +
search_endword +
search_exactword +
search_keyword +
search_multi +
search_word +
seek_text +
set_appendix_subbook +
set_binary_color_graphic +
set_binary_mono_graphic +
set_binary_mpeg +
set_binary_wave +
set_font +
set_hook +
set_hooks +
set_subbook +
stop_code +
subbook +
subbook_directory +
subbook_directory2 +
subbook_list +
subbook_title +
subbook_title2 +
T +
tell_text +
text +
U +
unset_appendix_subbook +
unset_font +
unset_subbook +
W +
wide_alt_character_text +
wide_alt_end +
wide_alt_start +
wide_font_bmp_size +
wide_font_character_bitmap +
wide_font_end +
wide_font_gif_size +
wide_font_png_size +
wide_font_size +
wide_font_size2 +
wide_font_start +
wide_font_width +
wide_font_width2 +
wide_font_xbm_size +
wide_font_xpm_size +
write_text +
write_text_byte1 +
write_text_byte2 +
write_text_string +
+ + +

κ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ +
+
E +
ERR_BAD_DIR_NAME +
ERR_BAD_FILE_NAME +
ERR_BAD_WORD +
ERR_DIFF_CONTENT +
ERR_EBNET_FAIL_CONNECT +
ERR_EBNET_NO_PERMISSION +
ERR_EBNET_SERVER_BUSY +
ERR_EBNET_UNSUPPORTED +
ERR_EMPTY_WORD +
ERR_END_OF_CONTENT +
ERR_FAIL_GETCWD +
ERR_FAIL_OPEN_APP +
ERR_FAIL_OPEN_BINARY +
ERR_FAIL_OPEN_CAT +
ERR_FAIL_OPEN_CATAPP +
ERR_FAIL_OPEN_FONT +
ERR_FAIL_OPEN_TEXT +
ERR_FAIL_READ_APP +
ERR_FAIL_READ_BINARY +
ERR_FAIL_READ_CAT +
ERR_FAIL_READ_CATAPP +
ERR_FAIL_READ_FONT +
ERR_FAIL_READ_TEXT +
ERR_FAIL_SEEK_APP +
ERR_FAIL_SEEK_BINARY +
ERR_FAIL_SEEK_CAT +
ERR_FAIL_SEEK_CATAPP +
ERR_FAIL_SEEK_FONT +
ERR_FAIL_SEEK_TEXT +
ERR_MEMORY_EXHAUSTED +
ERR_NO_APPSUB +
ERR_NO_CANDIDATES +
ERR_NO_CUR_APPSUB +
ERR_NO_CUR_BINARY +
ERR_NO_CUR_FONT +
ERR_NO_CUR_SUB +
ERR_NO_FONT +
ERR_NO_PREV_SEARCH +
ERR_NO_PREV_SEEK +
ERR_NO_SUB +
ERR_NO_SUCH_APPSUB +
ERR_NO_SUCH_BINARY +
ERR_NO_SUCH_BOOK +
ERR_NO_SUCH_CHAR_BMP +
ERR_NO_SUCH_CHAR_TEXT +
ERR_NO_SUCH_ENTRY_ID +
ERR_NO_SUCH_FONT +
ERR_NO_SUCH_HOOK +
ERR_NO_SUCH_MULTI_ID +
ERR_NO_SUCH_SEARCH +
ERR_NO_SUCH_SUB +
ERR_NO_TEXT +
ERR_NO_WORD +
ERR_TOO_LONG_FILE_NAME +
ERR_TOO_LONG_WORD +
ERR_TOO_MANY_WORDS +
ERR_UNBOUND_APP +
ERR_UNBOUND_BOOK +
ERR_UNBOUND_BOOKLIST +
ERR_UNEXP_APP +
ERR_UNEXP_BINARY +
ERR_UNEXP_CAT +
ERR_UNEXP_CATAPP +
ERR_UNEXP_FONT +
ERR_UNEXP_TEXT +
H +
HEIGHT_NARROW_FONT_16 +
HEIGHT_NARROW_FONT_24 +
HEIGHT_NARROW_FONT_30 +
HEIGHT_NARROW_FONT_48 +
HEIGHT_WIDE_FONT_16 +
HEIGHT_WIDE_FONT_24 +
HEIGHT_WIDE_FONT_30 +
HEIGHT_WIDE_FONT_48 +
HOOK_BEGIN_CANDIDATE +
HOOK_BEGIN_CLICKABLE_AREA +
HOOK_BEGIN_COLOR_BMP +
HOOK_BEGIN_COLOR_JPEG +
HOOK_BEGIN_DECORATION +
HOOK_BEGIN_EMPHASIS +
HOOK_BEGIN_GRAY_GRAPHIC +
HOOK_BEGIN_IN_COLOR_BMP +
HOOK_BEGIN_IN_COLOR_JPEG +
HOOK_BEGIN_KEYWORD +
HOOK_BEGIN_MONO_GRAPHIC +
HOOK_BEGIN_MPEG +
HOOK_BEGIN_NARROW +
HOOK_BEGIN_NO_NEWLINE +
HOOK_BEGIN_REFERENCE +
HOOK_BEGIN_SUBSCRIPT +
HOOK_BEGIN_SUPERSCRIPT +
HOOK_BEGIN_WAVE +
HOOK_END_CANDIDATE_GROUP +
HOOK_END_CANDIDATE_LEAF +
HOOK_END_CLICKABLE_AREA +
HOOK_END_COLOR_GRAPHIC +
HOOK_END_DECORATION +
HOOK_END_EMPHASIS +
HOOK_END_GRAY_GRAPHIC +
HOOK_END_IN_COLOR_GRAPHIC +
HOOK_END_KEYWORD +
HOOK_END_MONO_GRAPHIC +
HOOK_END_MPEG +
HOOK_END_NARROW +
HOOK_END_NO_NEWLINE +
HOOK_END_REFERENCE +
HOOK_END_SUBSCRIPT +
HOOK_END_SUPERSCRIPT +
HOOK_END_WAVE +
HOOK_GB2312 +
HOOK_INITIALIZE +
HOOK_ISO8859_1 +
HOOK_NARROW_FONT +
HOOK_NARROW_JISX0208 +
HOOK_NEWLINE +
HOOK_NULL +
HOOK_SET_INDENT +
HOOK_WIDE_FONT +
HOOK_WIDE_JISX0208 +
S +
SIZE_NARROW_FONT_16 +
SIZE_NARROW_FONT_16_BMP +
SIZE_NARROW_FONT_16_GIF +
SIZE_NARROW_FONT_16_PNG +
SIZE_NARROW_FONT_16_XBM +
SIZE_NARROW_FONT_16_XPM +
SIZE_NARROW_FONT_24 +
SIZE_NARROW_FONT_24_BMP +
SIZE_NARROW_FONT_24_GIF +
SIZE_NARROW_FONT_24_PNG +
SIZE_NARROW_FONT_24_XBM +
SIZE_NARROW_FONT_24_XPM +
SIZE_NARROW_FONT_30 +
SIZE_NARROW_FONT_30_BMP +
SIZE_NARROW_FONT_30_GIF +
SIZE_NARROW_FONT_30_PNG +
SIZE_NARROW_FONT_30_XBM +
SIZE_NARROW_FONT_30_XPM +
SIZE_NARROW_FONT_48 +
SIZE_NARROW_FONT_48_BMP +
SIZE_NARROW_FONT_48_GIF +
SIZE_NARROW_FONT_48_PNG +
SIZE_NARROW_FONT_48_XBM +
SIZE_NARROW_FONT_48_XPM +
SIZE_WIDE_FONT_16 +
SIZE_WIDE_FONT_16_BMP +
SIZE_WIDE_FONT_16_GIF +
SIZE_WIDE_FONT_16_PNG +
SIZE_WIDE_FONT_16_XBM +
SIZE_WIDE_FONT_16_XPM +
SIZE_WIDE_FONT_24 +
SIZE_WIDE_FONT_24_BMP +
SIZE_WIDE_FONT_24_GIF +
SIZE_WIDE_FONT_24_PNG +
SIZE_WIDE_FONT_24_XBM +
SIZE_WIDE_FONT_24_XPM +
SIZE_WIDE_FONT_30 +
SIZE_WIDE_FONT_30_BMP +
SIZE_WIDE_FONT_30_GIF +
SIZE_WIDE_FONT_30_PNG +
SIZE_WIDE_FONT_30_XBM +
SIZE_WIDE_FONT_30_XPM +
SIZE_WIDE_FONT_48 +
SIZE_WIDE_FONT_48_BMP +
SIZE_WIDE_FONT_48_GIF +
SIZE_WIDE_FONT_48_PNG +
SIZE_WIDE_FONT_48_XBM +
SIZE_WIDE_FONT_48_XPM +
SUCCESS +
W +
WIDTH_NARROW_FONT_16 +
WIDTH_NARROW_FONT_24 +
WIDTH_NARROW_FONT_30 +
WIDTH_NARROW_FONT_48 +
WIDTH_WIDE_FONT_16 +
WIDTH_WIDE_FONT_24 +
WIDTH_WIDE_FONT_30 +
WIDTH_WIDE_FONT_48 +
+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb-cat.html b/lib/ebu/doc/eb-cat.html new file mode 100644 index 0000000..fa82ea1 --- /dev/null +++ b/lib/ebu/doc/eb-cat.html @@ -0,0 +1,10941 @@ + + + + + + + +EB 饤֥ + + + +

EB 饤֥

+

+ʸϡEB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2001-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+EB 饤֥ CD-ROM Ҥ˥뤿 C Υ饤֥Ǥ +UNIX OS Windows (2000ʹ) Υƥư뤳Ȥ +Ǥޤ +

+ +

+EB 饤֥ EB, EBG, EBXA, EBXA-C, S-EBXA EPWING +CD-ROM ҤбƤޤ +ϡܤ䤵Ƥ뼭˻ȤƤޤ +CD-ROM ҼΤ ISO 9660 ˤʤäƤޤΤǡ¾ ISO 9660 +ƱΤǥޥȤ뤳ȤǤޤ +

+ +

+ܽϡEB 饤֥Ȥäƥץꥱץ +ȯԸˡ饤֥λͤ⤷ʸǤ +ơ饤֥θʻȥޥ˥奢Ǥ⤢ޤ +ɤ߿ʤˤäơɼԤ EB 饤֥ꤪ CD-ROM Ҥ¤ +ˤĤΤäƤɬפϤޤ󤬡Żҥ֥å EPWING Ѥơ +ºݤ CD-ROM ҤɤΤ褦ʤΤ򤷤ƤȤᤷޤ +ޤC ˤץߥ󥰤ˤĤƤϡʬ򤷤Ƥ뤳Ȥ +Ȥޤ +

+ +

+ܽƤ˱ä EB 饤֥Ȥäץꥱץ +ˤϡѤΥƥ EB 饤֥ C ѥ +󥹥ȡ뤷ƤƲ +ʤܽǤϼ UNIX OS ѤˤĤơҤƤޤ +

+ +

+EB 饤֥ϥե꡼եȥǤɤӥХʥ + Modified BSD 饤󥹤βǻѤ뤳ȤǽǤ +(С 4.1 ΤΤϡGPL ѤƤޤ) +ܤϡɤ°Ƥ COPYING ȤʸΥե򻲾 +Ʋ +

+ + +

Żҥ֥å EPWING ˤĤ

+ +

+Żҥ֥å EPWING ϡܤǻȤƤŻҽҤ +ǡ̾ΤǡCD-ROM ˼᤿ǿνҤΤƤޤ +CD-ROM ISO 9660 ʤΤǡCD-ROM ɥ饤֤륷ƥǤС +ưפ˥뤳ȤǤޤ +ŻҽҤΥǡȤϤäƤ⡢ºݤϼò¤Ȥʤä +ꡢΤƤҤ⼭बŪ¿褦Ǥ +

+ +

+Żҥ֥åEPWING Ȥˡǡ˴ؤ뵬ʤƤϰ̸ +ޤ󤬡EPWING ĤƤϵʤΰܹȵ JIS X 4081 +ŻҽǸǡ¤פȤƸƤޤ +ˡEPWING Żҥ֥åΥǡϡƤ뤳ȤΤ +ޤ +

+ +

+EB 饤֥γȯԤ⡢Żҥ֥åEPWING ʤƤΤޤ +EB 饤֥Ǥ JIS X 4081 εҤȤˡŻҥ֥åEPWING ɤ +褦ˤƤޤ +ʤ顢ʤƤʬʤ֤dzȯƤ뤿ᡢǰʤ +ɤʤҤ¸ߤޤ +

+ + +

ܽιˤĤ

+ +

+ϡEB 饤֥ħפǤϡEB 饤֥꤬бƤ뵡ǽб +ƤʤǽˤĤơñޤ +ޤ饤֥γά˴ؤơǽΤäƤۤɤȻפ +򤤤ĤƤޤ +

+ +

+˼ξϡ֥ץΥѥˡפǤϡEB 饤֥Ѥ +ץΥѥˡޤ +ܽΥץץ򥳥ѥ뤹뤿ɬפʾ⡢ξϤ +Ƥޤ +

+ +

+ơμξϡ֥饤֥νȸפ餬ºݤ +EB 饤֥Υץߥ󥰤βȤʤޤ +줾ξϤϡΤ褦ᤫ鹽Ƥޤ +ϤˤäƤϰ᤬ʤ⤢ޤ +

+ +
+
+
+ξϤDz⤹뵡ǽ䳵ǰˤĤƤδμEB 饤֥λͤ +פˤĤƲ⤷Ƥޤ + +
ץץ
+
+ֲפǤϥץҤ򼨤Ȥ¿Τǡưǽ +ץΥץ򤳤Ǽޤ + +
ǡξܺ
+
+ǡؿͤʤɤˤĤƤλȥޥ˥奢Ǥ +
+ + +

EB 饤֥ħ

+ +

+˽Ҥ٤褦ˡEB 饤֥ϡŻҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) + EPWING CD-ROM ҤбƤޤ +

+ +

+EB 饤֥ϡ CD-ROM ҤФơνԤȤ +Ǥޤ +

+ +
    +
  • ׸ +
  • ׸ +
  • ׸ +
  • ︡ +
  • ʣ縡 +
  • Фǡμ +
  • ʸǡμ +
  • ˥塼μ +
  • ɽμ +
  • 顼ǥǡμ ( EPWING Τ) +
  • Υǥǡμ +
  • ǡμ +
  • ưǡμ +
+ +

+ξϤǤϡEB 饤֥γפ˴ؤơ餫ΤäƤĺ +ۤɤȻפ뤽¾λˤĤơޤ +

+ + + +

إåե

+ +

+EB 饤֥ˤϡĤΥإåե뤬ѰդƤޤ +

+ +
+
appendix.h
+
+appendix (Ͽ) ˴ϢԤ +
binary.h
+
+Хʥǡ˴ϢԤ +
eb.h
+
+EB 饤֥δܥإåե롣 +
error.h
+
+顼ɤ˴ϢԤ +
font.h
+
+˴ϢԤ +
text.h
+
+ƥȥǡ (ʸФʤ) ˴ϢԤ +
+ +

+ʳˤ⤤ĤΥե뤬󥹥ȡ뤵ޤ˵󤲤 +إåե뤫ɤ߹ޤΤǡץꥱץब +ľɤ߹ɬפϤޤ +

+ +

+ץꥱץϡEB 饤֥ȤݤˤΥإåե +եƬնɤ߹ߤޤ +

+ +
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+
+ +

+eb.h ǤϤʤeb/eb.h ɤ߹褦ˤƲ +

+ + +

ʸ

+ +

+EB 饤֥ǤϡCD-ROM Υǡʸˤƥץꥱ +ϤݤʸɤꤷƤޤ +

+ +

+EBG (Żҥ֥å) ˤĤƤϡǡ ISO 8859-1 (ƥʸ 1 +ʸ) ǽ񤫤Ƥ뤿ᡢǡΤ ISO 8859-1 +ǹԤޤ + 2 ХȤɽ0x0101 0x1efe ΰѤޤ +(ΰβ 16 ӥåȤ 0x01 0xfe ϰϤѤޤ) +

+ +

+EBG, EBXA-C Żҥ֥å EPWING ˤĤƤϡǡ +JIS X 0208 (ܸΤʴ) ǽ񤫤ƤꡢJIS X 0208 0x2121 +0x7e7e ˥ޥåԥ󥰤0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+
+
+
+娧
+
+
+
+ +

+EB 饤֥Ǥ JIS X 0208 ʬܸ EUC (EUC-JP) ˥󥳡 +ơץꥱȤΤܸ EUC ǹԤޤ +äơJIS X 0208 ʬ 0xa1a1 0xfefe ˥ޥåԥ󥰤ޤ +

+ +

+EBXA-C (漭Żҥ֥å) ˤĤƤϡǡ JIS X 0208 +(ܸΤʴ) GB 2312 (δλ) ǽ񤫤Ƥꡢ +JIS X 0208 0x2121 0x7e7e ˥ޥåԥ󥰡 +GB 2312 0x21a1 0x7efe ˥ޥåԥ󥰤 +0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+ǣ¡
+
+
+娧
+
+
+
+ +

+EB 饤֥ǤϡץꥱȤΤ˻Ȥʸɤϡ +ܸ EUC EUC (EUC-ZH) Ǥ +äơΤޤޤǤ JIS X 0208 GB 2312 0xa1a1 0xfefe +ޥåԥ󥰤졢ͤƤޤޤ +ɤ򤹤Τϡץꥱ¦Ƿɬפޤ +(ܤϡ֥եåʸɤδط 򻲾ȤΤ) +

+ +

+Żҥ֥åEPWING ȤˡˤĤƤϡץꥱ¦Ǥɤ +ɬפޤ +ˤĤƾܤ ֳ 򻲾ȤΤȡ +

+ + +

̤줿ҤˤĤ

+ +

+EB 饤֥ϡǡ򰵽̤ƼϿҤ򰷤ȤǤޤ +ΤȤ 4 ΰˡбƤޤ +

+ +
+
ebzip ̷
+
+EB 饤֥ȼΰ̷Ǥ +° ebzip ޥɤȤȡηǰ̤Ҥޤ + +
EPWING V4, V5
+
+Τ EPWING V4, V5 νҤΰˡηǰ̤Τޤ + +
EPWING V6
+
+Τ EPWING V6 νҤΰˡηǰ̤Τޤ +EPWING V4, V5 βɷǤ + +
S-EBXA
+
+Τ S-EBXA νҤΰˡηǰ̤Τޤ +
+ +

+ǡοĹ EB 饤֥¦ǼưŪ˹Ԥ뤿ᡢ +ץꥱץफϡƤҤ̤Ƥ뤫 +ɤʬޤ +ץꥱץϡҤ̤Ƥ뤫ɤǽѤ +ɬפϤޤ +

+ + +

֥ۥȾνҤˤĤ

+ +

+С 4.0 顢EB 饤֥¾ΥۥȤνҤ˥Ǥ +褦ˤʤޤ +

+ +

+֥νϤ٤ EB 饤֥¦ǹԤޤΤǡ +ץꥱץϡҤʬΥۥȾˤ뤫ɤǡ +EB 饤֥θƤӽФѤɬפϤޤ +

+ +

+¾ΥۥȤ饢ȡ®٤٤ʤޤ +ΤᡢΨɤǤ褦ץꥱνˡפ٤ +뤳ȤϤ뤫Τޤ +

+ + +

ƥ׷

+ +

+ץꥱץΥѥѤ륳ѥˤϡ +ANSI (ANSI X3.159-1989, ISO/IEC 9899-1990) бΤΤоݤȤƤޤ +ޤƥˤ POSIX.1 (IEEE Std. 1003.2-1990, ISO/IEC 9945-1:1990) +ʤߴΤΤоݤȤƤޤ +

+ +

+ʤ餯 EB 饤֥ǤϡŤѥ UNIX ϥƥؤб +ʤ˹ԤƤޤС 4.1 бǤڤäƤޤ +ä ANSI бΥѥɬܤǤΤǡդ +

+ + +

ץΥѥˡ

+ +

+ܾϤǤϡEB 饤֥ѤץΥѥλˤĤơ +2 ̤ˡޤ +

+ +

+ܤϡŪʡϤΥץ򥳥ѥ뤹ݤ˸Ƥ +ƤäȤ᤯ѥ뤹뤿ˡǤ +EB 饤֥λȤФŪǴñʥץȤݤϡ +ɤǤ礦 +

+ +

+ܤϡEB 饤֥Ȥ߹ץꥱե꡼եȥ +Ȥƥ꡼ݤ˸ƤˡǤ +EB 饤֥ˤϡGNU Autoconf, Automake, Libtool ʻѤȤߤ +ѰդƤޤΤǡȤäѥˡˤĤޤ +

+ + + +

ƤäȤᤤѥˡ

+ +

+ץꥱץ򥳥ѥ뤹ݤϡإåե +ǥ쥯ȥ֤ C ѥ˶Ƥɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-I ץǰ֤ +ޤ +

+ +
+
+cc -I/usr/local/include -c sample.c
+
+
+ +

+/usr/local/include/eb ǤϤʤΰľꤷޤ +(֥إåե 򻲾ȤΤ) +

+ +

+ˡ󥯤Ƽ¹ԥХʥ빩Ǥ +ʲ˵饤֥ΰ⤷󥯤ޤ +ϡ饤֥Υե̾Ǥ (.a +.so ȤäҤϾά) +

+ +
+
EB 饤֥ (libeb)
+
+EB 饤֥ΤǤΥ饤֥ɬܤǤ + +
zlib (libz)
+
+̤ȿĹԤ饤֥Ǥ +(ܤ @url{http://www.gzip.org/zlib/}) +ebzip ޥɤǰ̤򰷤˻Ȥޤ +Υ饤֥ɬܤǤ +EB 饤֥Υɤˤ zlib ϿƤޤ +ƥ zlib 󥹥ȡ뤵ƤʤСEB 饤֥ +󥹥ȡ뤹ݤˡzlib ⼫ưŪ˥󥹥ȡ뤵ޤ + +
gettext 饤֥ (libintl)
+
+åιݲǽ (NLS) 󶡤饤֥Ǥ +åιݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥ +ϡɬפˤʤ뤫Τޤ +gettext μϲफޤEB 饤֥ǻѤǤΤ +åη GNU gettext ߴΤΤǤ + +åιݲǽͭˤƤǤ⡢OS ɸ C 饤֥ +Ȥ glibc ѤƤ륷ƥǤϡꤹɬפϤޤ + +
iconv 饤֥
+
+ʸѴΥ饤֥Ǥ +gettext 饤֥󥯤硢ɬפȤʤ뤫Τޤ +iconv μⲿफꡢOS ˤäƤϺǽ餫źդƤޤ +
+ +

+ɬפʥ饤֥ե̾ΤC ѥ˻ꤷƤޤ +äơե֤Ƥǥ쥯ȥ֤C ѥ˶ +ɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-L ץǥǥ쥯ȥ +֤ꤷ-l ץǥ饤֥Υե̾ +ޤ +

+ +
+
+cc sample.o -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+ͭ饤֥󥯤ϡ¹Իˤ饤֥ +ѥ碌ƻꤹɬפ뤫Τޤ +

+ +
+
+cc sample.o -R/usr/local/lib -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+C ѥλȤ˴ؤƤξܺ٤ϡC ѥΥޥ˥奢򻲾 +Ʋ +

+ + +

Autoconf ʻѤѥˡ

+ +

+ȤˡAutoconf, Automake, Libtool ϡ餫ᥤ󥹥ȡ뤷 +Ʋ +Autoconf ϥС 2.50 ʹߤɬפǤ +

+ +

+ޤץꥱץ configure.ac +(⤷ configure.in) ˡιԤäޤ +

+ +
+
+eb_LIB_EB4
+
+
+ +

eb_LIB_EB4 ϡEB 饤֥λѤɬפʰڤ +åԤ configure ˼Υץɲ +ޤ +

+ +
+
+  --with-eb-conf=FILE     eb.conf file is FILE [SYSCONFDIR/eb.conf]
+
+
+ +

+eb.conf ϡEB 饤֥򥤥󥹥ȡ뤷ȤξϿ +եǡ饤֥Ȱ˥󥹥ȡ뤵ޤ +eb_LIB_EB4 ϤΥեɤ߹ǡC ѥ +ϤʤФʤץʤɤξޤ +--eb-conf-file ϡeb.conf Υե̾ +Ū˻ꤹ륪ץǤ +

+ +

eb_LIB_EB4 ϡeb4.m4 Ȥե +󶡤Ƥޤ +EB 饤֥ /usr/local ˥󥹥ȡ뤷ġΥե +Υ󥹥ȡѹƤʤС/usr/local/share/aclocal +˥󥹥ȡ뤵ޤ + eb4.m4 򥽡ɤŬʥǥ쥯ȥβ (Ȥ +m4) ˥ԡƲ +

+ +

+aclocal ޥɤ aclocal.m4 ݤϡ +-I ץǥޥեΥǥ쥯ȥꤷޤ +

+ +
+
+aclocal -I m4
+
+
+ +

+äơȥåץǥ쥯ȥ Makefile.am ˤ +aclocal Ϥץ񤤤Ƥޤ +

+ +
+
+ACLOCAL_AMFLAGS = -I m4
+
+
+ +

+ޤɤΥǥ쥯ȥ Libtool ѥåޤѰդ +ʤСѰդޤ +libtoolize ޥɤ¹ԤƲ +Libtool ѥåɤΥǥ쥯ȥ˥ԡޤ +

+ +
+
+libtoolize
+
+
+ +

+ǸˡѥԤǥ쥯ȥ Makefile.am ե + _LDFLAGS INCLUDES ˡΤ褦ͤɲ +ޤ +

+ +
+
+program_LDFLAGS = $(EBCONF_EBLIBS) $(EBCONF_ZLIBLIBS) $(EBCONF_INTLLIBS)
+INCLUDES = $(EBCONF_EBINCS)
+
+
+ +

+(program_LDFLAGS program ΤȤϡ +ץꥱץμºݤΥޥ̾ˤޤ) +

+ + +

EB 饤֥ΤΥǥХå

+ +

+ּʬäץꥱưʤΤϡҤäȤ +EB 饤֥ΥХǤϤʤ?פȤEB 饤֥ +εưǧȻפȤ뤫Τޤ +

+ +

+Τ褦ʾϡĶѿ EB_DEBUG 򥻥åȤ֤ +ץꥱ¹ԤƤߤƲ +EB 饤֥ɸ२顼ϤˡΤ褦ʥ (ʤ̤Ǥ) +Ϥ褦ˤʤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB] in: eb_load_narrow_font(book=0)
+[EB] out: eb_load_narrow_font()
+[EB] in: eb_load_wide_font(book=0)
+[EB] out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

+ΥϡؿθƤӽФΰ󡢤Ӵؿͤ +Ƥޤ +ebfixlog Ȥ Perl5 ץȤȤȡ뤳 +Ǥޤ +ΥץȤϡEB 饤֥Υɤ misc +ǥ쥯ȥ˼Ƥޤ +

+ +

+ebfixlog ϡޥɹԤΰȤͿ줿ե +(ꤵʤɸ) åǡɤ߹ߡ +Τ褦˻ƽϤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB]   in: eb_load_narrow_font(book=0)
+[EB]   out: eb_load_narrow_font()
+[EB]   in: eb_load_wide_font(book=0)
+[EB]   out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

ebfixlog ץȤϡzio ebnet ȸƤФ롢 +EB 饤֥ǥեϤĽΥɤ߼ΤƤ褦 +ʤäƤޤ +ˤꡢ̤ʤ긺ޤ +

+ +

+zio EB 饤֥٥Ϥνǡˤ˸ƤӽФޤ +θĴ٤ݤ⡢ޤɤ߼ΤƤ饤֥ư +䤹Ǥ礦 +

+ +

+ebfixlog -z ץȤȡzio +åɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ +

+ebnet ϱ֥Ϥʬǡzio ⤵ +̥٥˰֤ޤ +֥εưפȤʳϡɤ߼ΤƤɤȻפޤ +

+ +

+ebfixlog -n ץȤȡebnet, +zio ξΥåɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ + +

饤֥νȸ

+ +

+ξϤϡEB 饤֥Υץߥ󥰤ˤĤƤβˤʤޤ +

+ +

+ޤץꥱץफ EB 饤֥Ѥˤϡ +ǽ˥饤֥ɬפޤ +

+ +

+饤֥νԤˤϡeb_initialize_library() +ȤؿƤӽФޤ +

+ +
+
+if (eb_initialize_library() != EB_SUCCESS) {
+    printf("eb_initialize_library() failed\n");
+    exit(1);
+}
+
+
+ +

+Ʊͤˡ饤֥Ȥä顢eb_finalize_library() +ȤؿƤӽФƸ򤷤ޤ +

+ +
+
+eb_finalize_library();
+
+
+ + + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2001-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     initexit
+ * :
+ *     initexit
+ * :
+ *     EB 饤֥ν򤷤Ƥߤޤ
+ *     ץγ¦鸫Сϲΰ̣ʤưǤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+
+    /* EB 饤֥*/
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        exit(1);
+    }
+
+    /* EB 饤֥Ѥλ*/
+    eb_finalize_library();
+    exit(0);
+}
+
+
+ + +

ؿξܺ

+ +

+ιƤؿȤˤϡeb/eb.h ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_initialize_library ()

+ +

+ؿ eb_initialize_library() ϡEB 饤֥ޤ +ץꥱץϡEB 饤֥¾δؿƤˡɬ +δؿƤɬפޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +硢eb_initialize_library() bindtextdomain() +ƤӽФޤ +äơץꥱץब setlocale() +ƤӽФΤϡδؿƤӽФǤɬפޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+饤֥ˡEB 饤֥¾δؿƤư +̤Ǥ +ޤǤ˽Ѥޤ֤ǡ eb_initialize_library() +ƤǤ⤤ޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_library ()

+ +

+ؿ eb_finalize_library() ϡEB 饤֥Ȥä +ݤθԤޤ +ץꥱץ¦ǻѤ +EB_BookEB_HooksetEB_Appendix ֥ȤθϹԤޤ +֥Ȥˤϡ줾Ѥδؿ +eb_finalize_book()eb_finalize_hookset() +eb_finalize_appendix() ƥ֥ȤФ +ƤǤɬפޤ +

+ +

+饤֥θ򤷤ϡEB 饤֥ΤʤؿƤǤ +ޤ +Ƥư̤Ǥ +

+ + +

CD-ROM Ҥ EB_Book ֥

+ +

+EB 饤֥ǤϡCD-ROM ҤؤΥϡ٤ EB_Book +Υ֥Ȥ𤷤ƹԤޤ +äơۤȤɤΥץꥱץϡܾϤǵҤƤ +ɬפȤϤǤ +

+ +

+ܾϤǤ EB_Book ֥ȤνȤäŪ +갷ˤĤޤ +

+ + + +

EB_Book ֥

+ +

+CD-ROM Ҥإˤϡޤ EB_Book Υ֥Ȥ +Ѱդޤ +Ʊʣ CD-ROM Ҥ˥ʤ顢Ұ˥֥Ȥ +ɬפޤ +

+ +
+
+EB_Book book;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Book *book_pointer;
+
+book_pointer = (EB_Book *) malloc(sizeof(EB_Book));
+
+
+ +

+EB_Book ֥Ȥ (ѿ book + book_pointer λؤΰ) ϤޤƤޤΤǡ +Τǥ֥Ȥޤ +

+ +
+
+eb_initialize_book(&book);
+eb_initialize_book(book_pointer);
+
+
+ +

+eb_initialize() Ϥ EB_Book ֥ +ؤΥݥ󥿤ǤäơEB_Book ֥ȤΤΤǤ +ʤȤդƲ +(EB 饤֥¾δؿ⡢٤ƥ֥Ȥݥ󥿤Ϥޤ) +

+ +

+CD-ROM ҤȤˤϡ³ EB_Book ֥Ȥ +CD-ROM ҤμΤ˷դޤ +ϡؿ eb_bind() ˤäƹԤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥ȡ
+
+
+⡲ʡˡ
+
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind(&book, "/mnt/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+eb_bind() ϤҤΥѥ (Ǥ /mnt/cdrom) +ϽҤΥȥåץǥ쥯ȥꡢĤޤ catalog ޤ +catalogs եΤǥ쥯ȥꤷޤ +

+ +

+EB_Book ֥ȤȤä顢 +eb_finalize_book() ƤǸ򤷤ޤ +֥ȤϽҤȤηդ򤫤줿֤ꡢdzƤ줿 +ϲ졢Ƥե⤹٤Ĥޤ +

+ +
+
+eb_finalize_book(&book);
+eb_finalize_book(book_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_book() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(book_pointer);
+
+
+ + +

֥ۥȤؤ eb_bind()

+ +

+ eb_bind() ѤơEB_Book +֥Ȥ֥ۥȤνҤ˷ӤĤ뤳ȤǤޤ +ˤϡҤΥѥˡ֥Ѥμ̻Ҥꤷޤ +̻ҤϡΤ褦ʷȤޤ +

+ +
+
+ebnet://ۥ:ݡ/̾
+
+
+ +

+ۥ ϱ֥ۥȤ IP ɥ쥹⤷ϥۥ̾Ǥ +IPv6 ɥ쥹ꤹϡɥ쥹 [ +] ǰϤɬפޤ +ݡ ϡΥۥȤԤƤݡȤֹǤ +ۥȤԤƤݡȤɸ 22010 ֤ǤС +ʬϾάǽǤ +

+ +

eb_bind() Υ򵭤ޤ +

+ +
+
+if (eb_bind(&book, "ebnet://localhost/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ + +

ץץ

+ +

+ΥץץǤϡCD-ROM ҤμĴ٤뤿ˡ +eb_disc_code() ȤؿѤƤޤ +δؿˤĤƤϡִؿξܺ١ 򻲾ȤΤȡ +

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     disctype <book-path>
+ * :
+ *     disctype /cdrom
+ * :
+ *     <book-path> ǻꤵ줿 CD-ROM ҤμबEB  EPWING 
+ *     Ĵ٤ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Disc_Code disc_code;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* `book' Ҥ˷դ롣Ԥ齪λ*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ҤμĴ٤ɽ*/
+    error_code = eb_disc_type(&book, &disc_code);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get disc type, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    if (disc_code == EB_DISC_EB) {
+        fputs("EB\n", stdout);
+    } else if (disc_code == EB_DISC_EPWING) {
+        fputs("EPWING\n", stdout);
+    } else {
+        fputs("unknown\n", stdout);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Book

+ +

+EB_Book ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Book ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Book ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Book ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

EB_Disc_Code

+ +

EB_Disc_Code ϡCD-ROM Ҥηɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_DISC_EB
+
+Żҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) Ǥ뤳Ȥɽޤ + +
EB_DISC_EPWING
+
+EPWING Ǥ뤳Ȥɽޤ + +
EB_DISC_INVALID
+
+ʷͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

EB_Character_Code

+ +

EB_Character_Code ϡCD-ROM ҤǻѤ +ʸɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_CHARCODE_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ѤƤ뤳Ȥɽޤ +Żҥ֥å EBG ϤǤ + +
EB_CHARCODE_JISX0208
+
+JIS X 0208 (ܸΤʴ) ѤƤ뤳Ȥɽޤ +EBG, EBXA-C ʳŻҥ֥å EPWING Ϥ٤ƤǤ + +
EB_CHARCODE_JISX0208_GB2312
+
+JIS X 0208 (ܸΤʴ) GB 2312 (δλ) ʻѤƤ +Ȥɽޤ +Żҥ֥å EBXA-C ϤǤ + +
EB_CHARCODE_INVALID
+
+ʸͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

void eb_initialize_book (EB_Book *book)

+ +

+ؿ eb_initialize_book() ϡbook λؤ +EB_Book ֥Ȥޤ +EB_Book ֥ȤФ EB 饤֥¾δؿƤˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_book() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind (EB_Book *book, const char *path)

+ +

+ؿ eb_bind() ϡbook λؤ EB_Book +֥Ȥ򡢥ѥ path ˤ CD-ROM Ҥ˷դޤ +ѥˤϡҤΥȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +ҤΥȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤ˽Ҥ˷դƤ硢νҤȤηդ +򤤤Ƥ顢path ˤҤ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥ȤҤȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤƤʤƤ +ʤޤ +ˡpath ХѥΤȤϡХѥѴ̤Ĺ +˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

void eb_finalize_book (EB_Book *book)

+ +

+ؿ eb_finalize_book() ϡbook ؤ +EB_Book ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥ȤҤȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_is_bound (EB_Book *book)

+ +

+ؿ eb_is_bound() ϡbook Ҥ˷դƤ뤫 +ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_path (EB_Book *book const char *path)

+ +

+ؿ eb_path() ϡbook ˷դƤҤΥѥ +⤷ϱ֥̻Ҥpath λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡeb_bind() +ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_disc_type (EB_Book *book, EB_Disc_Code *disc_code)

+ +

+ؿ eb_disc_type() ϡbook Υǥη +disc_code λؤΰ˽񤭹ߤޤ +񤭹ǥηͤϡEB_Disc_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdisc_code λؤΰ EB_DISC_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_character_code (EB_Book *book, EB_Character_Code *character_code)

+ +

+ؿ eb_character_code() ϡbook 񤫤Ƥ +ʸɤ character_code λؤΰ˽񤭹ߤޤ +񤭹ʸɤͤϡEB_Character_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡcharacter_code λؤΰ +EB_CHARCODE_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

+ +

+EB 饤֥δؿθƤӽФϡȤϸ¤ޤ +ȤСEB_Book ֥ȤҤ˷ӤĤؿ +eb_bind() ˤϡȤƽҤΥȥåץǥ쥯ȥϤޤ +¸ߤʤǥ쥯ȥꤷ硢ϼԤ˽ޤ +

+ +

+̤ˤݤϡ桼äѥꤷȤ˵ޤ +­Τ褦ˡ桼ΥߥǤϤʤԤⵯꤨޤ +

+ +

+ܾϤǤϡؿθƤӽФԤνˤĤޤ +

+ + + +

顼ɤȥ顼å

+ +

+EB 饤֥δؿ¿ϡͤȤ EB_Error_Code +֤ͤޤ +Ȥ֤ͤ EB_SUCCESS ǤԤȤ +顼θ˱֤ͤ͡ޤ +ΤᡢEB 饤֥ǤϼΤ褦 EB_SUCCESS Ȥӽ +褯Ԥޤ +

+ +
+
+EB_Error_Code error_code;
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+顼ɤͤϡؿ eb_error_message() ˤä +顼åѴ뤳ȤǤޤ +뤳Ȥǡ顼θ򥢥ץꥱץΥ桼 +⤦ʬ䤹뤳ȤǤޤ +

+ +
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed, %s\n",
+        eb_error_message(error_code));
+    return;
+}
+
+
+ +

+error_code EB_ERR_TOO_LONG_FILENAME +åȤƤСΤ褦ʥ顼åϤޤ +

+ +
+
+too long filename
+
+
+ +

+뤤ϡΤ褦ܸΥåΤޤ +

+ +
+
+ե̾Ĺޤ
+
+
+ +

+åιݲǽ (NLS) ̵ˤ EB 饤֥򥳥ѥ +ϡ˱ѸΥå֤ޤ +ͭˤϡˤäƤɤθΥå +֤뤫ޤޤ +

+ +

+ܽǤϥץʷˤ뤿ˡ顼Ϻ¤Ԥä +ޤ +ɤ̤ΥץꥱץǤϡؿθƤӽФ +ɤ˥åԤݤϥ顼å +ơ桼˥顼θΤ˾ޤȤޤ +

+ + +

顼Ф봲Ƥ

+ +

+EB_Book ֥Ȥϡ֤˴ؤѥ᥿򤤤Ĥä +ޤ +֥Ȥ CD-ROM Ҥ˷դƤ뤫ɤ⡢ѥ᥿ +ΤΰĤǤ +

+ +

+ EB_Book ֥ȤؤΥݥ󥿤ؿˤϡ +餫ᥪ֥ȤΥѥ᥿åȤƤ뤳Ȥ +ƤΤ⤢ޤ +ȤСeb_path() ϡ֥ȤҤ˷դƤ뤳 +ȤƤޤ +Ǥϡ⤷Ҥ˷դƤʤ֥Ȥ eb_path() +ϤɤʤǤ礦 +

+ +
+
+EB_Book book;
+EB_Error_Code error_code;
+char path[EB_MAX_PATH_LENGTH + 1];
+
+eb_initialize_library();
+eb_initialize(&book);
+error_code = eb_path(&book, path);    /* ɤʤ? */
+
+
+ +

+ξ硢eb_path() EB_ERR_UNBOUND_BOOK +֤ޤ +EB 饤֥δؿϡɬפʥѥ᥿åȤƤʤ֥Ȥ +ΤƵ䤷ޤ +

+ +

+ʤ顢ȥޥ˥奢ƤơEB 饤֥ +δؿϡͿ줿ݥ󥿤 NULL ɤޤǤĴ٤ޤ +Τ褦ʤȤ򤹤ȡץ۾ェλƤޤޤ +

+ +
+
+eb_bind(NULL, "/mnt/cdrom");    /* ۾ェλ! */
+eb_bind(&book, NULL);           /* ۾ェλ! */
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_Error_Code

+ +

EB_Error_Code ϡEB 饤֥Υ顼ɤ +ɽޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_ERRORS Ĥ +եåɤƤޤ +顼ɤΰˤĤƤϡ + (֥顼ɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

顼ɤΰ

+ +

+Ƥ륨顼ɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_SUCCESS

+ +

+ +顼ϵƤʤ +

+ + +

EB_ERR_MEMORY_EXHAUSTED

+ +

+EB 饤֥꤬ malloc() ƤӽФNULL +֤äƤ +

+ + +

EB_ERR_TOO_LONG_FILE_NAME

+ +

+Ϳ줿ҤΥѥ̾Ĺ롣 +

+ + +

EB_ERR_BAD_FILE_NAME

+ +

+ҤΥѥ̾Ǥ롣 +

+ + +

EB_ERR_BAD_DIR_NAME

+ +

+ǥ쥯ȥ̾Ǥ롣 +(EB 饤֥ѤʤΤǡ +Υ顼ɤץꥱץ֤뤳ȤϤޤ) +

+ + +

EB_ERR_TOO_LONG_WORD

+ +

+Ϳ줿Ĺ롣 +

+ + +

EB_ERR_BAD_WORD

+ +

+Ϳ줿ʸޤޤƤ롣 +

+ + +

EB_ERR_EMPTY_WORD

+ +

+Ϳ줿϶Ǥ롣 +

+ + +

EB_ERR_FAIL_GETCWD

+ +

+getcwd()getwd() Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CAT

+ +

+EB 饤֥꤬ҤΥե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CATAPP

+ +

+EB 饤֥꤬appendix Υե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_TEXT

+ +

+EB 饤֥꤬Ҥʸե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_FONT

+ +

+EB 饤֥꤬Ҥγե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_APP

+ +

+EB 饤֥꤬appendix ե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_BINARY

+ +

+EB 饤֥꤬Хʥǡե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CAT

+ +

+EB 饤֥꤬ҤΥեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CATAPP

+ +

+EB 饤֥꤬appendix Υեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_TEXT

+ +

+EB 饤֥꤬ҤʸեɤळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_FONT

+ +

+EB 饤֥꤬Ҥγեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_APP

+ +

+EB 饤֥꤬appendix Υᥤեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CAT

+ +

+EB 饤֥꤬ҤΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CATAPP

+ +

+EB 饤֥꤬appendix ΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_TEXT

+ +

+EB 饤֥꤬ҤʸեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_FONT

+ +

+EB 饤֥꤬ҤγեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_APP

+ +

+EB 饤֥꤬appendix ΥᥤեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեΥ˼Ԥ +

+ + +

EB_ERR_UNEXP_CAT

+ +

+EB 饤֥꤬ҤΥեǡԤȤϰۤʤǡ +Ĥ +

+ + +

EB_ERR_UNEXP_CATAPP

+ +

+EB 饤֥꤬appendix Υեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_TEXT

+ +

+EB 饤֥꤬Ҥʸեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_FONT

+ +

+EB 饤֥꤬Ҥγեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_APP

+ +

+EB 饤֥꤬appendix Υᥤեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNBOUND_BOOK

+ +

+ƤӽФ줿 EB 饤֥δؿϡҤ˷դ줿 +EB_Book ֥ȤˤȤ뤬Ϳ줿֥Ȥ +Ҥ˷դƤʤä +

+ + +

EB_ERR_UNBOUND_APP

+ +

+ƤӽФ줿 EB 饤֥δؿϡappendix ˷դ줿 +EB_Appendix ֥ȤˤȤ뤬Ϳ줿 +֥Ȥ appendix ˷դ +ʤä +

+ + +

EB_ERR_NO_SUB

+ +

+ҤܤĤäƤʤ +

+ + +

EB_ERR_NO_APPSUB

+ +

+appendix ܤĤäƤʤ +

+ + +

EB_ERR_NO_FONT

+ +

+ܤϡäƤʤ +

+ + +

EB_ERR_NO_TEXT

+ +

+ܤϡʸǡäƤʤ +

+ + +

EB_ERR_NO_CUR_SUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Book +֥ȤȤƤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_APPSUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Appendix +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_FONT

+ +

+ƤӽФ줿ؿϡ򤵤Ƥ EB_Book +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_BINARY

+ +

+ƤӽФ줿ؿϡХʥǡɤ߹׵򥻥åȤƤ +EB_Book ֥ȤˤȤ뤬Ϳ줿֥ȤǤ +åȤƤʤä +

+ + +

EB_ERR_NO_SUCH_SUB

+ +

+EB_Book ֥ȤܥɤؿͿ줿 +EB_Book ֥Ȥ˷դƤҤϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_APPSUB

+ +

+EB_Appendix ֥ȤܥɤؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix ϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_FONT

+ +

+EB_Book ֥ȤȳνĤΥؿͿ줿 +EB_Book ֥Ȥ˷ӤĤƤҤܤϡ +ΥγäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_BMP

+ +

+EB_Book ֥Ȥʸֹ椬ؿͿ줿 +EB_Book ֥Ȥ˷դƤҤܤϡ +ֹγΥӥåȥޥåץǡäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_TEXT

+ +

+EB_Appendix ֥Ȥʸֹ椬ؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix +ܤϡֹγʸäƤʤ +

+ + +

EB_ERR_NO_SUCH_SEARCH

+ +

+ܤϡꤵ줿᥽åɤäƤʤΤǡϹԤʤ +

+ + +

EB_ERR_NO_SUCH_HOOK

+ +

+ʥեåɤؿϤ줿 +

+ + +

EB_ERR_NO_SUCH_BINARY

+ +

+ꤵ줿֤ˡꤵ줿ΥХʥǡ¸ߤʤ +

+ + +

EB_ERR_DIFF_CONTENT

+ +

+ץꥱץफƥȥǡμ׵ᤵ줿 +줿ƥȥǡμबꥯȤ줿ȤȰפƤʤ +

+ + +

EB_ERR_NO_PREV_SEARCH

+ +

+eb_hit_list() ƤӽФ줿ץꥱץ +äƸΥꥯȤʤƤʤ +

+ + +

EB_ERR_NO_SUCH_MULTI_ID

+ +

+EB_Book ֥Ȥʣ縡ɤؿϤ줿 +դ줿ҤܤϡΥɤ˰פʣ縡ä +ʤ +

+ + +

EB_ERR_NO_SUCH_ENTRY_ID

+ +

+EB_Book ֥Ȥʣ縡ȥꥳɤؿ +Ϥ줿դ줿ҤܤϡΥȥꥳɤ +פʣ縡ȥäƤʤ +

+ + +

EB_ERR_TOO_MANY_WORDS

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿θĿ¿롣 +

+ + +

EB_ERR_NO_WORD

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿줬٤ƶǤ롣 +

+ + +

EB_ERR_NO_CANDIDATES

+ +

+eb_multi_entry_candidates() ƤӽФ줿 +ꤵ줿ʣ縡ȥϡθǡäƤʤ +

+ + +

EB_ERR_END_OF_CONTENT

+ +

+eb_forward_text()eb_backward_text() +ʸƬФԤȤǤʸʤƬãƤơ +ʾ˿ʤळȤǤʤä +

+ + +

EB_ERR_NO_PREV_SEEK

+ +

+餫 eb_seek_text() ǥԤäƤʤ֤ǡ +ƥȥǡɤ߹ߤƬФԤȤ +

+ + +

EB_ERR_EBNET_UNSUPPORTED

+ +

+ EB 饤֥ϡ֥ۥȤؤΥˤбƤʤ +

+ + +

EB_ERR_EBNET_FAIL_CONNECT

+ +

+֥ۥȤؤΥߤ (EBNETD) ³Ǥʤä +

+ + +

EB_ERR_EBNET_SERVER_BUSY

+ +

+֥ۥȤؤ³ԤäҤ˥Ƥ륯饤Ȥο +Ǥ˾¤ãƤ뤿ᡢνҤѤǤʤä +

+ + +

EB_ERR_EBNET_NO_PERMISSION

+ +

+֥ۥȤؤ³ԤäνҤؤѸ¤ʤᡢ +饢ݤ줿 +

+ + +

EB_ERR_UNBOUND_BOOKLIST

+ +

+ƤӽФ줿 EB 饤֥δؿϡ֥ۥȤ˷դ줿 +EB_BookList ֥ȤˤȤ뤬Ϳ줿֥ +ϱ֥ۥȤ˷դƤʤä +

+ + +

EB_ERR_NO_SUCH_BOOK

+ +

+EB_BookList ֥ȤȽҤֹؿϤ줿 +EB_BookList ˷դ줿֥ۥȾˤϡֹ +Ҥ¸ߤʤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/error.h>
+
+
+ + +

const char *eb_error_string (EB_Error_Code error_code)

+ +

+ؿ eb_error_string() ϡ顼 error_code +ʸѴΤ֤ޤ +ʸʸɤϡASCII ˤʤޤ +ȤС顼 EB_SUCCESS Ϥʸ +"EB_SUCCESS" ֤ޤ +̤ΤΥ顼ɤϤȤϡ"EB_ERR_UNKNOWN" ֤ޤ +

+ + +

const char *eb_error_message (EB_Error_Code error_code)

+ +

+ؿ eb_error_message() ϡ顼 error_code +бåʸˤ֤ޤ +ؿ֤åϡѸ줫ܸˤʤޤ +

+ +

+ݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥʤϡ +ѸΥå֤ޤ +ΤȤΥåʸɤϡASCII ˤʤޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +ϡ˱ƤɤθΥå֤Τ +ޤޤ +ޤGNU gettext С 0.36 ʹߤǤ iconv() ϢȤ뤳Ȥˤꡢ +åʸɤ˱Ѳޤ +gettext iconv() ȤϢȤԤʤСѸΥå ASCII +ܸΥåܸ EUC ˤʤޤ +δؿθƤӽФˤäơgettext ΥƥȥɥᥤѲ +ޤ +

+ +

+̤ΤΥ顼ɤϤȤ֤åϡѸǤ +"unknown error"ܸǤ "̤ΤΥ顼Ǥ" +ˤʤޤ +

+ + +

+ +

+˰줿ܤǤ̡νҤˤʤäƤΤǤ⡢Żҥ֥å EPWING +Ǥ 1 CD-ROM ˤޤȤ뤳ȤǤޤ +

+ +

+ȤС CD-ROM Ҥϡ켭񡢱ѡŵɴʻŵȤ 3 + (줿ܤǸȤ) ֽҡפäƤ뤳Ȥ⤢ޤ +ʶ路򤱤뤿ˡEB 饤֥ǤϤǸֽҡפΤȤ + (subbook) ȸƤǤޤ +

+ +
+
+ãġݣңϣͽ
+
+ܣι켭ŵϡ
+ܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ +

+CD-ROM ҤǤϡ줾ܤϤ켫ΤΩҤˤʤäƤޤ +ޤܤΥǡ⡢̡Υե˼Ƥޤ +äơEB 饤֥Ǥ⡢ץꥱץμפʽ +Ǥñθʸǡμʤɤϡ٤ñ̤ǹԤ褦 +ʤäƤޤ +

+ +

+ܾϤǤϡEB 饤֥ǤܤΰˤĤޤ +

+ + + +

ܥ

+ +

+EB 饤֥Ǥϡ줾ܤФ ܥ (subbook code) +Ƥޤ +Υɤ EB 饤֥꤬ܤ̤뤿ѤޤΤǡġ +ܥɤϡƱΤʤ褦ˤʤäƤޤ +

+ +

+ʲΥɤϡeb_subbook_list() Ȥؿ +Ǥ +δؿϡΤ٤Ƥܤܥɤ뤳ȤǤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_list() ȡΤ٤Ƥܥɤ + sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+ġܤˤϡɬ̾դƤޤ +Ƭ (sub_codes[0]) ̾ϡΤ褦ˤ +뤳ȤǤޤ +

+ +
+
+char title[EB_MAX_TITLE_LENGTH + 1];
+
+if (eb_subbook_title2(&book, sub_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_subbook_title2() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_title2() θƤӽФȡ +title ̾ɽʸ󤬳Ǽޤ +

+ +

+­Ǥ(ܤǤϤʤ) CD-ROM ̾ؿϤޤ +ʤʤ顢̾򼨤ǡ CD-ROM ˤϲˤʤǤ +

+ + +

+ +

+EB_Book ֥ȤϡӤĤ줿 CD-ROM Ҥ +Ǥդܤǡ (current subbook) +Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ñθ䡢ʸǡμʤɡۤȤɤϡܤ +ФƤԤޤ +

+ +

+eb_bind() EB_Book ֥ȤҤ +դľϡܤ򤵤Ƥʤ֤ˤʤäƤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ʤ䨢ܣɴʻŵϡ
+
+
+
+ +

+ܤԤˤϡؿ eb_set_subbook() Ѥޤ +eb_set_subbook() ϡȤϤ줿ܥɤ +äܤ򤷤ޤ +ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+if (eb_set_subbook(&book, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+ȡΤ褦ܤ򤵤줿֤ˤʤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     subbook <book-path>
+ * :
+ *     subbook /cdrom
+ * :
+ *     <boook-path> ǻꤵ CD-ROM Ҥ˴ޤޤƤ뤹٤Ƥܤ
+ *     ̾ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    char title[EB_MAX_TITLE_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* Ҥ˴ޤޤƤܤ̾ϡ*/
+    for (i = 0; i < subbook_count; i++) {
+        error_code = eb_subbook_title2(&book, subbook_list[i], title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get the title, %s\n",
+                argv[0], eb_error_message(error_code));
+            continue;
+        }
+        printf("%d: %s\n", i, title);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Subbook_Code

+ +

EB_Subbook_Code ܥɤɽޤ +νҤܤϡ줾դܥɤäƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤܥͤɽ EB_SUBBOOK_INVALID Ȥ +̤ܥɤƤޤ +ѲǽܤФơܥɤƤ뤳ȤϤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_load_all_subbooks (EB_Book *book)

+ +

+ؿ eb_load_all_subbooks() ϡbook Τ٤Ƥ +ܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ˹Ԥޤ +δؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+δؿƤӽФȡbook ϡܤ򤷤Ƥʤ֤ˤʤޤ +

+ + +

EB_Error_Code eb_subbook_list (EB_Book *book, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_subbook_list() ϡbook Τ٤ܤ +ܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơҤϿƤܤθĿ subbook_count λؤ +ΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook (EB_Book *book, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_subbook() ϡbook ܤ +ܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title (EB_Book *book, char *title)

+ +

+ؿ eb_subbook_title() ϡbook ܤ +̾ title λؤΰʸȤƽ񤭹ߤޤ +̾ʸĹϡĹ EB_MAX_TITLE_LENGTH ХȤǤ +ĹϡΥʥʸޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢̾ɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡtitle λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title2 (EB_Book *book, EB_Subbook_Code subbook_code, char *title)

+ +

+eb_subbook_title() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory (EB_Book *book, char *directory)

+ +

+ؿ eb_subbook_directory() ϡbook Ǹ +ܤΥǡե᤿ǥ쥯ȥ̾directory +λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory2 (EB_Book *book, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_subbook_directory() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤΥǥ쥯ȥ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_set_subbook (EB_Book *book, EB_Subbook_Code code)

+ +

+ؿ eb_set_subbook() ϡbook +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ϽҤ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

void eb_unset_subbook (EB_Book *book)

+ +

+ؿ eb_unset_subbook() ϡbook 򤷤Ƥ +ܤ̤ξ֤ˤޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤϡ +⤷ޤ +

+ + +

+ +

+CD-ROM Ҥˤơ˽פʵǽǤ +EB 饤֥ǤϡΤ褦ʸ᥽åɤѤǤޤ +

+ +
    +
  • ׸ (word search) +
  • ׸ (end-word search) +
  • ׸ (exact-word search) +
  • ︡ (keyword search) +
  • (cross search) +
  • ʣ縡 (multi search) +
+ +

+٤Ƥ CD-ROM ҡ٤Ƥܤǡ˵󤲤٤Ƥ +᥽åɤѲǽʤ櫓ǤϤޤ +ܤˤϡθ᥽åɤ󶡤ʤΤ¸ߤޤ +

+ +

+EB 饤֥ǤϡԤȤǤΤϡܤФ +Ǥ +

+ +

+ξϤǤϡ줾θ᥽åɤδñȡEB 饤֥Ǥ +ˤĤޤ +

+ + + +

סס׸

+ +

+סס׸ϡĤϸ˰פ +ȥõФ᥽åɤǤ +

+ +

+׸ϡϸƬʬפ륨ȥ򸡺ޤ +ȤСֹ͡פȤϡֹ͡סֹͻסֹͤûҡפȤä +ȥ˰פޤ +

+ +

+׸ϡϸפ륨ȥ򸡺ޤ +ȤС`bye' Ȥϡ`bye'`good bye'`bye bye' Ȥä +ȥ˰פޤ +

+ +

+׸ϡĤθȴ˰פ륨ȥ򸡺ޤ +

+ +

+ʲϡ׸ΥץǤ +ܤ椫顢Ƭ librar ǻϤޤ륨ȥõ +ޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+#define MAX_HITS 50
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_search_word(&book, "librar") != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ +

+eb_search_word() ׸ꥯȤؿǤ +Ǥϡlibrar ȤʸͿƤޤ +δؿϰפȥ֤ȤϤޤ +

+ +

+פȥμϡ³ eb_hit_list() ؿ +ƤӽФݤ˹Ԥޤ +eb_hit_list() ϰפȥΰ +hits[] λؤΰ˽񤭹ߡĤäץȥθĿ + &hit_count λؤΰ˽񤭹ߤޤ +Ǥϡeb_hit_list() Ϻ MAX_HITS +(= 50) Υȥõޤ +(Ĥޤꡢ50 ĸĤä鸡ߤޤ) +

+ +

+⤷ܤѡŵȤȡʤȤ library + librarian Ȥ 2 ĤΥȥ˴ؤ +Ǥ礦 +ΤȤ hits[] ϼΤ褦ˤʤäƤޤ +(library librarian ȥ +ϡγȤϰۤʤäƤ뤫Τޤ) +

+ +
+
+
+
+
+ΣϡΣ
+
+
+ +

+hits[] ȤˤĤƤϡܾϤθǤ⤦ܤ +ޤ +

+ +

+ޤǤ׸ˤȤޤפξ +eb_search_word() eb_search_endword() +Ƥ֤褦ˤޤ +¾Ϥ٤ƱǤ +

+ +
+
+if (eb_search_endword(&book, "nalization") != EB_SUCCESS) {
+    printf("eb_search_endword() failed\n");
+    return;
+}
+
+
+ +

+פξƱͤǤ +eb_search_exactword() Ƥ֤褦ˤʳϡ٤Ʊ +Ǥ +

+ +
+
+if (eb_search_exactword(&book, "library") != EB_SUCCESS) {
+    printf("eb_search_exactword() failed\n");
+    return;
+}
+
+
+ + +

+ +

+︡ϡʣĤϸˤ٤ưפ륨ȥ򸡺ޤ +ȤСѡŵξ︡Ǥϡϸ򤹤٤ƴޤʸ򸡺 +褦ˤʤäƤ뤫Τޤ +

+ +

+ʲϡ︡ make, with Ȥ +פ륨ȥܤ椫õФץҤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+static const char *keywords[3] = {"make", "with", NULL};
+
+if (eb_search_word(&book, keywords) != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+
+
+ +

+︡Ԥؿϡeb_search_keyword() Ǥ +סס׸δؿȴŪ˰ϰǤ +ʣϸդ褦ˤʤäƤޤ +ؿˤϡϸʸ (ؤΥݥ) ˤΤϤޤ +κǸˤ NULL ֤νüɬפ +դƲ +

+ +

+סס׸Ʊͤˡeb_search_keyword() +⸡ΥꥯȤԤǡפȥμϹԤޤ +ȥμˤϡϤƱͤ eb_hit_list() ؿ +Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ + +

+ +

+ϡ︡ΰȤ٤᥽åɤǤ +EPWING Żҥ֥åߤƤ⡢ɤ롼ǻȤʬʤƤΤ +ʬʤξԤϼ¤ˤ褯Ƥޤ +

+ +

+EB 饤֥ǥԤؿ eb_search_cross() +ǤȤϾ︡δؿ eb_search_keyword() +ޤäƱǤ +Ȥξܺ٤ϡ־︡ +

+ + +

ʣ縡

+ +

+ʣ縡ϡ︡ƱʣĤϸˤ٤ưפ륨ȥ +ޤġϸˤ餫ܤդƤޤ +

+ +

+ޤססס︡Ϥ٤ơܤˤĤ +षޤ󤬡ʣ縡ϰĤܤʣμबѰ +Ƥ뤳Ȥޤ +ȤС̾ŵˤϡΤ褦˿̾ѤѽѸθ + 2 ʣ縡ѰդƤ뤫Τޤ +

+ +
+
+(ʣ縡 1: ̾򸡺)
+    ϸ 0: ϰ
+    ϸ 1: 
+    ϸ 2: 
+    ϸ 3: 
+    ϸ 4: 
+
+
+ +
+
+(ʣ縡 2: ѽѸ򸡺)
+    ϸ 0: Ѹ
+    ϸ 1: 
+    ϸ 2: 
+
+
+ +

+Τ褦ˡġʣ縡ϡϸܤǤʤϸο +ޤޤǤ +ޤݤϤ٤ƤϸɬפϤʤʤȤĤ +ϸ줬ǤʤСޤ +

+ +

+ʣ縡ϡ ʣ縡 (multi search code) +ˤäƼ̤ޤ +ؿ eb_multi_search_list() ȤȡܤѲǽ +ʣ縡ΰޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+EB_Multi_Search_Code multi_codes[EB_MAX_MULTI_SEARCHES];
+int multi_count;
+
+if (eb_multi_search_list(&book, multi_codes, &multi_count)
+    != EB_SUCCESS) {
+    printf("eb_multi_search_list() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡ɤϡʣ縡ΤδؿɬפȤʤޤ +ȤСeb_multi_title() ϡꤷʣ縡̾ +(:ֿ̾סѽѸ측) ؿǤΤȤ +ʣ縡λˤϡʣ縡ɤѤޤ +ʲǤϡƬ˺ܤäƤʣ縡 (multi_codes[0]) +ꤷƤޤ +

+ +
+
+char title[EB_MAX_MULTI_TITLE_LENGTH + 1];
+
+if (eb_multi_title(&book, multi_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_multi_title() failed\n");
+    return;
+}
+
+
+ +

+˴ؿˤäƤϡʣ縡ɤ˲äơܤϸ줫 +Ƥɬפޤ +ȤСϸܤؿ eb_multi_entry_label() +˳ޤ +0 ܤϸ (ĤޤƬϸ) ܤˤϡΤ褦 +ޤ +

+ +
+
+char label[EB_MAX_MULTI_LABEL_LENGTH + 1];
+
+if (eb_multi_entry_label(&book, multi_code[0], 0, label)
+    != EB_SUCCESS) {
+    printf("eb_multi_entry_label() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡Ԥؿϡeb_search_multi() Ǥ +ȤϾ︡ȤۤƱǡϸʸˤΤ +ȤϤκǸˤ NULL ֤Ʋ +ƤʤϸΤȤˤϡʸ֤ޤ +

+ +

+eb_search_multi() ⸡ΥꥯȤԤǡפ +ȥμϹԤޤ +ˤ eb_hit_list() Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ʤʣ縡ϸˤäƤ + (candidates) 餸ѰդƤ뤳Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +ˤĤƤϡξϤǤϤʤ֥ƥȥǡפξϤޤ +(ʣ縡θ 򻲾ȤΤ) +

+ + +

ץȥξ

+ +

+eb_hit_list() ϡꥯȤ줿 (סס +סʣ) ˰פȥξȸĤäȥ +Ŀ򡢤줾 EB_Hit ΰ褪 int +ΰ˽񤭹ߤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ˽Ҥ˷դ
+ * 졢ܤȲꤷƤޤ*/
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+EB_Hit θġǤˤϡפȥ +Ф (heading) ʸ (text) γϰ֤ +񤭹ޤƤޤ +

+ +
+
+Ф
+
+ţ¡ȣ
+
+稻ʸ
+
+
+ʣˣ
+ᡡ
+롥ʣˡ
+
+
+
+ +

+ФʸˤĤƤΤܤȼˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ +

+ + +

ĤäƤ륨ȥμ

+ +

+˽Ҥ٤褦ˡeb_hit_list() ƤӽФȤϡפ +ȥDzĤޤõΤǻꤷޤ +ޤeb_hit_list() Ͻȡºݤ˸Ĥä +ȥο򥢥ץꥱץ˶ޤ +

+ +
+
+error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+if (error_code == EB_SUCCESS)
+    printf("%d entries found\n", hit_count);
+
+
+ +

+ꤷĿ¿ΰץȥ꤬ܤ¸ߤƤϡ +eb_hit_list() 򷫤֤ƤӽФȤǡĤΥȥ +뤳ȤǤޤ +

+ +
+
+for (;;) {
+    if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+        != EB_SUCCESS) {
+        fprintf(stderr, "an error occurs.\n");
+        return;
+    }
+    if (hit_count == 0)
+        break;
+    /* ץȥν */
+}
+
+
+ +

+ץȥ꤬⤦ĤäƤʤСeb_hit_list() +&hit_count λؤΰ 0 񤭹ǡ +EB_SUCCESS ֤ޤ +

+ +

+ eb_hit_list() Ԥ +(EB_SUCCESS ʳ֤ͤ)ꥯȤ˴ؤ +ֵϿϥꥻåȤ뤿ᡢץȥμ򤽤ʾ³뤳Ȥ +Ǥޤ +

+ + +

ʣȥκ

+ +

+eb_hit_list() ѤưפȥȡȤ +¼ŪѤʤȥ꤬ʣޤޤƤ뤳Ȥޤ +EB 饤֥ϡʣȥκϹԤޤ +ɬפʤ顢ץꥱ¦ǹԤȤˤʤޤ +

+ +

+ʣ˼ʤ顢ʲΤ٤Ƥξ˰פ륨ȥ +ʣȥȤߤʤܰʹߤ˽иȥޤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸ (֤ǤϤʤʸ󤽤Τ) Ʊ +
+ +

+(ФʸμˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ) +

+ +

+ʣϡľΥȥФƤΤߵȤϸ¤ޤ +ȤСeb_hit_list() ǰץȥ꤬ 50 줿硢 +Ǹ 50 ܤ 49 ĤȽʣԤɬפޤ +äơΤǤϥȥƱΤӤ 1 + 2 + ... + 49 = 1225 +ԤȤˤʤޤ +

+ +

+ҤˤäƤϽʣȥ꤬꤭ʤǽ⤢ޤ⤦ +ñˡ⤤Ĥޤ +ñˤˡϡʣȥȽ򼡤Τ褦Ѥ +ȤǤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸΰ֤Ʊ +
+ +

+˽ñˤˤϡľ 1ĤΥȥФƤʣ +ԤȤˡ⤢ޤ +ʤ顢50 ĤΰץȥФơӤ 49 ǺѤߤޤ +ˡϡҤˤäƤϤޤä̤ޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     word <book-path> <subbook-index> <word>
+ * :
+ *     word /cdrom 0 apple
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤ椫 <word>
+ *     Ȥñ׸õҥåȤ٤ƤΥȥ
+ *     Фɽޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAX_HITS 50
+#define MAXLEN_HEADING 127
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    EB_Hit hits[MAX_HITS];
+    char heading[MAXLEN_HEADING + 1];
+    int subbook_count;
+    int subbook_index;
+    int hit_count;
+    ssize_t heading_length;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index word\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ñ측ΥꥯȤС*/
+    error_code = eb_search_exactword(&book, argv[3]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to search for the word, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[3]);
+        goto die;
+    }
+
+    for (;;) {
+        /* ĤäƤҥåȥȥ*/
+        error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get hit entries, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        if (hit_count == 0)
+            break;
+
+        for (i = 0; i < hit_count; i++) {
+            /* Фΰ֤ذư*/
+            error_code = eb_seek_text(&book, &(hits[i].heading));
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to seek the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+
+            /* Фɽ*/
+            error_code = eb_read_heading(&book, NULL, NULL, NULL,
+                MAXLEN_HEADING, heading, &heading_length);
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to read the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+            printf("%s\n", heading);
+        }
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hit

+ +

+EB_Hit ϡ˰פȥξǼ뤿 +ǡǤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hit_Struct EB_Hit;
+
+struct EB_Hit_Struct {
+    EB_Position heading;  /* Фΰ */
+    EB_Position text;     /* ʸΰ   */
+};
+
+
+ +

+ץꥱץϡľ EB_Hit ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Position

+ +

EB_Position ϡܤΥǡΰ֤ɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ڡֹ 1 ϤޤꡢڡΥեåȤ 0 2047 ϰϤ +ʤޤ +ץꥱץǡΤȤФƤ +ɬפϤޤ +

+ +

+ץꥱץϡľ EB_Position ֥ +ΥФ򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Multi_Search_Code

+ +

EB_Multi_Search_Code ʣ縡ɤɽޤ +ܤѰդƤʣ縡ϡ줾դʣ縡ɤ +äƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤʣ縡ͤɽ EB_MULTI_INVALID Ȥ +̤ܥɤƤޤ +Ѳǽʣ縡Фơʣ縡ɤƤ뤳Ȥ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

int eb_have_word_search (EB_Book *book)

+ +

int eb_have_endword_search (EB_Book *book)

+ +

int eb_have_exactword_search (EB_Book *book)

+ +

+ؿ eb_have_word_search() ϡbook +ܤ׸᥽åɤѲǽɤĴ٤ޤ +Ʊͤ eb_have_endword_search() ϸ׸᥽åɤ +Ĥơeb_have_exactword_search() ϴ׸᥽åɤ +ĤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_keyword_search (EB_Book *book)

+ +

+ؿ eb_have_keyword_search() ϡbook +ܤǾ︡᥽åɤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_multi_search (EB_Book *book)

+ +

+ؿ eb_have_multi_search() ϡbook +ܤʣ縡᥽åɤѲǽɤĴ٤ޤ +

+ +

+ 1 ǤѲǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

EB_Error_Code eb_multi_search_list (EB_Book *book, EB_Multi_Search_Code *multi_list, int *multi_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡Ĵ١ʣ縡ɤΰ +EB_Multi_Search_Code ˤơmulti_list +λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_MULTI_SEARCHES ĤǤޤ +äơʣ縡μ multi_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_count (EB_Book *book, EB_Multi_Search_Code multi_id, int *entry_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ϸ +Ŀ entry_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ񤭹ޤϸθĿϡ1 ʾ EB_MAX_MULTI_ENTRIES +ʲˤʤޤ +Ԥȡentry_count λؤΰˤ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_title (EB_Book *book, EB_Multi_Search_Code multi_id, char *title)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ̾ title +λؤΰ˽񤭹ߤޤ +ܤϺĹ EB_MAX_MULTI_TITLE_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ҤˤäƤϡʣ縡ѰդƤƤ⡢ʣ縡̾ǡä +ʤȤޤ +ξ硢EB 饤֥꤬դ̾ title +񤭹ޤޤ +

+ +

+Ҥʸɤ EB_CHARCODE_ISO8859_1 ʤ顢 +EB 饤֥꤬դ̾ϡ"Multi Search 1", "Multi Search 2", ... +ˤʤޤ +ʳʸɤǤСܸ̾ EUC ǽ񤫤줿ʣ縡 1 +ʣ縡 2... Ȥʸˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_label (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, char *label)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθܤ label λؤΰ +񤭹ߤޤ +entry_index ϡƬθ 0 ܤȿޤ +ܤϺĹ EB_MAX_MULTI_LABEL_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

int eb_multi_entry_have_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθ줬äƤ뤫ɤĴ٤ޤ +entry_index ϡƬθ 0 ܤȿޤ +

+ +

+äƤ 1 ֤ޤ +äƤʤ⤽ܤ򤵤Ƥʤ硢뤤 +multi_id, entry_index ͤä +0 ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, EB_Position *position)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθθΰ֤ position +λؤΰ˽񤭹ߤޤ +Ƭθ줬 0 ܤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpositin λؤΰˤ eb_seek_text() +ɬԤ־񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_search_word (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_endword (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_exactword (EB_Book *book, const char *input_word)

+ +

+ؿ eb_search_word() ϡbook ܤ +Ф׸ꥯȤޤ +Ʊͤ eb_search_endword() ϸ׸ +eb_search_exactword() ϴ׸ꥯȤޤ +

+ +

input_word ǻꤷޤ +δؿϸꥯȤǡפȥ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơ 1 ХȰʾ塢EB_MAX_WORD_LENGTH (= 255) +ХȰʲǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD +Ĺ 0 (ʸ) ξ EB_ERR_EMPTY_WORD ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_search_keyword (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_cross (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_multi (EB_Book *book, EB_Multi_Search_Code multi_id, const char * const input_words[])

+ +

+ؿ eb_search_keyword() ϡbook +ܤФ︡ꥯȤޤ +Ʊͤ eb_search_cross() ϥ +eb_search_multi() ʣ縡򤽤줾ꥯȤޤ +

+ +

input_words ǻꤷޤ +︡ʣ縡ϤʣĤθդޤΤǡ +ˤϤޤ +ΤȤǤˤ NULL ֤νü +ޤ +

+ +

+δؿ⸡ꥯȤǡפȥξ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơġθ EB_MAX_WORD_LENGTH (= 255) ХȰʲ +ǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD ֤ޤ +Ĺ 0 ХȤθ̵뤵ޤʤȤ 1 ĤθĹ + 1 ʾʤȤޤ +Ĺ 1 ʾθ줬 1 ĤʤȤϡEB_ERR_NO_WORD +֤ޤ +

+ +

+ NULL ǿϡ︡Ǥ EB_MAX_KEYWORDS +ʲǤ EB_MAX_CROSS_ENTRIES ʲ +ʣ縡Ǥ EB_MAX_MULTI_ENTRIES ʲǤʤƤ +ʤޤ +Ŀ¿ EB_ERRO_TOO_MANY_WORDS ֤ޤ +ʸǤ򺹤ĿǤϤʤñϤ줿ǿ¤ +ĶƤȥ顼ˤʤޤΤǡդɬפǤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_hit_list (EB_Book *book, int max_hit_count, EB_Hit *hit_list, int *hit_count)

+ +

+ؿ eb_hit_list() ϡ餫ʲΤ줫δؿ +ꥯȤ줿¹Ԥפȥޤ +

+ +
    +
  • eb_search_word() (׸) +
  • eb_search_endword() (׸) +
  • eb_search_exactword() (׸) +
  • eb_search_keyword() (︡) +
  • eb_search_cross() () +
  • eb_search_multi() (ʣ縡) +
+ +

+äơδؿƤˡ嵭Τ줫δؿθƤӽФ +ʤƤϤʤޤ +

+ +

+eb_hit_list() Ϻ max_hit_count Ĥ +ץȥ hit_list ˽񤭹ߤޤ +ơ񤭹ץȥο hit_count ؤΰ +񤭹ߤޤ +ʾθĿΰץȥ꤬¸ߤ硢Ĥäȥξϡ +δؿ򷫤֤ƤӽФȤ뤳ȤǤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡꥯȤ˴ؤֵϿ +ꥻåȤޤΤǡפȥμϷ³Ǥʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_search_word() +
  • eb_search_endword() +
  • eb_search_exactword() +
  • eb_search_keyword() +
  • eb_search_cross() +
  • eb_search_multi() +
+ +

+֤Ƥ⡢פȥξϤ hit_list +Ƭ񤭹ߡhit_count ؤΰ˽񤭹ͤ⡢β + eb_hit_list() θƤӽФǽ񤭹ץȥο +ʤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ȥפȥ꤬ʤƤ⡢˽λСؿ +EB_SUCCESS ֤ޤ +

+ +

+Ԥȡhit_count ؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +ξ硢ꥯȤƤξֵϿϥꥻåȤޤΤǡ +ʾ eb_hit_list() ƤǡĤäץȥ +뤳ȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤ˵󤲤ΥꥯȤƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_PREV_SEARCH ֤ޤ +

+ + +

ƥȥǡ

+ +

+ƥȥǡμϡ¤ֽפʵǽǤ +

+ +

ƥȥǡ (text data) ϡ +ʸ (text body) Ȥ̣ǤϤޤ +CD-ROM ҤˤϳΤʸ¸ߤޤʸƱǡѤ +񤫤줿ǡढޤ +ܽǤϡΥǡޤȤƥƥȥǡȸƤǤޤ +EB 饤֥꤬ƥȥǡμˤϡΤΤޤ +

+ +
    +
  • Ф +
  • ʸ +
  • ˥塼 +
  • ɽ +
  • ʣ縡ϸθ +
+ +

+ܾϤǤϡΥƥȥǡμȲùˡˤĤޤ +

+ + + +

ƥȥǡΥɤ߹

+ +

+UNIX ǥץȤиΤˤϡե뤫ǡɤ߹ +ݤѤ lseek(), read() Ȥƥॳ +¸¿Ǥ礦 +

+ +

+EB 饤֥Ǥ⡢ƥȥǡμˤϡ (seek) +ɤ߹ (read) Ȥ 2 ĤǹԤޤ +EB 饤֥Ǥϥեݥ󥿤ǥץϤʤ +EB_Book ֥Ȥ̤ƥɤ߹ߤԤޤ +

+ +

+ޤ˻ꤹ֤ off_t ǤϤʤ +EB_Position ([] ǡξܺ١ 򻲾ȤΤ) +Υ֥ȤѤޤ +ȤСʸƬ֤ϡeb_text() ȤؿȤä +Τ褦˼ǤޤΤȤ֥ǡ EB_Position +֥Ȥ˽񤭹ޤޤ +

+ +
+
+EB_Position position;
+
+/* ؿνȡposition ʸγϰ֤
+ * 񤭹ޤޤ */
+if (eb_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ͤޤǤˡEB_Position ¤ϡΤ褦ˤʤäƤޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ƸĤäץȥθФʸɤ߹ݤˤ⡢־ +λˤ EB_Position Ȥޤ +פȥξϡؿ eb_hit_list() ˤä +EB_Hit ȤΥ֥Ȥ˽񤭹ޤޤ +EB_Hit ϼΤ褦Ƥޤ +(ܤ [] ǡξܺ١ 򻲾ȤΤȡ) +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ĤޤꡢΤȤθФʸΰ֤⡢EB_Position +ɽƤΤǤ +

+ +

+ǤϡºݤΥץˤơɤ߹ߤԤäƤߤޤ +ޤϡǤ +ˤϴؿ eb_seek_text() Ѥޤ +ǤϤꡢ֤ EB_Position Ϥޤ +

+ +
+
+if (eb_seek_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ǡμ (Фʸ ...) ˤ餺ƥȥǡΥ +٤ eb_seek_text() ǹԤޤ +

+ +

+EB_Book ֥Ȥϡƥȥǡμ̤ +ɤ߹֤߰ФƤ櫓ǤϤʤΥƥȥǡǶͭ +־ijФƤǤ +ȤСʸɤ߹ǡ̤ΰ֤˥ƸФɤ߹ȡ +EB_Book ʸɤ߹֤߰ΤȤ˺Ƥޤޤ +

+ +

+ơä顢ǡɤ߹ߤޤ +ɤ߹⤦ȤƥȥǡμˤäơѤؿۤʤޤ +Ф eb_read_heading() ȤޤʳǤ +eb_read_text() Ȥޤ +

+ +

+ʲϡeb_read_text() λǤ +

+ +
+
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

text ˤϥƥȥǡ +text_length ˤϼºݤɤ߹Хȿ񤭹ޤޤ +ƥȤϺ MAX_LENGTH ХȽ񤭹ޤޤ +ƥȥǡϤ˥ʥʸǽüޤΤǡbuffer ˤ +⤦ 1 Хʬΰ褬ɬפˤʤޤ +

+ +

+eb_read_heading() θƤӽФ⡢eb_read_text() +ȤޤäѤޤ +

+ +
+
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() eb_read_heading() ɤ߹ +ƥȥǡʿʸΥƥȤˤʤäƤơʥʸǽüƤޤ +

+ +
+
+printf("%s\n", text);   /* ϤƤߤ */
+
+
+ +

+ɤ߹ߤƥȥǡĹơeb_read_text() +뤤 eb_read_heading() ƤӽФǤ +ɤ߹ʤäϡٸƤӽФȤ³Υǡɤ߹ळȤ +Ǥޤ +

+ + +

ƥȥǡ

+ +

+Ǥϡɤ߹ƥȥǡϡʿʸƥȤˤʤäƤޤ +ɤ⡢CD-ROM ʿʸƥȤΥǡΤޤ޼ϿƤ +櫓ǤϤޤ +

+ +

+ºݤΥƥȥǡ򡢰ʲ˼ޤ +¦Υ֥å 16 ʿǥפͻҤǡ¦Ϥ JIS X 0208 +(ܸΤʴ) ʸɽƤʬ [] Ȥ +ľΤǤ +

+ +
+
+     (16ʿˤ)            (ǽʬ򤫤ʴѴ)
+1f0900011f41010026321f611f042121   1f0900011f410100[]1f611f04[]
+212721211f053e704a734a541f0a1f04   [][]1f05[][][]1f0a1f04
+214e1f0525372530255e1f04214f2121   []1f05[][][]1f04[][]
+214a237323692367236d236121212370   [][][][][][][][]
+2372236f236a236523632374214b1f05   [][][][][][][]1f05
+
+
+ +

+¦Υ֥å򸫤ȡ褽ʿʸ˶ᤤǥƥȥǡ +뤳ȤʬޤȤɤˡʸפǤϤʤǡޤޤ +ޤ +

+ +

+ʸǤϤʤʬϡ٤ơ֥ץ󥹡פȸƤФΤǤ +ץ󥹤ȤϡƥȥǡϤݤˡԤζػߤ +ĴȤä뤿λȤߤǤ +16 ʿ 1f ץ󥹤γϤ̣ޤ +

+ +

+ͤޤǤˡΥƥȥǡǻȤƤ륨ץ󥹤 +٤󤹤ȡΤ褦ˤʤޤ +

+ +
+
1f09 0001
+
+ (ǥ) ̤ꡣ +( 0001 ʤΤǡ̤ 1) +
1f41 0100
+
+γϡ +( 0100 ΰ̣ˤĤƤϡJIS X 4081 ˵Ҥʤ) +
1f61
+
+νλ +
1f04
+
+Ⱦɽγϡ +
1f05
+
+Ⱦɽνλ +
1f0a
+
+ +
+ +

+Υץǡɤ߹ǡʿʸƥȤˤʤäƤΤϡ +¤ EB 饤֥꤬ù򤷤Ǥ +ĤޤꡢֲԡפΤ褦ʿʸƥȤǤɽǽʥץ +ˤĤƤϽָγϡפΤ褦ɽǤʤΤˤĤƤ +̵뤹褦ˤơʿʸƥȤˤʤ褦˲ùƤΤǤ +

+ +

+ʿʸƥȤɽϤ˳ΤǡΥǡˤϴޤޤƤ +ץ󥹤¿̵뤹뤳ȤˤʤäƤޤޤ +HTML Τ褦ˡäɽϤΤǽϤʤ顢̵뤻˺Ѥ +󥹤䤻Ǥ +ǤϡHTML ǥƥȥǡؿ EB 饤֥Ѱդ +뤫Ȥȡǰʤ餢ޤ +

+ +

+ˡʤ֤Ϥޤͳ˥ƥȥǡùǤ +λȤߤѰդƤޤ +줬 եå (hook) Ǥ +եåȤȤǡƥȥǡ˲ù뤳ȤǤޤ +

+ + +

եå

+ +

+ä˲ꤷʤСeb_read_text(), +eb_read_heading() ֤ƥȥǡβùϡ餫 +줿̤ˡǹԤޤ +ȤСֲԡפΥץ󥹤ФƤϡ\n +񤭹褦ˤʤäƤޤ +

+ +

+եå (hook) ȤȡùˡѤ뤳ȤǤޤ +եåϡ餫줿եå֤ФơեåؿϿ +뤳Ȥͭˤʤޤ +եåؿϿƤȡeb_read_text() +eb_read_heading() ϡ餫ޤäǥǡ +񤭹ˡեåؿƤӽФޤ +ƤӽФ줿եåؿǡν񤭹߽ԤȤǡ +eb_read_text() eb_read_heading() ֤ +ƥȥǡѲȤ櫓Ǥ +

+ +

+EB 饤֥ˤϡ¿Υեå֤ѰդƤޤ +ƥץ󥹤ˤϡ줾Ѥ˥եåѰդƤꡢ +ʳˤʸΤΥեå¸ߤޤ +(ɤΤ褦ʥեå֤뤫ܤ +֥եåɤΰ 򻲾ȤΤȡ) +

+ +

+줾Υեå֤ϡեå (hook code) +ƤФ륳ͤǼ̤ޤ +ȤСҤΡֲԡפΥץ󥹤бեå + EB_HOOK_NEWLINE ˤʤޤ +

+ +

+ץꥱץबեå򰷤ˤϡեåνǤ +եåå (hook set) Ѱդޤ +ϡEB 饤֥Ѳǽʤ٤ƤΥեå֤Фơɤ +եåؿȤΤϿ뤿Υ֥ȤǤ +

+ +

+ǤϡºݤˤɤäƥեååȤ򰷤ΤƤޤ礦 +եååȤ EB_Hookset Υ֥ȤɽޤΤǡ +ޤ EB_Hookset ֥ȤѰդޤ +

+ +
+
+EB_Hookset hookset;
+
+
+ +

+EB_Hookset ֥ȤϡEB_Book ֥ +Ʊͤˡɬɬפޤ +

+ +
+
+eb_initialize_hookset(&hookset);
+
+
+ +

+ºݤΥեåؿϡΤ褦ʤΤˤʤޤ +Ǥϡեåؿ eb_write_text_string() Ȥ +ؿƤӽФơ<br> Ȥʸƥȥǡ +Ȥƽ񤭹Ǥޤ +

+ +
+
+EB_Error_Code
+hook_newline(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv) {
+    eb_write_text_string(book, "<br>");
+    return 0;
+}
+
+
+ +

+ؿ eb_set_hook() Ѥ뤳ȤǡΥեåؿ +եååȤϿ뤳ȤǤޤ +ޤ EB_Hook ȤΥ֥Ȥˤä +եåɤȥեåؿꤷ eb_set_hook() +ϤƤɬפޤ +Ǥϡֲԡפɽץ󥹤Фơ嵭Υեåؿ +ϿƤߤޤ +

+ +
+
+EB_Hook hook;
+
+hook.code = EB_HOOK_NEWLINE;   # եåɤ򥻥å
+hook.function = hook_newline;  # եåؿ򥻥å
+eb_set_hook(&hookset, &hook);
+
+
+ +

+ʤƱեå (եå) ʣեåؿϿƤ⡢ +ͭˤʤΤϺǸϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ؿ eb_set_hooks()s դ) ȤС +ʣΥեåؿ٤ϿǤޤ +

+ +
+
+static const EB_Hook hooks[] = {
+    {EB_HOOK_NEWLINE,        hook_newline},
+    {EB_HOOK_SET_INDENT,     hook_set_indent},
+    {EB_HOOK_WIDE_JISX0208,  hook_set_jisx0208},
+    {EB_HOOK_NULL,           NULL}
+};
+
+eb_set_hooks(&hookset, &hooks);
+
+
+ +

+뤿ˡEB_HOOK_NULL Ȥü +եåɤ֤ޤ +դƲ +

+ +

+ƥեåؿϿեååȤeb_raed_text(), +eb_raed_heading() ؤΰȤϤޤ +ޤǤǤϡNULL ϤƤޤ +&hookset ϤƤߤޤ +

+ +
+
+if (eb_read_text(&book, NULL, &hookset, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ˤäơƥȥǡ˲Ԥɽץ󥹤ȡ +\n <br> Ȥʸ +񤭹ޤ褦ˤʤޤ +

+ +

+EB_Hookset ֥ȤȤä顢 +eb_finalize_hookset() ƤǸ򤷤ޤ +

+ +
+
+eb_finalize_hookset(&hookset);
+
+
+ + +

եåʸɤδط

+ +

+Ǥϡץ󥹤ФեåˤȤޤ¾ +ˤ⡢EB 饤֥ˤʸФեåѰդƤޤ +

+ +
+
EB_HOOK_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ʸؤΥեåʸޤ +ȤơISO 8859-1 ʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_JISX0208
+
+ȾѤ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_JISX0208
+
+Ѥ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_GB2312
+
+GB 2312 (δλ) ʸؤΥեå +Ȥơ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ +
+ +

+⡢ʸƥȥǡ˸٤ˡեåؿƤӽФ +ޤ +

+ +

+εҤ򸫤Ƥʬ褦ˡեåؿϤʸֹϡҤʸ +ɤ˱ơISO 8859-1, ܸ EUC EUC Τ줫ʸ +ɽ줿Τˤʤޤ +

+ +

+եåؿϿʤСʸֹ椬ƥȥǡȤƤΤޤ +񤭹ޤޤ +

+ +

+⤷ץꥱץबEB 饤֥ɤȤϰۤʤ +ʸɤѤϡΥեåΥեåؿϿơ +Ѵ򤹤ΤǤ +ʸ˥եåؿƤӽФΤǡ٤ޤ +

+ +

+ޤEBXA-C 򰷤ˤϡ̤ʽɬפǤ +EBXA-C ǤϡʸɤȤ GB 2312 JIS X 0208 Ȥޤ +(ʸɡ 򻲾ȤΤ)EB 饤֥ˤɸν +Ǥϡɤ 0xa1a1 0xfefe ˥ޥåԥ󥰤ƾͤ뤿ᡢ +Ǥɤ餫եåʸɽˡѤʤȡ +Ǥޤ +

+ + +

θ

+ +

ָ ξϤǽҤ٤褦ˡCD-ROM +ˤ׸׸Ȥäʣθ᥽åɤޤ +EB 饤֥ǸԤȡɤθ᥽åɤǤ⡢פȥ +ϡʲΤ褦 EB_Hit Υ֥ȤȤ +ޤ +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ǤϡEB_Hit θФʸΰ֤ +ޤäƱˤʤޤ +äơФʸΥƥȥǡɤ߹ˤϡ¾θ᥽å +Τ褦ˤ줾ΰ֤˥ɤ߹ȤǤϤޤ +ޤ +

+ +

+ʲˡθФʸɤ߹ץ򼨤ޤ +

+ +
+
+/* Ф֤ؤΥԤ */
+if (eb_seek_text(&book, &hits[0].heading) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* Фɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    heading, &heading_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ۤɤ߹ФΡʬ */
+if (eb_forward_heading(&book) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ʸɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+Ǥ⡢ФƤɤ߹ˡ¾θ᥽åɤѤ +Ϥʤeb_read_heading() Ȥޤ +ѤäƤΤϡʸɤ߹ߤǤ +eb_read_text() ǤϤʤeb_read_heading() +Ȥޤ +Фɤ߹िδؿ eb_read_heading() ʸ +ɤ߹ि˸Ƥ֤ȤΤϴ̯äǤϥʸ +ФƱˤʤäƤ뤿Ǥ +̾Фϰ٤񤫤Ƥޤ󤬡ºݤΤȤ +ʸ٤ޤ +

+ +

+ޤʸϸФΤ˽񤫤Ƥ뤿ᡢ嵭Τ褦˸Ф +ɤ߹ eb_forward_heading() ȤؿƤӡ +θʸɤ߹िˤ⤦ eb_read_heading() +Ƥ֤ȤѤäƧߤޤ +

+ +

+ʸɬפǸФפʤСľ +eb_forward_heading() Ƥ֤褦ˤޤ +θ eb_read_heading() Ƥ֤ȡʸɤ߹ߤޤ +

+ + +

ɽ

+ +

+˵褦ˡƥȥǡˤϲफꡢ +ɽ (copyright notice) ȤΤޤ +̤̾ꡢɽ˴ؤƥȥǡ᤿ΤǤ +

+ +

+̤ˡɽʸȤϤޤäΩǡȤѰդޤ +äơʸƬޤɤǤߤƤ⡢ɽϤɤˤ +Ĥޤ +

+ +

+ܤˤĤơɽγϰ֤Τˤ +eb_copyright() Ȥޤ +δؿϡܤɽäƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡɽ̵ͭ +Ʊʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_copyright() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_copyright(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ɽϤʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

˥塼

+ +

+ʸȤΩƥȥǡȤƤϡɽ¾ +˥塼 (menu) ȤΤޤ +˥塼ϡʸȤʤǡϿƤޤ +ɽŪʤΤǤϡ ()ספȤäΤ󤲤ޤ +

+ +

+˥塼Ǥϡ̹ܻȡפȤץ󥹤¿ѤơŪ +ʹ¤ˤʤäƤΤŪǤ +Υץ󥹤ˤϡΥƥȤΰ֤ϿƤޤ +

+ +

+ȤС CD-ROM ҤΥ˥塼Τ褦ˤʤäƤȤޤ +Ǥϡ˥塼ˤ 3 Ĥιܤޤ +

+ +
+
+ * ʸ
+ * ɽˤĤ
+ * 
+
+
+ +

+˥塼Τ줾ιܤˤϡ褬ޤ +ƥȥǡɽǤϡֽʸסɽˤĤơסֱաפ +줾ʸ̹ܻȳϤӽλץ󥹤 +դˤʤäƤޤ +Ūʬ褦˵ȡΤ褦ʷˤʤäƤޤ +

+ +
+
+ * <̹ܻȳϥ> "ʸ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "ɽ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "" <̹ܻȽλ>
+
+
+ +

+HTML νΤäƤʤ顢a ȸʬΤǤ +ʤȻפޤ +

+ +
+
+<a href="./index.html">EB 饤֥Υۡڡ</a>
+
+
+ +

+ΰ־Ͻλ¦˵ܤޤΤǡ +HTML Ȥϵդˤʤޤ +­Ǥֻ̰Ȥϥ˥塼ǤʤʸǤŪ˻Ѥޤ +

+ +

+̹ܻȳϤӽλ󥹤Фơ줾եå +EB_HOOK_BEGIN_REFERENCE EB_HOOK_END_REFERENCE +ѰդƤޤ +ΰ־ϡλ󥹤ؤΥեåؿФơȤ +Ϥޤ +ȤСEB_HOOK_END_REFERENCE ؤΥեåؿƬǤϡ +Τ褦ˤɤΤޤ +

+ +
+
+EB_Error_Code
+hook_end_ref(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv)
+{
+    EB_Position position;
+
+    position.page = argv[1];    # Υڡֹ
+    position.offset = argv[2];  # Υեå
+
+
+ +

+ϡ˥塼 2 ؤȤʤޤ +νҤΡֱաפλéä顢Τ褦ɽˤʤäƤޤ +

+ +
+
+ƲǼ 켭ŵ  2  (EPWING )
+ 1  ȯ 1988ǯ 2
+ 2  ȯ 1999ǯ 11
+ 2  (EPWING ) ȯ 2000ǯ 2
+
+
+ +

+ƱͤˡֽʸסɽդơפλˤĤƤ⡢ʸϥǡ +ѰդƤޤ +޼ȡ˥塼γؤϼΤ褦ˤʤޤ +

+ +
+
+
+裱ء˥塼
+
+
+
+
+
+裲ء˥塼˥塼˥塼
+
+
+
+ +

+μǤϡ˥塼ϤǽˤʤäƤޤҤˤäƤ + 3 ء 4 ؤ³⤢ޤ +ޤ˥塼ΤѰγؿˤʤäƤȤϸ¤ޤ +˥塼λ褬ʸɽˤʤäƤ뤳Ȥ⤢ޤ +

+ +

+ܤˤĤơ( 1 ؤ) ˥塼γϰ Τˤ +eb_menu() Ȥޤ +δؿϡܤ˥塼äƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡ˥塼̵ͭƱ +ʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_menu() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_menu(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ˥塼Ϥʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

ʣ縡θ

+ +

+ʣ縡(ʣ縡 򻲾ȤΤ) ΤȤǽҤ٤褦ˡ +ʣ縡Ǥϡϸ (candidates) ѰդƤ +Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +

+ +

+ȤС̾򸡺ΤˡΤ褦ʣ縡äȤޤ +

+ +
+
+ϸ 0: ϰ
+ϸ 1: 
+ϸ 2: 
+ϸ 3: 
+ϸ 4: 
+
+
+ +

+Τϸ 3 Ρ̡פˤϡϸȤͭʸϡˡפȡֽ + 2 ĤʤǤ礦 +Τ褦ˡϸȤͭʸ줬¤ƤˡѰ +Ƥ뤳Ȥޤ +

+ +

+ϸΤΥǡǤϤޤ¤ϥƥȥǡ +ΤΤǤ +桼ФƸ󵭤ƥȤ򼨤ΰĤ +Ƥ餦褦ˤʤäƤޤ +

+ +

+⡢Υǡ¤ϥ˥塼˻Ƥꡢ˥塼 +褦ʳع¤äƤޤ +(֥˥塼 򻲾ȤΤ) +ȤСʣ縡ϸ 2 ֹϰפˤΰߤ +顢ǽγؤϼΤ褦ˤʤ뤫Τޤ +

+ +
+
+*  ()
+* ܰʳΥ (ܺ)
+* 衼å (ܺ)
+* ̥ꥫ (ܺ)
+* ¾ (ܺ)
+
+
+ +

+ܡפ֤ȡϸ줬ꤵ줿Ȥˤʤޤ +ʳιܤˤĤƤϤ˺٤ʬव줿褬Ѱդ +ޤ +Ǥϡ̥ꥫפǤߤޤ礦 +ȡ˼Τ褦ʸΥǡ󼨤ޤ +

+ +
+
+* ꥫ ()
+* ʥ ()
+
+
+ +

+ǡ֥ꥫס֥ʥפ֤ȡϸ줬ꤵޤ +

+ +

+˼ºݤˡEB 饤֥ȤäƤ򰷤ˡˤĤ +ޤ +ޤץꥱץϡʣ縡ϸ줬ä +뤫ɤ򡢳ǧɬפǤ礦 +eb_multi_entry_candidates() Ȥȡǡγϰ +뤳ȤǤޤ +δؿϡäƤʤ EB_ERR_NO_CANDIDATES +֤ޤΤǡ̵ͭʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_multi_entry_have_candidates() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+/* mulit_id, entry_id ǡɤʣ縡
+ * ܤϸˤĤƳǧΤꤷޤ*/
+err = eb_multi_entry_candidates(&book, multi_id, entry_id, &position);
+if (err == EB_ERR_NO_CANDIDATES) {
+    /* ϸˤϡѰդƤʤ */
+   return;
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +ɤ߹ƥȤǤϡȤʤΤ줾줬䳫ϤȽλɽ +ץ󥹤˶ޤ줿ˤʤäƤޤ +

+ +
+
+* <䳫ϥ> "" <佪λ>
+* <䳫ϥ> "ܰʳΥ" <佪λ>
+* <䳫ϥ> "衼å" <佪λ>
+* <䳫ϥ> "̥ꥫ" <佪λ>
+* <䳫ϥ> "¾" <佪λ>
+
+
+ +

+䳫ϥ󥹤ФƤϡեåȤ +EB_HOOK_BEGIN_CANDIDATE ѰդƤޤ +λ󥹤Фեå 2 ढäơ˼γؤ³ +˸ƤФ EB_HOOK_END_CANDIDATE_GROUP ȡθ줬Τޤ +ϸθȤʤ˸ƤФ EB_HOOK_END_GROUP_LEAF +ʬƤޤ +

+ +

+γؤΥǡγϰ֤ϡλ󥹤ΥեåؿˡȤ +ϤäƤޤ +(˥塼ƱͤʤΤǡ˥塼β򻲹ͤˤƲ) +

+ +

+λ󥹤ФեåؿǤϡeb_current_candidate() +ȤؿȤޤ +δؿϡϥ󥹤Ƚλ󥹤δ֤˶ޤ줿ָפʸ +(ݥ) ֤ޤ +

+ +
+
+const char *candidate;
+
+candidate = eb_current_candidate(book);
+
+
+ + +

ڤꥳɤ

+ +

+ʸϡƬޤǰܤηҤäǡˤʤäƤޤ +Ѹ켭ŵʤ顢ǽñ `A' Ǹ `zzz' ޤǤ٤ưĤ +ʸפ˽񤫤뤳Ȥˤʤޤ +

+ +

+̤ˡץꥱץबñ򸡺ݤϡʸ椫 +ñʬȴФƽϤ뤳ȤˤʤǤ礦 +ȤС`dictionary' Ȥñ硢Τ褦ʸϤϤ +Ԥޤ +μ䡢μñޤDZ䡹ɽ뤳Ȥ򡢤餯Ⱦ +桼˾ޤʤȦǤ +

+ +
+
+dictionary [̾] (ʣ: dictionaries)
+ŵŵ
+[] lexicon, glossary (Ѹ켭ŵ), encyclopedia (ɴʻŵ)
+
+
+ +

+äȤ CD-ROM Ҥˤϡñν򼨤 +(ץ) Ƥޤ +ĤޤꡢʬΤȴФȤϡŻҥ֥å EPWING Ǥ +ԲǽʤΤǤ +

+ +

+ʤ顢ˤΤνҤ¿ˤϡñνλ֤ˤ +и롢ͭΥץ󥹤¸ߤޤ +󡢤Υץ󥹤ñνλפ򼨤 +ǤϤʤ̤ӤȤѤΤǤֽλ֡פȤѤǤ +Ȥ̣Ǥ +

+ +

+EB 饤֥ǤϡΡֽλ֡פΰ˻Ȥ륨ץ󥹤 +Ȥڤꥳ (stop code) ȸƤǤޤ +EB 饤֥϶ڤꥳɤưȽꤹ뵡ǽäƤޤȽ +ǤϤʤΤdz뤳Ȥ⤢ޤ +ʸڤ줿ꡢʸ³䡹ȽϤ줿ꤷޤ +

+ +

+ξϡŪ appendix +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +Ƕڤꥳɤꤹ뤳ȤˤäƲǤҤ⤢ޤ +ǰʤڤꥳɤޤä¸ߤʤҤ⾯ʤ¸ߤޤ +ڤꥳɤʤҤФơͭнˡϺΤȤޤ +

+ +

+eb_read_text() ˤʸμǤϡڤꥳɤФ줿 +ɤ߹ߤߤޤ +˷֤ eb_read_text() ƤǤ⡢ڤꥳɤ +ʸɤ߹ޤ +

+ +

+ڤꥳɤ򸡽ФɤȽˤϡeb_is_text_stopped() +Ȥޤ +δؿϡǸɤ߹ߤԤäƥȥǡˡڤꥳɤ +ФƤ 1 ֤ޤ +

+ +

+ʸʳΥƥȥǡˤڤꥳɤγǰ¸ߤޤΤǡ +eb_is_text_stopped() Ȥäƶڤꥳɤ򸡽ФǤޤ +ʸʳǤ EB 饤֥꤬μ¤˶ڤȽ̤ǤޤΤǡ +Ƚϵޤ +

+ +

+Фˤڤϡ줾ñθФνλ֤Ȥʤޤ +˥塼ʣ縡θǤϡز줿ġΥ˥塼ǡ +νλ֤ǶڤȽꤵޤ +(Ʊ쳬ؤʣĤΥ˥塼ǡäƤ⡢ġΥ˥塼ǡ +ڤޤ) +ɽǤϡʸνλ֤ǶڤȽꤵޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     text <book-path> <subbook-index> <number>
+ * :
+ *     text /cdrom 0 10
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡʸ
+ *     Ƭ <number> ʬñϤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAXLEN_TEXT 1023
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    EB_Position text_position;
+    char text[MAXLEN_TEXT + 1];
+    ssize_t text_length;
+    int text_count;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index number\n",
+            argv[0]);
+        exit(1);
+    }
+    text_count = atoi(argv[3]);
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤγϰ֤*/
+    error_code = eb_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get text information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤ򥷡*/
+    error_code = eb_seek_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to seek text, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = 0;
+    while (i < text_count) {
+        /* ƥȤ*/
+        error_code = eb_read_text(&book, NULL, NULL, NULL, MAXLEN_TEXT,
+            text, &text_length);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        fputs(text, stdout);
+
+        if (!eb_is_text_stopped(&book))
+            continue;
+
+        fputs("\n----------------------------------------\n", stdout);
+
+        /* ñذư*/
+        error_code = eb_forward_text(&book, NULL);
+        if (error_code == EB_ERR_END_OF_CONTENT)
+            fputs("\n[END]\n", stdout);
+        else if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        i++;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hook_Code

+ +

EB_Hook_Hook ϡեå֥ɤɽޤ +

+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_HOOKS ĤΥեå +Ƥޤ +Ƥ֥ɤΰˤĤƤϡ + (֥եåɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

EB_Hook

+ +

EB_Hook ϡեåɤȤбեåؿ +Ȥɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hook_Struct EB_Hook;
+
+struct EB_Hook_Struct {
+    EB_Hook_Code code;
+    EB_Error_Code (*FUNC)(EB_Book *, EB_Appendix *, void *,
+        EB_Hook_Code, int, const unsigned int *);
+};
+
+
+ +

+ץꥱץϡľ EB_Hook ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Hookset

+ +

EB_Hookset ϡեå켰ɽޤ +EB 饤֥Ѳǽʤ٤ƤΥեå֤ФơɤΤ褦 +եåؿꤹΤϿ뤿ηǤ +

+ +

+EB_Hookiset ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Hookset ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Hookset ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_hookset() ƤǽʤƤ +ʤޤ +

+ + +

եåؿξܺ

+ +

+ǤϡեåؿλͤˤĤƵޤ +

+ +

+ޤեåؿƤӽФ eb_read_text() +eb_read_heading() ΥץȥפϼΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+eb_read_text(EB_Book *book, EB_Appendix *appendix,
+    EB_Hookset *hookset, void *container, size_t text_max_length,
+    char *text, ssize_t *text_length)
+
+
+ +

+եåؿΥץȥפϡΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+hook_function(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv);
+
+
+ +

+ book, appendix, container ϡ +eb_read_text()eb_read_heading() +Ϥ줿ͤΤޤޥեåؿˤϤäƤޤ +

+ +

+appendix ȤΤϡҤФǡ󶡤륪֥ +Ǥ +(appendix (Ͽ) ˤĤƾܤ +ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) + +

+ container ϡץꥱץफեåؿ +ǡϤȤ˻Ȥޤ +

+ +

argc argv ˤϡùΥƥȥǡ +Ϥޤ +ʸФեåǤϡʸֹ椬ϤäƤޤ +ץ󥹤ФեåǤϡΥ󥹼ΤΥ +(1f ǻϤޤ륳) ȡ⤷Хץ󥹤ؤ +ϤäƤޤ +ġΥեåˤơargc argv ˤɤ褦ͤ +ϤäƤΤܤ ֥եåɤΰ 򻲾ȤΤȡ +

+ +

+եåؿ椫鼡˵󤲤ؿƤӽФȤǡƥȥǡؤ +񤭹ߤԤȤǤޤ +

+ +
    +
  • eb_write_text() +
  • eb_write_text_string() +
  • eb_write_text_byte1() +
  • eb_write_text_byte2() +
+ +

+δؿλͤ˴ؤƾܤ +[ƥȥǡ] ؿξܺ١ 򻲾ȤΤȡ +

+ +

+եåؿ EB_SUCCESS ʳ֤ͤȡեåؿ +ƤӽФ eb_read_text(), eb_read_heading() +ϥ顼ȯΤȸʤΥ顼ɤ򤽤Τޤ +ץꥱץ֤ޤ +

+ +

+եåؿǤϡbook ФưʲδؿƤӽФƤ +ޤ +ƤӽФȤưϡ̤Ǥ +

+ +
    +
  • eb_seek_text() +
  • eb_read_text() +
  • eb_read_heading() +
  • eb_read_rawtext() +
  • eb_forward_text() +
  • eb_backward_text() +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbook() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_finalize_library() +
+ + +

եåɤΰ

+ +

+ƤեåɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/text.h>
+
+
+ + +

EB_HOOK_NULL

+ +

+EB_HOOK_NULL ϸ̩ˤϥեåǤϤʤ +eb_set_hooks() ʣΥեåؿϿݤˡ +EB_Hook Ǥ򼨤Ѥޤ +ΥեåɤФơեåؿϿǤޤ +

+ +

+ܤϡ[ƥȥǡ] եåؿξܺ١ 򻲾ȤΤȡ +

+ + +

EB_HOOK_INITIALIZE

+ +

+EB_HOOK_INITIALIZE ϡeb_seek_text() +ƤӽФľκǽ eb_read_text(), +eb_read_heading() θƤӽФ˽ޤ +򤷤ȤˡȤɤǤ礦 +

+ +

+ΥեåեåؿϤ argc 0 Ǥ +եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NARROW

+ +

EB_HOOK_END_NARROW

+ +

+EB_HOOK_BEGIN_NARROW EB_HOOK_END_NARROW +ϡȾɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NARROW ʤ 0x1f04 +EB_HOOK_END_NARROW ʤ 0x1f05 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_SUBSCRIPT

+ +

EB_HOOK_END_SUBSCRIPT

+ +

+EB_HOOK_BEGIN_SUBSCRIPT +EB_HOOK_END_SUBSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ͤϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUBSCRIPT ʤ 0x1f06 +EB_HOOK_END_SUBSCRIPT ʤ 0x1f07 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ +񤭹ߤޤ +

+ + +

EB_HOOK_SET_INDENT

+ +

+EB_HOOK_SET_INDENT ϡƥȥǡιƬλ +ɽץ󥹤ФեåǤ +

+ +

+ΥեåեåؿϤ argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f09 ˤʤޤ +argv[1] ̤ɽޤ +

+ +

+̤ñ̤ǤΤǤ +ޤ̤κǾͤϡ0 ξ 1 ξ̤꤬ޤ +ˤ 1 긺äꤷޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NEWLINE

+ +

+EB_HOOK_SET_NEWLINE ϡԤɽץ󥹤 +ФեåǤ +

+ +

+eb_read_heading() (Фɤ߹) ˤǤϡ +Ԥɽץ󥹤϶ڤꥳɤȤƤⰷޤ +Τᡢץ󥹤ĤäƤ⤳ΥեåνϹԤ줺 +ɤ߹߽Ͻλޤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f0a ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_newline() ưŪϿޤ +

+ + +

EB_HOOK_BEGIN_SUPERSCRIPT

+ +

EB_HOOK_END_SUPERSCRIPT

+ +

+EB_HOOK_BEGIN_SUPERSCRIPT +EB_HOOK_END_SUPERSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUPERSCRIPT ʤ 0x1f0e +EB_HOOK_END_SUPERSCRIPT ʤ 0x1f0f ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NO_NEWLINE

+ +

EB_HOOK_END_NO_NEWLINE

+ +

+EB_HOOK_BEGIN_NO_NEWLINE +EB_HOOK_END_NO_NEWLINE ϡԶػߤγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NO_NEWLINE ʤ 0x1f10 +EB_HOOK_END_NO_NEWLINE ʤ 0x1f11 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_EMPHASIS

+ +

EB_HOOK_END_EMPHASIS

+ +

+EB_HOOK_BEGIN_EMPHASIS EB_HOOK_END_EMPHASIS +ϡĴɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_EMPHASIS ʤ 0x1f12 +EB_HOOK_END_EMPHASIS ʤ 0x1f13 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CANDIDATE

+ +

EB_HOOK_END_CANDIDATE_LEAF

+ +

EB_HOOK_END_CANDIDATE_GROUP

+ +

+EB_HOOK_BEGIN_CANDIDATE ϡʣ縡θȤʤγϤ +ɽץ󥹤ФեåǤ +

+ +

+Фơλɽץ󥹤Фեå 2 +ޤ +Ĥ EB_HOOK_END_CANDIDATE_LEAF ǡȤʤ줬ºݤ +ϸȤƻȤΤǤ뤳Ȥ򼨤ޤ +⤦Ĥ EB_HOOK_END_CANDIDATE_GROUP ǡȤʤ +˺٤ʬƤ뤳Ȥ򼨤ޤ +(äơȤʤ򸡺ϸȤƻȤȤϤǤޤ) +

+ +

+եå EB_HOOK_BEGIN_CANDIDATES եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f43 ˤʤޤ +

+ +

+եå EB_HOOK_END_CANDIDATE_LEAF +EB_HOOK_END_CANDIDATE_GROUP եåؿϤ +argc 3 Ǥ +ɤΥեå⡢argv[0] ϥץ󥹤Υ +ΤΤǡ0x1f63 ˤʤޤ +եå EB_HOOK_END_CANDIDATE_GROUP argv[1] + argv[2] ϡγؤθǡγϥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +եå EB_HOOK_END_CANDIDATE_LEAF Ǥϡargv[1], +argv[2] 2 ĤȤ 0 ˤʤäƤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_REFERENCE

+ +

EB_HOOK_END_REFERENCE

+ +

+EB_HOOK_BEGIN_REFERENCE +EB_HOOK_END_REFERENCE ϡ̰֤ΥƥȥǡλȳϤ +λɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_REFERENCE եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f42 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_REFERENCE եåؿϤ argc + 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f62 ˤʤޤ +argv[1] argv[2] ϡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_KEYWORD

+ +

EB_HOOK_END_KEYWORD

+ +

+EB_HOOK_BEGIN_KEYWORD EB_HOOK_END_KEYWORD ϡ +γϤȽλɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_KEYWORD եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f41 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f61 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_DECORATION

+ +

EB_HOOK_END_DECORATION

+ +

+EB_HOOK_BEGIN_DECORATION +EB_HOOK_END_DECORATION ϡʸγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_DECORATION եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe0 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe1 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NARROW_FONT

+ +

EB_HOOK_WIDE_FONT

+ +

+EB_HOOK_NARROW_FONT EB_HOOK_WIDE_FONT ϡ +줾ȾѳѳФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡʸֹɽޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_narrow_character_text() +eb_hook_wide_character_text() ưŪϿޤ +

+ + +

EB_HOOK_ISO8859_1

+ +

+EB_HOOK_ISO8859_1 ϡISO 8859-1 (ƥʸ 1) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡISO 8859-1 ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ ISO 8859-1 Ȥơ1 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_ISO8859_1 ξǤ +

+ + +

EB_HOOK_NARROW_JISX0208

+ +

EB_HOOK_WIDE_JISX0208

+ +

+EB_HOOK_NARROW_JISX0208 EB_HOOK_WIDE_JISX0208 +ϡȾѤѤ JIS X 0208 (ܸΤʴ) ʸФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡJIS X 0208 ʸܸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤܸ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡ +νҤʸɤ EB_CHARCODE_JISX0208 +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_GB2312

+ +

+EB_HOOK_GB2312 ϡGB 2312 (δλ) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡGB 2312 ʸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_BEGIN_MONO_GRAPHIC

+ +

EB_HOOK_END_MONO_GRAPHIC

+ +

+EB_HOOK_BEGIN_MONO_GRAPHIC +EB_HOOK_END_MONO_GRAPIHC ϡΥǤγϤȽλ +ɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +argc 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f32 0x1f44 Τ줫ˤʤޤ +argv[2] argv[3] ϡǤι⤵ +(ԥ) ̣ޤ +Żҥ֥åΥΥ (ǽΰ 0x1f32 +) ˤϡǤι⤵ξ󤬷礱ƤΤǡͤϤɤ 0 +ʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MONO_GRAPHIC եåؿϤ +argc 3 Ǥ +argv[0] ϡץ󥹤ΥɤΤΤǤ +EB_HOOK_BEGIN_MONO_GRAPHIC argv[0] +0x1f32 ʤ顢EB_HOOK_END_MONO_GRAPHIC +argv[0] 0x1f52 ˤʤꡢ0x1f440x1f64 ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥Υǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_GRAY_GRAPHIC

+ +

EB_HOOK_END_GRAY_GRAPHIC

+ +

+Υեå̾Τϡ졼ǤΤͽ󤵤Ƥޤ +ܥС EB 饤֥ǤϤޤбƤޤ +

+ + +

EB_HOOK_BEGIN_COLOR_BMP

+ +

EB_HOOK_BEGIN_COLOR_JPEG

+ +

EB_HOOK_END_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_COLOR_BMP EB_HOOK_COLOR_JPEG +ϡ줾 BMP JPEG Υ顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_COLOR_BMP +EB_HOOK_COLOR_JPEG եåؿϤ argc +4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4d ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6d ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_IN_COLOR_BMP

+ +

EB_HOOK_BEGIN_IN_COLOR_JPEG

+ +

EB_HOOK_END_IN_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_IN_COLOR_BMP EB_HOOK_IN_COLOR_JPEG ϡ +줾 BMP JPEG Υ饤󥫥顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_IN_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_IN_COLOR_BMP +EB_HOOK_IN_COLOR_JPEG եåؿϤ argc + 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f3c ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_IN_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f5c ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CLICKABLE_AREA

+ +

EB_HOOK_END_CLICKABLE_AREA

+ +

+EB_HOOK_BEGIN_CLICKABLE_AREA ϡ顼Ǥӥ饤󥫥顼ΰФơɽϥץ󥹤ФեåǤ +ƱͤˡEB_HOOK_END_CLICKABLE_AREA Ͻλץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_CLICKABLE_AREA եåؿϤ +argc 7 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4f ˤʤޤ +argv[1] argv[2] ϡ줾ΰγ +x, y ɸɽޤ +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] Ǥαؤ +ȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +
+
+դ顼
+ʣ
+
+
+ʣˡ
+
+⤵
+
+ΰ衡
+
+
+
+
+
+
+
+
+
+
+ +

+EB_HOOK_END_CLICKABLE_AREA եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6f ˤʤޤ +

+ +

+μФˤĤƤϡ +ֻդ顼ǡ +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_WAVE

+ +

EB_HOOK_END_WAVE

+ +

+EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE ϡ +WAVE (PCM) βǡγϤȽλɽץ󥹤Ф +եåǤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4a ˤʤޤ +argv[2] argv[3] ϲǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤ򤽤줾ɽޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_WAVE եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6a ˤʤޤ +

+ +

+ǡμФˤĤƤϡWAVE +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_MPEG

+ +

EB_HOOK_END_MPEG

+ +

+EB_HOOK_BEGIN_MPEG EB_HOOK_END_MPEG ϡ +MPEG ưǡγϤȽλɽץ󥹤Фեå +Ǥ +

+ +

+եå EB_HOOK_BEGIN_MPEG եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f39 ˤʤޤ +argv[2] argv[5] ϡưǡΥե̾ +󥳡ɤˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MPEG եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f59 ˤʤޤ +

+ +

+ưǡμФˤĤƤϡMPEG ư +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

եååؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

void eb_initialize_hookset (EB_Hookset *hookset)

+ +

+ؿ initialize_hookset() ϡhookset λؤ +EB_Hookset ֥Ȥޤ +EB_Hookiset ֥ȤФ EB 饤֥¾δؿ +Ƥˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_hookset() ƤǤϤޤ +Ƥư̤Ǥ +

+ +

+δؿϡƥեåνͤ򼡤Τ褦˥åȤޤ +

+ + + + + + + + + + + + + + +
եå + եåؿ +
EB_HOOK_NARROW_JISX0208 + eb_hook_euc_to_ascii() +
EB_HOOK_NARROW_FONT + eb_hook_narrow_character_text() +
EB_HOOK_WIDE_FONT + eb_hook_wide_character_text() +
EB_HOOK_NEWLINE + eb_hook_newline() +
嵭ʳΥեå + NULL (եåؿʤ) +
+ + +

EB_Error_Code eb_finalize_hookset (EB_Hookset *hookset)

+ +

+ؿ eb_finalize_hookset() ϡhookset ؤ +EB_Hooksest ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϡ٤Ʋޤ +٤ƤΥեåˤϡեåؿȤ NULL åȤޤ +

+ +

+򤷤֥ȤФ eb_set_hook(), eb_set_hooks() +Ƥ֤Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_set_hook (EB_Hookset *hookset, const EB_Hook *hook)

+ +

+ؿ eb_set_hook() ϡhookset ؤ EB_Hooksest +֥ȤˡեåؿϿޤ +Ͽեåμȥեåؿϡhook ǻꤷޤ +

+ +

+ƱեåɤʣեåؿϿƤ⡢ͭˤʤΤϺǸ +ϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_set_hooks (EB_Hookset *hookset, const EB_Hook *hooks)

+ +

+δؿ eb_set_hook() ˻ƤޤǤդθĿ +եåؿ٤ϿǤۤʤޤ +

+ +

+Ͽեåμȥեåؿϡhooks ǻꤷޤ +hooks EB_Hook ֥Ȥ (Ƭ) +ؤƤʤФʤޤ +ޤˤϡեå EB_HOOK_NULL 򥻥å + EB_Hook ֥ȤǤȤ֤ɬפޤ +

+ +

+eb_set_hooks() ϡƬ֤ˡꤵ줿եå +ФƥեåؿϿƤޤ +顼ȯȡĤΥեåϿϤˡ򼨤顼 +򤿤֤ޤ +٤ƤΥեåؿϿȡEB_SUCCESS ֤ޤ +

+ + +

Ȥ߹ߥեåؿξܺ

+ +

+EB 饤֥ϡŪʥեåؿ򤤤ĤѰդƤޤ +ǤϡΥեåؿˤĤƤλͤ⤷ޤ +

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ +

+Υեåؿ⡢ appendix container +NULL ϤƤ⡢ư˻پϤʤ褦ˤʤäƤޤ +

+ + +

EB_Error_Code eb_hook_euc_to_ascii (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_euc_to_ascii() ϡեå +EB_HOOK_NARROW_JISX0208 (Ⱦ JIS X 0208 ʸ) Τ +եåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+Υեåؿϡargv[0] ȤϤ줿 JIS X 0208 ʸ +(󥳡ǥ󥰤ܸ EUC) Ĵ١б ASCII ʸ¸ߤ + ASCII ʸƥȥǡȤƽ񤭹ߡʤ JIS X 0208 +ʸ򤽤Τޤ޽񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_narrow_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

EB_Error_Code eb_hook_wide_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_character_text() ϡեå +EB_HOOK_NARROW_FONT (Ⱦѳ) ΤΥեåؿǤ +Ʊͤ eb_hook_wide_character_text() ϡեå +EB_HOOK_WIDE_FONT (ѳ) ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡappendix 椷Ƥܤ +argv[0] ȤϤ줿ʸäƤ뤫ɤ +Ĵ٤ޤ +äƤФʸƥȥǡȤƽ񤭹ߡäƤʤ +<?> Ȥʸ񤭹ߤޤ +

+ +

+appendix NULL ξ䡢Ͽܤ +ʤ⡢ʸäƤʤΤȤưޤ +

+ +

+δؿϡ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_newline (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_newline() ϡեå +EB_HOOK_NEWLINE () ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡƥȥǡ \n 񤭹ߤޤ + EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_empty (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_empty() ϡ⤷ʤեåؿǤ + EB_SUCCESS ֤ޤ +

+ + +

ƥȥǡؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

int eb_have_text (EB_Book *book)

+ +

int eb_have_menu (EB_Book *book)

+ +

int eb_have_copyright (EB_Book *book)

+ +

+ؿ eb_have_text() ϡbook 򤷤Ƥܤ +ʸäƤ뤫ɤĴ٤ޤ +Ʊͤˡeb_have_menu() ϥ˥塼äƤ뤫ɤ +eb_have_copyright() ɽäƤ뤫ɤĴ٤ޤ +

+ +

+δؿ⡢äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_text (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_menu (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_copyright (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_text() ϡbook 򤷤Ƥܤʸ +γϰ֤ position λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_menu() ϥ˥塼γϰ֤ +eb_have_copyright() ɽγϰ֤񤭹ߤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡposition ɬԤ֤񤭹ǡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤоݤȤʤƥȥǡäƤʤС +EB_ERR_NO_SUCH_SEARCH ֤ޤ +

+ + +

EB_Error_Code eb_seek_text (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡե򥷡ޤ +֤ position ǻꤷޤ +ΤȤposition Ͼ˥եƬΰ֤ȤƲ +ޤ +(а֤ؤΥǽϡEB 饤֥ˤϤޤ) +

+ +

+ԤȡޤǤ˹Ԥäɤ߹ߤξֵϿꥻåȤޤ +eb_read_text(), eb_read_heading(), +eb_read_rawtext() Ѥƥƥȥǡɤ߹ˤϡ +äƤδؿƤӽФƤɬפޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ +

+ʤҤˤäƤϡƥȥǡ᤿եˤ¾Υǡ +˳ǼƤ뤳ȤޤƥȰʳΥǡ˥ +Ƥ⡢ƥȥǡθ߰֡ɤ߹ߤ˴ؤֵϿѲޤ +

+ + +

EB_Error_Code eb_tell_text (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡեθߤΥ֤֤ޤ +

+ +

position λؤΰ˸ߤΥ֤񤭹ߡ +EB_SUCCESS ֤ޤ +ԤȡɬԤ֤񤭹ߡ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ + +

EB_Error_Code eb_read_text (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

EB_Error_Code eb_read_heading (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_text() eb_read_heading() ϡ +book +򤷤ƤܤΥƥȥǡեθߤΥ֤ǡ +ɤ߹ߤޤ +eb_read_heading() ϸФɤ߹ߤѤ +eb_read_text() ϤʳΥƥȥǡɤ߹ߤѤޤ +

+ +

+ɤ߹ޤ줿ƥȥǡϡɬפ˱ʸɤѴ +(ʸɡ 򻲾ȤΤ) Ԥ줿ˡhookset +λؤեååȤˤäƲùޤ +hookset NULL ΤȤϡ EB 饤֥¦ +ѰդƤ ɸΥեåå (default hookset) +Ѥޤ +ΥեååȤϡeb_initialize_hookset() ˤä +ΥեååȤǤ +

+ +

+եååȤˤäƲù줿ˡƥȥǡ text +ؤΰ˽񤭹ޤ졢񤭹Хȿ text_length λؤ +ΰ˽񤭹ޤޤ +text ϥʥʸǽüޤtext_length ˤ +ʥʸʬϴޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +text_max_length ˤʥʸʬϴäƤޤ +Τǡtext text_max_length + 1 ХʬΥǡ +ǼǤ礭ɬפǤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

eb_read_text() eb_read_heading() +ƤӽФˤϡ +餫 eb_seek_text() θƤӽФƥȥǡ +Υ֤åȤ줿֤ˤƤʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+դ˰٥СڤꥳɤФޤǤδ֤ʤ顢ؿ +֤Ƥ֤Ȥǥƥȥǡ³ɤ߹ळȤǤޤ +ڤꥳɤФȡؿƤӽФƤɤ߹ߤϹԤޤ +ξǤ⡢¾˥顼ȯʤ EB_SUCCESS ֤ꡢ +text ˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ eb_read_text() ƤӽФƥƥȥǡ +ɤ߹߻Ϥ᤿顢֤ƤӽФݤ⡢eb_read_text() +ȤʤФʤޤ +椫 eb_read_heading() ӸҤ +eb_read_rawtext() ڤؤƸƤӽФ +EB_ERR_DIFF_CONTENT 顼֤ޤ +ؿ eb_read_heading() ˤĤƤƱͤǤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ +

+Ϥ줿 appendix ڤꥳɤξäܤ +ǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ڤꥳɤưȽ̤ +ߤޤ +ȽϴʤΤǤϤʤΤǡҤˤäƤѤʰ֤ʸ +ڤƤޤΤޤ +(ʸʳΥƥȥǡ˴ؤƤϡΤ褦ϵޤ) +

+ +

+ container ϡץꥱץफեåؿ +ǡϤΤΤǤ +eb_read_text(), eb_read_heading() Ǥϡľ +ΰͤ򻲾Ȥ뤳ȤϤޤ +

+ +

+ appendix, container ϡΤޤޥեåؿ +Ϥޤ +ΰ NULL Ǥ⹽ޤ +(ƤӽФեåؿǻپ㤬ʤС) +

+ +

+ʤեåؿ eb_read_text(), eb_read_heading() +Ȥʸʤץ󥹰ʬФǡ񤭹⤦ +Ȥˡtext ˽ʬʶΰ褬ʤȤȤ +ޤ +ξ硢ؿޤ text ˽񤭹ळȤϤˡ +ä򽪤ޤ +äơޥХʸΥǡڤ줿ꤹ뤳ȤϤޤ +

+ +

+񤭹ʤäʬϡʤ text_length δˤ +ޤ +񤭹ʤäǡ book ¸ƤΤǡ +⤦ eb_read_text(), eb_read_heading() +ƤӽФȡθƤӽФǽ񤭹ʤäǡޤ text +Ƭ˽񤭹ޤޤ +񤭹ǡ text_length δޤ +

+ +

+book ¸ƤǡĹ +text_max_length ĶƤȡ񤭹ޤ˴ؿϽλ +ޤ +ΤȤ񤭹ʤäǡϰ³¸ޤ +Ĥޤꡢtext_max_length ޤ˾ݻƤ +ǡΤۤĹȡٸƤӽФƤ text ؤν񤭹ߤ +ʤߤޤΤǡդɬפǤ +

+ +

+eb_seek_text() ƤӽФeb_set_subbook() +ܤľȡ¸Ƥǡ˴ޤ +

+ + +

EB_Error_Code eb_read_rawtext (EB_Book *book, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_rawtext() ϡbook 򤷤Ƥ +ܤΥƥȥǡեθߤΥ֤ǡɤ߹ߤޤ +

+ +

+eb_read_text() ȻƤޤδؿϥեååȤˤ +ǡβùʸɤѴڹԤ鷺ǡɽΤޤ֤ޤ +ɤ߹ƥȥǡμϡǤäƤ⹽ޤ +

+ +

+ɤ߹ƥȥǡ text λؤΰ˽񤭹ޤ졢 +񤭹Хȿ text_length λؤΰ˽񤭹ޤޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +eb_read_text() Ȱۤʤꡢtext ϥʥʸ +ǽüޤ +ޥХʸ䥨ץ󥹤 text λĤΰ +­ʤʤä⡢ޤǤϽ񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+ޤδؿƤӽФˤϡ餫 eb_seek_text() +ƤӽФƥȥǡΥ֤åȤ줿֤ˤ +ʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ֤ƤӽФȤǡɤ߹ƥȥǡ³ +ɤ߹ळȤǤޤ +ڤꥳɤθФԤޤΤǡҤƤӽФ³ȡ +ƥȥǡեޤǹԤäƤޤޤ +

+ +

+ eb_read_rawtext() ƤӽФƥƥȥǡɤ߹ +Ϥ᤿顢֤ƤӽФݤ⡢eb_read_rawtext() +ȤʤФʤޤ +椫顢eb_read_text() eb_read_heading() +ڤؤȡ +EB_ERR_DIFF_CONTENT 顼֤ޤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ + +

int eb_is_text_stopped (EB_Book *book)

+ +

+ؿ eb_is_text_stopped() ϡǸɤ߹ƥȥǡ +ãɤȽꤷޤ +

+ +

+book ܤǡǸ eb_read_text()eb_read_heading() ǥƥȥǡɤ߹ݤˡ +ڤꥳɤ򸡽ФƥȥǡΤΰָΰ֤ã +ɤ߹ߤ򽪤ƤСδؿ 1 ֤ޤ +ʳΤȤϡ0 ֤ޤ +

+ +

+book ܤ򤷤Ƥʤ䡢ܤ˥ƥȥǡ +¸ߤʤ 0 ֤ޤ +

+ +

+eb_read_text() ޤ eb_read_heading() +ƥȥǡɤ߹Ǥʤ⡢Ʊͤ 0 ֤ޤ +ƥȥǡɤ߹ǤäƤ⡢ƥȥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤؿ (eb_read_text() ι򻲾) ƤǤޤȡ +ɤ߹ǤʤȸʤޤΤǡդƲ +

+ +

+̾ϤδؿȤʤƤ⡢eb_read_text() +eb_read_heading() 0 ֤顢ƥȥǡ +ãȤߤʤƺ٤ʤǤ礦 +κݤϡ text_max_length ͤʬ礭ä + +

+ + + +

EB_Error_Code eb_write_text_byte1 (EB_Book *book, int byte1)

+ +

EB_Error_Code eb_write_text_byte2 (EB_Book *book, int byte1, int byte2)

+ +

EB_Error_Code eb_write_text_string (EB_Book *book, const char *string)

+ +

EB_Error_Code eb_write_text (EB_Book *book, const char *stream, size_t stream_length)

+ +

+δؿϡեåؿ椫顢ƥȥǡ񤭹 +Ѥޤ +񤭹ǡμˤäơȤʬƲ +

+ +

+eb_write_text_byte1() ϡbyte1 ǻꤷ +1 ХȤͤ񤭹ߤޤ +eb_write_text_byte2() ϡbyte1, byte2 +ǻꤷ 2 ХȤ񤭹ߤޤ +eb_write_text_string() ϡstring ǻꤷ +ʸ񤭹ߤޤ +eb_write_text() ϡstream ϤޤĹ +stream_length ХȤΥХ񤭹ߤޤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥȸ +顼ɤ֤ޤ +

+ +

+ǽŪˡ񤭹ƥȥǡϡեåؿθƤӽФǤ +eb_read_text(), eb_read_heading() +ץꥱץϤޤ +

+ +

+եåؿȤƸƤӽФƤʤȤˡδؿƤӽФ +ư̤Ǥ +

+ + +

const char *eb_current_candidate (EB_Book *book)

+ +

+ؿ eb_current_candidate() ϡΥƥȥǡ +֤߰˽񤫤Ƥ롢ʣ縡θȤʤ֤ޤ +

+ +

+֤ʸĹϡĹ EB_MAX_WORD_LENGTH ХȤˤʤޤ +Ĺ˥ʥʸϴޤߤޤ +

+ +

+δؿüǡʣ縡θȤʤνλ̣ +ץ󥹤ؤΥեåǤ EB_HOOK_END_CANDIDATE_LEAF + EB_HOOK_END_CANDIDATE_GROUP Фեåؿ +Τ߸ƤӽФȤǤޤ +ʳξǸƤӽФȤưϡ̤Ǥ +

+ +

+δؿθƤӽФǤեåؿϤäƤ EB_Book +֥ (ؤΥݥ) 򡢤Τޤޤδؿ˰ȤϤ +ޤ +

+ +

+book ʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿ֤ʸ ISO 8859-1 +ˤʤꡢʳʸɤξܸ EUC ˤʤޤ +ؿ֤ʸϡ¾Υեåˤùαƶޤ +ʸɤѴԤʳϡǡ򤽤Τޤ֤ޤ +

+ +

+ʤδؿ֤ʸ򻲾ȤǤΤϡեåؿޤǤ +֤ǤΤǡդƲ +

+ + +

EB_Error_Code eb_forward_text (EB_Book *book, EB_Appendix *appendix)

+ +

EB_Error_Code eb_backward_text (EB_Book *book, EB_Appendix *appendix)

+ +

+ؿ eb_forward_text() eb_backward_text() ϡ +book 򤷤ƤܤʸΥ֤˰ư +ʸζڤꥳɤñ̤ȤƬФԤޤ +礦ɡ CD ζʤƬФƱǤ +

+ +

+eb_forward_text() ʸ˸äƥ֤ +ʤᡢeb_backward_text() Ƭ˸äƥ֤ +ᤷޤ +

+ +

+eb_forward_text() θƤӽФǤϡ֤ɬθ +γϰ֤ޤǰưޤ +Ф eb_backward_text() θƤӽФǤϡư褬 +ˤäưۤʤޤ +⤷ߤΥ֤ñƬˤȤϡ +eb_backward_text() θƤӽФˤäơñ +Ƭ˥֤ưޤ +֤ñˤȤϡñ +Ƭ˰ưޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+äơδؿƤӽФˤϡ餫 eb_seek_text() + eb_read_text() ƤӽФƤʤȤޤ +(eb_read_text() θƤӽФˤϡä +eb_seek_text() θƤӽФ뤳ȤȤʤޤ) +

+ +

+eb_read_text() ǤϤʤeb_read_heading() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+ʸǡƬãƤޤäơˤ⤦ʸʤȤϡ +EB_ERR_END_OF_CONTENT ֤ޤ +

+ +

+appendix NULL ǤϤʤڤꥳɤξ +äܤǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ƱˡǶڤꥳɤ +ưȽ̤ߤޤ +

+ +

+־ˤΤ˥塼ɽΤ褦ˡʸʳ +ƥȥǡǤäƤ⹽ޤ +ʸʳΥƥȥǡˤϡƬФ֤ǡ +Ƭ֤ˤޤΤǡδؿΩľϤۤȤ +ޤ +

+ +

+(˥塼ǤϡġγؤΥ˥塼ǡ줾Ω +ƥȥǡˤʤäƤ뤿ᡢƬФԤäƤΥ˥塼ǡؤ +ưǤޤ +ʣ縡θƱͤǤ) +

+ + +

EB_Error_Code eb_forward_heading (EB_Book *book)

+ +

+ؿ eb_forward_heading() ϡbook 򤷤Ƥ +ܤθФΥ֤˰ưФζڤñ̤ȤƬФ +Ԥޤ +

+ +

+ʸƬФԤؿ eb_forward_text() θФǤǤ +ФƬФԤϡʸ˸¤뤿ᡢ +eb_backward_heading() ȤؿѰդƤޤ +

+ +

+δؿƤ֤ȡ֤θФγϰ֤ޤǰưޤ +(ǤϡФΰˡָФפȡʸפߤ˽񤫤 +ޤǡ¤ʸפȡָФפ϶̤դޤ +֤θФΰξ硢δؿƤ֤ȺǤᤤ +ָФפ⤷ϡʸפγϰ֤ޤǰưޤ) +

+ +

+eb_read_heading() ǤϤʤeb_read_text() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+ʳθ᥽åɤθФγǼ֤Фơδؿ +Ƥ֤ȤǽǤΤ褦ɬפ뵡ϤʤǤ礦 +

+ + +

+ +

+ʸɤ˼ϿƤʤŪʸΤȤ¯ˡֳ +ȸޤ +Ȥġʸ̤뤿ˡʸɤ˼Ͽ줿 +ʸȤϽʣʤ֤ˡʸʸֹ˳꿶Τ̤Ǥ +(Ƥʸֹξܺ٤ˤĤƤϡʸɡ 򻲾ȤΤȡ) +

+ +

+ΤŻҥ֥åEPWING Ǥ⡢ۤȤɤȤäƤޤ +ϽƱΤǥХХǡޤä촶Ϥޤ +ĤޤꡢƱʸֹȤäƤƤ⡢Ƥ볰ϽҤˤä +㤤ޤ +뤳ȤǽǤĤ CD-ROM Ǥܤ +äۤʤ뤳Ȥޤ +ܤˤäƤϡɴγƤ뤳Ȥ⤢ޤ +

+ +

+CD-ROM ҤǤϡλǡ (Ĥޤե) Ѱդ +ޤ +եȤϥӥåȥޥåץǡǤꡢҤˤäƤ礭ΰۤʤ +ΥեȤѰդƤޤ +

+ +

+դ˸СФ󶡤ǡϡեȤǤ +ʸֹƤ줿ʤΤȯʤΤ +äŪʾѰդƤޤ +ץꥱץब򥵥ݡȤ뤿ˤϡΥե +򤽤ΤޤɽʳˡϤʤǤ礦 +

+ + + +

Ⱦѳѳ

+ +

+CD-ROM Ҥˤ볰ˤϡѳסȾѳפबޤ +ѳѰդƤեȤβȽĤĹ褽 1:1 ˤʤäƤꡢ +ȾѳǤ 1:2 ˤʤäƤޤ +

+ +
+
+ѳȾѳ
+ʣߣˡʣߣ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

+ƥȥǡˤϡȾɽγϤȽλɽץ󥹤 + (֥ƥȥǡ 򻲾ȤΤ) +ϤȽλδ֤֤줿ΤȾѳʳΤȤʤѳ +ʤޤ +

+ +

+ʸֹƱǤ⡢ѤȾѤǤϤޤäۤʤ뤳Ȥ⤢ޤ +Τǡʸֹ顢ѤȾѤΤɤ餫ȽǤ뤳Ȥ +Ǥޤ +ʤ餺ȾѳϤΥץ󥹤иƤɤ +Ȥ˴ŤȽǤʤȤޤ +

+ +

+ѤȾѤȽ EB 饤֥¦ǹԤޤΤǡ +ץꥱץबʸ̮βϤԤɬפϤޤ +

+ +

+CD-ROM ҤܤˤϡȾѳ뤤ѳΤɤ餫 +ƤΤ⤢ޤξȤƤΤ⤢ޤ +

+ + +

礭ȳ

+ +

+ܤˤϡƤ볰ΥեȤӥåȥޥå׷ǼϿ +ޤ +եȤ礭ϡĤΥԥˤ 16, 24, 30, 48 +4 बꡢѳȾѳ줾ΥեȤ礭 +(Υԥ߽ĤΥԥ) ϼ̤ˤʤޤ +

+ + + + + + + +
ĤΥԥ Ⱦѳ
16 16x16 8x16
24 24x24 16x24
30 32x30 16x30
48 48x48 24x48
+ +

+٤ƤܤǤ 4 ΥեȤѰդƤ櫓Ǥ +ޤ +Ĥ 16 ԥΤΤɬѰդƤޤʳϤʤȤ +ޤ +(ޤäƤʤС16 ԥΥեȤѰդ +ޤ) +

+ +

+EB 饤֥ǤϡΤ褦˽ΥԥĤޤ +եȤι⤵ (font height) ˡեȤ礭 +̤Ƥޤ +ơ줾ΥեȤι⤵ (16, 24, 30, 48) Фơ + (font code) ȤΤƤƤޤ +եȤι⤵ꤹݤϡɬγɤȤޤ +

+ + + + + + + +
ĤΥԥ
16 EB_FONT_16
24 EB_FONT_24
30 EB_FONT_30
48 EB_FONT_48
+ + +

γեȤι⤵

+ +

+EB_Book ֥ȤܤѰդƤ볰ե +ι⤵椫ǡ +γեȤι⤵ (current font height) Ȥƻꤹ +ȤǤޤ +EB 饤֥dzΥեȥǡ (ӥåȥޥåץǡ) Фˤϡ +եȤι⤵򤢤餫򤷤Ƥɬפޤ +

+ +

+򤹤ˤϡؿ eb_set_font() Ȥޤ +ʲΥץϡ⤵ 24 ԥΥեȤ򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+if (eb_set_font(&book, EB_FONT_24) != EB_SUCCESS) {
+    printf("eb_set_font_() failed\n");
+    return;
+}
+
+
+ +

+ΥץǤϡ⤵ 24 ԥΥեȤܤѰդ +ΤȲꤷƤޤºݤˤѰդƤʤܤޤ +⤷ܤ⤵ 24 ԥΥեȤѰդƤʤС +eb_set_font() EB_ERR_NO_SUCH_FONT ֤ޤ +

+ +

+򤹤ˡäƤܤѰդƤեȤ +ΤꤿȤ⤢ޤ +ˤϡ2 ̤ˡޤ +

+ +

+ޤ 1 ܤϡܤѰդƤեȤι⤵ΰ +eb_font_list() ǼˡǤ +ϡܥɤΰ eb_subbook_list() +ȤɤƤޤ +

+ +
+
+EB_Font_Code font_list[EB_MAX_FONTS];
+int font_count;
+int i;
+
+if (eb_font_list(&book, font_list, &font_count) != EB_SUCCESS) {
+    printf("eb_font_list() failed\n");
+    return;
+}
+
+for (i = 0; i < font_count; i++) {
+    if (font_list[i] == EB_FONT_24)
+        printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+2 ܤϡeb_have_font() ȤǤ +δؿϡι⤵ΥեȤܤѰդƤ뤫ɤ +Ĵ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_font(&book, EB_FONT_24)) {
+    printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+ޤܤȾѳѳƤ뤫ɤϡ줾 +eb_have_narrow_font(), eb_have_wide_font() +ȤäĴ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_narrow_font(&book))
+    printf("this subbook has narrow font\n");
+if (eb_have_wide_font(&book))
+    printf("this subbook has wide font\n");
+
+
+ +

+ʤ餫ܤ򤷤Ƥʤȡι⤵ǤʤΤ +դƲ +eb_set_subbook() ܤڤؤȡե +ι⤵Ͼ̤ξ֤ޤ +

+ + +

եȤμФ

+ +

+ι⤵򤷤֤ǤСΥեȥǡ +(ӥåȥޥåץǡ) ФȤǤޤ +

+ +

+եȥǡФؿϡ +ѳʤ eb_wide_font_character_bitmap() +Ⱦѳʤ eb_narrow_font_character_bitmap() Ǥ +

+ +

0xa121 ΥեȥǡФץϡ +Τ褦ˤʤޤ +ȾѳξϡƤӽФؿ̾ѤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȳι⤵ȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_48];
+
+if (eb_wide_font_character_bitmap(book, 0xa121, bitmap)
+    != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+Ǥϡbitmap ˥եȥǡǼƤޤ +bitmap ΰȤ EB_SIZE_WIDE_FONT_48 +ХȤݤƤޤϹ⤵ 48 ԥγǡǼ +ɬפʥɽޤ +

+ +

+եȥǡΥϡι⤵˱ưǤ +⤵ 48 ԥϳǤΥʤΤǡΥΰ +ѰդСɤι⤵γǤǼǤޤ +

+ +

+ǡϡӥåȥޥå׷ΥǡˤʤäƤޤ +طʿӥå 0, ʿӥå 1 Ȥơƥԥͤ¤٤ +ޤ +¤Ǥ夫ޤϱ˸äƥԥ򽦤äƤüޤ +褿IJʤ˹ߤơޤ˥ԥ򽦤ޤ +ʲֲʤޤǤ򷫤֤ޤ +

+ +

+ХǤϡ128, 64, 32, ...1 ην˥ӥåͤǼ +ޤ +Ĥޤꡢ128 ηϰֺΥԥ롢1 ηϰֱΥԥб +ޤ +

+ +

+ʲˡ16x16 ѳΥӥåȥޥåפȡΥХ򵭤ޤ +طʿʿǤ +

+ +
+
+0x00, 0x00,
+0x00, 0x00,
+0x1f, 0x88,
+0x00, 0xc8,
+0x09, 0x28,
+0x09, 0xf8,
+0x3e, 0x28,
+0x00, 0x28,
+0x10, 0x08,
+0x10, 0x08,
+0x1f, 0xf8,
+0x18, 0x08,
+0x18, 0x08,
+0x1f, 0xf8,
+0x00, 0x00,
+0x00, 0x00,
+
+
+ + +

եȤѴ

+ +

+EB 饤֥ˤϡΥӥåȥޥåץǡ XBM, XPM, GIF, BMP, PNG +γƲѴؿѰդƤޤ +ѴԤؿϡ 5 ĤǤ +

+ + + + + + + +
eb_bitmap_to_xbm() XBM ؤѴ
eb_bitmap_to_xpm() XPM ؤѴ
eb_bitmap_to_gif() GIF ؤѴ
eb_bitmap_to_bmp() BMP ؤѴ
eb_bitmap_to_png() PNG ؤѴ
+ +

+ɤδؿƤӽФƱǤǤ XBM ؤѴΥץ +򼨤ޤ +

+ +
+
+/* bitmap ˹⤵ 16 ѳΥӥåȥޥåץǡǼ
+ * ƤȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_16];
+char xbm[EB_SIZE_WIDE_FONT_16_XBM];
+size_t xbmsize;
+
+if (eb_wide_font_character_bitmap(bitmap, EB_WIDTH_WIDE_FONT_16,
+    EB_HEIGHT_FONT_16, xbm, &xbmsize) != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ƥγ

+ +

+ϥƥȥǡ (ʸ˥塼ʤ) ǻȤƤޤ +

+ +

+ץꥱץबƥȥǡ˽и볰̤ +ԤˤϡФեåꤷơեåؿǽ +Ȥˤʤޤ +

+ +

+ФեåϡѳФ EB_HOOK_WIDE_FONT +ȾѳФ EB_HOOK_NARROW_FONT बޤ +⡢и٤ˡꤷեåؿƤӽФޤ +

+ +

+եåΰˤĤƤϡ֥եåɤΰ 򻲾ȤΤȡ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Font_Code

+ +

+ɤϡι⤵ (ԥ) ɽޤ +ߤΤȤƤ⤵ϼ̤Ǥ +

+ +
    +
  • EB_FONT_16 +
  • EB_FONT_24 +
  • EB_FONT_30 +
  • EB_FONT_48 +
  • EB_FONT_INVALID +
+ +

+ɤμΤͤǤEB_FONT_16 ͤ 16 Ǥ +ޤ +¾ƱͤǤΤǡդƲ +

+ +

+EB_FONT_INVALID ̤ʳɤǡʳͤ +ɽѤޤ +

+ + +

ξܺ

+ +

+ƤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_WIDTH_NARROW_FONT_16

+ +

EB_WIDTH_NARROW_FONT_24

+ +

EB_WIDTH_NARROW_FONT_30

+ +

EB_WIDTH_NARROW_FONT_48

+ +

EB_WIDTH_WIDE_FONT_16

+ +

EB_WIDTH_WIDE_FONT_24

+ +

EB_WIDTH_WIDE_FONT_30

+ +

EB_WIDTH_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γ +ʬ (Υԥ) int ɽƤޤ +

+ + +

EB_HEIGHT_NARROW_FONT_16

+ +

EB_HEIGHT_NARROW_FONT_24

+ +

EB_HEIGHT_NARROW_FONT_30

+ +

EB_HEIGHT_NARROW_FONT_48

+ +

EB_HEIGHT_WIDE_FONT_16

+ +

EB_HEIGHT_WIDE_FONT_24

+ +

EB_HEIGHT_WIDE_FONT_30

+ +

EB_HEIGHT_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +νΥԥ int ɽƤޤ +

+ +

+EB_HEIGHT_NARROW_FONT_16 +EB_HEIGHT_WIDE_FONT_16 μºݤͤ 16 Ǥ +( EB_FONT_16 μºݤͤ 16 ǤϤޤΤǡ +դƲ) +

+ + +

EB_SIZE_NARROW_FONT_16

+ +

EB_SIZE_NARROW_FONT_24

+ +

EB_SIZE_NARROW_FONT_30

+ +

EB_SIZE_NARROW_FONT_48

+ +

EB_SIZE_WIDE_FONT_16

+ +

EB_SIZE_WIDE_FONT_24

+ +

EB_SIZE_WIDE_FONT_30

+ +

EB_SIZE_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +ΥӥåȥޥåץǡǼΤɬפΰ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XBM

+ +

EB_SIZE_NARROW_FONT_24_XBM

+ +

EB_SIZE_NARROW_FONT_30_XBM

+ +

EB_SIZE_NARROW_FONT_48_XBM

+ +

EB_SIZE_WIDE_FONT_16_XBM

+ +

EB_SIZE_WIDE_FONT_24_XBM

+ +

EB_SIZE_WIDE_FONT_30_XBM

+ +

EB_SIZE_WIDE_FONT_48_XBM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xbm() Ѥ XBM +ѴݤˡѴ XBM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XPM

+ +

EB_SIZE_NARROW_FONT_24_XPM

+ +

EB_SIZE_NARROW_FONT_30_XPM

+ +

EB_SIZE_NARROW_FONT_48_XPM

+ +

EB_SIZE_WIDE_FONT_16_XPM

+ +

EB_SIZE_WIDE_FONT_24_XPM

+ +

EB_SIZE_WIDE_FONT_30_XPM

+ +

EB_SIZE_WIDE_FONT_48_XPM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xpm() Ѥ XPM +ѴݤˡѴ XPM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_GIF

+ +

EB_SIZE_NARROW_FONT_24_GIF

+ +

EB_SIZE_NARROW_FONT_30_GIF

+ +

EB_SIZE_NARROW_FONT_48_GIF

+ +

EB_SIZE_WIDE_FONT_16_GIF

+ +

EB_SIZE_WIDE_FONT_24_GIF

+ +

EB_SIZE_WIDE_FONT_30_GIF

+ +

EB_SIZE_WIDE_FONT_48_GIF

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_gif() Ѥ GIF +ѴݤˡѴ GIF Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_BMP

+ +

EB_SIZE_NARROW_FONT_24_BMP

+ +

EB_SIZE_NARROW_FONT_30_BMP

+ +

EB_SIZE_NARROW_FONT_48_BMP

+ +

EB_SIZE_WIDE_FONT_16_BMP

+ +

EB_SIZE_WIDE_FONT_24_BMP

+ +

EB_SIZE_WIDE_FONT_30_BMP

+ +

EB_SIZE_WIDE_FONT_48_BMP

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_bmp() Ѥ BMP +ѴݤˡѴ BMP Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_PNG

+ +

EB_SIZE_NARROW_FONT_24_PNG

+ +

EB_SIZE_NARROW_FONT_30_PNG

+ +

EB_SIZE_NARROW_FONT_48_PNG

+ +

EB_SIZE_WIDE_FONT_16_PNG

+ +

EB_SIZE_WIDE_FONT_24_PNG

+ +

EB_SIZE_WIDE_FONT_30_PNG

+ +

EB_SIZE_WIDE_FONT_48_PNG

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_png() Ѥ PNG +ѴݤˡѴ PNG Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_Error_Code eb_font (EB_Book *book, EB_Font_Code *font_code)

+ +

+ؿ eb_font() ϡ򤷤Ƥܤˤơ +եȤι⤵ɽɤ font_code λؤΰ +񤭹ߤޤ +

+ +

+ȴؿ EB_SUCCESS ֤ޤ +Ԥ font_code λؤΰ EB_FONT_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢեȤι⤵򤵤ƤʤФʤޤ +򤵤ƤʤСEB_ERR_NO_CUR_FONT ֤ޤ +ܤΤΤ򤷤Ƥʤ⡢ƱͤǤ +

+ + +

EB_Error_Code eb_set_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_set_font() ϡܤˤ볰եȤ +⤵򥻥åȤޤ +åȤ볰եȤΡֹ⤵פϡб볰ɤ +font_code ǻꤷޤ +

+ +

+δؿϡ EB_SUCCESS ֤ꤷֹ⤵פ +γեȤι⤵פȤʤޤ +Ǥ˳եȤι⤵򤷤Ƥϡä̤ξ֤ +Ƥ餢餿 font_code 򤷤ޤ +

+ +

+Ԥȸ򼨤顼ɤ֤եȤι⤵̤ +֤ˤʤޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ޤܤäƤʤեȤι⤵ꤵȡ +EB_ERR_NO_SUCH_FONT ֤ޤ +

+ + +

void eb_unset_font (EB_Book *book)

+ +

+ؿ eb_unset_font() ϡγեȤι⤵̤ +ξ֤ᤷޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤ硢 +⤷ϳեȤι⤵򤵤Ƥʤϲ⤷ޤ +

+ + +

EB_Error_Code eb_font_list (EB_Book *book, EB_Font_Code *font_list, int *font_count)

+ +

+ؿ eb_font_list() ϡܤƤ볰 +⤵ΰ EB_Font_Code ˤơfont_list +λؤΰ˽񤭹ߤޤ +

+ +

EB_MAX_FONTS ĤǤޤ +äơҤϿƤܤθĿ font_count λؤΰ +񤭹ߤޤ +(ߤΥСǤ EB_MAX_FONTS ͤ 4 ˤʤäƤޤ +⤵ 16, 24, 30, 48 ԥ 4 Ǥ) +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡfont_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ + +

int eb_have_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_font() ϡfont_code ǻꤷ⤵ +եȤܤäƤ뤫ɤĴ٤ޤ +

+ +

+äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_font_height (EB_Book *book, int *height)

+ +

+ؿ eb_font_height() ϡbook +եȤι⤵ (Υԥ) height λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡheight λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_font_height2 (EB_Font_Code font_code, int *height)

+ +

+eb_font_height() ȻƤޤܤǤϤʤ +font_height ǻꤵ줿ɤι⤵ (Υԥ) +񤭹ۤʤޤ +

+ + +

int eb_have_narrow_font (EB_Book *book)

+ +

int eb_have_wide_font (EB_Book *book)

+ +

+ؿ eb_have_narrow_font() ϡܤȾѳ +Ƥ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_font() ϡѳƤ뤫 +ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width (EB_Book *book, int *width)

+ +

EB_Error_Code eb_wide_font_width (EB_Book *book, int *width)

+ +

+ؿ eb_narrow_font_width() ϡbook +եȤι⤵ˤȾѳ (Υԥ) +height λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_width() ѳ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡwidth λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳι⤵򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width2 (EB_Font_Code font_code, int *width)

+ +

EB_Error_Code eb_wide_font_width2 (EB_Font_Code font_code, int *width)

+ +

+eb_narrow_font_width(), eb_wide_font_width() +ƤޤܤǤϤʤfont_height ǻꤵ줿 +ɤ (Υԥ) 񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_size (EB_Book *book, size_t *size)

+ +

EB_Error_Code eb_wide_font_size (EB_Book *book, size_t *size)

+ +

+ؿ eb_narrow_font_size() ϡbook +եȤι⤵ˤȾѳʬΥǡ (Хȿ) +size λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_size() ѳΥ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

EB_Error_Code eb_wide_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

+eb_narrow_font_size(), eb_wide_font_size() +ƤޤܤǤϤʤ font_height ǻ +줿ɤγʬΥǡ񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_start (EB_Book *book, int *start)

+ +

EB_Error_Code eb_wide_font_start (EB_Book *book, int *start)

+ +

+ؿ eb_narrow_font_start() ϡbook +ܤˤȾѳƬʸֹ (ȾѳʸֹǺǾΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_font_end (EB_Book *book, int *end)

+ +

EB_Error_Code eb_wide_font_end (EB_Book *book, int *end)

+ +

+ؿ eb_narrow_font_end() ϡbook +ˤȾѳκǸʸֹ (ȾѳʸֹǺΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_end() ϡȾѳǤϤʤѳˤĤ +Ĵ٤Ȥơeb_narrow_font_end() ƱǤ +

+ + +

EB_Error_Code eb_narrow_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

EB_Error_Code eb_wide_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

+ؿ eb_narrow_font_character_bitmap() ϡbook +ܤƤ롢ȾѳΥӥåȥޥåץǡФޤ +Фʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿϥӥåȥޥåץǡ bitmap λؤΰ +񤭹ߡEB_SUCCESS ֤ޤ +Ԥȡbitmap λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +ܤȾѳƤʤ⡢Ϥ EB_ERR_NO_CUR_FONT +֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+ؿ eb_wide_font_character_bitmap() ϡȾѳǤϤʤ +ѳΥӥåȥޥåץǡФȤơ +eb_narrow_font_character_bitmap() ƱǤ +

+ +

+ӥåȥޥåץǡηˤĤƤϡ +ֳեȤμФ 򻲾ȤΤȡ +

+ + +

EB_Error_Code eb_forward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_forward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_font_character() ϡbook +ܤƤȾѳʸֹ character_number +n ĸ˰֤볰ʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳäƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_font_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_font_character() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_backward_narrow_font_character() +eb_forward_narrow_font_character() ȤϤ礦ɵդδؿǤ +book ܤƤȾѳʸֹ +character_number n ˰֤볰 +ʸֹޤ +

+ +

+Ʊͤˡeb_backward_wide_font_character() ϡѳ +Ĥ n γʸֹؿǡ +eb_forward_wide_font_character() ȿФδؿǤ +

+ +

+n ˤοꤹ뤳Ȥǽǡ줾켡θƤӽФ +ˤʤޤ +

+ +
+
+/* Ⱦѳξ (n < 0) */
+eb_forward_narrow_font_character (book, -n, character_number);
+
+/* ѳξ (n < 0) */
+eb_forward_wide_font_character (book, -n, character_number);
+
+
+ + +

EB_Error_Code eb_narrow_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_png_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_png_size (EB_Font_Code height, size_t *size)

+ +

+ǽ 5 Ĥδؿ +(eb_narrow_font_xbm_size() +eb_narrow_font_png_size()) ϡ height +ȾѳĤΥӥåȥޥåפ XBM, XPM, GIF, BMP, PNG ˤ줾Ѵ +ȤΥǡ size λؤΰ˽񤭹ߤޤ +

+ +

+Ʊͤˡ 5 Ĥδؿ +(eb_wide_font_xbm_size() +eb_wide_font_png_size()) ϡѳѴȤ +ǡ񤭹ߤޤ +

+ +

+δؿ⡢ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_bitmap_to_xbm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_xpm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_gif (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_bmp (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_png (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

+ 5 Ĥδؿϡeb_narrow_font_character() ޤ +eb_wide_font_character() ǼФΥӥåȥޥåפ +XBM, XPM, GIF, BMP, PNG ˤ줾Ѵޤ +

+ +

+ӥåȥޥåץǡλؤΰ bitmap ǻꤷӥåȥޥåפ +⤵ width, height Ϥޤ +

+ +

+ؿθƤӽФȡimage λؤΰѴΥǡ +񤭹ޤ졢image_length λؤΰѴΥǡ礭 +񤭹ޤޤ +

+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2002-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <book-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡ
+ *     ܤƤȾѳ (⤵ 16 ԥ) 򤹤٤ƥ
+ *     Ȥɽޤ
+ *
+ *     ܤ⤵ 16 ԥȾѳƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/font.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int font_start;
+    unsigned char bitmap[EB_SIZE_NARROW_FONT_16];
+    int i, j;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s book-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /*ָߤγ礭פꡣ*/
+    if (eb_set_font(&book, EB_FONT_16) < 0) {
+        fprintf(stderr, "%s: failed to set the font size, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_font_start(&book, &font_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = font_start;
+    for (;;) {
+        /* Υӥåȥޥåץǡ*/
+        error_code = eb_narrow_font_character_bitmap(&book, i,
+            (char *)bitmap);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ӥåȥޥåפ򥢥Ȥˤƽϡ*/
+        printf("code point=%04x\n", i);
+        for (j = 0; j < 16; j++) {
+            fputc((bitmap[j] & 0x80) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x40) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x20) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x10) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x08) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x04) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x02) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x01) ? '*' : ' ', stdout);
+            fputc('\n', stdout);
+        }
+        fputs("--------\n", stdout);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_font_character(&book, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

Хʥǡ

+ +

+Хʥǡ (binary data) Ȥϡ +Ǥư衢ȤäޥǥǡΤȤؤޤ +Хʥǡϡɬƥȥǡ +(֥ƥȥǡ 򻲾ȤΤ) +黲ȤѤޤ +

+ +

+ΤȤ EB 饤֥ǤϡΥХʥǡ갷Ȥ +Ǥ櫓ǤϤޤ +Żҥ֥åǰΤϡ2 ĴΥΥǤȡ顼 (JPEG) +Ǥ +EPWING ǤϡΥǡ顼 (BMP JPEG) ˲äơ +WAVE (PCM) MPEG ư򰷤ȤǤޤ +

+ +

+EB 饤֥꤬󶡤ƤΤϡХʥǡ +CD-ROM Ҥ뵡ǽǤ +ɽꤹ뵡ǽѰդƤޤΤǡդƲ +

+ +

+ץꥱϡ¼켭Ȥäоݤˤʤ顢 +ХʥǡɽˤбʤƤپϤޤ +Ǥϡ޴դɽ˥ΥǤȤäƤؼŵ +褦ˡбʤؤʤΤ⤢ޤ +Хʥǡɽεǽ뤫ɤϡץꥱ +оݼɤϰϤޤǤˤΤˤäƷɤǤ礦 +

+ +

+ʲξϤǤϼ̤˥ХʥǡΰˤĤޤ +

+ +

+Хʥǡμ˥ǡμФ̯˰ۤʤޤ ( +ǡμϿˡ̯˰ۤʤäƤ뤫¾ʤޤ)褽 +ϡΤ褦ʤΤˤʤޤ +

+ +
    +
  1. +ƥȥǡΥեåѤơХʥǡλȾ롣 + +
  2. +eb_binary_set_...() ؿƤӽФơꤷ֤ +Хʥǡ򤳤줫ɤ߹ݤ EB 饤֥롣 + +
  3. +eb_read_binary() Ǽºݤ˥ǡɤ߹ࡣ +
+ +

+ƥȥǡƱͤˡХʥǡܤ°ǡ +ǤΤǡܤ򤷤Ƥʤȼ뤳ȤϤǤޤ +Хʥǡɤ߹ߤˤϡƥȥǡȤ̤ +եǥץƤޤ +äơߤɤ߹Ǥ⡢ưˤϱƶϤޤ +

+ + + +

Υ

+ +

+2 ĴΥΥǤϡŻҥ֥åEPWING ¸ߤEB 饤֥ +ǤϤɤⰷȤǤޤ +(Żҥ֥å¸ߤ 16 ĴΥΥǤϡΤȤ EB 饤֥ +ǤбƤޤ) +

+ +

+ΥǥǡϳƱǤEB 饤֥Ǥϡ +1 ԥ 1bit Ƥ BMP Ѵƥץꥱ +Ϥ褦ˤƤޤ +äơץꥱ󤫤ϡ BMP οǥǡϿ +Ƥ褦ˤߤޤ +

+ +

+ƥȥǡ⤫ϡХʥǡǤΥǤ򻲾Ȥ +Ȥޤ +ΥǤФˤϡλȾɬפǤ +ȾμϡƥȥǡˡΥǤγϤȽλ +ɽץ󥹤ؤΥեå EB_HOOK_BEGIN_MONO_GRAPHIC + EB_HOOK_END_MONO_GRAPHIC ѤƹԤޤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +(argv) 4 ĤꡢΤ argv[2] +argv[3] Ǥȹ⤵ (ԥ) ̣ޤ +

+ +

+ޤեå EB_HOOK_END_MONO_GRAPHIC եåؿϤ + 3 Ĥǡargv[1] argv[2] +ǥǡΥڡֹȥեåȤˤʤޤ +

+ +

+ΥǤˤϡ嵭ΥեåǤΥڡֹ +եåȡȹ⤵򵭲Ƥޤ +

+ +

eb_set_binary_mono_graphic() ƤӽФơ줫 +ΥǤΥǡ뤳Ȥ EB 饤֥ޤ +eb_set_binary_mono_graphic() ؤΰˤϡ +EB_Book ֥ȤȡۤǤؤΥڡֹ桢 +եåȡ⤵Ϥޤ +EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥɬפޤ +

+ +
+
+/* eb_set_binary_mono_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_mono_graphic(EB_Book *book, EB_Position *position,
+    int width, int height);
+
+
+ +

+Żҥ֥åǤϡեåؿϤȹ⤵ͤ 0 ˤʤäƤޤ +Τޤ eb_set_binary_mono_graphic() Ϥޤ +(EPWING Ǥ 0 ϤƤϤޤ) +

+ +

+ʾǿǥǡμǤΤǡǡɤ߹ߤޤ +ˤϡeb_read_binary() Ȥޤ +

+ +
+
+#define MAX_LENGTH 1000
+char bitmap[MAX_LENGTH];
+ssize_t bitmap_length;
+
+if (eb_read_binary(&book, MAX_LENGTH, bitmap, &bitmap_length)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ȡɤ߹ǥǡ bitmap ˽񤭹ޤ졢 +ХȽ񤭹Τ bitmap_length ˽񤭹ޤޤ +񤭹ޤХȿϡ MAX_LENGTH ХȤǤ +

+ +

eb_read_binary() θƤӽФǿǥǡ +üޤɤ߹ɬפϤʤؿ򷫤֤ƤӽФС³ +ɤ߹ळȤǤޤ +eb_read_binary() ϡǥǡνüޤȤʾ +ǡɤ߹ߤޤΤǡeb_read_binary() 0 ֤ +ǿǥǡüȤǧǤޤ +

+ + +

+ +

+顼ǤϡŻҥ֥åǤ JPEG EPWING Ǥ JPEG BMP (DIB) +ΤΤѤƤޤ +EB 饤֥Ϥ򤹤٤ưȤǤޤŻҥ֥åؤб +ϸŪʤΤˤʤäƤޤ(ܤϸҤޤ) +

+ +

+顼ǤΥǡФˤϡΥǤƱͤ˥ƥȥǡ +饫顼ǤؤλȾեå̤Ƽ³Ƽºݤ +顼ǤΥǡɤ߹Ȥˤʤޤ +

+ +

+eb_set_binary_color_graphic() ƤӽФơ줫 +ץꥱ󤬥顼ǤΥǡ褦ȤƤ뤳Ȥ +EB 饤֥ޤ +eb_set_binary_color_graphic() ؤΰˤϡ +EB_Book ֥Ȥ˲äơ顼ǤΥڡֹ +եåȤϤޤ +

+ +
+
+/* eb_set_binary_color_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_color_graphic(EB_Book *book, EB_Position *position);
+
+
+ +

+EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥޤ + +顼ǤΥڡֹȥեåȤξϡ顼ǤγϤȽλɽ +ץ󥹤ؤΥեåޤ +եåϡ饤ɽѤ󥤥饤Ѥ 2 बꡢ +줾쳫ϥեå JPEG Ѥ BMP ѤʬƤޤ +

+ +
+
EB_HOOK_BEGIN_COLOR_BMP
+
EB_HOOK_BEGIN_COLOR_JPEG
+
+󥤥饤 BMP, JPEG γϥեå + +
EB_HOOK_END_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå + +
EB_HOOK_BEGIN_IN_COLOR_BMP
+
EB_HOOK_BEGIN_IN_COLOR_JPEG
+
+饤 BMP, JPEG γϥեå + +
EB_HOOK_END_IN_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå +
+ +

+󥤥饤Ѥνλեå EB_HOOK_END_GRAPHIC Ǥϡ +եåؿϤ argv[2] argv[3] +ǥǡΥڡֹȥեåȤˤʤޤΤǡ +eb_set_binary_color_graphic() ϤƤޤ +Ʊͤˡ饤Ѥνλեå EB_HOOK_END_IN_GRAPHIC +Ǥϡargv[2] argv[3] ڡֹ +եåȤǤΤǡϤޤ +

+ +

+ϡºݤ˥顼ǤΥǡФޤ +ˤϡΥǤƱͤ eb_read_binary() Ѥޤ +ȤϤޤäǤΤǡܤ +֥Υǡ 򻲾ȤƤ +

+ +

+Żҥ֥åΥ顼ǤˤĤƤϡǡνλ֤Ƥ +EB 饤֥ɤ߹ߤߤʤȤ»बޤ +ϡǡ礭˴ؤ󤬵Ƥʤǡǡ +ü֤ϡץꥱ JPEG ΥǡǥɤƳФ +ޤ +

+ + +

դ顼

+ +

+顼Ǥˤϡζΰ˻ξդäΤ +ޤ +HTML ˤ륯å֥롦᡼ (clickable image) ȤۤƱǡ +ΰ˥ޥݥ󥿤֤˥ޥ򥯥åȡ餫 +줿˲̤ܤȤųݤǤ +ȤʤΰϡĤФʣϿǤޤ +

+ +
+
+դ顼Ǥ
+
+
+
+ΰ裱ΰ裲
+
+
+
+
+
+ΰ裳ǡ
+
+
+
+
+
+ +

+դ顼Ǥμ갷ϡ̾Υ顼Ǥĥ +ʤޤ̾Υ顼ǤξǤϡȤ JPEG 󥤥饤 +ǤϡΤ褦ʽ֤ǥեåƤӽФޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ФƻդΥ顼ǤǤϡ2ĤΥեåδ֤ˡΰ +˴ؤեåޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ1 ) +
  3. EB_HOOK_END_CLICKABLE_AREA (ΰ1 λ) +
  4. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ2 ) +
  5. EB_HOOK_END_CLICKABLE_AREA (ΰ2 λ)
    + ʲΰ3ΰ4 ... ȶΰθĿʬ³ +
  6. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ΰ˴ؤŪʾϡEB_HOOK_BEGIN_CLICKABLE_AREA +(ϥեå) ΤۤǼޤ +եåؿϤ argv[1] argv[2] +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] ΰα +ؤȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +

+ץꥱ󤬻դ顼Ǥбʤϡΰ +ϾȽλ̵뤹뤳Ȥˤʤޤ +ˤꡢǤ̾ (ʤ) 顼ǤȤޤäƱ +ޤ +

+ + +

WAVE (PCM)

+ +

+WAVE (PCM) βǡ EPWING ˤ¸ߤޤ +(Żҥ֥åˤ CD-DA βǡޤEB 饤֥ +ǤбƤޤ) +

+ +

+WAVE βǡФˤϡޤƥȥǡ椫 WAVE +λȾޤ +ȳϤȽλɽץ󥹤ؤΥեå +EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE +줾줢ޤΤǡѤޤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤΤ +argv[2] argv[3] ǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤȤʤޤ +

+ +

+γϰ֤Ƚλ֤ؿ eb_set_binary_wave() Ϥơ +ΰ֤ˤ벻ǡ򤳤줫ФȤ EB 饤֥ޤ +

+ +
+
+/* eb_set_binary_wave() δؿץȥ */
+EB_Error_Code
+eb_set_binary_wave(EB_Book *book, EB_Position *start_position,
+EB_Position *end_position);
+
+
+ +

+Ƹϡºݤ˲ǡФޤ +ˤϡ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

MPEG1 ư

+ +

+MPEG1 ưǡ EPWING ˤ¸ߤޤ +ưǡ EPWING CD-ROM movie Ȥǥ쥯ȥβˡ +ư˰ĤΥեˤǼƤޤ +

+ +

+ƥȥǡ¸ߤ롢MPEG ǡλȳϤȽλɽ +ץ󥹤ؤΥեå EB_HOOK_BEGIN_MPEG +EB_HOOK_END_MPEG Ѥ뤳Ȥǡ MPEG +ե̾Ǥޤ +

+ +

+Ūˤϡեå EB_HOOK_BEGIN_MPEG եåؿϤ +Τargv[2] argv[5] 碌ư +Υե̾ɽ褦ˤʤäƤޤ +

+ +

+MPEG ưΥǡˤϡΥե̾ +eb_set_binary_mpeg() ϤơΥեưǡ +줫Фݤ EB 饤֥ޤ +ե̾ϡΤ褦ˤ argv + 2 +(&argv[2] ǤƱ) Ϥޤ +

+ +
+
+if (eb_set_binary_mpeg(&book, argv + 2) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ϡºݤưǡФޤ +ˤϡϤ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤˤĤƤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/binary.h>
+
+
+ + +

EB_Error_Code eb_set_binary_mono_graphic (EB_Book *book, const EB_Position *position, int width, height)

+ +

+ؿ eb_set_binary_mono_graphic() ϡΥǤΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֡width, height +ˤϿǤȹ⤵Ϥޤ +ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +Żҥ֥åǤȹ⤵ͤξ󤬥ƥȥǡ˵Ƥʤ +ᡢ0 ϤȤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֡⤵ͤ餫ˤ EB 饤֥꤬ȽǤ +ȤϡEB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +ΥǤΥǡϡ1 ԥ 1bit Ƥ BMP ˤʤä +ޤ +

+ + +

EB_Error_Code eb_set_binary_color_graphic (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_set_binary_color_graphic() ϡEPWING Υ顼Ǥ +ǡ򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֤Ϥޤ +֤ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +顼ǥǡϡJPEG BMP (DIB) ΤηˤʤäƤޤ +

+ + +

EB_Error_Code eb_set_binary_wave (EB_Book *book, const EB_Position *start_position, EB_Position *end_position)

+ +

+ؿ eb_set_binary_wave() ϡWAVE (PCM) βΥǡ +򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + start_position end_position ˤϲǡ +γϰ֤Ϥޤ +֤ξϡǡλȸǤƥȥǡ˵ܤƤꡢ +̾ϥեåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ǡΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˲ǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_set_binary_mpeg (EB_Book *book, const unsigned int *argv)

+ +

+ؿ eb_set_binary_mpeg() ϡMPEG1 ưΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + argv ˤưǡΥե̾Ϥޤ +Υե̾ʸǤϤʤեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 argv[2] + argv[5] ʬϤޤ +Ĥޤꡢեåؿΰ argv + 2 +eb_set_binary_mpeg() ؤΰ argv Ȥ +Ϥޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢưǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +¸ߤʤưե̾ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+δؿϡºݤưǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_read_binary (EB_Book *book, size_t binary_max_length, char *binary, ssize_t *binary_length)

+ +

+ؿ eb_read_binary() ϡХʥǡɤ߹ߤޤ +ɤ߹⤦ȤƤХʥǡϡ +

+ +
    +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+Τ줫δؿǡEB 饤֥ΤƤɬפޤ +

+ +

+ɤ߹ǡϰ binary λؤΰ˽񤭹ޤޤ +ޤΤȤ񤭹ޤ줿Хȿϡbinary_length λؤ +ΰ˥åȤޤ +񤭹ޤХȿϡĹǤ binary_max_length +˻ꤷͤޤǤȤʤޤ +

+ +

+δؿϡäɤ߹ǡνü˥ʥʸղä褦ʻ +ޤ +ɤ߹ޤǡХʥʤΤǡ˥ʥʸи +ޤ +

+ +

+δؿƤӽФǡХʥǡΤ쵤˼ +ɬפϤޤ +֤ƤӽФС³ǡɤ߹ޤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡХʥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤޤΤǡʾɤ߹ߤϤǤʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+eb_read_binary() 򷫤֤Ƥ硢Хʥǡ + binary Ƭ񤭹ޤ졢*binary_length +ͤ⡢β eb_read_binary() θƤӽФǽ񤭹ޤ줿 +Хȿˤʤޤ +

+ +

+ǡνüȡʾ夳δؿƤǤؿ binary +ˤϲ񤭹ޤ*binary_length 0 񤭹ߡ +EB_SUCCESS ֤ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡbinary_length ؤΰ -1 񤭹ߡ +顼ɤ֤ޤ +ξ硢Хʥǡɤ߹߾֤εϿꥻåȤޤΤǡ +ǡ³ɤ߹ळȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤƬ˵󤲤ؿθƤӽФƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_CUR_BINARY ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_file_name (const unsigned int *argv, char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡưǡΥե̾ +̾ʸѴޤ +

+ +

+EB 饤֥ǤϡưǡΥե̾ϥեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 4 Ĥ int +(argv[2] argv[5]) ˤäɽޤ +

+ +

+ưǡɤ߹ݤϡ򤽤Τޤ eb_set_binary_mpeg() +ϤɤΤǤե̾̾ʸϡδؿ +Ѥޤ +ȤСġư˰դ ID Τ褦ʤΤ򿶤ꤿϡե +̾ ID ȤƻȤɤΤޤ +ʤδؿѴե̾ˤϥѥޤޤƤޤ +

+ +

+եåؿΰ argv + 2 򤳤δؿؤΰ argv +ȤϤȡcomposed_file_name ؤΰˡʸ +Ѵ줿ե̾Ǽޤ +ե̾ϺĹ EB_MAX_DIRECTORY_NAME_LENGTH (= 8) Х +ˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ʤǼ줿ե̾ϡºݤ¸ߤե̾Ȥϼ㴳ۤʤä +ǽޤ +ȤСѻʸȾʸҤ̵ͭʤɤΰ㤤ޤ +δؿϡޤʸ˵ŪѴʤΤǡե뤬º +뤫ɤΥåϤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_path_name (EB_Book *book, const unsigned int *argv, char *composed_path_name)

+ +

+ؿ eb_compose_movie_path_name() ϡưǡΥե̾ +̾ʸѴޤ +ƯϡҤδؿ eb_compose_movie_file_name() ɤ +Ƥޤeb_compose_movie_path_name() ֤ե̾ +ϡХѥηˤʤäƤۤʤޤ +

+ +

eb_compose_movie_path_name() Ǥϡե̾º +뤫ɤΥåԤȤ⡢礭ʰ㤤Ǥ +ե̾ʸѴǡѻʸȾʸΰ㤤Ҥ +̵ͭϡºߤΥե˹碌ĴΤ֤ޤ +äơѥʬӤƤ⡢ +eb_compose_movie_file_name() ֤ե̾Ȥɬ +פޤ +

+ +

+ book ϡưեϿƤܤ򤷤 +ʤФʤޤ +ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB ֤ޤ +

+ +

+ argv ΰ̣ϡeb_compose_movie_file_name() +ƱǤ +

+ +

+ե̾Ѵȡؿ composed_path_name +ؤΰˡʸѴ줿ưե̾Ǽ +EB_SUCCESS ֤ޤ +ե̾ϺĹ EB_MAX_PATH_LENGTH ХȤˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ե̾ºߤʤȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ + +

EB_Error_Code eb_decompose_movie_file_name (unsigned int *argv, const char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡ +eb_compose_movie_file_name() Ȥ礦ɵդƯ򤷤ޤ +Ĥޤꡢ̾ʸѴ줿ưǡΥե̾ +composed_file_name 4 Ĥ int argv +ᤷޤ +äơargv λؤΰϡʤȤ int ͤ 4 +ǼǤ礭ɬפǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +

appendix ǡ

+ +

+appendix (Ͽ) Ȥ CD-ROM Ҥǡ +ȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +ebappendix ޥɤѤޤ +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
    +
  • ʸζڤꥳ +
  • ʸ +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalog ⤷ +catalogs ե뤬¸ߤܤΥǡб +֥ǥ쥯ȥ֤Ƥޤ +

+ +

+ץꥱ appendix бʸζڤꥳɤξȤ +褦ˤ뤳Ȥᤷޤ +ʸˤĤƤϡΥեȤ򤽤ΤޤɽǤΤ +СбɬϤʤ˳Ǥʸζڤꥳɤϡ +ʤʸɽǤʤҤбǤޤ +(ڤꥳɤˤĤƤϡֶڤꥳɤ 򻲾ȤΤ) +

+ + + +

EB_Appendix ֥

+ +

+CD-ROM Τ򰷤ˤ EB_Book ֥Ȥ +Ѥޤappendix 򰷤ˤ EB_Appendix ֥ +Ȥޤ +EB_Appendix ֥Ȥ뤿δؿϡ +EB_Book ΤΤȤϰۤʤޤϤ褯Ƥޤ +

+ +

+EB_Appendix ֥Ȥϡġ appendix Ф 1 +ĺɬפޤ +

+ +
+
+EB_Appendix app;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Appendix *app_pointer;
+
+app_pointer = (EB_Appendix *) malloc(sizeof(EB_Appendix));
+
+
+ +

+֥ȤϡȤɬ eb_initialize_appendix() +ȤؿȤʤƤϤʤޤ +EB_Book ֥ȤǤ eb_initialize_book() +ǽɬפޤƱǤ +

+ +
+
+eb_initialize_appendix(&app);
+eb_initialize_appendix(app_pointer);
+
+
+ +

+³ơ֥Ȥ appendix μΤ˷դ뤿ˡ +eb_bind_appendix() ƤӽФޤ +ϡEB_Book ֥Ȥ eb_bind() +ޤ +

+ +
+
+ţ¡
+֥ȡ
+
+
+⡲䡡
+ʡˡ
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind_appendix(&app, "/mnt/dict") != EB_SUCCESS) {
+    printf("eb_bind_appendix() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() Ϥ appendix Υѥ +(Ǥ /mnt/dict) appendix Υȥåץǥ쥯ȥꡢ +Ĥޤ catalog ޤ catalogs եΤ +ǥ쥯ȥꤷޤ +ѥˤϡ֥̻ (: ebnet://localhost/dict.app) +ꤹ뤳ȤǽǤ +

+ +

+EB_Appendix ֥ȤȤä顢 +eb_finalize_appendix() ƤǸ򤷤ޤ +֥Ȥ appendix Ȥηդ򤫤줿֤ꡢ +dzƤ줿ϲ졢Ƥե⤹٤ +Ĥޤ +

+ +
+
+eb_finalize_appendix(&app);
+eb_finalize_appendix(app_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_appendix() ƤʤС֥Ȥ +ΰ˲뤳ȤǤޤ +

+ +
+
+free(app_pointer);
+
+
+ + +

+ +

+CD-ROM Ʊͤˡappendix ˤܤ¸ߤޤ +appendix ܤ⡢ܥɤȤäƼ̤ޤ +ġܥɤϡappendix ƱΤʤ褦ˤʤäƤޤ +

+ +

+CD-ROM Τ٤ƤܤܥɤؿȤ +eb_subbook_list() ޤappendix ˤ +eb_appendix_subbook_list() ȤƱͤδؿޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_appendix_subbook_list(&app, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_appendix_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_appendix_subbook_list() ȡΤ٤Ƥ +ܥɤ sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+EB_Book Ʊͤ EB_Appendix ֥ +Ǥ⡢ӤĤ줿 CD-ROM ҤǤդܤǡ + (current subbook) Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ڤꥳɤ䳰ʸȤä appendix ΥǡؤΥ +ϡܤФƤԤޤ +

+ +

+ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+if (eb_set_appendix_subbook(&app, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() EB_Appendix ֥ + appendix ˷դľϡܤ򤵤Ƥʤ֤ +ʤäƤޤ +

+ + +

ʸζڤꥳ

+ +

+CD-ROM ҤˤäƤϡEB 饤֥꤬ʸɽ֤ +ߤʤȤޤ +(ܤϡֶڤꥳɤ 򻲾ȤΤ) +ϡʸζڤꥳɤο¬ EB 饤֥꤬ä˵ +ΤǤappendix ǡȤȤǡڤꥳɤ EB 饤֥ +˶Ƥ뤳ȤǤޤ +

+ +

+CD-ROM Ҥʸؿ eb_read_text() + 2 EB_Appendix * ȤΤǤ appendix +֥ȤϤƤ褦ˤޤ +

+ +
+
+/* book, app ϡ줾 EB_Book
+ *  EB_Appendix Υ֥Ȥǡɤ⤹Ǥ
+ * ܤȲꤷƤޤ*/
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, &app, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() ϡϤ줿 appendix ֥Ȥܤ +ѤߤǡĶڤꥳɤξäƤСζڤꥳɤ +Ѥޤ +

+ + +

ʸ

+ +

+CD-ROM ҤϡƤ볰ξȤƥեȤΥǡѰդ +ޤ +ĤޤꡢγɤΤ褦ʸʤΤ桼ʬ褦ˤˤϡ +ץꥱ󤬥եȤɽ뤷ޤ +Ǥϡƥȥ󥿡եѤץꥱǤϡ +ʸγʬޤäʬޤ +¿ѤƤҤǤϡʸǽ˶ᤤ֤ˤʤ뤫Τޤ +

+ +

+ EB 饤֥ǤϡؤȤʤʸ appendix +Ǥ褦ˤƤޤ +appendix ѰդƤ˸¤ꡢץꥱϳΥե +褹ˤʸϤ뤳ȤˤС +ƥȥ󥿡եѤץꥱǤҤɤ߰פ +ʤޤ +

+ +

+appendix ƤʸФؿϡ2 Ĥޤ +ȾѳѤ eb_narrow_alt_character_text() ѳѤ +eb_wide_alt_character_text() Ǥ +ɤ⡢ȤѤޤ +

+ +

+ʲǤϡȾѳʸֹ 0xa121 Фʸ +buffer ˳ǼƤޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * ǤܤǤȲꤷƤޤ*/
+char buffer[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+
+if (eb_narrow_alt_character_text(&app, buffer, 0xa121)
+    != EB_SUCCESS) {
+    printf("eb_narrow_alt_character_text() failed\n");
+    return;
+}
+
+
+ +

+ϸġܤФƤΤǡʸФˤϡ +餫ܤ򤷤Ƥɬפޤ +ΥեȤФݤϡ˲äƳΡֹ⤵פ򤷤Ƥ +ɬפޤʸˤϹ⤵γǰʤΤɬפޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡbuffer +Ϥ⤦ 1 Хʬ;͵Ƥޤ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

EB_Appendix

+ +

+EB_Appendix ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Appendix ֥Ȥϡ٤ EB 饤֥꤬ +ѰդƤؿǹԤޤ +ץꥱץϡľ EB_Appendix ֥ +ΥФ򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Appendix ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

void eb_initialize_appendix (EB_Appendix *app)

+ +

+ؿ eb_initialize_appendix() ϡapp λؤ +EB_Appendix ֥Ȥޤ +EB_Appendix ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_appendix() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_appendix (EB_Appendix *app)

+ +

+ؿ eb_finalize_appendix() ϡapp ؤ +EB_Appendix ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ appendix ȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_appendix() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_bind_appendix (EB_Appendix *app, const char *path)

+ +

+ؿ eb_bind_appendix() ϡapp λؤ +EB_Appendix ֥Ȥ򡢥ѥ path ˤ +appendix ˷դޤ +ѥˤϡappendix Υȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +appendix Υȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤappendix ˷դƤ硢 appendix Ȥ +դ򤤤Ƥ顢path ˤ appendix ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥Ȥ appendix Ȥηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ˡpath ХѥΤȤϡХѥѴ̤ +Ĺ˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

int eb_is_appendix_bound (EB_Appendix *app)

+ +

+ؿ eb_is_appendix_bound() ϡapp appendix +դƤ뤫ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_appendix_path (EB_Appendix *app, char *path)

+ +

+ؿ eb_appendix_path() ϡapp ˷դƤ +appendix Υѥ⤷ϱ֥̻Ҥpath λؤΰ +˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡ +eb_bind_appendix() ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_load_all_appendix_subbooks (EB_Appendix *app)

+ +

+ؿ eb_load_all_appendix_subbooks() ϡapp +Τ٤Ƥܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ +ԤޤδؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ +

+δؿƤӽФȡapp ϡܤ򤷤Ƥʤ֤ +ʤޤ +

+ + +

EB_Error_Code eb_appendix_subbook_list (EB_Book *app, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_appendix_subbook_list() ϡapp +٤ܤܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơappendix ϿƤܤθĿ subbook_count +ؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook (EB_Book *app, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_appendix_subbook() ϡapp +ܤܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢapp Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory (EB_Book *app, char *directory)

+ +

+ؿ eb_appendix_subbook_directory() ϡapp +ǸܤΥǡե᤿ǥ쥯ȥ̾ +directory λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory2 (EB_Book *app, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_appendix_subbook_directory() ȻƤޤ +ܤǤϤʤ subbook_code ǻꤵ줿ܤ +ǥ쥯ȥ̾񤭹ۤʤޤ +

+ +

+app ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +appendix ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_set_appendix_subbook (EB_Book *app, EB_Subbook_Code code)

+ +

+ؿ eb_set_appendix_subbook() ϡapp +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp appendix ˷դƤʤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

void eb_unset_appendix_subbook (EB_Book *app)

+ +

+ؿ eb_unset_appendix_subbook() ϡapp +Ƥܤ̤ξ֤ˤޤ +app appendix ˷դƤʤܤ򤵤Ƥʤ +ϡ⤷ޤ +

+ + +

int eb_have_stop_code (EB_Book *app)

+ +

+ؿ eb_have_stop_code() ϡapp ܤ +ڤꥳɤƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 ֤ޤ +Ƥʤ⤽ܤ򤵤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_stop_code (EB_Book *app, int *stop_code)

+ +

+ؿ eb_stop_code() ϡapp ܤ +Ƥڤꥳɤ stop_code λؤΰ˽񤭹ߤޤ +stop_code[0], stop_code[1] ˡڤꥳɤ +ȤƤ줾 0x0000 0xffff 񤭹ޤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡؿ stop_code[0] stop_code[1] + -1 񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤڤꥳɤƤʤϡEB_ERR_NO_STOPCODE +֤ޤ +

+ + +

int eb_have_narrow_alt (EB_Book *app)

+ +

int eb_have_wide_alt (EB_Book *app)

+ +

+ؿ eb_have_narrow_alt() ϡܤȾѳФ +ʸƤ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_alt() ϡѳФ +ʸƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +app ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_alt_start (EB_Book *app, int *start)

+ +

EB_Error_Code eb_wide_alt_start (EB_Book *app, int *start)

+ +

+ؿ eb_narrow_alt_start() ϡapp +ˤȾѳФʸϰϤĴ١Ƭʸֹ +(ȾѳʸֹǺǾΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_end (EB_Book *app, int *end)

+ +

EB_Error_Code eb_wide_alt_end (EB_Book *app, int *end)

+ +

+ؿ eb_narrow_alt_end() ϡapp +ˤȾѳФʸϰϤĴ١Ǹʸֹ +(ȾѳʸֹǺΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

EB_Error_Code eb_wide_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

+ؿ eb_narrow_alt_character_text() ϡbook +ܤƤ롢ȾѳʸФޤ +ʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿʸ text λؤΰ˽񤭹ߡ +EB_SUCCESS ֤ޤ +Ԥȡtext λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡtext +ΰˤϤ⤦ 1 ХʬɬפǤ +

+ +

+ʸ󤬤ɤʸɤǽ񤫤Ƥ뤫ϡappendix ˤ +ϿƤޤ +appendix ɬνҤбƺΤʤΤǡҤ +ʸɤ鼡Τ褦ȽǤСʤǤ礦 +

+ +
    +
  • Ҥ ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +
  • ʳξ硢ʸܸ EUC +
+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+ܤȾѳФʸ (character_number ˸¤餺 +ޤä) ƤʤϡEB_ERR_NO_ALT ֤ޤ +ǤϤʤʸֹˤĤƤȾѳФʸ +ƤΤΡcharacter_number Фʸ +¸ߤʤ硢ؿ EB_SUCCESS ֤text +λؤΰˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ؿ eb_wide_alt_character_text() ϡȾѳǤϤʤ +ѳФʸФȤơ +eb_narrow_alt_character_text() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_alt_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_alt_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_alt_character() ϡapp +ܤˤƤ롢ȾѳФʸ +ʸֹ character_number n ĸ˰֤ +ʸʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_alt_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_alt_character() ƱǤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <appendix-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <appendix-path> ǻꤷ appendix ܤӡ
+ *     ܤƤȾѳʸ򤹤٤ɽޤ
+ *
+ *      appendix ȾѳʸƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/appendix.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Appendix app;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int alt_start;
+    char text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s appendix-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `app' */
+    eb_initialize_library();
+    eb_initialize_appendix(&app);
+
+    /* appendix  `app' ˷դ롣*/
+    error_code = eb_bind_appendix(&app, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the app, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_appendix_subbook_list(&app, subbook_list,
+        &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    if (eb_set_appendix_subbook(&app, subbook_list[subbook_index])
+        < 0) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_alt_start(&app, &alt_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = alt_start;
+    for (;;) {
+        /* ʸ*/
+        error_code = eb_narrow_alt_character_text(&app, i, text);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ʸϡ*/
+        printf("%04x: %s\n", i, text);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_alt_character(&app, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* appendix  EB 饤֥Ѥλ*/
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

оνҰ

+ +

+EBNET Ф֥ԤݡФΥ饤ȤФ +ĤƤҤ appendix ǡΰ뤳Ȥ +Ǥޤ +

+ +

+ΤȤEBNET Фꤹ֥һҤˤϡνҤ +appendix ǡФ륢Ȥϰۤʤꡢ̾ϻꤷޤ +ʤ̷ϼΤ褦ˤʤޤ +

+ +
+
+ebnet://ۥ:ݡ/
+
+
+ +

+ `/' ϤʤƤ⹽ޤ +: Ȥ³ݡֹϾάǽǡξ +22010 ֥ݡȤѤ뤳Ȥ̣ޤ +

+ +

+ebinfo ޥɤ --book-list ץεưϡEB 饤֥ +ΤεǽˤäƼƤޤ +(ebinfo ˤĤƤξܺ٤ϡ +@pxref{Book list on EBNET server, , EBNET ФνҰ, ebinfo-ja, ebinfo-ja}) +

+ +
+
+% ebinfo --book-list ebnet://localhost
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

.app ˤʤäƤΤ appendix ǡǡ +¾ϽΤǤ +ν encycl Фƥʤ顢 +֥̻Ҥ ebnet://localhost/encycl ˤʤޤ +

+ +

+ʤ饤ȤФƥĤƤʤҤ appendix ǡ +ϡ¦ǰޤ +

+ + + +

EB_BookList ֥

+ +

+EBNET Ф󶡤Ҥ appendix ǡΰˤϡ +ޤ EB_BookList Υ֥ȤѰդɬפޤ +

+ +
+
+EB_BookList bl;
+
+
+ +

+֥Ȥΰϡmalloc() dzݤƤ⹽ޤ +

+ +
+
+EB_BookList *bl_pointer;
+
+bl_pointer = (EB_BookList *) malloc(sizeof(EB_BookList));
+
+
+ +

+EB_Book ֥ȤƱͤˡEB_BookList +֥ȤȤȤɬפޤ +ϡeb_initialize_booklist() ȤؿǹԤޤ +

+ +
+
+eb_initialize_booklist(&bl);
+eb_initialize_booklist(bl_pointer);
+
+
+ +

+λ顢ΥФȥ֥ȤӤĤޤ +ȤСebnet://localhost ɽ륵ФФơ +֥ȤӤĤˤϼΤ褦ˤޤ +

+ +
+
+if (eb_bind_booklist(&bl, "ebnet://localhost") != EB_SUCCESS) {
+    printf("eb_bind_booklist() failed\n");
+    return;
+}
+
+
+ +

+Ϥ礦ɡEB_Book ֥ȤФ +eb_bind() Ƥ֤ΤƱǤ +

+ +

+ơ褦䤯ҰξФȤǤޤ +ˤ eb_booklist_book_count(), +eb_booklist_book_name(), eb_booklist_book_title() +Ȥ 3 ĤδؿѤޤ +δؿϤ줾졢饤ȤǽʽҤοƽ + appendix ǡ̾ (̻ҤȤƻꤹ̾)ƽ + appendix ǡ̾뤳ȤǤޤ +

+ +
+
+char *name, *title;
+int count, i;
+
+count = eb_booklist_book_count(&bl);
+for (i = 0; i < count; i++) {
+    if (eb_booklist_book_name(&bl, i, &name) != EB_SUCCESS) {
+        printf("eb_booklist_book_name(%d) failed\n", i);
+        return;
+    }
+    if (eb_booklist_book_title(&bl, i, &title) != EB_SUCCESS) {
+        printf("eb_booklist_book_title(%d) failed\n", i);
+        return;
+    }
+    printf("name = %s, title = %s\n", name, title);
+}
+
+
+ +

+EB_BookList ֥ȤȤä顢ɬ +Ԥޤ +

+ +
+
+eb_finalize_booklist(&bl);
+eb_finalize_booklist(bl_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_booklist() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(bl_pointer);
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

EB_BookList

+ +

+EB_BookList ϡEBNET о夬ȤäƤҤ +appendix ΰݤѤ륪ȤηǤ +

+ +

+EB_BookList ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_booklist() Ƥǽɬפ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

void eb_initialize_booklist (EB_BookList *bl)

+ +

+ؿ eb_initialize_booklist() ϡbl λؤ +EB_BookList ֥Ȥޤ +EB_BookList ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_booklist() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind_booklist (EB_BookList *bl, const char *path)

+ +

+ؿ eb_bind_booklist() ϡapp λؤ +EB_BookList ֥Ȥ򡢱֥һ path +ǻꤵ줿 EBNET Ф˷դޤ +

+ +

+֥ȤǤ˥Ф˷դƤ硢ΥФȤηդ +򤤤Ƥ顢path ˤ륵Ф˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ֥Ȥ򥵡ФȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +ޤ̾ꤷƤʤ֥һҤǤʤФʤޤ +ʳηȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ +

+ѤƤ EB 饤֥ΥХʥ꤬֥бΤΤ +硢EB_ERR_EBNET_UNSUPPORTED ֤ޤ +

+ + +

void eb_finalize_booklist (EB_BookList *bl)

+ +

+ؿ eb_finalize_booklist() ϡbl ؤ +EB_BookList ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ EBNET ФȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_booklist() Ƥ +Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_booklist_book_count (EB_BookList *bl)

+ +

+ؿ eb_booklist_book_count() ϡEBNET Ф +饤ȤФƥĤƤҤ appendix ǡο +ޤ +

+ +

bl λؤ EB_BookList ֥Ȥϡ +餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +

+ + +

EB_Error_Code eb_booklist_book_name (EB_BookList *bl, int i, char **name)

+ +

EB_Error_Code eb_booklist_book_title (EB_BookList *bl, int i, char **title)

+ +

+ؿ eb_booklist_book_name() ϡEBNET ФνҤ +appendix ǡ̾Τޤ +Ǹ̾ΡפȤϡ֥̻Ҥǻꤹ̾ΤȤǤ +Ĥޤꡢebnet://localhost/dict dict ʬ +ؤޤ +Ʊͤˡؿ eb_booklist_book_title() ϡҤ appendix +̾ޤ +

+ +

+δؿ⡢EBNET оβܤνҤ⤷ appendix ξ +Τ򡢰 i ǻꤷޤ +Ƭ 1 ܤǤϤʤ 0 ܤˤʤޤ +

+ +

+ȡؿϽҤ̾Ρ̾ؤΥݥ󥿤 *name, +*title ˽񤭹ߡEB_SUCCESS ֤ޤ +ʤΥݥͤ ֥ bl ݻƤ +ʸؤ褦ˤʤäƤޤ +bl Ф eb_finalize_booklist() Ƥ +ޤȡʸ⻲ԲǽˤʤäƤޤޤΤǡդƲ +

+ +

bl λؤ EB_BookList ֥ +ϡ餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +ޤi 0 ʾ夫ĥФ󶡤ƤҤ appendix +̤ǤʤФʤޤ +ʳͤΤȤϡEB_ERR_NO_SUCH_BOOK ֤ޤ +

+ + +

ץץ

+ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     booklist <remote-access-ideintifier>
+ * :
+ *     booklist ebnet://localhost
+ * :
+ *     <remote-access-ideintifier> ǻꤷ EBNET Ф³
+ *     ơФ󶡤ҡappendix ΰɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/booklist.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_BookList bl;
+    int book_count;
+    char *name, *title;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path remote-access-identifier\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `bl' */
+    eb_initialize_library();
+    eb_initialize_booklist(&bl);
+
+    /* EBNET Ф `bl' ˷դ롣*/
+    error_code = eb_bind_booklist(&bl, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the EBNET server, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* оνҡappendix θĿ*/
+    error_code = eb_booklist_book_count(&bl, &book_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the number of books, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    for (i = 0; i < book_count; i++) {
+        /* ҡappendix ̾Τ*/
+        error_code = eb_booklist_book_name(&bl, i, &name);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book name #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ҡappendix ̾*/
+        error_code = eb_booklist_book_name(&bl, i, &title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book title #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        printf("%-20s  %s\n", name, title);
+    }
+        
+    /* `bl'  EB 饤֥Ѥλ*/
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(1);
+}
+
+
+ + +

+ + +

ǡκ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ +
+
A +
Appendix +
B +
Book +
BookList +
D +
Disc_Code +
E +
EB_Character_Code +
Error_Code +
F +
Font_Code +
H +
Hit +
Hook +
Hook_Code +
Hookset +
M +
Multi_Search_Code +
P +
Position +
S +
Subbook_Code +
+ + +

ؿκ

+ +

+ؿ̾Ƭ eb_ ϾάƤޤ +

+ +
+
A +
appendix_path +
appendix_subbook +
appendix_subbook_directory +
appendix_subbook_directory2 +
appendix_subbook_list +
B +
backward_narrow_alt_character +
backward_narrow_font_character +
backward_text +
backward_wide_alt_character +
backward_wide_font_character +
bind +
bind_appendix +
bind_booklist +
bitmap_to_bmp +
bitmap_to_gif +
bitmap_to_png +
bitmap_to_xbm +
bitmap_to_xpm +
booklist_book_count +
booklist_book_name +
booklist_book_title +
C +
character_code +
compose_movie_file_name +
compose_movie_path_name +
copyright +
current_candidate +
D +
decompose_movie_file_name +
disc_type +
E +
error_message +
error_string +
F +
finalize_appendix +
finalize_book +
finalize_booklist +
finalize_hookset +
finalize_library +
font +
font_height +
font_height2 +
font_list +
forward_heading +
forward_narrow_font_character +
forward_text +
forward_wide_font_character +
H +
have_copyright +
have_endword_search +
have_exactword_search +
have_font +
have_keyword_search +
have_menu +
have_multi_search +
have_narrow_alt +
have_narrow_font +
have_stop_code +
have_text +
have_wide_alt +
have_wide_font +
have_word_search +
hit_list +
hook_empty +
hook_euc_to_ascii +
hook_narrow_character_text +
hook_newline +
hook_wide_character_text +
I +
initialize_appendix +
initialize_book +
initialize_booklist +
initialize_hookset +
initialize_library +
is_appendix_bound +
is_bound +
is_text_stopped +
L +
load_all_appendix_subbooks +
load_all_subbooks +
M +
menu +
multi_entry_candidates +
multi_entry_count +
multi_entry_have_candidates +
multi_entry_label +
multi_search_list +
multi_title +
N +
narrow_alt_character_text +
narrow_alt_end +
narrow_alt_start +
narrow_font_bmp_size +
narrow_font_character_bitmap +
narrow_font_end +
narrow_font_gif_size +
narrow_font_png_size +
narrow_font_size +
narrow_font_size2 +
narrow_font_start +
narrow_font_width +
narrow_font_width2 +
narrow_font_xbm_size +
narrow_font_xpm_size +
P +
path +
R +
read_binary +
read_heading +
read_rawtext +
read_text +
S +
search_cross +
search_endword +
search_exactword +
search_keyword +
search_multi +
search_word +
seek_text +
set_appendix_subbook +
set_binary_color_graphic +
set_binary_mono_graphic +
set_binary_mpeg +
set_binary_wave +
set_font +
set_hook +
set_hooks +
set_subbook +
stop_code +
subbook +
subbook_directory +
subbook_directory2 +
subbook_list +
subbook_title +
subbook_title2 +
T +
tell_text +
text +
U +
unset_appendix_subbook +
unset_font +
unset_subbook +
W +
wide_alt_character_text +
wide_alt_end +
wide_alt_start +
wide_font_bmp_size +
wide_font_character_bitmap +
wide_font_end +
wide_font_gif_size +
wide_font_png_size +
wide_font_size +
wide_font_size2 +
wide_font_start +
wide_font_width +
wide_font_width2 +
wide_font_xbm_size +
wide_font_xpm_size +
write_text +
write_text_byte1 +
write_text_byte2 +
write_text_string +
+ + +

κ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ +
+
E +
ERR_BAD_DIR_NAME +
ERR_BAD_FILE_NAME +
ERR_BAD_WORD +
ERR_DIFF_CONTENT +
ERR_EBNET_FAIL_CONNECT +
ERR_EBNET_NO_PERMISSION +
ERR_EBNET_SERVER_BUSY +
ERR_EBNET_UNSUPPORTED +
ERR_EMPTY_WORD +
ERR_END_OF_CONTENT +
ERR_FAIL_GETCWD +
ERR_FAIL_OPEN_APP +
ERR_FAIL_OPEN_BINARY +
ERR_FAIL_OPEN_CAT +
ERR_FAIL_OPEN_CATAPP +
ERR_FAIL_OPEN_FONT +
ERR_FAIL_OPEN_TEXT +
ERR_FAIL_READ_APP +
ERR_FAIL_READ_BINARY +
ERR_FAIL_READ_CAT +
ERR_FAIL_READ_CATAPP +
ERR_FAIL_READ_FONT +
ERR_FAIL_READ_TEXT +
ERR_FAIL_SEEK_APP +
ERR_FAIL_SEEK_BINARY +
ERR_FAIL_SEEK_CAT +
ERR_FAIL_SEEK_CATAPP +
ERR_FAIL_SEEK_FONT +
ERR_FAIL_SEEK_TEXT +
ERR_MEMORY_EXHAUSTED +
ERR_NO_APPSUB +
ERR_NO_CANDIDATES +
ERR_NO_CUR_APPSUB +
ERR_NO_CUR_BINARY +
ERR_NO_CUR_FONT +
ERR_NO_CUR_SUB +
ERR_NO_FONT +
ERR_NO_PREV_SEARCH +
ERR_NO_PREV_SEEK +
ERR_NO_SUB +
ERR_NO_SUCH_APPSUB +
ERR_NO_SUCH_BINARY +
ERR_NO_SUCH_BOOK +
ERR_NO_SUCH_CHAR_BMP +
ERR_NO_SUCH_CHAR_TEXT +
ERR_NO_SUCH_ENTRY_ID +
ERR_NO_SUCH_FONT +
ERR_NO_SUCH_HOOK +
ERR_NO_SUCH_MULTI_ID +
ERR_NO_SUCH_SEARCH +
ERR_NO_SUCH_SUB +
ERR_NO_TEXT +
ERR_NO_WORD +
ERR_TOO_LONG_FILE_NAME +
ERR_TOO_LONG_WORD +
ERR_TOO_MANY_WORDS +
ERR_UNBOUND_APP +
ERR_UNBOUND_BOOK +
ERR_UNBOUND_BOOKLIST +
ERR_UNEXP_APP +
ERR_UNEXP_BINARY +
ERR_UNEXP_CAT +
ERR_UNEXP_CATAPP +
ERR_UNEXP_FONT +
ERR_UNEXP_TEXT +
H +
HEIGHT_NARROW_FONT_16 +
HEIGHT_NARROW_FONT_24 +
HEIGHT_NARROW_FONT_30 +
HEIGHT_NARROW_FONT_48 +
HEIGHT_WIDE_FONT_16 +
HEIGHT_WIDE_FONT_24 +
HEIGHT_WIDE_FONT_30 +
HEIGHT_WIDE_FONT_48 +
HOOK_BEGIN_CANDIDATE +
HOOK_BEGIN_CLICKABLE_AREA +
HOOK_BEGIN_COLOR_BMP +
HOOK_BEGIN_COLOR_JPEG +
HOOK_BEGIN_DECORATION +
HOOK_BEGIN_EMPHASIS +
HOOK_BEGIN_GRAY_GRAPHIC +
HOOK_BEGIN_IN_COLOR_BMP +
HOOK_BEGIN_IN_COLOR_JPEG +
HOOK_BEGIN_KEYWORD +
HOOK_BEGIN_MONO_GRAPHIC +
HOOK_BEGIN_MPEG +
HOOK_BEGIN_NARROW +
HOOK_BEGIN_NO_NEWLINE +
HOOK_BEGIN_REFERENCE +
HOOK_BEGIN_SUBSCRIPT +
HOOK_BEGIN_SUPERSCRIPT +
HOOK_BEGIN_WAVE +
HOOK_END_CANDIDATE_GROUP +
HOOK_END_CANDIDATE_LEAF +
HOOK_END_CLICKABLE_AREA +
HOOK_END_COLOR_GRAPHIC +
HOOK_END_DECORATION +
HOOK_END_EMPHASIS +
HOOK_END_GRAY_GRAPHIC +
HOOK_END_IN_COLOR_GRAPHIC +
HOOK_END_KEYWORD +
HOOK_END_MONO_GRAPHIC +
HOOK_END_MPEG +
HOOK_END_NARROW +
HOOK_END_NO_NEWLINE +
HOOK_END_REFERENCE +
HOOK_END_SUBSCRIPT +
HOOK_END_SUPERSCRIPT +
HOOK_END_WAVE +
HOOK_GB2312 +
HOOK_INITIALIZE +
HOOK_ISO8859_1 +
HOOK_NARROW_FONT +
HOOK_NARROW_JISX0208 +
HOOK_NEWLINE +
HOOK_NULL +
HOOK_SET_INDENT +
HOOK_WIDE_FONT +
HOOK_WIDE_JISX0208 +
S +
SIZE_NARROW_FONT_16 +
SIZE_NARROW_FONT_16_BMP +
SIZE_NARROW_FONT_16_GIF +
SIZE_NARROW_FONT_16_PNG +
SIZE_NARROW_FONT_16_XBM +
SIZE_NARROW_FONT_16_XPM +
SIZE_NARROW_FONT_24 +
SIZE_NARROW_FONT_24_BMP +
SIZE_NARROW_FONT_24_GIF +
SIZE_NARROW_FONT_24_PNG +
SIZE_NARROW_FONT_24_XBM +
SIZE_NARROW_FONT_24_XPM +
SIZE_NARROW_FONT_30 +
SIZE_NARROW_FONT_30_BMP +
SIZE_NARROW_FONT_30_GIF +
SIZE_NARROW_FONT_30_PNG +
SIZE_NARROW_FONT_30_XBM +
SIZE_NARROW_FONT_30_XPM +
SIZE_NARROW_FONT_48 +
SIZE_NARROW_FONT_48_BMP +
SIZE_NARROW_FONT_48_GIF +
SIZE_NARROW_FONT_48_PNG +
SIZE_NARROW_FONT_48_XBM +
SIZE_NARROW_FONT_48_XPM +
SIZE_WIDE_FONT_16 +
SIZE_WIDE_FONT_16_BMP +
SIZE_WIDE_FONT_16_GIF +
SIZE_WIDE_FONT_16_PNG +
SIZE_WIDE_FONT_16_XBM +
SIZE_WIDE_FONT_16_XPM +
SIZE_WIDE_FONT_24 +
SIZE_WIDE_FONT_24_BMP +
SIZE_WIDE_FONT_24_GIF +
SIZE_WIDE_FONT_24_PNG +
SIZE_WIDE_FONT_24_XBM +
SIZE_WIDE_FONT_24_XPM +
SIZE_WIDE_FONT_30 +
SIZE_WIDE_FONT_30_BMP +
SIZE_WIDE_FONT_30_GIF +
SIZE_WIDE_FONT_30_PNG +
SIZE_WIDE_FONT_30_XBM +
SIZE_WIDE_FONT_30_XPM +
SIZE_WIDE_FONT_48 +
SIZE_WIDE_FONT_48_BMP +
SIZE_WIDE_FONT_48_GIF +
SIZE_WIDE_FONT_48_PNG +
SIZE_WIDE_FONT_48_XBM +
SIZE_WIDE_FONT_48_XPM +
SUCCESS +
W +
WIDTH_NARROW_FONT_16 +
WIDTH_NARROW_FONT_24 +
WIDTH_NARROW_FONT_30 +
WIDTH_NARROW_FONT_48 +
WIDTH_WIDE_FONT_16 +
WIDTH_WIDE_FONT_24 +
WIDTH_WIDE_FONT_30 +
WIDTH_WIDE_FONT_48 +
+ + + diff --git a/lib/ebu/doc/eb-index-const.html b/lib/ebu/doc/eb-index-const.html new file mode 100644 index 0000000..568ff2c --- /dev/null +++ b/lib/ebu/doc/eb-index-const.html @@ -0,0 +1,181 @@ +
+
E +
ERR_BAD_DIR_NAME +
ERR_BAD_FILE_NAME +
ERR_BAD_WORD +
ERR_DIFF_CONTENT +
ERR_EBNET_FAIL_CONNECT +
ERR_EBNET_NO_PERMISSION +
ERR_EBNET_SERVER_BUSY +
ERR_EBNET_UNSUPPORTED +
ERR_EMPTY_WORD +
ERR_END_OF_CONTENT +
ERR_FAIL_GETCWD +
ERR_FAIL_OPEN_APP +
ERR_FAIL_OPEN_BINARY +
ERR_FAIL_OPEN_CAT +
ERR_FAIL_OPEN_CATAPP +
ERR_FAIL_OPEN_FONT +
ERR_FAIL_OPEN_TEXT +
ERR_FAIL_READ_APP +
ERR_FAIL_READ_BINARY +
ERR_FAIL_READ_CAT +
ERR_FAIL_READ_CATAPP +
ERR_FAIL_READ_FONT +
ERR_FAIL_READ_TEXT +
ERR_FAIL_SEEK_APP +
ERR_FAIL_SEEK_BINARY +
ERR_FAIL_SEEK_CAT +
ERR_FAIL_SEEK_CATAPP +
ERR_FAIL_SEEK_FONT +
ERR_FAIL_SEEK_TEXT +
ERR_MEMORY_EXHAUSTED +
ERR_NO_APPSUB +
ERR_NO_CANDIDATES +
ERR_NO_CUR_APPSUB +
ERR_NO_CUR_BINARY +
ERR_NO_CUR_FONT +
ERR_NO_CUR_SUB +
ERR_NO_FONT +
ERR_NO_PREV_SEARCH +
ERR_NO_PREV_SEEK +
ERR_NO_SUB +
ERR_NO_SUCH_APPSUB +
ERR_NO_SUCH_BINARY +
ERR_NO_SUCH_BOOK +
ERR_NO_SUCH_CHAR_BMP +
ERR_NO_SUCH_CHAR_TEXT +
ERR_NO_SUCH_ENTRY_ID +
ERR_NO_SUCH_FONT +
ERR_NO_SUCH_HOOK +
ERR_NO_SUCH_MULTI_ID +
ERR_NO_SUCH_SEARCH +
ERR_NO_SUCH_SUB +
ERR_NO_TEXT +
ERR_NO_WORD +
ERR_TOO_LONG_FILE_NAME +
ERR_TOO_LONG_WORD +
ERR_TOO_MANY_WORDS +
ERR_UNBOUND_APP +
ERR_UNBOUND_BOOK +
ERR_UNBOUND_BOOKLIST +
ERR_UNEXP_APP +
ERR_UNEXP_BINARY +
ERR_UNEXP_CAT +
ERR_UNEXP_CATAPP +
ERR_UNEXP_FONT +
ERR_UNEXP_TEXT +
H +
HEIGHT_NARROW_FONT_16 +
HEIGHT_NARROW_FONT_24 +
HEIGHT_NARROW_FONT_30 +
HEIGHT_NARROW_FONT_48 +
HEIGHT_WIDE_FONT_16 +
HEIGHT_WIDE_FONT_24 +
HEIGHT_WIDE_FONT_30 +
HEIGHT_WIDE_FONT_48 +
HOOK_BEGIN_CANDIDATE +
HOOK_BEGIN_CLICKABLE_AREA +
HOOK_BEGIN_COLOR_BMP +
HOOK_BEGIN_COLOR_JPEG +
HOOK_BEGIN_DECORATION +
HOOK_BEGIN_EMPHASIS +
HOOK_BEGIN_GRAY_GRAPHIC +
HOOK_BEGIN_IN_COLOR_BMP +
HOOK_BEGIN_IN_COLOR_JPEG +
HOOK_BEGIN_KEYWORD +
HOOK_BEGIN_MONO_GRAPHIC +
HOOK_BEGIN_MPEG +
HOOK_BEGIN_NARROW +
HOOK_BEGIN_NO_NEWLINE +
HOOK_BEGIN_REFERENCE +
HOOK_BEGIN_SUBSCRIPT +
HOOK_BEGIN_SUPERSCRIPT +
HOOK_BEGIN_WAVE +
HOOK_END_CANDIDATE_GROUP +
HOOK_END_CANDIDATE_LEAF +
HOOK_END_CLICKABLE_AREA +
HOOK_END_COLOR_GRAPHIC +
HOOK_END_DECORATION +
HOOK_END_EMPHASIS +
HOOK_END_GRAY_GRAPHIC +
HOOK_END_IN_COLOR_GRAPHIC +
HOOK_END_KEYWORD +
HOOK_END_MONO_GRAPHIC +
HOOK_END_MPEG +
HOOK_END_NARROW +
HOOK_END_NO_NEWLINE +
HOOK_END_REFERENCE +
HOOK_END_SUBSCRIPT +
HOOK_END_SUPERSCRIPT +
HOOK_END_WAVE +
HOOK_GB2312 +
HOOK_INITIALIZE +
HOOK_ISO8859_1 +
HOOK_NARROW_FONT +
HOOK_NARROW_JISX0208 +
HOOK_NEWLINE +
HOOK_NULL +
HOOK_SET_INDENT +
HOOK_WIDE_FONT +
HOOK_WIDE_JISX0208 +
S +
SIZE_NARROW_FONT_16 +
SIZE_NARROW_FONT_16_BMP +
SIZE_NARROW_FONT_16_GIF +
SIZE_NARROW_FONT_16_PNG +
SIZE_NARROW_FONT_16_XBM +
SIZE_NARROW_FONT_16_XPM +
SIZE_NARROW_FONT_24 +
SIZE_NARROW_FONT_24_BMP +
SIZE_NARROW_FONT_24_GIF +
SIZE_NARROW_FONT_24_PNG +
SIZE_NARROW_FONT_24_XBM +
SIZE_NARROW_FONT_24_XPM +
SIZE_NARROW_FONT_30 +
SIZE_NARROW_FONT_30_BMP +
SIZE_NARROW_FONT_30_GIF +
SIZE_NARROW_FONT_30_PNG +
SIZE_NARROW_FONT_30_XBM +
SIZE_NARROW_FONT_30_XPM +
SIZE_NARROW_FONT_48 +
SIZE_NARROW_FONT_48_BMP +
SIZE_NARROW_FONT_48_GIF +
SIZE_NARROW_FONT_48_PNG +
SIZE_NARROW_FONT_48_XBM +
SIZE_NARROW_FONT_48_XPM +
SIZE_WIDE_FONT_16 +
SIZE_WIDE_FONT_16_BMP +
SIZE_WIDE_FONT_16_GIF +
SIZE_WIDE_FONT_16_PNG +
SIZE_WIDE_FONT_16_XBM +
SIZE_WIDE_FONT_16_XPM +
SIZE_WIDE_FONT_24 +
SIZE_WIDE_FONT_24_BMP +
SIZE_WIDE_FONT_24_GIF +
SIZE_WIDE_FONT_24_PNG +
SIZE_WIDE_FONT_24_XBM +
SIZE_WIDE_FONT_24_XPM +
SIZE_WIDE_FONT_30 +
SIZE_WIDE_FONT_30_BMP +
SIZE_WIDE_FONT_30_GIF +
SIZE_WIDE_FONT_30_PNG +
SIZE_WIDE_FONT_30_XBM +
SIZE_WIDE_FONT_30_XPM +
SIZE_WIDE_FONT_48 +
SIZE_WIDE_FONT_48_BMP +
SIZE_WIDE_FONT_48_GIF +
SIZE_WIDE_FONT_48_PNG +
SIZE_WIDE_FONT_48_XBM +
SIZE_WIDE_FONT_48_XPM +
SUCCESS +
W +
WIDTH_NARROW_FONT_16 +
WIDTH_NARROW_FONT_24 +
WIDTH_NARROW_FONT_30 +
WIDTH_NARROW_FONT_48 +
WIDTH_WIDE_FONT_16 +
WIDTH_WIDE_FONT_24 +
WIDTH_WIDE_FONT_30 +
WIDTH_WIDE_FONT_48 +
diff --git a/lib/ebu/doc/eb-index-func.html b/lib/ebu/doc/eb-index-func.html new file mode 100644 index 0000000..4a88019 --- /dev/null +++ b/lib/ebu/doc/eb-index-func.html @@ -0,0 +1,166 @@ +
+
A +
appendix_path +
appendix_subbook +
appendix_subbook_directory +
appendix_subbook_directory2 +
appendix_subbook_list +
B +
backward_narrow_alt_character +
backward_narrow_font_character +
backward_text +
backward_wide_alt_character +
backward_wide_font_character +
bind +
bind_appendix +
bind_booklist +
bitmap_to_bmp +
bitmap_to_gif +
bitmap_to_png +
bitmap_to_xbm +
bitmap_to_xpm +
booklist_book_count +
booklist_book_name +
booklist_book_title +
C +
character_code +
compose_movie_file_name +
compose_movie_path_name +
copyright +
current_candidate +
D +
decompose_movie_file_name +
disc_type +
E +
error_message +
error_string +
F +
finalize_appendix +
finalize_book +
finalize_booklist +
finalize_hookset +
finalize_library +
font +
font_height +
font_height2 +
font_list +
forward_heading +
forward_narrow_font_character +
forward_text +
forward_wide_font_character +
H +
have_copyright +
have_endword_search +
have_exactword_search +
have_font +
have_keyword_search +
have_menu +
have_multi_search +
have_narrow_alt +
have_narrow_font +
have_stop_code +
have_text +
have_wide_alt +
have_wide_font +
have_word_search +
hit_list +
hook_empty +
hook_euc_to_ascii +
hook_narrow_character_text +
hook_newline +
hook_wide_character_text +
I +
initialize_appendix +
initialize_book +
initialize_booklist +
initialize_hookset +
initialize_library +
is_appendix_bound +
is_bound +
is_text_stopped +
L +
load_all_appendix_subbooks +
load_all_subbooks +
M +
menu +
multi_entry_candidates +
multi_entry_count +
multi_entry_have_candidates +
multi_entry_label +
multi_search_list +
multi_title +
N +
narrow_alt_character_text +
narrow_alt_end +
narrow_alt_start +
narrow_font_bmp_size +
narrow_font_character_bitmap +
narrow_font_end +
narrow_font_gif_size +
narrow_font_png_size +
narrow_font_size +
narrow_font_size2 +
narrow_font_start +
narrow_font_width +
narrow_font_width2 +
narrow_font_xbm_size +
narrow_font_xpm_size +
P +
path +
R +
read_binary +
read_heading +
read_rawtext +
read_text +
S +
search_cross +
search_endword +
search_exactword +
search_keyword +
search_multi +
search_word +
seek_text +
set_appendix_subbook +
set_binary_color_graphic +
set_binary_mono_graphic +
set_binary_mpeg +
set_binary_wave +
set_font +
set_hook +
set_hooks +
set_subbook +
stop_code +
subbook +
subbook_directory +
subbook_directory2 +
subbook_list +
subbook_title +
subbook_title2 +
T +
tell_text +
text +
U +
unset_appendix_subbook +
unset_font +
unset_subbook +
W +
wide_alt_character_text +
wide_alt_end +
wide_alt_start +
wide_font_bmp_size +
wide_font_character_bitmap +
wide_font_end +
wide_font_gif_size +
wide_font_png_size +
wide_font_size +
wide_font_size2 +
wide_font_start +
wide_font_width +
wide_font_width2 +
wide_font_xbm_size +
wide_font_xpm_size +
write_text +
write_text_byte1 +
write_text_byte2 +
write_text_string +
diff --git a/lib/ebu/doc/eb-index-type.html b/lib/ebu/doc/eb-index-type.html new file mode 100644 index 0000000..df40ec0 --- /dev/null +++ b/lib/ebu/doc/eb-index-type.html @@ -0,0 +1,25 @@ +
+
A +
Appendix +
B +
Book +
BookList +
D +
Disc_Code +
E +
EB_Character_Code +
Error_Code +
F +
Font_Code +
H +
Hit +
Hook +
Hook_Code +
Hookset +
M +
Multi_Search_Code +
P +
Position +
S +
Subbook_Code +
diff --git a/lib/ebu/doc/eb-sample-appendix.html b/lib/ebu/doc/eb-sample-appendix.html new file mode 100644 index 0000000..9d7a87a --- /dev/null +++ b/lib/ebu/doc/eb-sample-appendix.html @@ -0,0 +1,144 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <appendix-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <appendix-path> ǻꤷ appendix ܤӡ
+ *     ܤƤȾѳʸ򤹤٤ɽޤ
+ *
+ *      appendix ȾѳʸƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/appendix.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Appendix app;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int alt_start;
+    char text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s appendix-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `app' */
+    eb_initialize_library();
+    eb_initialize_appendix(&app);
+
+    /* appendix  `app' ˷դ롣*/
+    error_code = eb_bind_appendix(&app, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the app, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_appendix_subbook_list(&app, subbook_list,
+        &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    if (eb_set_appendix_subbook(&app, subbook_list[subbook_index])
+        < 0) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_alt_start(&app, &alt_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = alt_start;
+    for (;;) {
+        /* ʸ*/
+        error_code = eb_narrow_alt_character_text(&app, i, text);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ʸϡ*/
+        printf("%04x: %s\n", i, text);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_alt_character(&app, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* appendix  EB 饤֥Ѥλ*/
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_appendix(&app);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-booklist.html b/lib/ebu/doc/eb-sample-booklist.html new file mode 100644 index 0000000..463bc00 --- /dev/null +++ b/lib/ebu/doc/eb-sample-booklist.html @@ -0,0 +1,115 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2003-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     booklist <remote-access-ideintifier>
+ * :
+ *     booklist ebnet://localhost
+ * :
+ *     <remote-access-ideintifier> ǻꤷ EBNET Ф³
+ *     ơФ󶡤ҡappendix ΰɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/booklist.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_BookList bl;
+    int book_count;
+    char *name, *title;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path remote-access-identifier\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `bl' */
+    eb_initialize_library();
+    eb_initialize_booklist(&bl);
+
+    /* EBNET Ф `bl' ˷դ롣*/
+    error_code = eb_bind_booklist(&bl, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the EBNET server, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* оνҡappendix θĿ*/
+    error_code = eb_booklist_book_count(&bl, &book_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the number of books, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    for (i = 0; i < book_count; i++) {
+        /* ҡappendix ̾Τ*/
+        error_code = eb_booklist_book_name(&bl, i, &name);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book name #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ҡappendix ̾*/
+        error_code = eb_booklist_book_name(&bl, i, &title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get book title #%d, %s\n",
+                argv[0], i, eb_error_message(error_code));
+            goto die;
+        }
+
+        printf("%-20s  %s\n", name, title);
+    }
+        
+    /* `bl'  EB 饤֥Ѥλ*/
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_booklist(&bl);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-disctype.html b/lib/ebu/doc/eb-sample-disctype.html new file mode 100644 index 0000000..f45d0f6 --- /dev/null +++ b/lib/ebu/doc/eb-sample-disctype.html @@ -0,0 +1,104 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     disctype <book-path>
+ * :
+ *     disctype /cdrom
+ * :
+ *     <book-path> ǻꤵ줿 CD-ROM ҤμबEB  EPWING 
+ *     Ĵ٤ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Disc_Code disc_code;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* `book' Ҥ˷դ롣Ԥ齪λ*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ҤμĴ٤ɽ*/
+    error_code = eb_disc_type(&book, &disc_code);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get disc type, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    if (disc_code == EB_DISC_EB) {
+        fputs("EB\n", stdout);
+    } else if (disc_code == EB_DISC_EPWING) {
+        fputs("EPWING\n", stdout);
+    } else {
+        fputs("unknown\n", stdout);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-font.html b/lib/ebu/doc/eb-sample-font.html new file mode 100644 index 0000000..9361996 --- /dev/null +++ b/lib/ebu/doc/eb-sample-font.html @@ -0,0 +1,164 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2002-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     font <book-path> <subbook-index>
+ * :
+ *     font /cdrom 0
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡ
+ *     ܤƤȾѳ (⤵ 16 ԥ) 򤹤٤ƥ
+ *     Ȥɽޤ
+ *
+ *     ܤ⤵ 16 ԥȾѳƤʤȡ
+ *     顼ˤʤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/font.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    int font_start;
+    unsigned char bitmap[EB_SIZE_NARROW_FONT_16];
+    int i, j;
+
+    /* ޥɹ԰å*/
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s book-path subbook-index\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /*ָߤγ礭פꡣ*/
+    if (eb_set_font(&book, EB_FONT_16) < 0) {
+        fprintf(stderr, "%s: failed to set the font size, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* γϰ֤*/
+    error_code = eb_narrow_font_start(&book, &font_start);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get font information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = font_start;
+    for (;;) {
+        /* Υӥåȥޥåץǡ*/
+        error_code = eb_narrow_font_character_bitmap(&book, i,
+            (char *)bitmap);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get font data, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+
+        /* ӥåȥޥåפ򥢥Ȥˤƽϡ*/
+        printf("code point=%04x\n", i);
+        for (j = 0; j < 16; j++) {
+            fputc((bitmap[j] & 0x80) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x40) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x20) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x10) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x08) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x04) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x02) ? '*' : ' ', stdout);
+            fputc((bitmap[j] & 0x01) ? '*' : ' ', stdout);
+            fputc('\n', stdout);
+        }
+        fputs("--------\n", stdout);
+
+        /* ʸֹĿʤ롣*/
+        error_code = eb_forward_narrow_font_character(&book, 1, &i);
+        if (error_code != EB_SUCCESS)
+            break;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-initexit.html b/lib/ebu/doc/eb-sample-initexit.html new file mode 100644 index 0000000..0c4413f --- /dev/null +++ b/lib/ebu/doc/eb-sample-initexit.html @@ -0,0 +1,64 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 2001-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     initexit
+ * :
+ *     initexit
+ * :
+ *     EB 饤֥ν򤷤Ƥߤޤ
+ *     ץγ¦鸫Сϲΰ̣ʤưǤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+
+    /* EB 饤֥*/
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        exit(1);
+    }
+
+    /* EB 饤֥Ѥλ*/
+    eb_finalize_library();
+    exit(0);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-subbook.html b/lib/ebu/doc/eb-sample-subbook.html new file mode 100644 index 0000000..b2b1508 --- /dev/null +++ b/lib/ebu/doc/eb-sample-subbook.html @@ -0,0 +1,110 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     subbook <book-path>
+ * :
+ *     subbook /cdrom
+ * :
+ *     <boook-path> ǻꤵ CD-ROM Ҥ˴ޤޤƤ뤹٤Ƥܤ
+ *     ̾ɽޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    char title[EB_MAX_TITLE_LENGTH + 1];
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s book-path\n", argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    error_code = eb_initialize_library();
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* Ҥ˴ޤޤƤܤ̾ϡ*/
+    for (i = 0; i < subbook_count; i++) {
+        error_code = eb_subbook_title2(&book, subbook_list[i], title);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get the title, %s\n",
+                argv[0], eb_error_message(error_code));
+            continue;
+        }
+        printf("%d: %s\n", i, title);
+    }
+
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-text.html b/lib/ebu/doc/eb-sample-text.html new file mode 100644 index 0000000..4ecbb6a --- /dev/null +++ b/lib/ebu/doc/eb-sample-text.html @@ -0,0 +1,163 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     text <book-path> <subbook-index> <number>
+ * :
+ *     text /cdrom 0 10
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤӡʸ
+ *     Ƭ <number> ʬñϤޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAXLEN_TEXT 1023
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    int subbook_count;
+    int subbook_index;
+    EB_Position text_position;
+    char text[MAXLEN_TEXT + 1];
+    ssize_t text_length;
+    int text_count;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index number\n",
+            argv[0]);
+        exit(1);
+    }
+    text_count = atoi(argv[3]);
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤγϰ֤*/
+    error_code = eb_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get text information, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ƥȤ򥷡*/
+    error_code = eb_seek_text(&book, &text_position);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to seek text, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    i = 0;
+    while (i < text_count) {
+        /* ƥȤ*/
+        error_code = eb_read_text(&book, NULL, NULL, NULL, MAXLEN_TEXT,
+            text, &text_length);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        fputs(text, stdout);
+
+        if (!eb_is_text_stopped(&book))
+            continue;
+
+        fputs("\n----------------------------------------\n", stdout);
+
+        /* ñذư*/
+        error_code = eb_forward_text(&book, NULL);
+        if (error_code == EB_ERR_END_OF_CONTENT)
+            fputs("\n[END]\n", stdout);
+        else if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to read text, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        i++;
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-sample-word.html b/lib/ebu/doc/eb-sample-word.html new file mode 100644 index 0000000..eccf2df --- /dev/null +++ b/lib/ebu/doc/eb-sample-word.html @@ -0,0 +1,159 @@ +
+
+/*                                                            -*- C -*-
+ * Copyright (c) 1999-2006  Motoyuki Kasahara
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * ˡ:
+ *     word <book-path> <subbook-index> <word>
+ * :
+ *     word /cdrom 0 apple
+ * :
+ *     <book-path> ǻꤷ CD-ROM Ҥܤ椫 <word>
+ *     Ȥñ׸õҥåȤ٤ƤΥȥ
+ *     Фɽޤ
+ *
+ *     <subbook-index> ˤϡоݤܤΥǥåꤷ
+ *     ǥåϡҤκǽܤ 012 ... 
+ *     ʤޤ
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <eb/eb.h>
+#include <eb/error.h>
+#include <eb/text.h>
+
+#define MAX_HITS 50
+#define MAXLEN_HEADING 127
+
+int
+main(int argc, char *argv[])
+{
+    EB_Error_Code error_code;
+    EB_Book book;
+    EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS];
+    EB_Hit hits[MAX_HITS];
+    char heading[MAXLEN_HEADING + 1];
+    int subbook_count;
+    int subbook_index;
+    int hit_count;
+    ssize_t heading_length;
+    int i;
+
+    /* ޥɹ԰å*/
+    if (argc != 4) {
+        fprintf(stderr, "Usage: %s book-path subbook-index word\n",
+            argv[0]);
+        exit(1);
+    }
+
+    /* EB 饤֥ `book' */
+    eb_initialize_library();
+    eb_initialize_book(&book);
+
+    /* Ҥ `book' ˷դ롣*/
+    error_code = eb_bind(&book, argv[1]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[1]);
+        goto die;
+    }
+
+    /* ܤΰ*/
+    error_code = eb_subbook_list(&book, subbook_list, &subbook_count);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ܤΥǥå*/
+    subbook_index = atoi(argv[2]);
+
+    /*ָߤ (current subbook)פꡣ*/
+    error_code = eb_set_subbook(&book, subbook_list[subbook_index]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to set the current subbook, %s\n",
+            argv[0], eb_error_message(error_code));
+        goto die;
+    }
+
+    /* ñ측ΥꥯȤС*/
+    error_code = eb_search_exactword(&book, argv[3]);
+    if (error_code != EB_SUCCESS) {
+        fprintf(stderr, "%s: failed to search for the word, %s: %s\n",
+            argv[0], eb_error_message(error_code), argv[3]);
+        goto die;
+    }
+
+    for (;;) {
+        /* ĤäƤҥåȥȥ*/
+        error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+        if (error_code != EB_SUCCESS) {
+            fprintf(stderr, "%s: failed to get hit entries, %s\n",
+                argv[0], eb_error_message(error_code));
+            goto die;
+        }
+        if (hit_count == 0)
+            break;
+
+        for (i = 0; i < hit_count; i++) {
+            /* Фΰ֤ذư*/
+            error_code = eb_seek_text(&book, &(hits[i].heading));
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to seek the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+
+            /* Фɽ*/
+            error_code = eb_read_heading(&book, NULL, NULL, NULL,
+                MAXLEN_HEADING, heading, &heading_length);
+            if (error_code != EB_SUCCESS) {
+                fprintf(stderr, "%s: failed to read the subbook, %s\n",
+                    argv[0], eb_error_message(error_code));
+                goto die;
+            }
+            printf("%s\n", heading);
+        }
+    }
+        
+    /* Ҥ EB 饤֥Ѥλ*/
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(0);
+
+    /* 顼ȯǽλȤν*/
+  die:
+    eb_finalize_book(&book);
+    eb_finalize_library();
+    exit(1);
+}
+
+
diff --git a/lib/ebu/doc/eb-toc.html b/lib/ebu/doc/eb-toc.html new file mode 100644 index 0000000..f5f22f5 --- /dev/null +++ b/lib/ebu/doc/eb-toc.html @@ -0,0 +1,127 @@ + diff --git a/lib/ebu/doc/eb.css b/lib/ebu/doc/eb.css new file mode 100644 index 0000000..06131af --- /dev/null +++ b/lib/ebu/doc/eb.css @@ -0,0 +1,51 @@ +body { + color: #000000; + background-color: #ffffff; +} + +td { + border-style: solid; + border-width: 1px; +} + +table { + border-style: solid; + border-width: 2px; +} + +h2 { + color: #000000; + font-size: x-large; + padding: 3px; +} + +h3 { + color: #ffffff; + background-color: #8787a7; + font-size: large; + padding: 5px; + border-style: solid; + border-width: 4px; + border-bottom-color: #3f3f5f; + border-right-color: #3f3f5f; + border-top-color: #dfdfff; + border-left-color: #dfdfff; +} + +h4 { + color: #000000; + background-color: #dfdfff; + font-size: medium; + border-color: #3f3f5f; + border-left-style: solid; + border-bottom-style: solid; + border-left-width: 8px; + border-bottom-width: 2px; + padding: 6px; +} + +blockquote.program { + border-style: dotted; + border-width: 1px; + padding-left: 8px; +} diff --git a/lib/ebu/doc/eb.html b/lib/ebu/doc/eb.html new file mode 100644 index 0000000..ce1a938 --- /dev/null +++ b/lib/ebu/doc/eb.html @@ -0,0 +1,165 @@ + + + + + + + +EB 饤֥ + + + +

+[] [ܼ] +

+
+

EB 饤֥

+

+ʸϡEB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2001-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/eb.html.in b/lib/ebu/doc/eb.html.in new file mode 100644 index 0000000..48bcdc8 --- /dev/null +++ b/lib/ebu/doc/eb.html.in @@ -0,0 +1,9431 @@ + + + + + + + +EB 饤֥ + + + +

EB 饤֥

+

+ʸϡEB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2001-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+EB 饤֥ CD-ROM Ҥ˥뤿 C Υ饤֥Ǥ +UNIX OS Windows (2000ʹ) Υƥư뤳Ȥ +Ǥޤ +

+ +

+EB 饤֥ EB, EBG, EBXA, EBXA-C, S-EBXA EPWING +CD-ROM ҤбƤޤ +ϡܤ䤵Ƥ뼭˻ȤƤޤ +CD-ROM ҼΤ ISO 9660 ˤʤäƤޤΤǡ¾ ISO 9660 +ƱΤǥޥȤ뤳ȤǤޤ +

+ +

+ܽϡEB 饤֥Ȥäƥץꥱץ +ȯԸˡ饤֥λͤ⤷ʸǤ +ơ饤֥θʻȥޥ˥奢Ǥ⤢ޤ +ɤ߿ʤˤäơɼԤ EB 饤֥ꤪ CD-ROM Ҥ¤ +ˤĤΤäƤɬפϤޤ󤬡Żҥ֥å EPWING Ѥơ +ºݤ CD-ROM ҤɤΤ褦ʤΤ򤷤ƤȤᤷޤ +ޤC ˤץߥ󥰤ˤĤƤϡʬ򤷤Ƥ뤳Ȥ +Ȥޤ +

+ +

+ܽƤ˱ä EB 饤֥Ȥäץꥱץ +ˤϡѤΥƥ EB 饤֥ C ѥ +󥹥ȡ뤷ƤƲ +ʤܽǤϼ UNIX OS ѤˤĤơҤƤޤ +

+ +

+EB 饤֥ϥե꡼եȥǤɤӥХʥ + Modified BSD 饤󥹤βǻѤ뤳ȤǽǤ +(С 4.1 ΤΤϡGPL ѤƤޤ) +ܤϡɤ°Ƥ COPYING ȤʸΥե򻲾 +Ʋ +

+ + +

Żҥ֥å EPWING ˤĤ

+ +

+Żҥ֥å EPWING ϡܤǻȤƤŻҽҤ +ǡ̾ΤǡCD-ROM ˼᤿ǿνҤΤƤޤ +CD-ROM ISO 9660 ʤΤǡCD-ROM ɥ饤֤륷ƥǤС +ưפ˥뤳ȤǤޤ +ŻҽҤΥǡȤϤäƤ⡢ºݤϼò¤Ȥʤä +ꡢΤƤҤ⼭बŪ¿褦Ǥ +

+ +

+Żҥ֥åEPWING Ȥˡǡ˴ؤ뵬ʤƤϰ̸ +ޤ󤬡EPWING ĤƤϵʤΰܹȵ JIS X 4081 +ŻҽǸǡ¤פȤƸƤޤ +ˡEPWING Żҥ֥åΥǡϡƤ뤳ȤΤ +ޤ +

+ +

+EB 饤֥γȯԤ⡢Żҥ֥åEPWING ʤƤΤޤ +EB 饤֥Ǥ JIS X 4081 εҤȤˡŻҥ֥åEPWING ɤ +褦ˤƤޤ +ʤ顢ʤƤʬʤ֤dzȯƤ뤿ᡢǰʤ +ɤʤҤ¸ߤޤ +

+ + +

ܽιˤĤ

+ +

+ϡEB 饤֥ħפǤϡEB 饤֥꤬бƤ뵡ǽб +ƤʤǽˤĤơñޤ +ޤ饤֥γά˴ؤơǽΤäƤۤɤȻפ +򤤤ĤƤޤ +

+ +

+˼ξϡ֥ץΥѥˡפǤϡEB 饤֥Ѥ +ץΥѥˡޤ +ܽΥץץ򥳥ѥ뤹뤿ɬפʾ⡢ξϤ +Ƥޤ +

+ +

+ơμξϡ֥饤֥νȸפ餬ºݤ +EB 饤֥Υץߥ󥰤βȤʤޤ +줾ξϤϡΤ褦ᤫ鹽Ƥޤ +ϤˤäƤϰ᤬ʤ⤢ޤ +

+ +
+
+
+ξϤDz⤹뵡ǽ䳵ǰˤĤƤδμEB 饤֥λͤ +פˤĤƲ⤷Ƥޤ + +
ץץ
+
+ֲפǤϥץҤ򼨤Ȥ¿Τǡưǽ +ץΥץ򤳤Ǽޤ + +
ǡξܺ
+
+ǡؿͤʤɤˤĤƤλȥޥ˥奢Ǥ +
+ + +

EB 饤֥ħ

+ +

+˽Ҥ٤褦ˡEB 饤֥ϡŻҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) + EPWING CD-ROM ҤбƤޤ +

+ +

+EB 饤֥ϡ CD-ROM ҤФơνԤȤ +Ǥޤ +

+ +
    +
  • ׸ +
  • ׸ +
  • ׸ +
  • ︡ +
  • ʣ縡 +
  • Фǡμ +
  • ʸǡμ +
  • ˥塼μ +
  • ɽμ +
  • 顼ǥǡμ ( EPWING Τ) +
  • Υǥǡμ +
  • ǡμ +
  • ưǡμ +
+ +

+ξϤǤϡEB 饤֥γפ˴ؤơ餫ΤäƤĺ +ۤɤȻפ뤽¾λˤĤơޤ +

+ + + +

إåե

+ +

+EB 饤֥ˤϡĤΥإåե뤬ѰդƤޤ +

+ +
+
appendix.h
+
+appendix (Ͽ) ˴ϢԤ +
binary.h
+
+Хʥǡ˴ϢԤ +
eb.h
+
+EB 饤֥δܥإåե롣 +
error.h
+
+顼ɤ˴ϢԤ +
font.h
+
+˴ϢԤ +
text.h
+
+ƥȥǡ (ʸФʤ) ˴ϢԤ +
+ +

+ʳˤ⤤ĤΥե뤬󥹥ȡ뤵ޤ˵󤲤 +إåե뤫ɤ߹ޤΤǡץꥱץब +ľɤ߹ɬפϤޤ +

+ +

+ץꥱץϡEB 饤֥ȤݤˤΥإåե +եƬնɤ߹ߤޤ +

+ +
+
+#include <eb/eb.h>
+#include <eb/error.h>
+
+
+ +

+eb.h ǤϤʤeb/eb.h ɤ߹褦ˤƲ +

+ + +

ʸ

+ +

+EB 饤֥ǤϡCD-ROM Υǡʸˤƥץꥱ +ϤݤʸɤꤷƤޤ +

+ +

+EBG (Żҥ֥å) ˤĤƤϡǡ ISO 8859-1 (ƥʸ 1 +ʸ) ǽ񤫤Ƥ뤿ᡢǡΤ ISO 8859-1 +ǹԤޤ + 2 ХȤɽ0x0101 0x1efe ΰѤޤ +(ΰβ 16 ӥåȤ 0x01 0xfe ϰϤѤޤ) +

+ +

+EBG, EBXA-C Żҥ֥å EPWING ˤĤƤϡǡ +JIS X 0208 (ܸΤʴ) ǽ񤫤ƤꡢJIS X 0208 0x2121 +0x7e7e ˥ޥåԥ󥰤0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+
+
+
+娧
+
+
+
+ +

+EB 饤֥Ǥ JIS X 0208 ʬܸ EUC (EUC-JP) ˥󥳡 +ơץꥱȤΤܸ EUC ǹԤޤ +äơJIS X 0208 ʬ 0xa1a1 0xfefe ˥ޥåԥ󥰤ޤ +

+ +

+EBXA-C (漭Żҥ֥å) ˤĤƤϡǡ JIS X 0208 +(ܸΤʴ) GB 2312 (δλ) ǽ񤫤Ƥꡢ +JIS X 0208 0x2121 0x7e7e ˥ޥåԥ󥰡 +GB 2312 0x21a1 0x7efe ˥ޥåԥ󥰤 +0xa121 0xfe7e 򳰻ΰˤƤޤ () +

+ +
+
+̣ӥå
+
+塡ᣱ
+
+
+
+
+ʣɣӡب
+
+
+娧
+̣ӥåȡ
+ᣱ
+
+ǣ¡
+
+
+娧
+
+
+
+ +

+EB 饤֥ǤϡץꥱȤΤ˻Ȥʸɤϡ +ܸ EUC EUC (EUC-ZH) Ǥ +äơΤޤޤǤ JIS X 0208 GB 2312 0xa1a1 0xfefe +ޥåԥ󥰤졢ͤƤޤޤ +ɤ򤹤Τϡץꥱ¦Ƿɬפޤ +(ܤϡ֥եåʸɤδط 򻲾ȤΤ) +

+ +

+Żҥ֥åEPWING ȤˡˤĤƤϡץꥱ¦Ǥɤ +ɬפޤ +ˤĤƾܤ ֳ 򻲾ȤΤȡ +

+ + +

̤줿ҤˤĤ

+ +

+EB 饤֥ϡǡ򰵽̤ƼϿҤ򰷤ȤǤޤ +ΤȤ 4 ΰˡбƤޤ +

+ +
+
ebzip ̷
+
+EB 饤֥ȼΰ̷Ǥ +° ebzip ޥɤȤȡηǰ̤Ҥޤ + +
EPWING V4, V5
+
+Τ EPWING V4, V5 νҤΰˡηǰ̤Τޤ + +
EPWING V6
+
+Τ EPWING V6 νҤΰˡηǰ̤Τޤ +EPWING V4, V5 βɷǤ + +
S-EBXA
+
+Τ S-EBXA νҤΰˡηǰ̤Τޤ +
+ +

+ǡοĹ EB 饤֥¦ǼưŪ˹Ԥ뤿ᡢ +ץꥱץफϡƤҤ̤Ƥ뤫 +ɤʬޤ +ץꥱץϡҤ̤Ƥ뤫ɤǽѤ +ɬפϤޤ +

+ + +

֥ۥȾνҤˤĤ

+ +

+С 4.0 顢EB 饤֥¾ΥۥȤνҤ˥Ǥ +褦ˤʤޤ +

+ +

+֥νϤ٤ EB 饤֥¦ǹԤޤΤǡ +ץꥱץϡҤʬΥۥȾˤ뤫ɤǡ +EB 饤֥θƤӽФѤɬפϤޤ +

+ +

+¾ΥۥȤ饢ȡ®٤٤ʤޤ +ΤᡢΨɤǤ褦ץꥱνˡפ٤ +뤳ȤϤ뤫Τޤ +

+ + +

ƥ׷

+ +

+ץꥱץΥѥѤ륳ѥˤϡ +ANSI (ANSI X3.159-1989, ISO/IEC 9899-1990) бΤΤоݤȤƤޤ +ޤƥˤ POSIX.1 (IEEE Std. 1003.2-1990, ISO/IEC 9945-1:1990) +ʤߴΤΤоݤȤƤޤ +

+ +

+ʤ餯 EB 饤֥ǤϡŤѥ UNIX ϥƥؤб +ʤ˹ԤƤޤС 4.1 бǤڤäƤޤ +ä ANSI бΥѥɬܤǤΤǡդ +

+ + +

ץΥѥˡ

+ +

+ܾϤǤϡEB 饤֥ѤץΥѥλˤĤơ +2 ̤ˡޤ +

+ +

+ܤϡŪʡϤΥץ򥳥ѥ뤹ݤ˸Ƥ +ƤäȤ᤯ѥ뤹뤿ˡǤ +EB 饤֥λȤФŪǴñʥץȤݤϡ +ɤǤ礦 +

+ +

+ܤϡEB 饤֥Ȥ߹ץꥱե꡼եȥ +Ȥƥ꡼ݤ˸ƤˡǤ +EB 饤֥ˤϡGNU Autoconf, Automake, Libtool ʻѤȤߤ +ѰդƤޤΤǡȤäѥˡˤĤޤ +

+ + + +

ƤäȤᤤѥˡ

+ +

+ץꥱץ򥳥ѥ뤹ݤϡإåե +ǥ쥯ȥ֤ C ѥ˶Ƥɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-I ץǰ֤ +ޤ +

+ +
+
+cc -I/usr/local/include -c sample.c
+
+
+ +

+/usr/local/include/eb ǤϤʤΰľꤷޤ +(֥إåե 򻲾ȤΤ) +

+ +

+ˡ󥯤Ƽ¹ԥХʥ빩Ǥ +ʲ˵饤֥ΰ⤷󥯤ޤ +ϡ饤֥Υե̾Ǥ (.a +.so ȤäҤϾά) +

+ +
+
EB 饤֥ (libeb)
+
+EB 饤֥ΤǤΥ饤֥ɬܤǤ + +
zlib (libz)
+
+̤ȿĹԤ饤֥Ǥ +(ܤ @url{http://www.gzip.org/zlib/}) +ebzip ޥɤǰ̤򰷤˻Ȥޤ +Υ饤֥ɬܤǤ +EB 饤֥Υɤˤ zlib ϿƤޤ +ƥ zlib 󥹥ȡ뤵ƤʤСEB 饤֥ +󥹥ȡ뤹ݤˡzlib ⼫ưŪ˥󥹥ȡ뤵ޤ + +
gettext 饤֥ (libintl)
+
+åιݲǽ (NLS) 󶡤饤֥Ǥ +åιݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥ +ϡɬפˤʤ뤫Τޤ +gettext μϲफޤEB 饤֥ǻѤǤΤ +åη GNU gettext ߴΤΤǤ + +åιݲǽͭˤƤǤ⡢OS ɸ C 饤֥ +Ȥ glibc ѤƤ륷ƥǤϡꤹɬפϤޤ + +
iconv 饤֥
+
+ʸѴΥ饤֥Ǥ +gettext 饤֥󥯤硢ɬפȤʤ뤫Τޤ +iconv μⲿफꡢOS ˤäƤϺǽ餫źդƤޤ +
+ +

+ɬפʥ饤֥ե̾ΤC ѥ˻ꤷƤޤ +äơե֤Ƥǥ쥯ȥ֤C ѥ˶ +ɬפ뤫Τޤ +̤ UNIX C ѥǤϡ-L ץǥǥ쥯ȥ +֤ꤷ-l ץǥ饤֥Υե̾ +ޤ +

+ +
+
+cc sample.o -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+ͭ饤֥󥯤ϡ¹Իˤ饤֥ +ѥ碌ƻꤹɬפ뤫Τޤ +

+ +
+
+cc sample.o -R/usr/local/lib -L/usr/local/lib -leb -lz -lintl -liconv
+
+
+ +

+C ѥλȤ˴ؤƤξܺ٤ϡC ѥΥޥ˥奢򻲾 +Ʋ +

+ + +

Autoconf ʻѤѥˡ

+ +

+ȤˡAutoconf, Automake, Libtool ϡ餫ᥤ󥹥ȡ뤷 +Ʋ +Autoconf ϥС 2.50 ʹߤɬפǤ +

+ +

+ޤץꥱץ configure.ac +(⤷ configure.in) ˡιԤäޤ +

+ +
+
+eb_LIB_EB4
+
+
+ +

eb_LIB_EB4 ϡEB 饤֥λѤɬפʰڤ +åԤ configure ˼Υץɲ +ޤ +

+ +
+
+  --with-eb-conf=FILE     eb.conf file is FILE [SYSCONFDIR/eb.conf]
+
+
+ +

+eb.conf ϡEB 饤֥򥤥󥹥ȡ뤷ȤξϿ +եǡ饤֥Ȱ˥󥹥ȡ뤵ޤ +eb_LIB_EB4 ϤΥեɤ߹ǡC ѥ +ϤʤФʤץʤɤξޤ +--eb-conf-file ϡeb.conf Υե̾ +Ū˻ꤹ륪ץǤ +

+ +

eb_LIB_EB4 ϡeb4.m4 Ȥե +󶡤Ƥޤ +EB 饤֥ /usr/local ˥󥹥ȡ뤷ġΥե +Υ󥹥ȡѹƤʤС/usr/local/share/aclocal +˥󥹥ȡ뤵ޤ + eb4.m4 򥽡ɤŬʥǥ쥯ȥβ (Ȥ +m4) ˥ԡƲ +

+ +

+aclocal ޥɤ aclocal.m4 ݤϡ +-I ץǥޥեΥǥ쥯ȥꤷޤ +

+ +
+
+aclocal -I m4
+
+
+ +

+äơȥåץǥ쥯ȥ Makefile.am ˤ +aclocal Ϥץ񤤤Ƥޤ +

+ +
+
+ACLOCAL_AMFLAGS = -I m4
+
+
+ +

+ޤɤΥǥ쥯ȥ Libtool ѥåޤѰդ +ʤСѰդޤ +libtoolize ޥɤ¹ԤƲ +Libtool ѥåɤΥǥ쥯ȥ˥ԡޤ +

+ +
+
+libtoolize
+
+
+ +

+ǸˡѥԤǥ쥯ȥ Makefile.am ե + _LDFLAGS INCLUDES ˡΤ褦ͤɲ +ޤ +

+ +
+
+program_LDFLAGS = $(EBCONF_EBLIBS) $(EBCONF_ZLIBLIBS) $(EBCONF_INTLLIBS)
+INCLUDES = $(EBCONF_EBINCS)
+
+
+ +

+(program_LDFLAGS program ΤȤϡ +ץꥱץμºݤΥޥ̾ˤޤ) +

+ + +

EB 饤֥ΤΥǥХå

+ +

+ּʬäץꥱưʤΤϡҤäȤ +EB 饤֥ΥХǤϤʤ?פȤEB 饤֥ +εưǧȻפȤ뤫Τޤ +

+ +

+Τ褦ʾϡĶѿ EB_DEBUG 򥻥åȤ֤ +ץꥱ¹ԤƤߤƲ +EB 饤֥ɸ२顼ϤˡΤ褦ʥ (ʤ̤Ǥ) +Ϥ褦ˤʤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB] in: eb_load_narrow_font(book=0)
+[EB] out: eb_load_narrow_font()
+[EB] in: eb_load_wide_font(book=0)
+[EB] out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

+ΥϡؿθƤӽФΰ󡢤Ӵؿͤ +Ƥޤ +ebfixlog Ȥ Perl5 ץȤȤȡ뤳 +Ǥޤ +ΥץȤϡEB 饤֥Υɤ misc +ǥ쥯ȥ˼Ƥޤ +

+ +

+ebfixlog ϡޥɹԤΰȤͿ줿ե +(ꤵʤɸ) åǡɤ߹ߡ +Τ褦˻ƽϤޤ +

+ +
+
+[EB] in: eb_set_font(book=0, font_code=0)
+[EB]   in: eb_load_narrow_font(book=0)
+[EB]   out: eb_load_narrow_font()
+[EB]   in: eb_load_wide_font(book=0)
+[EB]   out: eb_load_wide_font()
+[EB] out: eb_set_font() = EB_SUCCESS
+
+
+ +

ebfixlog ץȤϡzio ebnet ȸƤФ롢 +EB 饤֥ǥեϤĽΥɤ߼ΤƤ褦 +ʤäƤޤ +ˤꡢ̤ʤ긺ޤ +

+ +

+zio EB 饤֥٥Ϥνǡˤ˸ƤӽФޤ +θĴ٤ݤ⡢ޤɤ߼ΤƤ饤֥ư +䤹Ǥ礦 +

+ +

+ebfixlog -z ץȤȡzio +åɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ +

+ebnet ϱ֥Ϥʬǡzio ⤵ +̥٥˰֤ޤ +֥εưפȤʳϡɤ߼ΤƤɤȻפޤ +

+ +

+ebfixlog -n ץȤȡebnet, +zio ξΥåɤ߼ΤƤ˽Ϥ褦ˤʤޤ +

+ + +

饤֥νȸ

+ +

+ξϤϡEB 饤֥Υץߥ󥰤ˤĤƤβˤʤޤ +

+ +

+ޤץꥱץफ EB 饤֥Ѥˤϡ +ǽ˥饤֥ɬפޤ +

+ +

+饤֥νԤˤϡeb_initialize_library() +ȤؿƤӽФޤ +

+ +
+
+if (eb_initialize_library() != EB_SUCCESS) {
+    printf("eb_initialize_library() failed\n");
+    exit(1);
+}
+
+
+ +

+Ʊͤˡ饤֥Ȥä顢eb_finalize_library() +ȤؿƤӽФƸ򤷤ޤ +

+ +
+
+eb_finalize_library();
+
+
+ + + +

ץץ

+ + + + +

ؿξܺ

+ +

+ιƤؿȤˤϡeb/eb.h ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_initialize_library ()

+ +

+ؿ eb_initialize_library() ϡEB 饤֥ޤ +ץꥱץϡEB 饤֥¾δؿƤˡɬ +δؿƤɬפޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +硢eb_initialize_library() bindtextdomain() +ƤӽФޤ +äơץꥱץब setlocale() +ƤӽФΤϡδؿƤӽФǤɬפޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+饤֥ˡEB 饤֥¾δؿƤư +̤Ǥ +ޤǤ˽Ѥޤ֤ǡ eb_initialize_library() +ƤǤ⤤ޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_library ()

+ +

+ؿ eb_finalize_library() ϡEB 饤֥Ȥä +ݤθԤޤ +ץꥱץ¦ǻѤ +EB_BookEB_HooksetEB_Appendix ֥ȤθϹԤޤ +֥Ȥˤϡ줾Ѥδؿ +eb_finalize_book()eb_finalize_hookset() +eb_finalize_appendix() ƥ֥ȤФ +ƤǤɬפޤ +

+ +

+饤֥θ򤷤ϡEB 饤֥ΤʤؿƤǤ +ޤ +Ƥư̤Ǥ +

+ + +

CD-ROM Ҥ EB_Book ֥

+ +

+EB 饤֥ǤϡCD-ROM ҤؤΥϡ٤ EB_Book +Υ֥Ȥ𤷤ƹԤޤ +äơۤȤɤΥץꥱץϡܾϤǵҤƤ +ɬפȤϤǤ +

+ +

+ܾϤǤ EB_Book ֥ȤνȤäŪ +갷ˤĤޤ +

+ + + +

EB_Book ֥

+ +

+CD-ROM Ҥإˤϡޤ EB_Book Υ֥Ȥ +Ѱդޤ +Ʊʣ CD-ROM Ҥ˥ʤ顢Ұ˥֥Ȥ +ɬפޤ +

+ +
+
+EB_Book book;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Book *book_pointer;
+
+book_pointer = (EB_Book *) malloc(sizeof(EB_Book));
+
+
+ +

+EB_Book ֥Ȥ (ѿ book + book_pointer λؤΰ) ϤޤƤޤΤǡ +Τǥ֥Ȥޤ +

+ +
+
+eb_initialize_book(&book);
+eb_initialize_book(book_pointer);
+
+
+ +

+eb_initialize() Ϥ EB_Book ֥ +ؤΥݥ󥿤ǤäơEB_Book ֥ȤΤΤǤ +ʤȤդƲ +(EB 饤֥¾δؿ⡢٤ƥ֥Ȥݥ󥿤Ϥޤ) +

+ +

+CD-ROM ҤȤˤϡ³ EB_Book ֥Ȥ +CD-ROM ҤμΤ˷դޤ +ϡؿ eb_bind() ˤäƹԤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥ȡ
+
+
+⡲ʡˡ
+
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind(&book, "/mnt/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+eb_bind() ϤҤΥѥ (Ǥ /mnt/cdrom) +ϽҤΥȥåץǥ쥯ȥꡢĤޤ catalog ޤ +catalogs եΤǥ쥯ȥꤷޤ +

+ +

+EB_Book ֥ȤȤä顢 +eb_finalize_book() ƤǸ򤷤ޤ +֥ȤϽҤȤηդ򤫤줿֤ꡢdzƤ줿 +ϲ졢Ƥե⤹٤Ĥޤ +

+ +
+
+eb_finalize_book(&book);
+eb_finalize_book(book_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_book() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(book_pointer);
+
+
+ + +

֥ۥȤؤ eb_bind()

+ +

+ eb_bind() ѤơEB_Book +֥Ȥ֥ۥȤνҤ˷ӤĤ뤳ȤǤޤ +ˤϡҤΥѥˡ֥Ѥμ̻Ҥꤷޤ +̻ҤϡΤ褦ʷȤޤ +

+ +
+
+ebnet://ۥ:ݡ/̾
+
+
+ +

+ۥ ϱ֥ۥȤ IP ɥ쥹⤷ϥۥ̾Ǥ +IPv6 ɥ쥹ꤹϡɥ쥹 [ +] ǰϤɬפޤ +ݡ ϡΥۥȤԤƤݡȤֹǤ +ۥȤԤƤݡȤɸ 22010 ֤ǤС +ʬϾάǽǤ +

+ +

eb_bind() Υ򵭤ޤ +

+ +
+
+if (eb_bind(&book, "ebnet://localhost/cdrom") != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ + +

ץץ

+ +

+ΥץץǤϡCD-ROM ҤμĴ٤뤿ˡ +eb_disc_code() ȤؿѤƤޤ +δؿˤĤƤϡִؿξܺ١ 򻲾ȤΤȡ +

+ + + + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Book

+ +

+EB_Book ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Book ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Book ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Book ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

EB_Disc_Code

+ +

EB_Disc_Code ϡCD-ROM Ҥηɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_DISC_EB
+
+Żҥ֥å (EB, EBG, EBXA, EBXA-C, S-EBXA) Ǥ뤳Ȥɽޤ + +
EB_DISC_EPWING
+
+EPWING Ǥ뤳Ȥɽޤ + +
EB_DISC_INVALID
+
+ʷͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

EB_Character_Code

+ +

EB_Character_Code ϡCD-ROM ҤǻѤ +ʸɤɽޤ +ߤΤȤͤƤޤ +

+ +
+
EB_CHARCODE_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ѤƤ뤳Ȥɽޤ +Żҥ֥å EBG ϤǤ + +
EB_CHARCODE_JISX0208
+
+JIS X 0208 (ܸΤʴ) ѤƤ뤳Ȥɽޤ +EBG, EBXA-C ʳŻҥ֥å EPWING Ϥ٤ƤǤ + +
EB_CHARCODE_JISX0208_GB2312
+
+JIS X 0208 (ܸΤʴ) GB 2312 (δλ) ʻѤƤ +Ȥɽޤ +Żҥ֥å EBXA-C ϤǤ + +
EB_CHARCODE_INVALID
+
+ʸͤɽޤ +
+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

void eb_initialize_book (EB_Book *book)

+ +

+ؿ eb_initialize_book() ϡbook λؤ +EB_Book ֥Ȥޤ +EB_Book ֥ȤФ EB 饤֥¾δؿƤˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_book() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind (EB_Book *book, const char *path)

+ +

+ؿ eb_bind() ϡbook λؤ EB_Book +֥Ȥ򡢥ѥ path ˤ CD-ROM Ҥ˷դޤ +ѥˤϡҤΥȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +ҤΥȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤ˽Ҥ˷դƤ硢νҤȤηդ +򤤤Ƥ顢path ˤҤ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥ȤҤȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤƤʤƤ +ʤޤ +ˡpath ХѥΤȤϡХѥѴ̤Ĺ +˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

void eb_finalize_book (EB_Book *book)

+ +

+ؿ eb_finalize_book() ϡbook ؤ +EB_Book ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥ȤҤȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_is_bound (EB_Book *book)

+ +

+ؿ eb_is_bound() ϡbook Ҥ˷դƤ뤫 +ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_path (EB_Book *book const char *path)

+ +

+ؿ eb_path() ϡbook ˷դƤҤΥѥ +⤷ϱ֥̻Ҥpath λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡeb_bind() +ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_disc_type (EB_Book *book, EB_Disc_Code *disc_code)

+ +

+ؿ eb_disc_type() ϡbook Υǥη +disc_code λؤΰ˽񤭹ߤޤ +񤭹ǥηͤϡEB_Disc_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdisc_code λؤΰ EB_DISC_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_character_code (EB_Book *book, EB_Character_Code *character_code)

+ +

+ؿ eb_character_code() ϡbook 񤫤Ƥ +ʸɤ character_code λؤΰ˽񤭹ߤޤ +񤭹ʸɤͤϡEB_Character_Code +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) +Τ줫ͤǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡcharacter_code λؤΰ +EB_CHARCODE_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

+ +

+EB 饤֥δؿθƤӽФϡȤϸ¤ޤ +ȤСEB_Book ֥ȤҤ˷ӤĤؿ +eb_bind() ˤϡȤƽҤΥȥåץǥ쥯ȥϤޤ +¸ߤʤǥ쥯ȥꤷ硢ϼԤ˽ޤ +

+ +

+̤ˤݤϡ桼äѥꤷȤ˵ޤ +­Τ褦ˡ桼ΥߥǤϤʤԤⵯꤨޤ +

+ +

+ܾϤǤϡؿθƤӽФԤνˤĤޤ +

+ + + +

顼ɤȥ顼å

+ +

+EB 饤֥δؿ¿ϡͤȤ EB_Error_Code +֤ͤޤ +Ȥ֤ͤ EB_SUCCESS ǤԤȤ +顼θ˱֤ͤ͡ޤ +ΤᡢEB 饤֥ǤϼΤ褦 EB_SUCCESS Ȥӽ +褯Ԥޤ +

+ +
+
+EB_Error_Code error_code;
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed\n");
+    return;
+}
+
+
+ +

+顼ɤͤϡؿ eb_error_message() ˤä +顼åѴ뤳ȤǤޤ +뤳Ȥǡ顼θ򥢥ץꥱץΥ桼 +⤦ʬ䤹뤳ȤǤޤ +

+ +
+
+error_code = eb_bind(&book, "/mnt/cdrom");
+if (error_code != EB_SUCCESS) {
+    printf("eb_bind() failed, %s\n",
+        eb_error_message(error_code));
+    return;
+}
+
+
+ +

+error_code EB_ERR_TOO_LONG_FILENAME +åȤƤСΤ褦ʥ顼åϤޤ +

+ +
+
+too long filename
+
+
+ +

+뤤ϡΤ褦ܸΥåΤޤ +

+ +
+
+ե̾Ĺޤ
+
+
+ +

+åιݲǽ (NLS) ̵ˤ EB 饤֥򥳥ѥ +ϡ˱ѸΥå֤ޤ +ͭˤϡˤäƤɤθΥå +֤뤫ޤޤ +

+ +

+ܽǤϥץʷˤ뤿ˡ顼Ϻ¤Ԥä +ޤ +ɤ̤ΥץꥱץǤϡؿθƤӽФ +ɤ˥åԤݤϥ顼å +ơ桼˥顼θΤ˾ޤȤޤ +

+ + +

顼Ф봲Ƥ

+ +

+EB_Book ֥Ȥϡ֤˴ؤѥ᥿򤤤Ĥä +ޤ +֥Ȥ CD-ROM Ҥ˷դƤ뤫ɤ⡢ѥ᥿ +ΤΰĤǤ +

+ +

+ EB_Book ֥ȤؤΥݥ󥿤ؿˤϡ +餫ᥪ֥ȤΥѥ᥿åȤƤ뤳Ȥ +ƤΤ⤢ޤ +ȤСeb_path() ϡ֥ȤҤ˷դƤ뤳 +ȤƤޤ +Ǥϡ⤷Ҥ˷դƤʤ֥Ȥ eb_path() +ϤɤʤǤ礦 +

+ +
+
+EB_Book book;
+EB_Error_Code error_code;
+char path[EB_MAX_PATH_LENGTH + 1];
+
+eb_initialize_library();
+eb_initialize(&book);
+error_code = eb_path(&book, path);    /* ɤʤ? */
+
+
+ +

+ξ硢eb_path() EB_ERR_UNBOUND_BOOK +֤ޤ +EB 饤֥δؿϡɬפʥѥ᥿åȤƤʤ֥Ȥ +ΤƵ䤷ޤ +

+ +

+ʤ顢ȥޥ˥奢ƤơEB 饤֥ +δؿϡͿ줿ݥ󥿤 NULL ɤޤǤĴ٤ޤ +Τ褦ʤȤ򤹤ȡץ۾ェλƤޤޤ +

+ +
+
+eb_bind(NULL, "/mnt/cdrom");    /* ۾ェλ! */
+eb_bind(&book, NULL);           /* ۾ェλ! */
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_Error_Code

+ +

EB_Error_Code ϡEB 饤֥Υ顼ɤ +ɽޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_ERRORS Ĥ +եåɤƤޤ +顼ɤΰˤĤƤϡ + (֥顼ɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

顼ɤΰ

+ +

+Ƥ륨顼ɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/error.h>
+
+
+ + +

EB_SUCCESS

+ +

+ +顼ϵƤʤ +

+ + +

EB_ERR_MEMORY_EXHAUSTED

+ +

+EB 饤֥꤬ malloc() ƤӽФNULL +֤äƤ +

+ + +

EB_ERR_TOO_LONG_FILE_NAME

+ +

+Ϳ줿ҤΥѥ̾Ĺ롣 +

+ + +

EB_ERR_BAD_FILE_NAME

+ +

+ҤΥѥ̾Ǥ롣 +

+ + +

EB_ERR_BAD_DIR_NAME

+ +

+ǥ쥯ȥ̾Ǥ롣 +(EB 饤֥ѤʤΤǡ +Υ顼ɤץꥱץ֤뤳ȤϤޤ) +

+ + +

EB_ERR_TOO_LONG_WORD

+ +

+Ϳ줿Ĺ롣 +

+ + +

EB_ERR_BAD_WORD

+ +

+Ϳ줿ʸޤޤƤ롣 +

+ + +

EB_ERR_EMPTY_WORD

+ +

+Ϳ줿϶Ǥ롣 +

+ + +

EB_ERR_FAIL_GETCWD

+ +

+getcwd()getwd() Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CAT

+ +

+EB 饤֥꤬ҤΥե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_CATAPP

+ +

+EB 饤֥꤬appendix Υե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_TEXT

+ +

+EB 饤֥꤬Ҥʸե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_FONT

+ +

+EB 饤֥꤬Ҥγե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_APP

+ +

+EB 饤֥꤬appendix ե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_OPEN_BINARY

+ +

+EB 饤֥꤬Хʥǡե򳫤Ȥ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CAT

+ +

+EB 饤֥꤬ҤΥեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_CATAPP

+ +

+EB 饤֥꤬appendix Υեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_TEXT

+ +

+EB 饤֥꤬ҤʸեɤळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_FONT

+ +

+EB 饤֥꤬Ҥγեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_APP

+ +

+EB 饤֥꤬appendix Υᥤեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_READ_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեɤ߹ळȤ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CAT

+ +

+EB 饤֥꤬ҤΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_CATAPP

+ +

+EB 饤֥꤬appendix ΥեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_TEXT

+ +

+EB 饤֥꤬ҤʸեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_FONT

+ +

+EB 饤֥꤬ҤγեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_APP

+ +

+EB 饤֥꤬appendix ΥᥤեΥ˼Ԥ +

+ + +

EB_ERR_FAIL_SEEK_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեΥ˼Ԥ +

+ + +

EB_ERR_UNEXP_CAT

+ +

+EB 饤֥꤬ҤΥեǡԤȤϰۤʤǡ +Ĥ +

+ + +

EB_ERR_UNEXP_CATAPP

+ +

+EB 饤֥꤬appendix Υեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_TEXT

+ +

+EB 饤֥꤬Ҥʸեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_FONT

+ +

+EB 饤֥꤬Ҥγեǡ곰Υǡ򸫤Ĥ +

+ + +

EB_ERR_UNEXP_APP

+ +

+EB 饤֥꤬appendix Υᥤեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNEXP_BINARY

+ +

+EB 饤֥꤬ҤΥХʥǡեǡ곰Υǡ +Ĥ +

+ + +

EB_ERR_UNBOUND_BOOK

+ +

+ƤӽФ줿 EB 饤֥δؿϡҤ˷դ줿 +EB_Book ֥ȤˤȤ뤬Ϳ줿֥Ȥ +Ҥ˷դƤʤä +

+ + +

EB_ERR_UNBOUND_APP

+ +

+ƤӽФ줿 EB 饤֥δؿϡappendix ˷դ줿 +EB_Appendix ֥ȤˤȤ뤬Ϳ줿 +֥Ȥ appendix ˷դ +ʤä +

+ + +

EB_ERR_NO_SUB

+ +

+ҤܤĤäƤʤ +

+ + +

EB_ERR_NO_APPSUB

+ +

+appendix ܤĤäƤʤ +

+ + +

EB_ERR_NO_FONT

+ +

+ܤϡäƤʤ +

+ + +

EB_ERR_NO_TEXT

+ +

+ܤϡʸǡäƤʤ +

+ + +

EB_ERR_NO_CUR_SUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Book +֥ȤȤƤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_APPSUB

+ +

+ƤӽФ줿ؿϡܤ򤵤Ƥ EB_Appendix +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_FONT

+ +

+ƤӽФ줿ؿϡ򤵤Ƥ EB_Book +֥ȤˤȤ뤬Ϳ줿֥ȤǤ򤵤 +ʤä +

+ + +

EB_ERR_NO_CUR_BINARY

+ +

+ƤӽФ줿ؿϡХʥǡɤ߹׵򥻥åȤƤ +EB_Book ֥ȤˤȤ뤬Ϳ줿֥ȤǤ +åȤƤʤä +

+ + +

EB_ERR_NO_SUCH_SUB

+ +

+EB_Book ֥ȤܥɤؿͿ줿 +EB_Book ֥Ȥ˷դƤҤϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_APPSUB

+ +

+EB_Appendix ֥ȤܥɤؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix ϡ +ܥɤ˰פܤäƤʤ +

+ + +

EB_ERR_NO_SUCH_FONT

+ +

+EB_Book ֥ȤȳνĤΥؿͿ줿 +EB_Book ֥Ȥ˷ӤĤƤҤܤϡ +ΥγäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_BMP

+ +

+EB_Book ֥Ȥʸֹ椬ؿͿ줿 +EB_Book ֥Ȥ˷դƤҤܤϡ +ֹγΥӥåȥޥåץǡäƤʤ +

+ + +

EB_ERR_NO_SUCH_CHAR_TEXT

+ +

+EB_Appendix ֥Ȥʸֹ椬ؿͿ줿 +EB_Appendix ֥Ȥ˷դƤ appendix +ܤϡֹγʸäƤʤ +

+ + +

EB_ERR_NO_SUCH_SEARCH

+ +

+ܤϡꤵ줿᥽åɤäƤʤΤǡϹԤʤ +

+ + +

EB_ERR_NO_SUCH_HOOK

+ +

+ʥեåɤؿϤ줿 +

+ + +

EB_ERR_NO_SUCH_BINARY

+ +

+ꤵ줿֤ˡꤵ줿ΥХʥǡ¸ߤʤ +

+ + +

EB_ERR_DIFF_CONTENT

+ +

+ץꥱץफƥȥǡμ׵ᤵ줿 +줿ƥȥǡμबꥯȤ줿ȤȰפƤʤ +

+ + +

EB_ERR_NO_PREV_SEARCH

+ +

+eb_hit_list() ƤӽФ줿ץꥱץ +äƸΥꥯȤʤƤʤ +

+ + +

EB_ERR_NO_SUCH_MULTI_ID

+ +

+EB_Book ֥Ȥʣ縡ɤؿϤ줿 +դ줿ҤܤϡΥɤ˰פʣ縡ä +ʤ +

+ + +

EB_ERR_NO_SUCH_ENTRY_ID

+ +

+EB_Book ֥Ȥʣ縡ȥꥳɤؿ +Ϥ줿դ줿ҤܤϡΥȥꥳɤ +פʣ縡ȥäƤʤ +

+ + +

EB_ERR_TOO_MANY_WORDS

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿θĿ¿롣 +

+ + +

EB_ERR_NO_WORD

+ +

+ץꥱץफ︡⤷ʣ縡θꥯ +줿줬٤ƶǤ롣 +

+ + +

EB_ERR_NO_CANDIDATES

+ +

+eb_multi_entry_candidates() ƤӽФ줿 +ꤵ줿ʣ縡ȥϡθǡäƤʤ +

+ + +

EB_ERR_END_OF_CONTENT

+ +

+eb_forward_text()eb_backward_text() +ʸƬФԤȤǤʸʤƬãƤơ +ʾ˿ʤळȤǤʤä +

+ + +

EB_ERR_NO_PREV_SEEK

+ +

+餫 eb_seek_text() ǥԤäƤʤ֤ǡ +ƥȥǡɤ߹ߤƬФԤȤ +

+ + +

EB_ERR_EBNET_UNSUPPORTED

+ +

+ EB 饤֥ϡ֥ۥȤؤΥˤбƤʤ +

+ + +

EB_ERR_EBNET_FAIL_CONNECT

+ +

+֥ۥȤؤΥߤ (EBNETD) ³Ǥʤä +

+ + +

EB_ERR_EBNET_SERVER_BUSY

+ +

+֥ۥȤؤ³ԤäҤ˥Ƥ륯饤Ȥο +Ǥ˾¤ãƤ뤿ᡢνҤѤǤʤä +

+ + +

EB_ERR_EBNET_NO_PERMISSION

+ +

+֥ۥȤؤ³ԤäνҤؤѸ¤ʤᡢ +饢ݤ줿 +

+ + +

EB_ERR_UNBOUND_BOOKLIST

+ +

+ƤӽФ줿 EB 饤֥δؿϡ֥ۥȤ˷դ줿 +EB_BookList ֥ȤˤȤ뤬Ϳ줿֥ +ϱ֥ۥȤ˷դƤʤä +

+ + +

EB_ERR_NO_SUCH_BOOK

+ +

+EB_BookList ֥ȤȽҤֹؿϤ줿 +EB_BookList ˷դ줿֥ۥȾˤϡֹ +Ҥ¸ߤʤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/error.h>
+
+
+ + +

const char *eb_error_string (EB_Error_Code error_code)

+ +

+ؿ eb_error_string() ϡ顼 error_code +ʸѴΤ֤ޤ +ʸʸɤϡASCII ˤʤޤ +ȤС顼 EB_SUCCESS Ϥʸ +"EB_SUCCESS" ֤ޤ +̤ΤΥ顼ɤϤȤϡ"EB_ERR_UNKNOWN" ֤ޤ +

+ + +

const char *eb_error_message (EB_Error_Code error_code)

+ +

+ؿ eb_error_message() ϡ顼 error_code +бåʸˤ֤ޤ +ؿ֤åϡѸ줫ܸˤʤޤ +

+ +

+ݲǽͭˤ EB 饤֥򥳥ѥ뤷Ƥʤϡ +ѸΥå֤ޤ +ΤȤΥåʸɤϡASCII ˤʤޤ +

+ +

+åιݲǽ (NLS) ͭˤ EB 饤֥򥳥ѥ +ϡ˱ƤɤθΥå֤Τ +ޤޤ +ޤGNU gettext С 0.36 ʹߤǤ iconv() ϢȤ뤳Ȥˤꡢ +åʸɤ˱Ѳޤ +gettext iconv() ȤϢȤԤʤСѸΥå ASCII +ܸΥåܸ EUC ˤʤޤ +δؿθƤӽФˤäơgettext ΥƥȥɥᥤѲ +ޤ +

+ +

+̤ΤΥ顼ɤϤȤ֤åϡѸǤ +"unknown error"ܸǤ "̤ΤΥ顼Ǥ" +ˤʤޤ +

+ + +

+ +

+˰줿ܤǤ̡νҤˤʤäƤΤǤ⡢Żҥ֥å EPWING +Ǥ 1 CD-ROM ˤޤȤ뤳ȤǤޤ +

+ +

+ȤС CD-ROM Ҥϡ켭񡢱ѡŵɴʻŵȤ 3 + (줿ܤǸȤ) ֽҡפäƤ뤳Ȥ⤢ޤ +ʶ路򤱤뤿ˡEB 饤֥ǤϤǸֽҡפΤȤ + (subbook) ȸƤǤޤ +

+ +
+
+ãġݣңϣͽ
+
+ܣι켭ŵϡ
+ܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ +

+CD-ROM ҤǤϡ줾ܤϤ켫ΤΩҤˤʤäƤޤ +ޤܤΥǡ⡢̡Υե˼Ƥޤ +äơEB 饤֥Ǥ⡢ץꥱץμפʽ +Ǥñθʸǡμʤɤϡ٤ñ̤ǹԤ褦 +ʤäƤޤ +

+ +

+ܾϤǤϡEB 饤֥ǤܤΰˤĤޤ +

+ + + +

ܥ

+ +

+EB 饤֥Ǥϡ줾ܤФ ܥ (subbook code) +Ƥޤ +Υɤ EB 饤֥꤬ܤ̤뤿ѤޤΤǡġ +ܥɤϡƱΤʤ褦ˤʤäƤޤ +

+ +

+ʲΥɤϡeb_subbook_list() Ȥؿ +Ǥ +δؿϡΤ٤Ƥܤܥɤ뤳ȤǤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_list() ȡΤ٤Ƥܥɤ + sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+ġܤˤϡɬ̾դƤޤ +Ƭ (sub_codes[0]) ̾ϡΤ褦ˤ +뤳ȤǤޤ +

+ +
+
+char title[EB_MAX_TITLE_LENGTH + 1];
+
+if (eb_subbook_title2(&book, sub_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_subbook_title2() failed\n");
+    return;
+}
+
+
+ +

+eb_subbook_title2() θƤӽФȡ +title ̾ɽʸ󤬳Ǽޤ +

+ +

+­Ǥ(ܤǤϤʤ) CD-ROM ̾ؿϤޤ +ʤʤ顢̾򼨤ǡ CD-ROM ˤϲˤʤǤ +

+ + +

+ +

+EB_Book ֥ȤϡӤĤ줿 CD-ROM Ҥ +Ǥդܤǡ (current subbook) +Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ñθ䡢ʸǡμʤɡۤȤɤϡܤ +ФƤԤޤ +

+ +

+eb_bind() EB_Book ֥ȤҤ +դľϡܤ򤵤Ƥʤ֤ˤʤäƤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ʤ䨢ܣɴʻŵϡ
+
+
+
+ +

+ܤԤˤϡؿ eb_set_subbook() Ѥޤ +eb_set_subbook() ϡȤϤ줿ܥɤ +äܤ򤷤ޤ +ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_subbook_list(&book, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+if (eb_set_subbook(&book, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+ȡΤ褦ܤ򤵤줿֤ˤʤޤ +

+ +
+
+ţ¡£롡ãġݣңϣͽ
+֥
+
+桡ܣι켭ŵϡ
+ܡܣαѡŵϡ
+ܣɴʻŵϡ
+
+
+
+ + +

ץץ

+ + + + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Subbook_Code

+ +

EB_Subbook_Code ܥɤɽޤ +νҤܤϡ줾դܥɤäƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤܥͤɽ EB_SUBBOOK_INVALID Ȥ +̤ܥɤƤޤ +ѲǽܤФơܥɤƤ뤳ȤϤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Error_Code eb_load_all_subbooks (EB_Book *book)

+ +

+ؿ eb_load_all_subbooks() ϡbook Τ٤Ƥ +ܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ˹Ԥޤ +δؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+δؿƤӽФȡbook ϡܤ򤷤Ƥʤ֤ˤʤޤ +

+ + +

EB_Error_Code eb_subbook_list (EB_Book *book, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_subbook_list() ϡbook Τ٤ܤ +ܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơҤϿƤܤθĿ subbook_count λؤ +ΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+book ϡ餫Ҥ˷դƤʤƤϤʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook (EB_Book *book, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_subbook() ϡbook ܤ +ܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title (EB_Book *book, char *title)

+ +

+ؿ eb_subbook_title() ϡbook ܤ +̾ title λؤΰʸȤƽ񤭹ߤޤ +̾ʸĹϡĹ EB_MAX_TITLE_LENGTH ХȤǤ +ĹϡΥʥʸޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢̾ɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡtitle λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_title2 (EB_Book *book, EB_Subbook_Code subbook_code, char *title)

+ +

+eb_subbook_title() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory (EB_Book *book, char *directory)

+ +

+ؿ eb_subbook_directory() ϡbook Ǹ +ܤΥǡե᤿ǥ쥯ȥ̾directory +λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_subbook_directory2 (EB_Book *book, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_subbook_directory() ȻƤޤܤǤϤʤ + subbook_code ǻꤵ줿ܤΥǥ쥯ȥ̾񤭹 +ۤʤޤ +

+ +

+book ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +Ҥ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

EB_Error_Code eb_set_subbook (EB_Book *book, EB_Subbook_Code code)

+ +

+ؿ eb_set_subbook() ϡbook +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ϽҤ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ + +

void eb_unset_subbook (EB_Book *book)

+ +

+ؿ eb_unset_subbook() ϡbook 򤷤Ƥ +ܤ̤ξ֤ˤޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤϡ +⤷ޤ +

+ + +

+ +

+CD-ROM Ҥˤơ˽פʵǽǤ +EB 饤֥ǤϡΤ褦ʸ᥽åɤѤǤޤ +

+ +
    +
  • ׸ (word search) +
  • ׸ (end-word search) +
  • ׸ (exact-word search) +
  • ︡ (keyword search) +
  • (cross search) +
  • ʣ縡 (multi search) +
+ +

+٤Ƥ CD-ROM ҡ٤Ƥܤǡ˵󤲤٤Ƥ +᥽åɤѲǽʤ櫓ǤϤޤ +ܤˤϡθ᥽åɤ󶡤ʤΤ¸ߤޤ +

+ +

+EB 饤֥ǤϡԤȤǤΤϡܤФ +Ǥ +

+ +

+ξϤǤϡ줾θ᥽åɤδñȡEB 饤֥Ǥ +ˤĤޤ +

+ + + +

סס׸

+ +

+סס׸ϡĤϸ˰פ +ȥõФ᥽åɤǤ +

+ +

+׸ϡϸƬʬפ륨ȥ򸡺ޤ +ȤСֹ͡פȤϡֹ͡סֹͻסֹͤûҡפȤä +ȥ˰פޤ +

+ +

+׸ϡϸפ륨ȥ򸡺ޤ +ȤС`bye' Ȥϡ`bye'`good bye'`bye bye' Ȥä +ȥ˰פޤ +

+ +

+׸ϡĤθȴ˰פ륨ȥ򸡺ޤ +

+ +

+ʲϡ׸ΥץǤ +ܤ椫顢Ƭ librar ǻϤޤ륨ȥõ +ޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+#define MAX_HITS 50
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_search_word(&book, "librar") != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ +

+eb_search_word() ׸ꥯȤؿǤ +Ǥϡlibrar ȤʸͿƤޤ +δؿϰפȥ֤ȤϤޤ +

+ +

+פȥμϡ³ eb_hit_list() ؿ +ƤӽФݤ˹Ԥޤ +eb_hit_list() ϰפȥΰ +hits[] λؤΰ˽񤭹ߡĤäץȥθĿ + &hit_count λؤΰ˽񤭹ߤޤ +Ǥϡeb_hit_list() Ϻ MAX_HITS +(= 50) Υȥõޤ +(Ĥޤꡢ50 ĸĤä鸡ߤޤ) +

+ +

+⤷ܤѡŵȤȡʤȤ library + librarian Ȥ 2 ĤΥȥ˴ؤ +Ǥ礦 +ΤȤ hits[] ϼΤ褦ˤʤäƤޤ +(library librarian ȥ +ϡγȤϰۤʤäƤ뤫Τޤ) +

+ +
+
+
+
+
+ΣϡΣ
+
+
+ +

+hits[] ȤˤĤƤϡܾϤθǤ⤦ܤ +ޤ +

+ +

+ޤǤ׸ˤȤޤפξ +eb_search_word() eb_search_endword() +Ƥ֤褦ˤޤ +¾Ϥ٤ƱǤ +

+ +
+
+if (eb_search_endword(&book, "nalization") != EB_SUCCESS) {
+    printf("eb_search_endword() failed\n");
+    return;
+}
+
+
+ +

+פξƱͤǤ +eb_search_exactword() Ƥ֤褦ˤʳϡ٤Ʊ +Ǥ +

+ +
+
+if (eb_search_exactword(&book, "library") != EB_SUCCESS) {
+    printf("eb_search_exactword() failed\n");
+    return;
+}
+
+
+ + +

+ +

+︡ϡʣĤϸˤ٤ưפ륨ȥ򸡺ޤ +ȤСѡŵξ︡Ǥϡϸ򤹤٤ƴޤʸ򸡺 +褦ˤʤäƤ뤫Τޤ +

+ +

+ʲϡ︡ make, with Ȥ +פ륨ȥܤ椫õФץҤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+static const char *keywords[3] = {"make", "with", NULL};
+
+if (eb_search_word(&book, keywords) != EB_SUCCESS) {
+    printf("eb_search_word() failed\n");
+    return;
+}
+
+
+ +

+︡Ԥؿϡeb_search_keyword() Ǥ +סס׸δؿȴŪ˰ϰǤ +ʣϸդ褦ˤʤäƤޤ +ؿˤϡϸʸ (ؤΥݥ) ˤΤϤޤ +κǸˤ NULL ֤νüɬפ +դƲ +

+ +

+סס׸Ʊͤˡeb_search_keyword() +⸡ΥꥯȤԤǡפȥμϹԤޤ +ȥμˤϡϤƱͤ eb_hit_list() ؿ +Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    printf("eb_hit_list() failed\n");
+    return;
+}
+
+
+ + +

+ +

+ϡ︡ΰȤ٤᥽åɤǤ +EPWING Żҥ֥åߤƤ⡢ɤ롼ǻȤʬʤƤΤ +ʬʤξԤϼ¤ˤ褯Ƥޤ +

+ +

+EB 饤֥ǥԤؿ eb_search_cross() +ǤȤϾ︡δؿ eb_search_keyword() +ޤäƱǤ +Ȥξܺ٤ϡ־︡ +

+ + +

ʣ縡

+ +

+ʣ縡ϡ︡ƱʣĤϸˤ٤ưפ륨ȥ +ޤġϸˤ餫ܤդƤޤ +

+ +

+ޤססס︡Ϥ٤ơܤˤĤ +षޤ󤬡ʣ縡ϰĤܤʣμबѰ +Ƥ뤳Ȥޤ +ȤС̾ŵˤϡΤ褦˿̾ѤѽѸθ + 2 ʣ縡ѰդƤ뤫Τޤ +

+ +
+
+(ʣ縡 1: ̾򸡺)
+    ϸ 0: ϰ
+    ϸ 1: 
+    ϸ 2: 
+    ϸ 3: 
+    ϸ 4: 
+
+
+ +
+
+(ʣ縡 2: ѽѸ򸡺)
+    ϸ 0: Ѹ
+    ϸ 1: 
+    ϸ 2: 
+
+
+ +

+Τ褦ˡġʣ縡ϡϸܤǤʤϸο +ޤޤǤ +ޤݤϤ٤ƤϸɬפϤʤʤȤĤ +ϸ줬ǤʤСޤ +

+ +

+ʣ縡ϡ ʣ縡 (multi search code) +ˤäƼ̤ޤ +ؿ eb_multi_search_list() ȤȡܤѲǽ +ʣ縡ΰޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+EB_Multi_Search_Code multi_codes[EB_MAX_MULTI_SEARCHES];
+int multi_count;
+
+if (eb_multi_search_list(&book, multi_codes, &multi_count)
+    != EB_SUCCESS) {
+    printf("eb_multi_search_list() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡ɤϡʣ縡ΤδؿɬפȤʤޤ +ȤСeb_multi_title() ϡꤷʣ縡̾ +(:ֿ̾סѽѸ측) ؿǤΤȤ +ʣ縡λˤϡʣ縡ɤѤޤ +ʲǤϡƬ˺ܤäƤʣ縡 (multi_codes[0]) +ꤷƤޤ +

+ +
+
+char title[EB_MAX_MULTI_TITLE_LENGTH + 1];
+
+if (eb_multi_title(&book, multi_codes[0], title)
+    != EB_SUCCESS) {
+    printf("eb_multi_title() failed\n");
+    return;
+}
+
+
+ +

+˴ؿˤäƤϡʣ縡ɤ˲äơܤϸ줫 +Ƥɬפޤ +ȤСϸܤؿ eb_multi_entry_label() +˳ޤ +0 ܤϸ (ĤޤƬϸ) ܤˤϡΤ褦 +ޤ +

+ +
+
+char label[EB_MAX_MULTI_LABEL_LENGTH + 1];
+
+if (eb_multi_entry_label(&book, multi_code[0], 0, label)
+    != EB_SUCCESS) {
+    printf("eb_multi_entry_label() failed\n");
+    return;
+}
+
+
+ +

+ʣ縡Ԥؿϡeb_search_multi() Ǥ +ȤϾ︡ȤۤƱǡϸʸˤΤ +ȤϤκǸˤ NULL ֤Ʋ +ƤʤϸΤȤˤϡʸ֤ޤ +

+ +

+eb_search_multi() ⸡ΥꥯȤԤǡפ +ȥμϹԤޤ +ˤ eb_hit_list() Ȥޤ +

+ +
+
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ʤʣ縡ϸˤäƤ + (candidates) 餸ѰդƤ뤳Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +ˤĤƤϡξϤǤϤʤ֥ƥȥǡפξϤޤ +(ʣ縡θ 򻲾ȤΤ) +

+ + +

ץȥξ

+ +

+eb_hit_list() ϡꥯȤ줿 (סס +סʣ) ˰פȥξȸĤäȥ +Ŀ򡢤줾 EB_Hit ΰ褪 int +ΰ˽񤭹ߤޤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ˽Ҥ˷դ
+ * 졢ܤȲꤷƤޤ*/
+EB_Hit hits[MAX_HITS];
+int hit_count;
+
+if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+EB_Hit θġǤˤϡפȥ +Ф (heading) ʸ (text) γϰ֤ +񤭹ޤƤޤ +

+ +
+
+Ф
+
+ţ¡ȣ
+
+稻ʸ
+
+
+ʣˣ
+ᡡ
+롥ʣˡ
+
+
+
+ +

+ФʸˤĤƤΤܤȼˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ +

+ + +

ĤäƤ륨ȥμ

+ +

+˽Ҥ٤褦ˡeb_hit_list() ƤӽФȤϡפ +ȥDzĤޤõΤǻꤷޤ +ޤeb_hit_list() Ͻȡºݤ˸Ĥä +ȥο򥢥ץꥱץ˶ޤ +

+ +
+
+error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count);
+if (error_code == EB_SUCCESS)
+    printf("%d entries found\n", hit_count);
+
+
+ +

+ꤷĿ¿ΰץȥ꤬ܤ¸ߤƤϡ +eb_hit_list() 򷫤֤ƤӽФȤǡĤΥȥ +뤳ȤǤޤ +

+ +
+
+for (;;) {
+    if (eb_hit_list(&book, MAX_HITS, hits, &hit_count)
+        != EB_SUCCESS) {
+        fprintf(stderr, "an error occurs.\n");
+        return;
+    }
+    if (hit_count == 0)
+        break;
+    /* ץȥν */
+}
+
+
+ +

+ץȥ꤬⤦ĤäƤʤСeb_hit_list() +&hit_count λؤΰ 0 񤭹ǡ +EB_SUCCESS ֤ޤ +

+ +

+ eb_hit_list() Ԥ +(EB_SUCCESS ʳ֤ͤ)ꥯȤ˴ؤ +ֵϿϥꥻåȤ뤿ᡢץȥμ򤽤ʾ³뤳Ȥ +Ǥޤ +

+ + +

ʣȥκ

+ +

+eb_hit_list() ѤưפȥȡȤ +¼ŪѤʤȥ꤬ʣޤޤƤ뤳Ȥޤ +EB 饤֥ϡʣȥκϹԤޤ +ɬפʤ顢ץꥱ¦ǹԤȤˤʤޤ +

+ +

+ʣ˼ʤ顢ʲΤ٤Ƥξ˰פ륨ȥ +ʣȥȤߤʤܰʹߤ˽иȥޤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸ (֤ǤϤʤʸ󤽤Τ) Ʊ +
+ +

+(ФʸμˡˤĤƤϡ +֥ƥȥǡ 򻲾ȤΤȡ) +

+ +

+ʣϡľΥȥФƤΤߵȤϸ¤ޤ +ȤСeb_hit_list() ǰץȥ꤬ 50 줿硢 +Ǹ 50 ܤ 49 ĤȽʣԤɬפޤ +äơΤǤϥȥƱΤӤ 1 + 2 + ... + 49 = 1225 +ԤȤˤʤޤ +

+ +

+ҤˤäƤϽʣȥ꤬꤭ʤǽ⤢ޤ⤦ +ñˡ⤤Ĥޤ +ñˤˡϡʣȥȽ򼡤Τ褦Ѥ +ȤǤ +

+ +
    +
  • ȥλؤʸΰ֤Ʊ +
  • ȥλؤФʸΰ֤Ʊ +
+ +

+˽ñˤˤϡľ 1ĤΥȥФƤʣ +ԤȤˡ⤢ޤ +ʤ顢50 ĤΰץȥФơӤ 49 ǺѤߤޤ +ˡϡҤˤäƤϤޤä̤ޤ +

+ + +

ץץ

+ + + + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hit

+ +

+EB_Hit ϡ˰פȥξǼ뤿 +ǡǤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hit_Struct EB_Hit;
+
+struct EB_Hit_Struct {
+    EB_Position heading;  /* Фΰ */
+    EB_Position text;     /* ʸΰ   */
+};
+
+
+ +

+ץꥱץϡľ EB_Hit ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Position

+ +

EB_Position ϡܤΥǡΰ֤ɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ڡֹ 1 ϤޤꡢڡΥեåȤ 0 2047 ϰϤ +ʤޤ +ץꥱץǡΤȤФƤ +ɬפϤޤ +

+ +

+ץꥱץϡľ EB_Position ֥ +ΥФ򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Multi_Search_Code

+ +

EB_Multi_Search_Code ʣ縡ɤɽޤ +ܤѰդƤʣ縡ϡ줾դʣ縡ɤ +äƤޤ +ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳Ȥ +Ǥޤ +

+ +

+ޤʣ縡ͤɽ EB_MULTI_INVALID Ȥ +̤ܥɤƤޤ +Ѳǽʣ縡Фơʣ縡ɤƤ뤳Ȥ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

int eb_have_word_search (EB_Book *book)

+ +

int eb_have_endword_search (EB_Book *book)

+ +

int eb_have_exactword_search (EB_Book *book)

+ +

+ؿ eb_have_word_search() ϡbook +ܤ׸᥽åɤѲǽɤĴ٤ޤ +Ʊͤ eb_have_endword_search() ϸ׸᥽åɤ +Ĥơeb_have_exactword_search() ϴ׸᥽åɤ +ĤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_keyword_search (EB_Book *book)

+ +

+ؿ eb_have_keyword_search() ϡbook +ܤǾ︡᥽åɤѲǽɤĴ٤ޤ +

+ +

+Ѳǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

int eb_have_multi_search (EB_Book *book)

+ +

+ؿ eb_have_multi_search() ϡbook +ܤʣ縡᥽åɤѲǽɤĴ٤ޤ +

+ +

+ 1 ǤѲǽʤ 1 ֤ޤ +᥽åɤäƤʤ⤽ܤ򤵤Ƥʤ 0 +֤ޤ +

+ + +

EB_Error_Code eb_multi_search_list (EB_Book *book, EB_Multi_Search_Code *multi_list, int *multi_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡Ĵ١ʣ縡ɤΰ +EB_Multi_Search_Code ˤơmulti_list +λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_MULTI_SEARCHES ĤǤޤ +äơʣ縡μ multi_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_count (EB_Book *book, EB_Multi_Search_Code multi_id, int *entry_count)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ϸ +Ŀ entry_count λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ񤭹ޤϸθĿϡ1 ʾ EB_MAX_MULTI_ENTRIES +ʲˤʤޤ +Ԥȡentry_count λؤΰˤ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_title (EB_Book *book, EB_Multi_Search_Code multi_id, char *title)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ̾ title +λؤΰ˽񤭹ߤޤ +ܤϺĹ EB_MAX_MULTI_TITLE_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ҤˤäƤϡʣ縡ѰդƤƤ⡢ʣ縡̾ǡä +ʤȤޤ +ξ硢EB 饤֥꤬դ̾ title +񤭹ޤޤ +

+ +

+Ҥʸɤ EB_CHARCODE_ISO8859_1 ʤ顢 +EB 饤֥꤬դ̾ϡ"Multi Search 1", "Multi Search 2", ... +ˤʤޤ +ʳʸɤǤСܸ̾ EUC ǽ񤫤줿ʣ縡 1 +ʣ縡 2... Ȥʸˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_label (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, char *label)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθܤ label λؤΰ +񤭹ߤޤ +entry_index ϡƬθ 0 ܤȿޤ +ܤϺĹ EB_MAX_MULTI_LABEL_LENGTH ХȤˤʤޤ +Ĺˡʥʸϴޤߤޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ܤɽʸ ISO 8859-1 +ˤʤꡢʳʸɤʤܸ EUC ˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡlabel λؤΰˤ϶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

int eb_multi_entry_have_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθ줬äƤ뤫ɤĴ٤ޤ +entry_index ϡƬθ 0 ܤȿޤ +

+ +

+äƤ 1 ֤ޤ +äƤʤ⤽ܤ򤵤Ƥʤ硢뤤 +multi_id, entry_index ͤä +0 ֤ޤ +

+ + +

EB_Error_Code eb_multi_entry_candidates (EB_Book *book, EB_Multi_Search_Code multi_id, int entry_index, EB_Position *position)

+ +

+ؿ eb_multi_search_list() ϡbook +ܤѰդƤʣ縡 multi_id ˤĤĴ١ +entry_index ܤθθΰ֤ position +λؤΰ˽񤭹ߤޤ +Ƭθ줬 0 ܤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpositin λؤΰˤ eb_seek_text() +ɬԤ־񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +

+ + +

EB_Error_Code eb_search_word (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_endword (EB_Book *book, const char *input_word)

+ +

EB_Error_Code eb_search_exactword (EB_Book *book, const char *input_word)

+ +

+ؿ eb_search_word() ϡbook ܤ +Ф׸ꥯȤޤ +Ʊͤ eb_search_endword() ϸ׸ +eb_search_exactword() ϴ׸ꥯȤޤ +

+ +

input_word ǻꤷޤ +δؿϸꥯȤǡפȥ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơ 1 ХȰʾ塢EB_MAX_WORD_LENGTH (= 255) +ХȰʲǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD +Ĺ 0 (ʸ) ξ EB_ERR_EMPTY_WORD ֤ޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_search_keyword (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_cross (EB_Book *book, const char * const input_words[])

+ +

EB_Error_Code eb_search_multi (EB_Book *book, EB_Multi_Search_Code multi_id, const char * const input_words[])

+ +

+ؿ eb_search_keyword() ϡbook +ܤФ︡ꥯȤޤ +Ʊͤ eb_search_cross() ϥ +eb_search_multi() ʣ縡򤽤줾ꥯȤޤ +

+ +

input_words ǻꤷޤ +︡ʣ縡ϤʣĤθդޤΤǡ +ˤϤޤ +ΤȤǤˤ NULL ֤νü +ޤ +

+ +

+δؿ⸡ꥯȤǡפȥξ +֤ȤϤޤ +פȥμˤ eb_hit_list() Ȥޤ +ؿϡ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +ԤȡؿƤӽФ˥ꥯȤƤξֵϿϥꥻå +ޤΤǡξ֤Τޤ eb_hit_list() ƤӽФƤ⡢ +Ϥ꼺Ԥ˽ޤ +

+ +

+Ҥʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿϤ ISO 8859-1 +ǽ񤫤ƤʤФʤޤ +ʳʸɤξϡܸ EUC ǽ񤫤ƤʤФʤޤ +ʸֹޤǤ硢ؿ EB_ERR_BAD_WORD +֤ޤ +

+ +

+äơġθ EB_MAX_WORD_LENGTH (= 255) ХȰʲ +ǤʤФʤޤ +Ĺˡʥʸϴޤߤޤ +ĹϡEB_ERR_TOO_LONG_WORD ֤ޤ +Ĺ 0 ХȤθ̵뤵ޤʤȤ 1 ĤθĹ + 1 ʾʤȤޤ +Ĺ 1 ʾθ줬 1 ĤʤȤϡEB_ERR_NO_WORD +֤ޤ +

+ +

+ NULL ǿϡ︡Ǥ EB_MAX_KEYWORDS +ʲǤ EB_MAX_CROSS_ENTRIES ʲ +ʣ縡Ǥ EB_MAX_MULTI_ENTRIES ʲǤʤƤ +ʤޤ +Ŀ¿ EB_ERRO_TOO_MANY_WORDS ֤ޤ +ʸǤ򺹤ĿǤϤʤñϤ줿ǿ¤ +ĶƤȥ顼ˤʤޤΤǡդɬפǤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ʤפ륨ȥ꤬ 1 Ĥ뤫ɤϡͤˤϱƶޤ +

+ + +

EB_Error_Code eb_hit_list (EB_Book *book, int max_hit_count, EB_Hit *hit_list, int *hit_count)

+ +

+ؿ eb_hit_list() ϡ餫ʲΤ줫δؿ +ꥯȤ줿¹Ԥפȥޤ +

+ +
    +
  • eb_search_word() (׸) +
  • eb_search_endword() (׸) +
  • eb_search_exactword() (׸) +
  • eb_search_keyword() (︡) +
  • eb_search_cross() () +
  • eb_search_multi() (ʣ縡) +
+ +

+äơδؿƤˡ嵭Τ줫δؿθƤӽФ +ʤƤϤʤޤ +

+ +

+eb_hit_list() Ϻ max_hit_count Ĥ +ץȥ hit_list ˽񤭹ߤޤ +ơ񤭹ץȥο hit_count ؤΰ +񤭹ߤޤ +ʾθĿΰץȥ꤬¸ߤ硢Ĥäȥξϡ +δؿ򷫤֤ƤӽФȤ뤳ȤǤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡꥯȤ˴ؤֵϿ +ꥻåȤޤΤǡפȥμϷ³Ǥʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_search_word() +
  • eb_search_endword() +
  • eb_search_exactword() +
  • eb_search_keyword() +
  • eb_search_cross() +
  • eb_search_multi() +
+ +

+֤Ƥ⡢פȥξϤ hit_list +Ƭ񤭹ߡhit_count ؤΰ˽񤭹ͤ⡢β + eb_hit_list() θƤӽФǽ񤭹ץȥο +ʤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ȥפȥ꤬ʤƤ⡢˽λСؿ +EB_SUCCESS ֤ޤ +

+ +

+Ԥȡhit_count ؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +ξ硢ꥯȤƤξֵϿϥꥻåȤޤΤǡ +ʾ eb_hit_list() ƤǡĤäץȥ +뤳ȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤ˵󤲤ΥꥯȤƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_PREV_SEARCH ֤ޤ +

+ + +

ƥȥǡ

+ +

+ƥȥǡμϡ¤ֽפʵǽǤ +

+ +

ƥȥǡ (text data) ϡ +ʸ (text body) Ȥ̣ǤϤޤ +CD-ROM ҤˤϳΤʸ¸ߤޤʸƱǡѤ +񤫤줿ǡढޤ +ܽǤϡΥǡޤȤƥƥȥǡȸƤǤޤ +EB 饤֥꤬ƥȥǡμˤϡΤΤޤ +

+ +
    +
  • Ф +
  • ʸ +
  • ˥塼 +
  • ɽ +
  • ʣ縡ϸθ +
+ +

+ܾϤǤϡΥƥȥǡμȲùˡˤĤޤ +

+ + + +

ƥȥǡΥɤ߹

+ +

+UNIX ǥץȤиΤˤϡե뤫ǡɤ߹ +ݤѤ lseek(), read() Ȥƥॳ +¸¿Ǥ礦 +

+ +

+EB 饤֥Ǥ⡢ƥȥǡμˤϡ (seek) +ɤ߹ (read) Ȥ 2 ĤǹԤޤ +EB 饤֥Ǥϥեݥ󥿤ǥץϤʤ +EB_Book ֥Ȥ̤ƥɤ߹ߤԤޤ +

+ +

+ޤ˻ꤹ֤ off_t ǤϤʤ +EB_Position ([] ǡξܺ١ 򻲾ȤΤ) +Υ֥ȤѤޤ +ȤСʸƬ֤ϡeb_text() ȤؿȤä +Τ褦˼ǤޤΤȤ֥ǡ EB_Position +֥Ȥ˽񤭹ޤޤ +

+ +
+
+EB_Position position;
+
+/* ؿνȡposition ʸγϰ֤
+ * 񤭹ޤޤ */
+if (eb_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ͤޤǤˡEB_Position ¤ϡΤ褦ˤʤäƤޤ +

+ +
+
+typedef struct EB_Position_Struct EB_Position;
+
+struct EB_Position_Struct {
+    int page;     /* ڡֹ */
+    int offset;   /* ڡΥեå */
+};
+
+
+ +

+ƸĤäץȥθФʸɤ߹ݤˤ⡢־ +λˤ EB_Position Ȥޤ +פȥξϡؿ eb_hit_list() ˤä +EB_Hit ȤΥ֥Ȥ˽񤭹ޤޤ +EB_Hit ϼΤ褦Ƥޤ +(ܤ [] ǡξܺ١ 򻲾ȤΤȡ) +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ĤޤꡢΤȤθФʸΰ֤⡢EB_Position +ɽƤΤǤ +

+ +

+ǤϡºݤΥץˤơɤ߹ߤԤäƤߤޤ +ޤϡǤ +ˤϴؿ eb_seek_text() Ѥޤ +ǤϤꡢ֤ EB_Position Ϥޤ +

+ +
+
+if (eb_seek_text(&book, &position) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ǡμ (Фʸ ...) ˤ餺ƥȥǡΥ +٤ eb_seek_text() ǹԤޤ +

+ +

+EB_Book ֥Ȥϡƥȥǡμ̤ +ɤ߹֤߰ФƤ櫓ǤϤʤΥƥȥǡǶͭ +־ijФƤǤ +ȤСʸɤ߹ǡ̤ΰ֤˥ƸФɤ߹ȡ +EB_Book ʸɤ߹֤߰ΤȤ˺Ƥޤޤ +

+ +

+ơä顢ǡɤ߹ߤޤ +ɤ߹⤦ȤƥȥǡμˤäơѤؿۤʤޤ +Ф eb_read_heading() ȤޤʳǤ +eb_read_text() Ȥޤ +

+ +

+ʲϡeb_read_text() λǤ +

+ +
+
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

text ˤϥƥȥǡ +text_length ˤϼºݤɤ߹Хȿ񤭹ޤޤ +ƥȤϺ MAX_LENGTH ХȽ񤭹ޤޤ +ƥȥǡϤ˥ʥʸǽüޤΤǡbuffer ˤ +⤦ 1 Хʬΰ褬ɬפˤʤޤ +

+ +

+eb_read_heading() θƤӽФ⡢eb_read_text() +ȤޤäѤޤ +

+ +
+
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() eb_read_heading() ɤ߹ +ƥȥǡʿʸΥƥȤˤʤäƤơʥʸǽüƤޤ +

+ +
+
+printf("%s\n", text);   /* ϤƤߤ */
+
+
+ +

+ɤ߹ߤƥȥǡĹơeb_read_text() +뤤 eb_read_heading() ƤӽФǤ +ɤ߹ʤäϡٸƤӽФȤ³Υǡɤ߹ळȤ +Ǥޤ +

+ + +

ƥȥǡ

+ +

+Ǥϡɤ߹ƥȥǡϡʿʸƥȤˤʤäƤޤ +ɤ⡢CD-ROM ʿʸƥȤΥǡΤޤ޼ϿƤ +櫓ǤϤޤ +

+ +

+ºݤΥƥȥǡ򡢰ʲ˼ޤ +¦Υ֥å 16 ʿǥפͻҤǡ¦Ϥ JIS X 0208 +(ܸΤʴ) ʸɽƤʬ [] Ȥ +ľΤǤ +

+ +
+
+     (16ʿˤ)            (ǽʬ򤫤ʴѴ)
+1f0900011f41010026321f611f042121   1f0900011f410100[]1f611f04[]
+212721211f053e704a734a541f0a1f04   [][]1f05[][][]1f0a1f04
+214e1f0525372530255e1f04214f2121   []1f05[][][]1f04[][]
+214a237323692367236d236121212370   [][][][][][][][]
+2372236f236a236523632374214b1f05   [][][][][][][]1f05
+
+
+ +

+¦Υ֥å򸫤ȡ褽ʿʸ˶ᤤǥƥȥǡ +뤳ȤʬޤȤɤˡʸפǤϤʤǡޤޤ +ޤ +

+ +

+ʸǤϤʤʬϡ٤ơ֥ץ󥹡פȸƤФΤǤ +ץ󥹤ȤϡƥȥǡϤݤˡԤζػߤ +ĴȤä뤿λȤߤǤ +16 ʿ 1f ץ󥹤γϤ̣ޤ +

+ +

+ͤޤǤˡΥƥȥǡǻȤƤ륨ץ󥹤 +٤󤹤ȡΤ褦ˤʤޤ +

+ +
+
1f09 0001
+
+ (ǥ) ̤ꡣ +( 0001 ʤΤǡ̤ 1) +
1f41 0100
+
+γϡ +( 0100 ΰ̣ˤĤƤϡJIS X 4081 ˵Ҥʤ) +
1f61
+
+νλ +
1f04
+
+Ⱦɽγϡ +
1f05
+
+Ⱦɽνλ +
1f0a
+
+ +
+ +

+Υץǡɤ߹ǡʿʸƥȤˤʤäƤΤϡ +¤ EB 饤֥꤬ù򤷤Ǥ +ĤޤꡢֲԡפΤ褦ʿʸƥȤǤɽǽʥץ +ˤĤƤϽָγϡפΤ褦ɽǤʤΤˤĤƤ +̵뤹褦ˤơʿʸƥȤˤʤ褦˲ùƤΤǤ +

+ +

+ʿʸƥȤɽϤ˳ΤǡΥǡˤϴޤޤƤ +ץ󥹤¿̵뤹뤳ȤˤʤäƤޤޤ +HTML Τ褦ˡäɽϤΤǽϤʤ顢̵뤻˺Ѥ +󥹤䤻Ǥ +ǤϡHTML ǥƥȥǡؿ EB 饤֥Ѱդ +뤫Ȥȡǰʤ餢ޤ +

+ +

+ˡʤ֤Ϥޤͳ˥ƥȥǡùǤ +λȤߤѰդƤޤ +줬 եå (hook) Ǥ +եåȤȤǡƥȥǡ˲ù뤳ȤǤޤ +

+ + +

եå

+ +

+ä˲ꤷʤСeb_read_text(), +eb_read_heading() ֤ƥȥǡβùϡ餫 +줿̤ˡǹԤޤ +ȤСֲԡפΥץ󥹤ФƤϡ\n +񤭹褦ˤʤäƤޤ +

+ +

+եå (hook) ȤȡùˡѤ뤳ȤǤޤ +եåϡ餫줿եå֤ФơեåؿϿ +뤳Ȥͭˤʤޤ +եåؿϿƤȡeb_read_text() +eb_read_heading() ϡ餫ޤäǥǡ +񤭹ˡեåؿƤӽФޤ +ƤӽФ줿եåؿǡν񤭹߽ԤȤǡ +eb_read_text() eb_read_heading() ֤ +ƥȥǡѲȤ櫓Ǥ +

+ +

+EB 饤֥ˤϡ¿Υեå֤ѰդƤޤ +ƥץ󥹤ˤϡ줾Ѥ˥եåѰդƤꡢ +ʳˤʸΤΥեå¸ߤޤ +(ɤΤ褦ʥեå֤뤫ܤ +֥եåɤΰ 򻲾ȤΤȡ) +

+ +

+줾Υեå֤ϡեå (hook code) +ƤФ륳ͤǼ̤ޤ +ȤСҤΡֲԡפΥץ󥹤бեå + EB_HOOK_NEWLINE ˤʤޤ +

+ +

+ץꥱץबեå򰷤ˤϡեåνǤ +եåå (hook set) Ѱդޤ +ϡEB 饤֥Ѳǽʤ٤ƤΥեå֤Фơɤ +եåؿȤΤϿ뤿Υ֥ȤǤ +

+ +

+ǤϡºݤˤɤäƥեååȤ򰷤ΤƤޤ礦 +եååȤ EB_Hookset Υ֥ȤɽޤΤǡ +ޤ EB_Hookset ֥ȤѰդޤ +

+ +
+
+EB_Hookset hookset;
+
+
+ +

+EB_Hookset ֥ȤϡEB_Book ֥ +Ʊͤˡɬɬפޤ +

+ +
+
+eb_initialize_hookset(&hookset);
+
+
+ +

+ºݤΥեåؿϡΤ褦ʤΤˤʤޤ +Ǥϡեåؿ eb_write_text_string() Ȥ +ؿƤӽФơ<br> Ȥʸƥȥǡ +Ȥƽ񤭹Ǥޤ +

+ +
+
+EB_Error_Code
+hook_newline(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv) {
+    eb_write_text_string(book, "<br>");
+    return 0;
+}
+
+
+ +

+ؿ eb_set_hook() Ѥ뤳ȤǡΥեåؿ +եååȤϿ뤳ȤǤޤ +ޤ EB_Hook ȤΥ֥Ȥˤä +եåɤȥեåؿꤷ eb_set_hook() +ϤƤɬפޤ +Ǥϡֲԡפɽץ󥹤Фơ嵭Υեåؿ +ϿƤߤޤ +

+ +
+
+EB_Hook hook;
+
+hook.code = EB_HOOK_NEWLINE;   # եåɤ򥻥å
+hook.function = hook_newline;  # եåؿ򥻥å
+eb_set_hook(&hookset, &hook);
+
+
+ +

+ʤƱեå (եå) ʣեåؿϿƤ⡢ +ͭˤʤΤϺǸϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ؿ eb_set_hooks()s դ) ȤС +ʣΥեåؿ٤ϿǤޤ +

+ +
+
+static const EB_Hook hooks[] = {
+    {EB_HOOK_NEWLINE,        hook_newline},
+    {EB_HOOK_SET_INDENT,     hook_set_indent},
+    {EB_HOOK_WIDE_JISX0208,  hook_set_jisx0208},
+    {EB_HOOK_NULL,           NULL}
+};
+
+eb_set_hooks(&hookset, &hooks);
+
+
+ +

+뤿ˡEB_HOOK_NULL Ȥü +եåɤ֤ޤ +դƲ +

+ +

+ƥեåؿϿեååȤeb_raed_text(), +eb_raed_heading() ؤΰȤϤޤ +ޤǤǤϡNULL ϤƤޤ +&hookset ϤƤߤޤ +

+ +
+
+if (eb_read_text(&book, NULL, &hookset, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ˤäơƥȥǡ˲Ԥɽץ󥹤ȡ +\n <br> Ȥʸ +񤭹ޤ褦ˤʤޤ +

+ +

+EB_Hookset ֥ȤȤä顢 +eb_finalize_hookset() ƤǸ򤷤ޤ +

+ +
+
+eb_finalize_hookset(&hookset);
+
+
+ + +

եåʸɤδط

+ +

+Ǥϡץ󥹤ФեåˤȤޤ¾ +ˤ⡢EB 饤֥ˤʸФեåѰդƤޤ +

+ +
+
EB_HOOK_ISO8859_1
+
+ISO 8859-1 (ƥʸ 1) ʸؤΥեåʸޤ +ȤơISO 8859-1 ʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_JISX0208
+
+ȾѤ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_JISX0208
+
+Ѥ JIS X 0208 (ܸΤʴ) ʸؤΥեå +Ȥơܸ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_GB2312
+
+GB 2312 (δλ) ʸؤΥեå +Ȥơ EUC ɽʸֹ椬եåؿϤޤ + +
EB_HOOK_NARROW_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ + +
EB_HOOK_WIDE_FONT
+
+ȾѤγؤΥեå +Ȥơʸֹ椬եåؿϤޤ +
+ +

+⡢ʸƥȥǡ˸٤ˡեåؿƤӽФ +ޤ +

+ +

+εҤ򸫤Ƥʬ褦ˡեåؿϤʸֹϡҤʸ +ɤ˱ơISO 8859-1, ܸ EUC EUC Τ줫ʸ +ɽ줿Τˤʤޤ +

+ +

+եåؿϿʤСʸֹ椬ƥȥǡȤƤΤޤ +񤭹ޤޤ +

+ +

+⤷ץꥱץबEB 饤֥ɤȤϰۤʤ +ʸɤѤϡΥեåΥեåؿϿơ +Ѵ򤹤ΤǤ +ʸ˥եåؿƤӽФΤǡ٤ޤ +

+ +

+ޤEBXA-C 򰷤ˤϡ̤ʽɬפǤ +EBXA-C ǤϡʸɤȤ GB 2312 JIS X 0208 Ȥޤ +(ʸɡ 򻲾ȤΤ)EB 饤֥ˤɸν +Ǥϡɤ 0xa1a1 0xfefe ˥ޥåԥ󥰤ƾͤ뤿ᡢ +Ǥɤ餫եåʸɽˡѤʤȡ +Ǥޤ +

+ + +

θ

+ +

ָ ξϤǽҤ٤褦ˡCD-ROM +ˤ׸׸Ȥäʣθ᥽åɤޤ +EB 饤֥ǸԤȡɤθ᥽åɤǤ⡢פȥ +ϡʲΤ褦 EB_Hit Υ֥ȤȤ +ޤ +

+ +
+
+typedef struct {
+    EB_Position heading;   /* Фΰ */
+    EB_Position text;      /* ʸΰ   */
+} EB_Hit;
+
+
+ +

+ǤϡEB_Hit θФʸΰ֤ +ޤäƱˤʤޤ +äơФʸΥƥȥǡɤ߹ˤϡ¾θ᥽å +Τ褦ˤ줾ΰ֤˥ɤ߹ȤǤϤޤ +ޤ +

+ +

+ʲˡθФʸɤ߹ץ򼨤ޤ +

+ +
+
+/* Ф֤ؤΥԤ */
+if (eb_seek_text(&book, &hits[0].heading) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* Фɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    heading, &heading_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ۤɤ߹ФΡʬ */
+if (eb_forward_heading(&book) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+/* ʸɤ߹ߤԤ */
+if (eb_read_heading(&book, NULL, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+Ǥ⡢ФƤɤ߹ˡ¾θ᥽åɤѤ +Ϥʤeb_read_heading() Ȥޤ +ѤäƤΤϡʸɤ߹ߤǤ +eb_read_text() ǤϤʤeb_read_heading() +Ȥޤ +Фɤ߹िδؿ eb_read_heading() ʸ +ɤ߹ि˸Ƥ֤ȤΤϴ̯äǤϥʸ +ФƱˤʤäƤ뤿Ǥ +̾Фϰ٤񤫤Ƥޤ󤬡ºݤΤȤ +ʸ٤ޤ +

+ +

+ޤʸϸФΤ˽񤫤Ƥ뤿ᡢ嵭Τ褦˸Ф +ɤ߹ eb_forward_heading() ȤؿƤӡ +θʸɤ߹िˤ⤦ eb_read_heading() +Ƥ֤ȤѤäƧߤޤ +

+ +

+ʸɬפǸФפʤСľ +eb_forward_heading() Ƥ֤褦ˤޤ +θ eb_read_heading() Ƥ֤ȡʸɤ߹ߤޤ +

+ + +

ɽ

+ +

+˵褦ˡƥȥǡˤϲफꡢ +ɽ (copyright notice) ȤΤޤ +̤̾ꡢɽ˴ؤƥȥǡ᤿ΤǤ +

+ +

+̤ˡɽʸȤϤޤäΩǡȤѰդޤ +äơʸƬޤɤǤߤƤ⡢ɽϤɤˤ +Ĥޤ +

+ +

+ܤˤĤơɽγϰ֤Τˤ +eb_copyright() Ȥޤ +δؿϡܤɽäƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡɽ̵ͭ +Ʊʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_copyright() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_copyright(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ɽϤʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

˥塼

+ +

+ʸȤΩƥȥǡȤƤϡɽ¾ +˥塼 (menu) ȤΤޤ +˥塼ϡʸȤʤǡϿƤޤ +ɽŪʤΤǤϡ ()ספȤäΤ󤲤ޤ +

+ +

+˥塼Ǥϡ̹ܻȡפȤץ󥹤¿ѤơŪ +ʹ¤ˤʤäƤΤŪǤ +Υץ󥹤ˤϡΥƥȤΰ֤ϿƤޤ +

+ +

+ȤС CD-ROM ҤΥ˥塼Τ褦ˤʤäƤȤޤ +Ǥϡ˥塼ˤ 3 Ĥιܤޤ +

+ +
+
+ * ʸ
+ * ɽˤĤ
+ * 
+
+
+ +

+˥塼Τ줾ιܤˤϡ褬ޤ +ƥȥǡɽǤϡֽʸסɽˤĤơסֱաפ +줾ʸ̹ܻȳϤӽλץ󥹤 +դˤʤäƤޤ +Ūʬ褦˵ȡΤ褦ʷˤʤäƤޤ +

+ +
+
+ * <̹ܻȳϥ> "ʸ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "ɽ" <̹ܻȽλ>
+ * <̹ܻȳϥ> "" <̹ܻȽλ>
+
+
+ +

+HTML νΤäƤʤ顢a ȸʬΤǤ +ʤȻפޤ +

+ +
+
+<a href="./index.html">EB 饤֥Υۡڡ</a>
+
+
+ +

+ΰ־Ͻλ¦˵ܤޤΤǡ +HTML Ȥϵդˤʤޤ +­Ǥֻ̰Ȥϥ˥塼ǤʤʸǤŪ˻Ѥޤ +

+ +

+̹ܻȳϤӽλ󥹤Фơ줾եå +EB_HOOK_BEGIN_REFERENCE EB_HOOK_END_REFERENCE +ѰդƤޤ +ΰ־ϡλ󥹤ؤΥեåؿФơȤ +Ϥޤ +ȤСEB_HOOK_END_REFERENCE ؤΥեåؿƬǤϡ +Τ褦ˤɤΤޤ +

+ +
+
+EB_Error_Code
+hook_end_ref(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv)
+{
+    EB_Position position;
+
+    position.page = argv[1];    # Υڡֹ
+    position.offset = argv[2];  # Υեå
+
+
+ +

+ϡ˥塼 2 ؤȤʤޤ +νҤΡֱաפλéä顢Τ褦ɽˤʤäƤޤ +

+ +
+
+ƲǼ 켭ŵ  2  (EPWING )
+ 1  ȯ 1988ǯ 2
+ 2  ȯ 1999ǯ 11
+ 2  (EPWING ) ȯ 2000ǯ 2
+
+
+ +

+ƱͤˡֽʸסɽդơפλˤĤƤ⡢ʸϥǡ +ѰդƤޤ +޼ȡ˥塼γؤϼΤ褦ˤʤޤ +

+ +
+
+
+裱ء˥塼
+
+
+
+
+
+裲ء˥塼˥塼˥塼
+
+
+
+ +

+μǤϡ˥塼ϤǽˤʤäƤޤҤˤäƤ + 3 ء 4 ؤ³⤢ޤ +ޤ˥塼ΤѰγؿˤʤäƤȤϸ¤ޤ +˥塼λ褬ʸɽˤʤäƤ뤳Ȥ⤢ޤ +

+ +

+ܤˤĤơ( 1 ؤ) ˥塼γϰ Τˤ +eb_menu() Ȥޤ +δؿϡܤ˥塼äƤʤ +EB_ERR_NO_SUCH_SEARCH ֤ޤΤǡ˥塼̵ͭƱ +ʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_have_menu() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+err = eb_menu(&book, &position);
+if (err == EB_ERR_NO_SUCH_SEARCH) {
+    /* ˥塼Ϥʤ */
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +

+ + +

ʣ縡θ

+ +

+ʣ縡(ʣ縡 򻲾ȤΤ) ΤȤǽҤ٤褦ˡ +ʣ縡Ǥϡϸ (candidates) ѰդƤ +Ȥޤ +ϡϸȤͭʸ򤢤餫󤷤Ƥ +ץꥱץΥ桼򤵤ȤߤǤ +

+ +

+ȤС̾򸡺ΤˡΤ褦ʣ縡äȤޤ +

+ +
+
+ϸ 0: ϰ
+ϸ 1: 
+ϸ 2: 
+ϸ 3: 
+ϸ 4: 
+
+
+ +

+Τϸ 3 Ρ̡פˤϡϸȤͭʸϡˡפȡֽ + 2 ĤʤǤ礦 +Τ褦ˡϸȤͭʸ줬¤ƤˡѰ +Ƥ뤳Ȥޤ +

+ +

+ϸΤΥǡǤϤޤ¤ϥƥȥǡ +ΤΤǤ +桼ФƸ󵭤ƥȤ򼨤ΰĤ +Ƥ餦褦ˤʤäƤޤ +

+ +

+⡢Υǡ¤ϥ˥塼˻Ƥꡢ˥塼 +褦ʳع¤äƤޤ +(֥˥塼 򻲾ȤΤ) +ȤСʣ縡ϸ 2 ֹϰפˤΰߤ +顢ǽγؤϼΤ褦ˤʤ뤫Τޤ +

+ +
+
+*  ()
+* ܰʳΥ (ܺ)
+* 衼å (ܺ)
+* ̥ꥫ (ܺ)
+* ¾ (ܺ)
+
+
+ +

+ܡפ֤ȡϸ줬ꤵ줿Ȥˤʤޤ +ʳιܤˤĤƤϤ˺٤ʬव줿褬Ѱդ +ޤ +Ǥϡ̥ꥫפǤߤޤ礦 +ȡ˼Τ褦ʸΥǡ󼨤ޤ +

+ +
+
+* ꥫ ()
+* ʥ ()
+
+
+ +

+ǡ֥ꥫס֥ʥפ֤ȡϸ줬ꤵޤ +

+ +

+˼ºݤˡEB 饤֥ȤäƤ򰷤ˡˤĤ +ޤ +ޤץꥱץϡʣ縡ϸ줬ä +뤫ɤ򡢳ǧɬפǤ礦 +eb_multi_entry_candidates() Ȥȡǡγϰ +뤳ȤǤޤ +δؿϡäƤʤ EB_ERR_NO_CANDIDATES +֤ޤΤǡ̵ͭʬޤ +(ϰ֤ϼˡ̵ͭĴ٤Ȥϡ +eb_multi_entry_have_candidates() ȤؿȤޤ) +

+ +
+
+EB_Position position;
+EB_Error_Code err;
+
+/* mulit_id, entry_id ǡɤʣ縡
+ * ܤϸˤĤƳǧΤꤷޤ*/
+err = eb_multi_entry_candidates(&book, multi_id, entry_id, &position);
+if (err == EB_ERR_NO_CANDIDATES) {
+    /* ϸˤϡѰդƤʤ */
+   return;
+} else if (err != EB_SUCCESS) {
+    /* ʳΥ顼 */
+   return;
+}
+
+
+ +

+ϡ줿 (position) ˥ơ +eb_read_text() ǥƥȥǡɤ߹ߤޤ +ɤ߹ƥȤǤϡȤʤΤ줾줬䳫ϤȽλɽ +ץ󥹤˶ޤ줿ˤʤäƤޤ +

+ +
+
+* <䳫ϥ> "" <佪λ>
+* <䳫ϥ> "ܰʳΥ" <佪λ>
+* <䳫ϥ> "衼å" <佪λ>
+* <䳫ϥ> "̥ꥫ" <佪λ>
+* <䳫ϥ> "¾" <佪λ>
+
+
+ +

+䳫ϥ󥹤ФƤϡեåȤ +EB_HOOK_BEGIN_CANDIDATE ѰդƤޤ +λ󥹤Фեå 2 ढäơ˼γؤ³ +˸ƤФ EB_HOOK_END_CANDIDATE_GROUP ȡθ줬Τޤ +ϸθȤʤ˸ƤФ EB_HOOK_END_GROUP_LEAF +ʬƤޤ +

+ +

+γؤΥǡγϰ֤ϡλ󥹤ΥեåؿˡȤ +ϤäƤޤ +(˥塼ƱͤʤΤǡ˥塼β򻲹ͤˤƲ) +

+ +

+λ󥹤ФեåؿǤϡeb_current_candidate() +ȤؿȤޤ +δؿϡϥ󥹤Ƚλ󥹤δ֤˶ޤ줿ָפʸ +(ݥ) ֤ޤ +

+ +
+
+const char *candidate;
+
+candidate = eb_current_candidate(book);
+
+
+ + +

ڤꥳɤ

+ +

+ʸϡƬޤǰܤηҤäǡˤʤäƤޤ +Ѹ켭ŵʤ顢ǽñ `A' Ǹ `zzz' ޤǤ٤ưĤ +ʸפ˽񤫤뤳Ȥˤʤޤ +

+ +

+̤ˡץꥱץबñ򸡺ݤϡʸ椫 +ñʬȴФƽϤ뤳ȤˤʤǤ礦 +ȤС`dictionary' Ȥñ硢Τ褦ʸϤϤ +Ԥޤ +μ䡢μñޤDZ䡹ɽ뤳Ȥ򡢤餯Ⱦ +桼˾ޤʤȦǤ +

+ +
+
+dictionary [̾] (ʣ: dictionaries)
+ŵŵ
+[] lexicon, glossary (Ѹ켭ŵ), encyclopedia (ɴʻŵ)
+
+
+ +

+äȤ CD-ROM Ҥˤϡñν򼨤 +(ץ) Ƥޤ +ĤޤꡢʬΤȴФȤϡŻҥ֥å EPWING Ǥ +ԲǽʤΤǤ +

+ +

+ʤ顢ˤΤνҤ¿ˤϡñνλ֤ˤ +и롢ͭΥץ󥹤¸ߤޤ +󡢤Υץ󥹤ñνλפ򼨤 +ǤϤʤ̤ӤȤѤΤǤֽλ֡פȤѤǤ +Ȥ̣Ǥ +

+ +

+EB 饤֥ǤϡΡֽλ֡פΰ˻Ȥ륨ץ󥹤 +Ȥڤꥳ (stop code) ȸƤǤޤ +EB 饤֥϶ڤꥳɤưȽꤹ뵡ǽäƤޤȽ +ǤϤʤΤdz뤳Ȥ⤢ޤ +ʸڤ줿ꡢʸ³䡹ȽϤ줿ꤷޤ +

+ +

+ξϡŪ appendix +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +Ƕڤꥳɤꤹ뤳ȤˤäƲǤҤ⤢ޤ +ǰʤڤꥳɤޤä¸ߤʤҤ⾯ʤ¸ߤޤ +ڤꥳɤʤҤФơͭнˡϺΤȤޤ +

+ +

+eb_read_text() ˤʸμǤϡڤꥳɤФ줿 +ɤ߹ߤߤޤ +˷֤ eb_read_text() ƤǤ⡢ڤꥳɤ +ʸɤ߹ޤ +

+ +

+ڤꥳɤ򸡽ФɤȽˤϡeb_is_text_stopped() +Ȥޤ +δؿϡǸɤ߹ߤԤäƥȥǡˡڤꥳɤ +ФƤ 1 ֤ޤ +

+ +

+ʸʳΥƥȥǡˤڤꥳɤγǰ¸ߤޤΤǡ +eb_is_text_stopped() Ȥäƶڤꥳɤ򸡽ФǤޤ +ʸʳǤ EB 饤֥꤬μ¤˶ڤȽ̤ǤޤΤǡ +Ƚϵޤ +

+ +

+Фˤڤϡ줾ñθФνλ֤Ȥʤޤ +˥塼ʣ縡θǤϡز줿ġΥ˥塼ǡ +νλ֤ǶڤȽꤵޤ +(Ʊ쳬ؤʣĤΥ˥塼ǡäƤ⡢ġΥ˥塼ǡ +ڤޤ) +ɽǤϡʸνλ֤ǶڤȽꤵޤ +

+ + +

ץץ

+ + + + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Hook_Code

+ +

EB_Hook_Hook ϡեå֥ɤɽޤ +

+ +

+ηդ̾ȤƤޤΤǡ2 ĤΥɤ +2 黻 == != ǰӤ뤳ȤǤޤ +

+ +

+EB 饤֥Ǥϡ EB_NUMBER_OF_HOOKS ĤΥեå +Ƥޤ +Ƥ֥ɤΰˤĤƤϡ + (֥եåɤΰ 򻲾ȤΤ) +򻲾ȤƲ +

+ + +

EB_Hook

+ +

EB_Hook ϡեåɤȤбեåؿ +Ȥɽޤ +¤ϡΤ褦Ƥޤ +

+ +
+
+typedef struct EB_Hook_Struct EB_Hook;
+
+struct EB_Hook_Struct {
+    EB_Hook_Code code;
+    EB_Error_Code (*FUNC)(EB_Book *, EB_Appendix *, void *,
+        EB_Hook_Code, int, const unsigned int *);
+};
+
+
+ +

+ץꥱץϡľ EB_Hook ֥Ȥ +Ф򻲾ȤꡢåȤꤷƤ⹽ޤ +

+ + +

EB_Hookset

+ +

EB_Hookset ϡեå켰ɽޤ +EB 饤֥Ѳǽʤ٤ƤΥեå֤ФơɤΤ褦 +եåؿꤹΤϿ뤿ηǤ +

+ +

+EB_Hookiset ֥Ȥϡ٤ EB 饤֥꤬Ѱ +ƤؿǹԤޤ +ץꥱץϡľ EB_Hookset ֥Ȥ +Ф򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Hookset ֥ȤѤݤϡޤΥ֥Ȥ +Ф eb_initialize_hookset() ƤǽʤƤ +ʤޤ +

+ + +

եåؿξܺ

+ +

+ǤϡեåؿλͤˤĤƵޤ +

+ +

+ޤեåؿƤӽФ eb_read_text() +eb_read_heading() ΥץȥפϼΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+eb_read_text(EB_Book *book, EB_Appendix *appendix,
+    EB_Hookset *hookset, void *container, size_t text_max_length,
+    char *text, ssize_t *text_length)
+
+
+ +

+եåؿΥץȥפϡΤ褦ˤʤäƤޤ +

+ +
+
+EB_Error_Code
+hook_function(EB_Book *book, EB_Appendix *appendix, void *container,
+    EB_Hook_Code code, int argc, const unsigned int *argv);
+
+
+ +

+ book, appendix, container ϡ +eb_read_text()eb_read_heading() +Ϥ줿ͤΤޤޥեåؿˤϤäƤޤ +

+ +

+appendix ȤΤϡҤФǡ󶡤륪֥ +Ǥ +(appendix (Ͽ) ˤĤƾܤ +ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) + +

+ container ϡץꥱץफեåؿ +ǡϤȤ˻Ȥޤ +

+ +

argc argv ˤϡùΥƥȥǡ +Ϥޤ +ʸФեåǤϡʸֹ椬ϤäƤޤ +ץ󥹤ФեåǤϡΥ󥹼ΤΥ +(1f ǻϤޤ륳) ȡ⤷Хץ󥹤ؤ +ϤäƤޤ +ġΥեåˤơargc argv ˤɤ褦ͤ +ϤäƤΤܤ ֥եåɤΰ 򻲾ȤΤȡ +

+ +

+եåؿ椫鼡˵󤲤ؿƤӽФȤǡƥȥǡؤ +񤭹ߤԤȤǤޤ +

+ +
    +
  • eb_write_text() +
  • eb_write_text_string() +
  • eb_write_text_byte1() +
  • eb_write_text_byte2() +
+ +

+δؿλͤ˴ؤƾܤ +[ƥȥǡ] ؿξܺ١ 򻲾ȤΤȡ +

+ +

+եåؿ EB_SUCCESS ʳ֤ͤȡեåؿ +ƤӽФ eb_read_text(), eb_read_heading() +ϥ顼ȯΤȸʤΥ顼ɤ򤽤Τޤ +ץꥱץ֤ޤ +

+ +

+եåؿǤϡbook ФưʲδؿƤӽФƤ +ޤ +ƤӽФȤưϡ̤Ǥ +

+ +
    +
  • eb_seek_text() +
  • eb_read_text() +
  • eb_read_heading() +
  • eb_read_rawtext() +
  • eb_forward_text() +
  • eb_backward_text() +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbook() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_finalize_library() +
+ + +

եåɤΰ

+ +

+ƤեåɤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/text.h>
+
+
+ + +

EB_HOOK_NULL

+ +

+EB_HOOK_NULL ϸ̩ˤϥեåǤϤʤ +eb_set_hooks() ʣΥեåؿϿݤˡ +EB_Hook Ǥ򼨤Ѥޤ +ΥեåɤФơեåؿϿǤޤ +

+ +

+ܤϡ[ƥȥǡ] եåؿξܺ١ 򻲾ȤΤȡ +

+ + +

EB_HOOK_INITIALIZE

+ +

+EB_HOOK_INITIALIZE ϡeb_seek_text() +ƤӽФľκǽ eb_read_text(), +eb_read_heading() θƤӽФ˽ޤ +򤷤ȤˡȤɤǤ礦 +

+ +

+ΥեåեåؿϤ argc 0 Ǥ +եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NARROW

+ +

EB_HOOK_END_NARROW

+ +

+EB_HOOK_BEGIN_NARROW EB_HOOK_END_NARROW +ϡȾɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NARROW ʤ 0x1f04 +EB_HOOK_END_NARROW ʤ 0x1f05 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_SUBSCRIPT

+ +

EB_HOOK_END_SUBSCRIPT

+ +

+EB_HOOK_BEGIN_SUBSCRIPT +EB_HOOK_END_SUBSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ͤϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUBSCRIPT ʤ 0x1f06 +EB_HOOK_END_SUBSCRIPT ʤ 0x1f07 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ +񤭹ߤޤ +

+ + +

EB_HOOK_SET_INDENT

+ +

+EB_HOOK_SET_INDENT ϡƥȥǡιƬλ +ɽץ󥹤ФեåǤ +

+ +

+ΥեåեåؿϤ argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f09 ˤʤޤ +argv[1] ̤ɽޤ +

+ +

+̤ñ̤ǤΤǤ +ޤ̤κǾͤϡ0 ξ 1 ξ̤꤬ޤ +ˤ 1 긺äꤷޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NEWLINE

+ +

+EB_HOOK_SET_NEWLINE ϡԤɽץ󥹤 +ФեåǤ +

+ +

+eb_read_heading() (Фɤ߹) ˤǤϡ +Ԥɽץ󥹤϶ڤꥳɤȤƤⰷޤ +Τᡢץ󥹤ĤäƤ⤳ΥեåνϹԤ줺 +ɤ߹߽Ͻλޤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f0a ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_newline() ưŪϿޤ +

+ + +

EB_HOOK_BEGIN_SUPERSCRIPT

+ +

EB_HOOK_END_SUPERSCRIPT

+ +

+EB_HOOK_BEGIN_SUPERSCRIPT +EB_HOOK_END_SUPERSCRIPT ϡդɽγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_SUPERSCRIPT ʤ 0x1f0e +EB_HOOK_END_SUPERSCRIPT ʤ 0x1f0f ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_NO_NEWLINE

+ +

EB_HOOK_END_NO_NEWLINE

+ +

+EB_HOOK_BEGIN_NO_NEWLINE +EB_HOOK_END_NO_NEWLINE ϡԶػߤγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_NO_NEWLINE ʤ 0x1f10 +EB_HOOK_END_NO_NEWLINE ʤ 0x1f11 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_EMPHASIS

+ +

EB_HOOK_END_EMPHASIS

+ +

+EB_HOOK_BEGIN_EMPHASIS EB_HOOK_END_EMPHASIS +ϡĴɽγϤȽλɽץ󥹤ФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +EB_HOOK_BEGIN_EMPHASIS ʤ 0x1f12 +EB_HOOK_END_EMPHASIS ʤ 0x1f13 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CANDIDATE

+ +

EB_HOOK_END_CANDIDATE_LEAF

+ +

EB_HOOK_END_CANDIDATE_GROUP

+ +

+EB_HOOK_BEGIN_CANDIDATE ϡʣ縡θȤʤγϤ +ɽץ󥹤ФեåǤ +

+ +

+Фơλɽץ󥹤Фեå 2 +ޤ +Ĥ EB_HOOK_END_CANDIDATE_LEAF ǡȤʤ줬ºݤ +ϸȤƻȤΤǤ뤳Ȥ򼨤ޤ +⤦Ĥ EB_HOOK_END_CANDIDATE_GROUP ǡȤʤ +˺٤ʬƤ뤳Ȥ򼨤ޤ +(äơȤʤ򸡺ϸȤƻȤȤϤǤޤ) +

+ +

+եå EB_HOOK_BEGIN_CANDIDATES եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f43 ˤʤޤ +

+ +

+եå EB_HOOK_END_CANDIDATE_LEAF +EB_HOOK_END_CANDIDATE_GROUP եåؿϤ +argc 3 Ǥ +ɤΥեå⡢argv[0] ϥץ󥹤Υ +ΤΤǡ0x1f63 ˤʤޤ +եå EB_HOOK_END_CANDIDATE_GROUP argv[1] + argv[2] ϡγؤθǡγϥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +եå EB_HOOK_END_CANDIDATE_LEAF Ǥϡargv[1], +argv[2] 2 ĤȤ 0 ˤʤäƤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_REFERENCE

+ +

EB_HOOK_END_REFERENCE

+ +

+EB_HOOK_BEGIN_REFERENCE +EB_HOOK_END_REFERENCE ϡ̰֤ΥƥȥǡλȳϤ +λɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_REFERENCE եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f42 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_REFERENCE եåؿϤ argc + 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f62 ˤʤޤ +argv[1] argv[2] ϡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_KEYWORD

+ +

EB_HOOK_END_KEYWORD

+ +

+EB_HOOK_BEGIN_KEYWORD EB_HOOK_END_KEYWORD ϡ +γϤȽλɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_KEYWORD եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f41 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f61 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_DECORATION

+ +

EB_HOOK_END_DECORATION

+ +

+EB_HOOK_BEGIN_DECORATION +EB_HOOK_END_DECORATION ϡʸγϤȽλɽ +ץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_DECORATION եåؿϤ +argc 2 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe0 ˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_KEYWORD ϡեåؿ 1 ĤΰϤޤ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1fe1 ˤʤޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_NARROW_FONT

+ +

EB_HOOK_WIDE_FONT

+ +

+EB_HOOK_NARROW_FONT EB_HOOK_WIDE_FONT ϡ +줾ȾѳѳФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡʸֹɽޤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ󤬡eb_initialize_hookset() +EB_Hook ֥ȤȡեåؿȤ +eb_hook_narrow_character_text() +eb_hook_wide_character_text() ưŪϿޤ +

+ + +

EB_HOOK_ISO8859_1

+ +

+EB_HOOK_ISO8859_1 ϡISO 8859-1 (ƥʸ 1) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡISO 8859-1 ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ ISO 8859-1 Ȥơ1 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_ISO8859_1 ξǤ +

+ + +

EB_HOOK_NARROW_JISX0208

+ +

EB_HOOK_WIDE_JISX0208

+ +

+EB_HOOK_NARROW_JISX0208 EB_HOOK_WIDE_JISX0208 +ϡȾѤѤ JIS X 0208 (ܸΤʴ) ʸФեåǤ +

+ +

+ɤΥեå⡢եåؿϤ argc 1 Ǥ +argv[0] ϡJIS X 0208 ʸܸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤܸ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡ +νҤʸɤ EB_CHARCODE_JISX0208 +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_GB2312

+ +

+EB_HOOK_GB2312 ϡGB 2312 (δλ) ʸФ +եåǤ +

+ +

+ΥեåեåؿϤ argc 1 Ǥ +argv[0] ϡGB 2312 ʸ EUC ɽȤ +ʸֹɽޤ +

+ +

+եåؿϿƤʤ֤Ǥϡargv[0] ͤ򤽤Τޤ +ƥȥǡ˽񤭹ߤޤ +ĤޤꡢʸϤΤޤ EUC Ȥơ2 ХȽ񤭹ޤޤ +

+ +

+ΥեåѤΤϡνҤʸɤ +EB_CHARCODE_JISX0208_GB2312 ξǤ +

+ + +

EB_HOOK_BEGIN_MONO_GRAPHIC

+ +

EB_HOOK_END_MONO_GRAPHIC

+ +

+EB_HOOK_BEGIN_MONO_GRAPHIC +EB_HOOK_END_MONO_GRAPIHC ϡΥǤγϤȽλ +ɽץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +argc 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f32 0x1f44 Τ줫ˤʤޤ +argv[2] argv[3] ϡǤι⤵ +(ԥ) ̣ޤ +Żҥ֥åΥΥ (ǽΰ 0x1f32 +) ˤϡǤι⤵ξ󤬷礱ƤΤǡͤϤɤ 0 +ʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MONO_GRAPHIC եåؿϤ +argc 3 Ǥ +argv[0] ϡץ󥹤ΥɤΤΤǤ +EB_HOOK_BEGIN_MONO_GRAPHIC argv[0] +0x1f32 ʤ顢EB_HOOK_END_MONO_GRAPHIC +argv[0] 0x1f52 ˤʤꡢ0x1f440x1f64 ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥Υǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_GRAY_GRAPHIC

+ +

EB_HOOK_END_GRAY_GRAPHIC

+ +

+Υեå̾Τϡ졼ǤΤͽ󤵤Ƥޤ +ܥС EB 饤֥ǤϤޤбƤޤ +

+ + +

EB_HOOK_BEGIN_COLOR_BMP

+ +

EB_HOOK_BEGIN_COLOR_JPEG

+ +

EB_HOOK_END_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_COLOR_BMP EB_HOOK_COLOR_JPEG +ϡ줾 BMP JPEG Υ顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_COLOR_BMP +EB_HOOK_COLOR_JPEG եåؿϤ argc +4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4d ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6d ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +ȥեåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_IN_COLOR_BMP

+ +

EB_HOOK_BEGIN_IN_COLOR_JPEG

+ +

EB_HOOK_END_IN_COLOR_GRAPHIC

+ +

+EB_HOOK_BEGIN_IN_COLOR_BMP EB_HOOK_IN_COLOR_JPEG ϡ +줾 BMP JPEG Υ饤󥫥顼ǤγϤɽ +ץ󥹤ФեåǤ +ϤΥեå BMP JPEG ȤǥեåʬƤޤλ +եå϶̤ǡEB_HOOK_END_IN_COLOR_GRAPIHC ˤʤޤ +

+ +

+եå EB_HOOK_BEGIN_IN_COLOR_BMP +EB_HOOK_IN_COLOR_JPEG եåؿϤ argc + 4 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f3c ˤʤޤ +argv[2] argv[3] ϡǤȹ⤵ +(ԥ) ̣ޤ +argv[1] ΰ̣Ǥ +

+ +

+եå EB_HOOK_END_IN_COLOR_BMP եåؿϤ +argc 3 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f5c ˤʤޤ +argv[1] argv[2] ϡǥǡΥڡֹ +եåȤǤ +ϡEB_Position ֥ +([] ǡξܺ١ 򻲾ȤΤ) + page offset Фͤޤ +

+ +

+ǥǡμФˤĤƤϡ֥顼ǡ +򻲾ȤƤ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_CLICKABLE_AREA

+ +

EB_HOOK_END_CLICKABLE_AREA

+ +

+EB_HOOK_BEGIN_CLICKABLE_AREA ϡ顼Ǥӥ饤󥫥顼ΰФơɽϥץ󥹤ФեåǤ +ƱͤˡEB_HOOK_END_CLICKABLE_AREA Ͻλץ󥹤ФեåǤ +

+ +

+եå EB_HOOK_BEGIN_CLICKABLE_AREA եåؿϤ +argc 7 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4f ˤʤޤ +argv[1] argv[2] ϡ줾ΰγ +x, y ɸɽޤ +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] Ǥαؤ +ȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +
+
+դ顼
+ʣ
+
+
+ʣˡ
+
+⤵
+
+ΰ衡
+
+
+
+
+
+
+
+
+
+
+ +

+EB_HOOK_END_CLICKABLE_AREA եåؿϤ +argc 1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6f ˤʤޤ +

+ +

+μФˤĤƤϡ +ֻդ顼ǡ +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_WAVE

+ +

EB_HOOK_END_WAVE

+ +

+EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE ϡ +WAVE (PCM) βǡγϤȽλɽץ󥹤Ф +եåǤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f4a ˤʤޤ +argv[2] argv[3] ϲǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤ򤽤줾ɽޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_WAVE եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f6a ˤʤޤ +

+ +

+ǡμФˤĤƤϡWAVE +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

EB_HOOK_BEGIN_MPEG

+ +

EB_HOOK_END_MPEG

+ +

+EB_HOOK_BEGIN_MPEG EB_HOOK_END_MPEG ϡ +MPEG ưǡγϤȽλɽץ󥹤Фեå +Ǥ +

+ +

+եå EB_HOOK_BEGIN_MPEG եåؿϤ +argc 6 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f39 ˤʤޤ +argv[2] argv[5] ϡưǡΥե̾ +󥳡ɤˤʤޤ +argv[1] ΰ̣Ǥ +

+ +

+EB_HOOK_END_MPEG եåؿϤ argc +1 Ǥ +argv[0] ϥץ󥹤ΥɤΤΤǡ +0x1f59 ˤʤޤ +

+ +

+ưǡμФˤĤƤϡMPEG ư +򻲾ȤƲ +

+ +

+եåؿϿƤʤ֤ǤϡΥեåϥƥȥǡ˲ +񤭹ߤޤ +

+ + +

եååؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

void eb_initialize_hookset (EB_Hookset *hookset)

+ +

+ؿ initialize_hookset() ϡhookset λؤ +EB_Hookset ֥Ȥޤ +EB_Hookiset ֥ȤФ EB 饤֥¾δؿ +Ƥˡ +ɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ +eb_initialize_hookset() ƤǤϤޤ +Ƥư̤Ǥ +

+ +

+δؿϡƥեåνͤ򼡤Τ褦˥åȤޤ +

+ + + + + + + + + + + + + + +
եå + եåؿ +
EB_HOOK_NARROW_JISX0208 + eb_hook_euc_to_ascii() +
EB_HOOK_NARROW_FONT + eb_hook_narrow_character_text() +
EB_HOOK_WIDE_FONT + eb_hook_wide_character_text() +
EB_HOOK_NEWLINE + eb_hook_newline() +
嵭ʳΥեå + NULL (եåؿʤ) +
+ + +

EB_Error_Code eb_finalize_hookset (EB_Hookset *hookset)

+ +

+ؿ eb_finalize_hookset() ϡhookset ؤ +EB_Hooksest ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϡ٤Ʋޤ +٤ƤΥեåˤϡեåؿȤ NULL åȤޤ +

+ +

+򤷤֥ȤФ eb_set_hook(), eb_set_hooks() +Ƥ֤Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_set_hook (EB_Hookset *hookset, const EB_Hook *hook)

+ +

+ؿ eb_set_hook() ϡhookset ؤ EB_Hooksest +֥ȤˡեåؿϿޤ +Ͽեåμȥեåؿϡhook ǻꤷޤ +

+ +

+ƱեåɤʣեåؿϿƤ⡢ͭˤʤΤϺǸ +ϿΤǤΤǡդƲ +եåؿȤ NULL ꤹȡϿƤեå +ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_set_hooks (EB_Hookset *hookset, const EB_Hook *hooks)

+ +

+δؿ eb_set_hook() ˻ƤޤǤդθĿ +եåؿ٤ϿǤۤʤޤ +

+ +

+Ͽեåμȥեåؿϡhooks ǻꤷޤ +hooks EB_Hook ֥Ȥ (Ƭ) +ؤƤʤФʤޤ +ޤˤϡեå EB_HOOK_NULL 򥻥å + EB_Hook ֥ȤǤȤ֤ɬפޤ +

+ +

+eb_set_hooks() ϡƬ֤ˡꤵ줿եå +ФƥեåؿϿƤޤ +顼ȯȡĤΥեåϿϤˡ򼨤顼 +򤿤֤ޤ +٤ƤΥեåؿϿȡEB_SUCCESS ֤ޤ +

+ + +

Ȥ߹ߥեåؿξܺ

+ +

+EB 饤֥ϡŪʥեåؿ򤤤ĤѰդƤޤ +ǤϡΥեåؿˤĤƤλͤ⤷ޤ +

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ +

+Υեåؿ⡢ appendix container +NULL ϤƤ⡢ư˻پϤʤ褦ˤʤäƤޤ +

+ + +

EB_Error_Code eb_hook_euc_to_ascii (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_euc_to_ascii() ϡեå +EB_HOOK_NARROW_JISX0208 (Ⱦ JIS X 0208 ʸ) Τ +եåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+Υեåؿϡargv[0] ȤϤ줿 JIS X 0208 ʸ +(󥳡ǥ󥰤ܸ EUC) Ĵ١б ASCII ʸ¸ߤ + ASCII ʸƥȥǡȤƽ񤭹ߡʤ JIS X 0208 +ʸ򤽤Τޤ޽񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_narrow_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

EB_Error_Code eb_hook_wide_character_text (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_character_text() ϡեå +EB_HOOK_NARROW_FONT (Ⱦѳ) ΤΥեåؿǤ +Ʊͤ eb_hook_wide_character_text() ϡեå +EB_HOOK_WIDE_FONT (ѳ) ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡappendix 椷Ƥܤ +argv[0] ȤϤ줿ʸäƤ뤫ɤ +Ĵ٤ޤ +äƤФʸƥȥǡȤƽ񤭹ߡäƤʤ +<?> Ȥʸ񤭹ߤޤ +

+ +

+appendix NULL ξ䡢Ͽܤ +ʤ⡢ʸäƤʤΤȤưޤ +

+ +

+δؿϡ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_newline (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_narrow_newline() ϡեå +EB_HOOK_NEWLINE () ΤΥեåؿǤ +

+ +

+EB_Hookset ֥Ȥؿ +eb_initialiez_hookset() ǽȡδؿưŪ +Ͽޤ +

+ +

+δؿϡƥȥǡ \n 񤭹ߤޤ + EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_hook_empty (EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv)

+ +

+eb_hook_empty() ϡ⤷ʤեåؿǤ + EB_SUCCESS ֤ޤ +

+ + +

ƥȥǡؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/text.h>
+
+
+ + +

int eb_have_text (EB_Book *book)

+ +

int eb_have_menu (EB_Book *book)

+ +

int eb_have_copyright (EB_Book *book)

+ +

+ؿ eb_have_text() ϡbook 򤷤Ƥܤ +ʸäƤ뤫ɤĴ٤ޤ +Ʊͤˡeb_have_menu() ϥ˥塼äƤ뤫ɤ +eb_have_copyright() ɽäƤ뤫ɤĴ٤ޤ +

+ +

+δؿ⡢äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_text (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_menu (EB_Book *book, EB_Position *position)

+ +

EB_Error_Code eb_copyright (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_text() ϡbook 򤷤Ƥܤʸ +γϰ֤ position λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_menu() ϥ˥塼γϰ֤ +eb_have_copyright() ɽγϰ֤񤭹ߤޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡposition ɬԤ֤񤭹ǡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤоݤȤʤƥȥǡäƤʤС +EB_ERR_NO_SUCH_SEARCH ֤ޤ +

+ + +

EB_Error_Code eb_seek_text (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡե򥷡ޤ +֤ position ǻꤷޤ +ΤȤposition Ͼ˥եƬΰ֤ȤƲ +ޤ +(а֤ؤΥǽϡEB 饤֥ˤϤޤ) +

+ +

+ԤȡޤǤ˹Ԥäɤ߹ߤξֵϿꥻåȤޤ +eb_read_text(), eb_read_heading(), +eb_read_rawtext() Ѥƥƥȥǡɤ߹ˤϡ +äƤδؿƤӽФƤɬפޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ +

+ʤҤˤäƤϡƥȥǡ᤿եˤ¾Υǡ +˳ǼƤ뤳ȤޤƥȰʳΥǡ˥ +Ƥ⡢ƥȥǡθ߰֡ɤ߹ߤ˴ؤֵϿѲޤ +

+ + +

EB_Error_Code eb_tell_text (EB_Book *book, EB_Position *position)

+ +

+ؿ eb_seek_text() ϡbook 򤷤Ƥܤ +ƥȥǡեθߤΥ֤֤ޤ +

+ +

position λؤΰ˸ߤΥ֤񤭹ߡ +EB_SUCCESS ֤ޤ +ԤȡɬԤ֤񤭹ߡ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ܤ˥ƥȥǡ¸ߤʤȤϡEB_ERR_NO_TEXT +֤ޤ +

+ + +

EB_Error_Code eb_read_text (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

EB_Error_Code eb_read_heading (EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, void *container, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_text() eb_read_heading() ϡ +book +򤷤ƤܤΥƥȥǡեθߤΥ֤ǡ +ɤ߹ߤޤ +eb_read_heading() ϸФɤ߹ߤѤ +eb_read_text() ϤʳΥƥȥǡɤ߹ߤѤޤ +

+ +

+ɤ߹ޤ줿ƥȥǡϡɬפ˱ʸɤѴ +(ʸɡ 򻲾ȤΤ) Ԥ줿ˡhookset +λؤեååȤˤäƲùޤ +hookset NULL ΤȤϡ EB 饤֥¦ +ѰդƤ ɸΥեåå (default hookset) +Ѥޤ +ΥեååȤϡeb_initialize_hookset() ˤä +ΥեååȤǤ +

+ +

+եååȤˤäƲù줿ˡƥȥǡ text +ؤΰ˽񤭹ޤ졢񤭹Хȿ text_length λؤ +ΰ˽񤭹ޤޤ +text ϥʥʸǽüޤtext_length ˤ +ʥʸʬϴޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +text_max_length ˤʥʸʬϴäƤޤ +Τǡtext text_max_length + 1 ХʬΥǡ +ǼǤ礭ɬפǤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

eb_read_text() eb_read_heading() +ƤӽФˤϡ +餫 eb_seek_text() θƤӽФƥȥǡ +Υ֤åȤ줿֤ˤƤʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+դ˰٥СڤꥳɤФޤǤδ֤ʤ顢ؿ +֤Ƥ֤Ȥǥƥȥǡ³ɤ߹ळȤǤޤ +ڤꥳɤФȡؿƤӽФƤɤ߹ߤϹԤޤ +ξǤ⡢¾˥顼ȯʤ EB_SUCCESS ֤ꡢ +text ˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ eb_read_text() ƤӽФƥƥȥǡ +ɤ߹߻Ϥ᤿顢֤ƤӽФݤ⡢eb_read_text() +ȤʤФʤޤ +椫 eb_read_heading() ӸҤ +eb_read_rawtext() ڤؤƸƤӽФ +EB_ERR_DIFF_CONTENT 顼֤ޤ +ؿ eb_read_heading() ˤĤƤƱͤǤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ +

+Ϥ줿 appendix ڤꥳɤξäܤ +ǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ڤꥳɤưȽ̤ +ߤޤ +ȽϴʤΤǤϤʤΤǡҤˤäƤѤʰ֤ʸ +ڤƤޤΤޤ +(ʸʳΥƥȥǡ˴ؤƤϡΤ褦ϵޤ) +

+ +

+ container ϡץꥱץफեåؿ +ǡϤΤΤǤ +eb_read_text(), eb_read_heading() Ǥϡľ +ΰͤ򻲾Ȥ뤳ȤϤޤ +

+ +

+ appendix, container ϡΤޤޥեåؿ +Ϥޤ +ΰ NULL Ǥ⹽ޤ +(ƤӽФեåؿǻپ㤬ʤС) +

+ +

+ʤեåؿ eb_read_text(), eb_read_heading() +Ȥʸʤץ󥹰ʬФǡ񤭹⤦ +Ȥˡtext ˽ʬʶΰ褬ʤȤȤ +ޤ +ξ硢ؿޤ text ˽񤭹ळȤϤˡ +ä򽪤ޤ +äơޥХʸΥǡڤ줿ꤹ뤳ȤϤޤ +

+ +

+񤭹ʤäʬϡʤ text_length δˤ +ޤ +񤭹ʤäǡ book ¸ƤΤǡ +⤦ eb_read_text(), eb_read_heading() +ƤӽФȡθƤӽФǽ񤭹ʤäǡޤ text +Ƭ˽񤭹ޤޤ +񤭹ǡ text_length δޤ +

+ +

+book ¸ƤǡĹ +text_max_length ĶƤȡ񤭹ޤ˴ؿϽλ +ޤ +ΤȤ񤭹ʤäǡϰ³¸ޤ +Ĥޤꡢtext_max_length ޤ˾ݻƤ +ǡΤۤĹȡٸƤӽФƤ text ؤν񤭹ߤ +ʤߤޤΤǡդɬפǤ +

+ +

+eb_seek_text() ƤӽФeb_set_subbook() +ܤľȡ¸Ƥǡ˴ޤ +

+ + +

EB_Error_Code eb_read_rawtext (EB_Book *book, size_t text_max_length, char *text, ssize_t *text_length)

+ +

+ؿ eb_read_rawtext() ϡbook 򤷤Ƥ +ܤΥƥȥǡեθߤΥ֤ǡɤ߹ߤޤ +

+ +

+eb_read_text() ȻƤޤδؿϥեååȤˤ +ǡβùʸɤѴڹԤ鷺ǡɽΤޤ֤ޤ +ɤ߹ƥȥǡμϡǤäƤ⹽ޤ +

+ +

+ɤ߹ƥȥǡ text λؤΰ˽񤭹ޤ졢 +񤭹Хȿ text_length λؤΰ˽񤭹ޤޤ +ƥȥǡϡtext_max_length ǻꤵ줿ХȿĶ +񤭹ळȤϤޤ +eb_read_text() Ȱۤʤꡢtext ϥʥʸ +ǽüޤ +ޥХʸ䥨ץ󥹤 text λĤΰ +­ʤʤä⡢ޤǤϽ񤭹ߤޤ +

+ +

+ EB_SUCCESS ֤Ԥ +text_length λؤΰ 0 񤭹Ǹ򼨤顼 +֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+ޤδؿƤӽФˤϡ餫 eb_seek_text() +ƤӽФƥȥǡΥ֤åȤ줿֤ˤ +ʤƤϤʤޤ +򤻤˸ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ֤ƤӽФȤǡɤ߹ƥȥǡ³ +ɤ߹ळȤǤޤ +ڤꥳɤθФԤޤΤǡҤƤӽФ³ȡ +ƥȥǡեޤǹԤäƤޤޤ +

+ +

+ eb_read_rawtext() ƤӽФƥƥȥǡɤ߹ +Ϥ᤿顢֤ƤӽФݤ⡢eb_read_rawtext() +ȤʤФʤޤ +椫顢eb_read_text() eb_read_heading() +ڤؤȡ +EB_ERR_DIFF_CONTENT 顼֤ޤ +¤ϡ eb_seek_text() ƤӽФ +eb_set_subbook() ܤľޤ³ޤ +

+ + +

int eb_is_text_stopped (EB_Book *book)

+ +

+ؿ eb_is_text_stopped() ϡǸɤ߹ƥȥǡ +ãɤȽꤷޤ +

+ +

+book ܤǡǸ eb_read_text()eb_read_heading() ǥƥȥǡɤ߹ݤˡ +ڤꥳɤ򸡽ФƥȥǡΤΰָΰ֤ã +ɤ߹ߤ򽪤ƤСδؿ 1 ֤ޤ +ʳΤȤϡ0 ֤ޤ +

+ +

+book ܤ򤷤Ƥʤ䡢ܤ˥ƥȥǡ +¸ߤʤ 0 ֤ޤ +

+ +

+eb_read_text() ޤ eb_read_heading() +ƥȥǡɤ߹Ǥʤ⡢Ʊͤ 0 ֤ޤ +ƥȥǡɤ߹ǤäƤ⡢ƥȥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤؿ (eb_read_text() ι򻲾) ƤǤޤȡ +ɤ߹ǤʤȸʤޤΤǡդƲ +

+ +

+̾ϤδؿȤʤƤ⡢eb_read_text() +eb_read_heading() 0 ֤顢ƥȥǡ +ãȤߤʤƺ٤ʤǤ礦 +κݤϡ text_max_length ͤʬ礭ä + +

+ + + +

EB_Error_Code eb_write_text_byte1 (EB_Book *book, int byte1)

+ +

EB_Error_Code eb_write_text_byte2 (EB_Book *book, int byte1, int byte2)

+ +

EB_Error_Code eb_write_text_string (EB_Book *book, const char *string)

+ +

EB_Error_Code eb_write_text (EB_Book *book, const char *stream, size_t stream_length)

+ +

+δؿϡեåؿ椫顢ƥȥǡ񤭹 +Ѥޤ +񤭹ǡμˤäơȤʬƲ +

+ +

+eb_write_text_byte1() ϡbyte1 ǻꤷ +1 ХȤͤ񤭹ߤޤ +eb_write_text_byte2() ϡbyte1, byte2 +ǻꤷ 2 ХȤ񤭹ߤޤ +eb_write_text_string() ϡstring ǻꤷ +ʸ񤭹ߤޤ +eb_write_text() ϡstream ϤޤĹ +stream_length ХȤΥХ񤭹ߤޤ +

+ +

+ɤδؿ⡢ EB_SUCCESS ֤Ԥȸ +顼ɤ֤ޤ +

+ +

+ǽŪˡ񤭹ƥȥǡϡեåؿθƤӽФǤ +eb_read_text(), eb_read_heading() +ץꥱץϤޤ +

+ +

+եåؿȤƸƤӽФƤʤȤˡδؿƤӽФ +ư̤Ǥ +

+ + +

const char *eb_current_candidate (EB_Book *book)

+ +

+ؿ eb_current_candidate() ϡΥƥȥǡ +֤߰˽񤫤Ƥ롢ʣ縡θȤʤ֤ޤ +

+ +

+֤ʸĹϡĹ EB_MAX_WORD_LENGTH ХȤˤʤޤ +Ĺ˥ʥʸϴޤߤޤ +

+ +

+δؿüǡʣ縡θȤʤνλ̣ +ץ󥹤ؤΥեåǤ EB_HOOK_END_CANDIDATE_LEAF + EB_HOOK_END_CANDIDATE_GROUP Фեåؿ +Τ߸ƤӽФȤǤޤ +ʳξǸƤӽФȤưϡ̤Ǥ +

+ +

+δؿθƤӽФǤեåؿϤäƤ EB_Book +֥ (ؤΥݥ) 򡢤Τޤޤδؿ˰ȤϤ +ޤ +

+ +

+book ʸ +([CD-ROM Ҥ EB_Book ֥] ǡξܺ١ 򻲾ȤΤ) + EB_CHARCODE_ISO8859_1 ʤ顢ؿ֤ʸ ISO 8859-1 +ˤʤꡢʳʸɤξܸ EUC ˤʤޤ +ؿ֤ʸϡ¾Υեåˤùαƶޤ +ʸɤѴԤʳϡǡ򤽤Τޤ֤ޤ +

+ +

+ʤδؿ֤ʸ򻲾ȤǤΤϡեåؿޤǤ +֤ǤΤǡդƲ +

+ + +

EB_Error_Code eb_forward_text (EB_Book *book, EB_Appendix *appendix)

+ +

EB_Error_Code eb_backward_text (EB_Book *book, EB_Appendix *appendix)

+ +

+ؿ eb_forward_text() eb_backward_text() ϡ +book 򤷤ƤܤʸΥ֤˰ư +ʸζڤꥳɤñ̤ȤƬФԤޤ +礦ɡ CD ζʤƬФƱǤ +

+ +

+eb_forward_text() ʸ˸äƥ֤ +ʤᡢeb_backward_text() Ƭ˸äƥ֤ +ᤷޤ +

+ +

+eb_forward_text() θƤӽФǤϡ֤ɬθ +γϰ֤ޤǰưޤ +Ф eb_backward_text() θƤӽФǤϡư褬 +ˤäưۤʤޤ +⤷ߤΥ֤ñƬˤȤϡ +eb_backward_text() θƤӽФˤäơñ +Ƭ˥֤ưޤ +֤ñˤȤϡñ +Ƭ˰ưޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ +

+äơδؿƤӽФˤϡ餫 eb_seek_text() + eb_read_text() ƤӽФƤʤȤޤ +(eb_read_text() θƤӽФˤϡä +eb_seek_text() θƤӽФ뤳ȤȤʤޤ) +

+ +

+eb_read_text() ǤϤʤeb_read_heading() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+ʸǡƬãƤޤäơˤ⤦ʸʤȤϡ +EB_ERR_END_OF_CONTENT ֤ޤ +

+ +

+appendix NULL ǤϤʤڤꥳɤξ +äܤǤСʸζڤꥳɤȤƤͤѤޤ +ʳξϡeb_read_text() ƱˡǶڤꥳɤ +ưȽ̤ߤޤ +

+ +

+־ˤΤ˥塼ɽΤ褦ˡʸʳ +ƥȥǡǤäƤ⹽ޤ +ʸʳΥƥȥǡˤϡƬФ֤ǡ +Ƭ֤ˤޤΤǡδؿΩľϤۤȤ +ޤ +

+ +

+(˥塼ǤϡġγؤΥ˥塼ǡ줾Ω +ƥȥǡˤʤäƤ뤿ᡢƬФԤäƤΥ˥塼ǡؤ +ưǤޤ +ʣ縡θƱͤǤ) +

+ + +

EB_Error_Code eb_forward_heading (EB_Book *book)

+ +

+ؿ eb_forward_heading() ϡbook 򤷤Ƥ +ܤθФΥ֤˰ưФζڤñ̤ȤƬФ +Ԥޤ +

+ +

+ʸƬФԤؿ eb_forward_text() θФǤǤ +ФƬФԤϡʸ˸¤뤿ᡢ +eb_backward_heading() ȤؿѰդƤޤ +

+ +

+δؿƤ֤ȡ֤θФγϰ֤ޤǰưޤ +(ǤϡФΰˡָФפȡʸפߤ˽񤫤 +ޤǡ¤ʸפȡָФפ϶̤դޤ +֤θФΰξ硢δؿƤ֤ȺǤᤤ +ָФפ⤷ϡʸפγϰ֤ޤǰưޤ) +

+ +

+eb_read_heading() ǤϤʤeb_read_text() +eb_read_rawtext() θƤӽФǤδؿ +ƤӽФȡEB_ERR_DIFF_CONTENT ֤ޤ +ޤä eb_seek_text() ǥˤδؿ +ƤӽФȡEB_ERR_NO_PREV_SEEK ֤ޤ +

+ +

+δؿϡ EB_SUCCESS ֤Ԥȸ򼨤 +顼ɤ֤ޤ +

+ +

+ʳθ᥽åɤθФγǼ֤Фơδؿ +Ƥ֤ȤǽǤΤ褦ɬפ뵡ϤʤǤ礦 +

+ + +

+ +

+ʸɤ˼ϿƤʤŪʸΤȤ¯ˡֳ +ȸޤ +Ȥġʸ̤뤿ˡʸɤ˼Ͽ줿 +ʸȤϽʣʤ֤ˡʸʸֹ˳꿶Τ̤Ǥ +(Ƥʸֹξܺ٤ˤĤƤϡʸɡ 򻲾ȤΤȡ) +

+ +

+ΤŻҥ֥åEPWING Ǥ⡢ۤȤɤȤäƤޤ +ϽƱΤǥХХǡޤä촶Ϥޤ +ĤޤꡢƱʸֹȤäƤƤ⡢Ƥ볰ϽҤˤä +㤤ޤ +뤳ȤǽǤĤ CD-ROM Ǥܤ +äۤʤ뤳Ȥޤ +ܤˤäƤϡɴγƤ뤳Ȥ⤢ޤ +

+ +

+CD-ROM ҤǤϡλǡ (Ĥޤե) Ѱդ +ޤ +եȤϥӥåȥޥåץǡǤꡢҤˤäƤ礭ΰۤʤ +ΥեȤѰդƤޤ +

+ +

+դ˸СФ󶡤ǡϡեȤǤ +ʸֹƤ줿ʤΤȯʤΤ +äŪʾѰդƤޤ +ץꥱץब򥵥ݡȤ뤿ˤϡΥե +򤽤ΤޤɽʳˡϤʤǤ礦 +

+ + + +

Ⱦѳѳ

+ +

+CD-ROM Ҥˤ볰ˤϡѳסȾѳפबޤ +ѳѰդƤեȤβȽĤĹ褽 1:1 ˤʤäƤꡢ +ȾѳǤ 1:2 ˤʤäƤޤ +

+ +
+
+ѳȾѳ
+ʣߣˡʣߣ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

+ƥȥǡˤϡȾɽγϤȽλɽץ󥹤 + (֥ƥȥǡ 򻲾ȤΤ) +ϤȽλδ֤֤줿ΤȾѳʳΤȤʤѳ +ʤޤ +

+ +

+ʸֹƱǤ⡢ѤȾѤǤϤޤäۤʤ뤳Ȥ⤢ޤ +Τǡʸֹ顢ѤȾѤΤɤ餫ȽǤ뤳Ȥ +Ǥޤ +ʤ餺ȾѳϤΥץ󥹤иƤɤ +Ȥ˴ŤȽǤʤȤޤ +

+ +

+ѤȾѤȽ EB 饤֥¦ǹԤޤΤǡ +ץꥱץबʸ̮βϤԤɬפϤޤ +

+ +

+CD-ROM ҤܤˤϡȾѳ뤤ѳΤɤ餫 +ƤΤ⤢ޤξȤƤΤ⤢ޤ +

+ + +

礭ȳ

+ +

+ܤˤϡƤ볰ΥեȤӥåȥޥå׷ǼϿ +ޤ +եȤ礭ϡĤΥԥˤ 16, 24, 30, 48 +4 बꡢѳȾѳ줾ΥեȤ礭 +(Υԥ߽ĤΥԥ) ϼ̤ˤʤޤ +

+ + + + + + + +
ĤΥԥ Ⱦѳ
16 16x16 8x16
24 24x24 16x24
30 32x30 16x30
48 48x48 24x48
+ +

+٤ƤܤǤ 4 ΥեȤѰդƤ櫓Ǥ +ޤ +Ĥ 16 ԥΤΤɬѰդƤޤʳϤʤȤ +ޤ +(ޤäƤʤС16 ԥΥեȤѰդ +ޤ) +

+ +

+EB 饤֥ǤϡΤ褦˽ΥԥĤޤ +եȤι⤵ (font height) ˡեȤ礭 +̤Ƥޤ +ơ줾ΥեȤι⤵ (16, 24, 30, 48) Фơ + (font code) ȤΤƤƤޤ +եȤι⤵ꤹݤϡɬγɤȤޤ +

+ + + + + + + +
ĤΥԥ
16 EB_FONT_16
24 EB_FONT_24
30 EB_FONT_30
48 EB_FONT_48
+ + +

γեȤι⤵

+ +

+EB_Book ֥ȤܤѰդƤ볰ե +ι⤵椫ǡ +γեȤι⤵ (current font height) Ȥƻꤹ +ȤǤޤ +EB 饤֥dzΥեȥǡ (ӥåȥޥåץǡ) Фˤϡ +եȤι⤵򤢤餫򤷤Ƥɬפޤ +

+ +

+򤹤ˤϡؿ eb_set_font() Ȥޤ +ʲΥץϡ⤵ 24 ԥΥեȤ򤹤Ǥ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȲꤷƤޤ*/
+if (eb_set_font(&book, EB_FONT_24) != EB_SUCCESS) {
+    printf("eb_set_font_() failed\n");
+    return;
+}
+
+
+ +

+ΥץǤϡ⤵ 24 ԥΥեȤܤѰդ +ΤȲꤷƤޤºݤˤѰդƤʤܤޤ +⤷ܤ⤵ 24 ԥΥեȤѰդƤʤС +eb_set_font() EB_ERR_NO_SUCH_FONT ֤ޤ +

+ +

+򤹤ˡäƤܤѰդƤեȤ +ΤꤿȤ⤢ޤ +ˤϡ2 ̤ˡޤ +

+ +

+ޤ 1 ܤϡܤѰդƤեȤι⤵ΰ +eb_font_list() ǼˡǤ +ϡܥɤΰ eb_subbook_list() +ȤɤƤޤ +

+ +
+
+EB_Font_Code font_list[EB_MAX_FONTS];
+int font_count;
+int i;
+
+if (eb_font_list(&book, font_list, &font_count) != EB_SUCCESS) {
+    printf("eb_font_list() failed\n");
+    return;
+}
+
+for (i = 0; i < font_count; i++) {
+    if (font_list[i] == EB_FONT_24)
+        printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+2 ܤϡeb_have_font() ȤǤ +δؿϡι⤵ΥեȤܤѰդƤ뤫ɤ +Ĵ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_font(&book, EB_FONT_24)) {
+    printf("this subbook has EB_FONT_24\n");
+}
+
+
+ +

+ޤܤȾѳѳƤ뤫ɤϡ줾 +eb_have_narrow_font(), eb_have_wide_font() +ȤäĴ٤뤳ȤǤޤ +

+ +
+
+if (eb_have_narrow_font(&book))
+    printf("this subbook has narrow font\n");
+if (eb_have_wide_font(&book))
+    printf("this subbook has wide font\n");
+
+
+ +

+ʤ餫ܤ򤷤Ƥʤȡι⤵ǤʤΤ +դƲ +eb_set_subbook() ܤڤؤȡե +ι⤵Ͼ̤ξ֤ޤ +

+ + +

եȤμФ

+ +

+ι⤵򤷤֤ǤСΥեȥǡ +(ӥåȥޥåץǡ) ФȤǤޤ +

+ +

+եȥǡФؿϡ +ѳʤ eb_wide_font_character_bitmap() +Ⱦѳʤ eb_narrow_font_character_bitmap() Ǥ +

+ +

0xa121 ΥեȥǡФץϡ +Τ褦ˤʤޤ +ȾѳξϡƤӽФؿ̾ѤǤ +

+ +
+
+/* book  EB_Book Υ֥ȤǡǤ
+ * Ҥ˷դ졢ܤȳι⤵ȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_48];
+
+if (eb_wide_font_character_bitmap(book, 0xa121, bitmap)
+    != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+Ǥϡbitmap ˥եȥǡǼƤޤ +bitmap ΰȤ EB_SIZE_WIDE_FONT_48 +ХȤݤƤޤϹ⤵ 48 ԥγǡǼ +ɬפʥɽޤ +

+ +

+եȥǡΥϡι⤵˱ưǤ +⤵ 48 ԥϳǤΥʤΤǡΥΰ +ѰդСɤι⤵γǤǼǤޤ +

+ +

+ǡϡӥåȥޥå׷ΥǡˤʤäƤޤ +طʿӥå 0, ʿӥå 1 Ȥơƥԥͤ¤٤ +ޤ +¤Ǥ夫ޤϱ˸äƥԥ򽦤äƤüޤ +褿IJʤ˹ߤơޤ˥ԥ򽦤ޤ +ʲֲʤޤǤ򷫤֤ޤ +

+ +

+ХǤϡ128, 64, 32, ...1 ην˥ӥåͤǼ +ޤ +Ĥޤꡢ128 ηϰֺΥԥ롢1 ηϰֱΥԥб +ޤ +

+ +

+ʲˡ16x16 ѳΥӥåȥޥåפȡΥХ򵭤ޤ +طʿʿǤ +

+ +
+
+0x00, 0x00,
+0x00, 0x00,
+0x1f, 0x88,
+0x00, 0xc8,
+0x09, 0x28,
+0x09, 0xf8,
+0x3e, 0x28,
+0x00, 0x28,
+0x10, 0x08,
+0x10, 0x08,
+0x1f, 0xf8,
+0x18, 0x08,
+0x18, 0x08,
+0x1f, 0xf8,
+0x00, 0x00,
+0x00, 0x00,
+
+
+ + +

եȤѴ

+ +

+EB 饤֥ˤϡΥӥåȥޥåץǡ XBM, XPM, GIF, BMP, PNG +γƲѴؿѰդƤޤ +ѴԤؿϡ 5 ĤǤ +

+ + + + + + + +
eb_bitmap_to_xbm() XBM ؤѴ
eb_bitmap_to_xpm() XPM ؤѴ
eb_bitmap_to_gif() GIF ؤѴ
eb_bitmap_to_bmp() BMP ؤѴ
eb_bitmap_to_png() PNG ؤѴ
+ +

+ɤδؿƤӽФƱǤǤ XBM ؤѴΥץ +򼨤ޤ +

+ +
+
+/* bitmap ˹⤵ 16 ѳΥӥåȥޥåץǡǼ
+ * ƤȲꤷƤޤ*/
+char bitmap[EB_SIZE_WIDE_FONT_16];
+char xbm[EB_SIZE_WIDE_FONT_16_XBM];
+size_t xbmsize;
+
+if (eb_wide_font_character_bitmap(bitmap, EB_WIDTH_WIDE_FONT_16,
+    EB_HEIGHT_FONT_16, xbm, &xbmsize) != EB_SUCCESS) {
+    return;
+}
+
+
+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ƥγ

+ +

+ϥƥȥǡ (ʸ˥塼ʤ) ǻȤƤޤ +

+ +

+ץꥱץबƥȥǡ˽и볰̤ +ԤˤϡФեåꤷơեåؿǽ +Ȥˤʤޤ +

+ +

+ФեåϡѳФ EB_HOOK_WIDE_FONT +ȾѳФ EB_HOOK_NARROW_FONT बޤ +⡢и٤ˡꤷեåؿƤӽФޤ +

+ +

+եåΰˤĤƤϡ֥եåɤΰ 򻲾ȤΤȡ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/eb.h>
+
+
+ + +

EB_Font_Code

+ +

+ɤϡι⤵ (ԥ) ɽޤ +ߤΤȤƤ⤵ϼ̤Ǥ +

+ +
    +
  • EB_FONT_16 +
  • EB_FONT_24 +
  • EB_FONT_30 +
  • EB_FONT_48 +
  • EB_FONT_INVALID +
+ +

+ɤμΤͤǤEB_FONT_16 ͤ 16 Ǥ +ޤ +¾ƱͤǤΤǡդƲ +

+ +

+EB_FONT_INVALID ̤ʳɤǡʳͤ +ɽѤޤ +

+ + +

ξܺ

+ +

+ƤȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_WIDTH_NARROW_FONT_16

+ +

EB_WIDTH_NARROW_FONT_24

+ +

EB_WIDTH_NARROW_FONT_30

+ +

EB_WIDTH_NARROW_FONT_48

+ +

EB_WIDTH_WIDE_FONT_16

+ +

EB_WIDTH_WIDE_FONT_24

+ +

EB_WIDTH_WIDE_FONT_30

+ +

EB_WIDTH_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γ +ʬ (Υԥ) int ɽƤޤ +

+ + +

EB_HEIGHT_NARROW_FONT_16

+ +

EB_HEIGHT_NARROW_FONT_24

+ +

EB_HEIGHT_NARROW_FONT_30

+ +

EB_HEIGHT_NARROW_FONT_48

+ +

EB_HEIGHT_WIDE_FONT_16

+ +

EB_HEIGHT_WIDE_FONT_24

+ +

EB_HEIGHT_WIDE_FONT_30

+ +

EB_HEIGHT_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +νΥԥ int ɽƤޤ +

+ +

+EB_HEIGHT_NARROW_FONT_16 +EB_HEIGHT_WIDE_FONT_16 μºݤͤ 16 Ǥ +( EB_FONT_16 μºݤͤ 16 ǤϤޤΤǡ +դƲ) +

+ + +

EB_SIZE_NARROW_FONT_16

+ +

EB_SIZE_NARROW_FONT_24

+ +

EB_SIZE_NARROW_FONT_30

+ +

EB_SIZE_NARROW_FONT_48

+ +

EB_SIZE_WIDE_FONT_16

+ +

EB_SIZE_WIDE_FONT_24

+ +

EB_SIZE_WIDE_FONT_30

+ +

EB_SIZE_WIDE_FONT_48

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +ΥӥåȥޥåץǡǼΤɬפΰ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XBM

+ +

EB_SIZE_NARROW_FONT_24_XBM

+ +

EB_SIZE_NARROW_FONT_30_XBM

+ +

EB_SIZE_NARROW_FONT_48_XBM

+ +

EB_SIZE_WIDE_FONT_16_XBM

+ +

EB_SIZE_WIDE_FONT_24_XBM

+ +

EB_SIZE_WIDE_FONT_30_XBM

+ +

EB_SIZE_WIDE_FONT_48_XBM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xbm() Ѥ XBM +ѴݤˡѴ XBM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_XPM

+ +

EB_SIZE_NARROW_FONT_24_XPM

+ +

EB_SIZE_NARROW_FONT_30_XPM

+ +

EB_SIZE_NARROW_FONT_48_XPM

+ +

EB_SIZE_WIDE_FONT_16_XPM

+ +

EB_SIZE_WIDE_FONT_24_XPM

+ +

EB_SIZE_WIDE_FONT_30_XPM

+ +

EB_SIZE_WIDE_FONT_48_XPM

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_xpm() Ѥ XPM +ѴݤˡѴ XPM Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_GIF

+ +

EB_SIZE_NARROW_FONT_24_GIF

+ +

EB_SIZE_NARROW_FONT_30_GIF

+ +

EB_SIZE_NARROW_FONT_48_GIF

+ +

EB_SIZE_WIDE_FONT_16_GIF

+ +

EB_SIZE_WIDE_FONT_24_GIF

+ +

EB_SIZE_WIDE_FONT_30_GIF

+ +

EB_SIZE_WIDE_FONT_48_GIF

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_gif() Ѥ GIF +ѴݤˡѴ GIF Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_BMP

+ +

EB_SIZE_NARROW_FONT_24_BMP

+ +

EB_SIZE_NARROW_FONT_30_BMP

+ +

EB_SIZE_NARROW_FONT_48_BMP

+ +

EB_SIZE_WIDE_FONT_16_BMP

+ +

EB_SIZE_WIDE_FONT_24_BMP

+ +

EB_SIZE_WIDE_FONT_30_BMP

+ +

EB_SIZE_WIDE_FONT_48_BMP

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_bmp() Ѥ BMP +ѴݤˡѴ BMP Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

EB_SIZE_NARROW_FONT_16_PNG

+ +

EB_SIZE_NARROW_FONT_24_PNG

+ +

EB_SIZE_NARROW_FONT_30_PNG

+ +

EB_SIZE_NARROW_FONT_48_PNG

+ +

EB_SIZE_WIDE_FONT_16_PNG

+ +

EB_SIZE_WIDE_FONT_24_PNG

+ +

EB_SIZE_WIDE_FONT_30_PNG

+ +

EB_SIZE_WIDE_FONT_48_PNG

+ +

+ϡȾѡѤӤ줾ι⤵ () γʬ +Υӥåȥޥåץǡ eb_bitmap_to_png() Ѥ PNG +ѴݤˡѴ PNG Υǡ礭ɽƤޤ +ͤ int ǡñ̤ϥХȤǤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/font.h>
+
+
+ + +

EB_Error_Code eb_font (EB_Book *book, EB_Font_Code *font_code)

+ +

+ؿ eb_font() ϡ򤷤Ƥܤˤơ +եȤι⤵ɽɤ font_code λؤΰ +񤭹ߤޤ +

+ +

+ȴؿ EB_SUCCESS ֤ޤ +Ԥ font_code λؤΰ EB_FONT_INVALID +񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢեȤι⤵򤵤ƤʤФʤޤ +򤵤ƤʤСEB_ERR_NO_CUR_FONT ֤ޤ +ܤΤΤ򤷤Ƥʤ⡢ƱͤǤ +

+ + +

EB_Error_Code eb_set_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_set_font() ϡܤˤ볰եȤ +⤵򥻥åȤޤ +åȤ볰եȤΡֹ⤵פϡб볰ɤ +font_code ǻꤷޤ +

+ +

+δؿϡ EB_SUCCESS ֤ꤷֹ⤵פ +γեȤι⤵פȤʤޤ +Ǥ˳եȤι⤵򤷤Ƥϡä̤ξ֤ +Ƥ餢餿 font_code 򤷤ޤ +

+ +

+Ԥȸ򼨤顼ɤ֤եȤι⤵̤ +֤ˤʤޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ޤܤäƤʤեȤι⤵ꤵȡ +EB_ERR_NO_SUCH_FONT ֤ޤ +

+ + +

void eb_unset_font (EB_Book *book)

+ +

+ؿ eb_unset_font() ϡγեȤι⤵̤ +ξ֤ᤷޤ +book Ҥ˷դƤʤܤ򤵤Ƥʤ硢 +⤷ϳեȤι⤵򤵤Ƥʤϲ⤷ޤ +

+ + +

EB_Error_Code eb_font_list (EB_Book *book, EB_Font_Code *font_list, int *font_count)

+ +

+ؿ eb_font_list() ϡܤƤ볰 +⤵ΰ EB_Font_Code ˤơfont_list +λؤΰ˽񤭹ߤޤ +

+ +

EB_MAX_FONTS ĤǤޤ +äơҤϿƤܤθĿ font_count λؤΰ +񤭹ߤޤ +(ߤΥСǤ EB_MAX_FONTS ͤ 4 ˤʤäƤޤ +⤵ 16, 24, 30, 48 ԥ 4 Ǥ) +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡfont_count λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook Τ줫ܤ򤵤ƤʤƤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +

+ + +

int eb_have_font (EB_Book *book, EB_Font_Code font_code)

+ +

+ؿ eb_font() ϡfont_code ǻꤷ⤵ +եȤܤäƤ뤫ɤĴ٤ޤ +

+ +

+äƤ 1 ֤äƤʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_font_height (EB_Book *book, int *height)

+ +

+ؿ eb_font_height() ϡbook +եȤι⤵ (Υԥ) height λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡheight λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_font_height2 (EB_Font_Code font_code, int *height)

+ +

+eb_font_height() ȻƤޤܤǤϤʤ +font_height ǻꤵ줿ɤι⤵ (Υԥ) +񤭹ۤʤޤ +

+ + +

int eb_have_narrow_font (EB_Book *book)

+ +

int eb_have_wide_font (EB_Book *book)

+ +

+ؿ eb_have_narrow_font() ϡܤȾѳ +Ƥ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_font() ϡѳƤ뤫 +ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +book ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width (EB_Book *book, int *width)

+ +

EB_Error_Code eb_wide_font_width (EB_Book *book, int *width)

+ +

+ؿ eb_narrow_font_width() ϡbook +եȤι⤵ˤȾѳ (Υԥ) +height λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_width() ѳ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡwidth λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳι⤵򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_width2 (EB_Font_Code font_code, int *width)

+ +

EB_Error_Code eb_wide_font_width2 (EB_Font_Code font_code, int *width)

+ +

+eb_narrow_font_width(), eb_wide_font_width() +ƤޤܤǤϤʤfont_height ǻꤵ줿 +ɤ (Υԥ) 񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_size (EB_Book *book, size_t *size)

+ +

EB_Error_Code eb_wide_font_size (EB_Book *book, size_t *size)

+ +

+ؿ eb_narrow_font_size() ϡbook +եȤι⤵ˤȾѳʬΥǡ (Хȿ) +size λؤΰ˽񤭹ߤޤ +Ʊͤˡeb_wide_font_size() ѳΥ񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +

+ + +

EB_Error_Code eb_narrow_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

EB_Error_Code eb_wide_font_size2 (EB_Font_Code font_code, size_t *size)

+ +

+eb_narrow_font_size(), eb_wide_font_size() +ƤޤܤǤϤʤ font_height ǻ +줿ɤγʬΥǡ񤭹ۤʤޤ +

+ + +

EB_Error_Code eb_narrow_font_start (EB_Book *book, int *start)

+ +

EB_Error_Code eb_wide_font_start (EB_Book *book, int *start)

+ +

+ؿ eb_narrow_font_start() ϡbook +ܤˤȾѳƬʸֹ (ȾѳʸֹǺǾΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_font_end (EB_Book *book, int *end)

+ +

EB_Error_Code eb_wide_font_end (EB_Book *book, int *end)

+ +

+ؿ eb_narrow_font_end() ϡbook +ˤȾѳκǸʸֹ (ȾѳʸֹǺΤ) +start λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+ؿ eb_wide_font_end() ϡȾѳǤϤʤѳˤĤ +Ĵ٤Ȥơeb_narrow_font_end() ƱǤ +

+ + +

EB_Error_Code eb_narrow_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

EB_Error_Code eb_wide_font_character_bitmap (EB_Book *book, int character_number, char *bitmap)

+ +

+ؿ eb_narrow_font_character_bitmap() ϡbook +ܤƤ롢ȾѳΥӥåȥޥåץǡФޤ +Фʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿϥӥåȥޥåץǡ bitmap λؤΰ +񤭹ߡEB_SUCCESS ֤ޤ +Ԥȡbitmap λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+餫ᡢbook ϳեȤι⤵򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_FONT ֤ޤ +ܤȾѳƤʤ⡢Ϥ EB_ERR_NO_CUR_FONT +֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+ؿ eb_wide_font_character_bitmap() ϡȾѳǤϤʤ +ѳΥӥåȥޥåץǡФȤơ +eb_narrow_font_character_bitmap() ƱǤ +

+ +

+ӥåȥޥåץǡηˤĤƤϡ +ֳեȤμФ 򻲾ȤΤȡ +

+ + +

EB_Error_Code eb_forward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_forward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_font_character() ϡbook +ܤƤȾѳʸֹ character_number +n ĸ˰֤볰ʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢbook ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ܤȾѳäƤʤϡEB_ERR_NO_CUR_FONT +֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_BMP ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_font_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_font_character() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_font_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_font_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_backward_narrow_font_character() +eb_forward_narrow_font_character() ȤϤ礦ɵդδؿǤ +book ܤƤȾѳʸֹ +character_number n ˰֤볰 +ʸֹޤ +

+ +

+Ʊͤˡeb_backward_wide_font_character() ϡѳ +Ĥ n γʸֹؿǡ +eb_forward_wide_font_character() ȿФδؿǤ +

+ +

+n ˤοꤹ뤳Ȥǽǡ줾켡θƤӽФ +ˤʤޤ +

+ +
+
+/* Ⱦѳξ (n < 0) */
+eb_forward_narrow_font_character (book, -n, character_number);
+
+/* ѳξ (n < 0) */
+eb_forward_wide_font_character (book, -n, character_number);
+
+
+ + +

EB_Error_Code eb_narrow_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_narrow_font_png_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xbm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_xpm_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_gif_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_bmp_size (EB_Font_Code height, size_t *size)

+ +

EB_Error_Code eb_wide_font_png_size (EB_Font_Code height, size_t *size)

+ +

+ǽ 5 Ĥδؿ +(eb_narrow_font_xbm_size() +eb_narrow_font_png_size()) ϡ height +ȾѳĤΥӥåȥޥåפ XBM, XPM, GIF, BMP, PNG ˤ줾Ѵ +ȤΥǡ size λؤΰ˽񤭹ߤޤ +

+ +

+Ʊͤˡ 5 Ĥδؿ +(eb_wide_font_xbm_size() +eb_wide_font_png_size()) ϡѳѴȤ +ǡ񤭹ߤޤ +

+ +

+δؿ⡢ EB_SUCCESS ֤ޤ +Ԥȡsize λؤΰ 0 񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ + +

EB_Error_Code eb_bitmap_to_xbm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_xpm (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_gif (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_bmp (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

EB_Error_Code eb_bitmap_to_png (const char *bitmap, int width, int height, char *image, size_t *image_length)

+ +

+ 5 Ĥδؿϡeb_narrow_font_character() ޤ +eb_wide_font_character() ǼФΥӥåȥޥåפ +XBM, XPM, GIF, BMP, PNG ˤ줾Ѵޤ +

+ +

+ӥåȥޥåץǡλؤΰ bitmap ǻꤷӥåȥޥåפ +⤵ width, height Ϥޤ +

+ +

+ؿθƤӽФȡimage λؤΰѴΥǡ +񤭹ޤ졢image_length λؤΰѴΥǡ礭 +񤭹ޤޤ +

+ +

+XPM, GIF, PNG ؤѴǤϡʿϹطʿƩˤʤޤ +BMP ؤѴǤϡʿϹطʿˤʤޤ +XBM ϥΥѤΥǡʤΤǡϤޤ +

+ + +

ץץ

+ + + + +

Хʥǡ

+ +

+Хʥǡ (binary data) Ȥϡ +Ǥư衢ȤäޥǥǡΤȤؤޤ +Хʥǡϡɬƥȥǡ +(֥ƥȥǡ 򻲾ȤΤ) +黲ȤѤޤ +

+ +

+ΤȤ EB 饤֥ǤϡΥХʥǡ갷Ȥ +Ǥ櫓ǤϤޤ +Żҥ֥åǰΤϡ2 ĴΥΥǤȡ顼 (JPEG) +Ǥ +EPWING ǤϡΥǡ顼 (BMP JPEG) ˲äơ +WAVE (PCM) MPEG ư򰷤ȤǤޤ +

+ +

+EB 饤֥꤬󶡤ƤΤϡХʥǡ +CD-ROM Ҥ뵡ǽǤ +ɽꤹ뵡ǽѰդƤޤΤǡդƲ +

+ +

+ץꥱϡ¼켭Ȥäоݤˤʤ顢 +ХʥǡɽˤбʤƤپϤޤ +Ǥϡ޴դɽ˥ΥǤȤäƤؼŵ +褦ˡбʤؤʤΤ⤢ޤ +Хʥǡɽεǽ뤫ɤϡץꥱ +оݼɤϰϤޤǤˤΤˤäƷɤǤ礦 +

+ +

+ʲξϤǤϼ̤˥ХʥǡΰˤĤޤ +

+ +

+Хʥǡμ˥ǡμФ̯˰ۤʤޤ ( +ǡμϿˡ̯˰ۤʤäƤ뤫¾ʤޤ)褽 +ϡΤ褦ʤΤˤʤޤ +

+ +
    +
  1. +ƥȥǡΥեåѤơХʥǡλȾ롣 + +
  2. +eb_binary_set_...() ؿƤӽФơꤷ֤ +Хʥǡ򤳤줫ɤ߹ݤ EB 饤֥롣 + +
  3. +eb_read_binary() Ǽºݤ˥ǡɤ߹ࡣ +
+ +

+ƥȥǡƱͤˡХʥǡܤ°ǡ +ǤΤǡܤ򤷤Ƥʤȼ뤳ȤϤǤޤ +Хʥǡɤ߹ߤˤϡƥȥǡȤ̤ +եǥץƤޤ +äơߤɤ߹Ǥ⡢ưˤϱƶϤޤ +

+ + + +

Υ

+ +

+2 ĴΥΥǤϡŻҥ֥åEPWING ¸ߤEB 饤֥ +ǤϤɤⰷȤǤޤ +(Żҥ֥å¸ߤ 16 ĴΥΥǤϡΤȤ EB 饤֥ +ǤбƤޤ) +

+ +

+ΥǥǡϳƱǤEB 饤֥Ǥϡ +1 ԥ 1bit Ƥ BMP Ѵƥץꥱ +Ϥ褦ˤƤޤ +äơץꥱ󤫤ϡ BMP οǥǡϿ +Ƥ褦ˤߤޤ +

+ +

+ƥȥǡ⤫ϡХʥǡǤΥǤ򻲾Ȥ +Ȥޤ +ΥǤФˤϡλȾɬפǤ +ȾμϡƥȥǡˡΥǤγϤȽλ +ɽץ󥹤ؤΥեå EB_HOOK_BEGIN_MONO_GRAPHIC + EB_HOOK_END_MONO_GRAPHIC ѤƹԤޤ +

+ +

+եå EB_HOOK_BEGIN_MONO_GRAPHIC եåؿϤ +(argv) 4 ĤꡢΤ argv[2] +argv[3] Ǥȹ⤵ (ԥ) ̣ޤ +

+ +

+ޤեå EB_HOOK_END_MONO_GRAPHIC եåؿϤ + 3 Ĥǡargv[1] argv[2] +ǥǡΥڡֹȥեåȤˤʤޤ +

+ +

+ΥǤˤϡ嵭ΥեåǤΥڡֹ +եåȡȹ⤵򵭲Ƥޤ +

+ +

eb_set_binary_mono_graphic() ƤӽФơ줫 +ΥǤΥǡ뤳Ȥ EB 饤֥ޤ +eb_set_binary_mono_graphic() ؤΰˤϡ +EB_Book ֥ȤȡۤǤؤΥڡֹ桢 +եåȡ⤵Ϥޤ +EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥɬפޤ +

+ +
+
+/* eb_set_binary_mono_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_mono_graphic(EB_Book *book, EB_Position *position,
+    int width, int height);
+
+
+ +

+Żҥ֥åǤϡեåؿϤȹ⤵ͤ 0 ˤʤäƤޤ +Τޤ eb_set_binary_mono_graphic() Ϥޤ +(EPWING Ǥ 0 ϤƤϤޤ) +

+ +

+ʾǿǥǡμǤΤǡǡɤ߹ߤޤ +ˤϡeb_read_binary() Ȥޤ +

+ +
+
+#define MAX_LENGTH 1000
+char bitmap[MAX_LENGTH];
+ssize_t bitmap_length;
+
+if (eb_read_binary(&book, MAX_LENGTH, bitmap, &bitmap_length)
+    != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ȡɤ߹ǥǡ bitmap ˽񤭹ޤ졢 +ХȽ񤭹Τ bitmap_length ˽񤭹ޤޤ +񤭹ޤХȿϡ MAX_LENGTH ХȤǤ +

+ +

eb_read_binary() θƤӽФǿǥǡ +üޤɤ߹ɬפϤʤؿ򷫤֤ƤӽФС³ +ɤ߹ळȤǤޤ +eb_read_binary() ϡǥǡνüޤȤʾ +ǡɤ߹ߤޤΤǡeb_read_binary() 0 ֤ +ǿǥǡüȤǧǤޤ +

+ + +

+ +

+顼ǤϡŻҥ֥åǤ JPEG EPWING Ǥ JPEG BMP (DIB) +ΤΤѤƤޤ +EB 饤֥Ϥ򤹤٤ưȤǤޤŻҥ֥åؤб +ϸŪʤΤˤʤäƤޤ(ܤϸҤޤ) +

+ +

+顼ǤΥǡФˤϡΥǤƱͤ˥ƥȥǡ +饫顼ǤؤλȾեå̤Ƽ³Ƽºݤ +顼ǤΥǡɤ߹Ȥˤʤޤ +

+ +

+eb_set_binary_color_graphic() ƤӽФơ줫 +ץꥱ󤬥顼ǤΥǡ褦ȤƤ뤳Ȥ +EB 饤֥ޤ +eb_set_binary_color_graphic() ؤΰˤϡ +EB_Book ֥Ȥ˲äơ顼ǤΥڡֹ +եåȤϤޤ +

+ +
+
+/* eb_set_binary_color_graphic() δؿץȥ */
+EB_Error_Code
+eb_set_binary_color_graphic(EB_Book *book, EB_Position *position);
+
+
+ +

+EB_Book ֥Ȥϡ줫ФȤƤǤ +ϿƤܤ򤢤餫򤷤Ƥޤ + +顼ǤΥڡֹȥեåȤξϡ顼ǤγϤȽλɽ +ץ󥹤ؤΥեåޤ +եåϡ饤ɽѤ󥤥饤Ѥ 2 बꡢ +줾쳫ϥեå JPEG Ѥ BMP ѤʬƤޤ +

+ +
+
EB_HOOK_BEGIN_COLOR_BMP
+
EB_HOOK_BEGIN_COLOR_JPEG
+
+󥤥饤 BMP, JPEG γϥեå + +
EB_HOOK_END_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå + +
EB_HOOK_BEGIN_IN_COLOR_BMP
+
EB_HOOK_BEGIN_IN_COLOR_JPEG
+
+饤 BMP, JPEG γϥեå + +
EB_HOOK_END_IN_COLOR_GRAPHIC
+
+󥤥饤ѥ顼 (BMP, JPEG ) νλեå +
+ +

+󥤥饤Ѥνλեå EB_HOOK_END_GRAPHIC Ǥϡ +եåؿϤ argv[2] argv[3] +ǥǡΥڡֹȥեåȤˤʤޤΤǡ +eb_set_binary_color_graphic() ϤƤޤ +Ʊͤˡ饤Ѥνλեå EB_HOOK_END_IN_GRAPHIC +Ǥϡargv[2] argv[3] ڡֹ +եåȤǤΤǡϤޤ +

+ +

+ϡºݤ˥顼ǤΥǡФޤ +ˤϡΥǤƱͤ eb_read_binary() Ѥޤ +ȤϤޤäǤΤǡܤ +֥Υǡ 򻲾ȤƤ +

+ +

+Żҥ֥åΥ顼ǤˤĤƤϡǡνλ֤Ƥ +EB 饤֥ɤ߹ߤߤʤȤ»बޤ +ϡǡ礭˴ؤ󤬵Ƥʤǡǡ +ü֤ϡץꥱ JPEG ΥǡǥɤƳФ +ޤ +

+ + +

դ顼

+ +

+顼Ǥˤϡζΰ˻ξդäΤ +ޤ +HTML ˤ륯å֥롦᡼ (clickable image) ȤۤƱǡ +ΰ˥ޥݥ󥿤֤˥ޥ򥯥åȡ餫 +줿˲̤ܤȤųݤǤ +ȤʤΰϡĤФʣϿǤޤ +

+ +
+
+դ顼Ǥ
+
+
+
+ΰ裱ΰ裲
+
+
+
+
+
+ΰ裳ǡ
+
+
+
+
+
+ +

+դ顼Ǥμ갷ϡ̾Υ顼Ǥĥ +ʤޤ̾Υ顼ǤξǤϡȤ JPEG 󥤥饤 +ǤϡΤ褦ʽ֤ǥեåƤӽФޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ФƻդΥ顼ǤǤϡ2ĤΥեåδ֤ˡΰ +˴ؤեåޤ +

+ +
    +
  1. EB_HOOK_BEGIN_COLOR_JPEG (󥤥饤 JPEG ) +
  2. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ1 ) +
  3. EB_HOOK_END_CLICKABLE_AREA (ΰ1 λ) +
  4. EB_HOOK_BEGIN_CLICKABLE_AREA (ΰ2 ) +
  5. EB_HOOK_END_CLICKABLE_AREA (ΰ2 λ)
    + ʲΰ3ΰ4 ... ȶΰθĿʬ³ +
  6. EB_HOOK_END_COLOR_GRAPHIC (󥤥饤 JPEG λ) +
+ +

+ΰ˴ؤŪʾϡEB_HOOK_BEGIN_CLICKABLE_AREA +(ϥեå) ΤۤǼޤ +եåؿϤ argv[1] argv[2] +줾ΰγ x, y ɸɽޤ +顼Ǥκκɸ (0, 0) Ǥ +Ʊͤˡargv[3] argv[4] ΰα +ؤȡؤι⤵ɽޤ +Ǹ argv[5] argv[6] Υڡֹ +ȥեåȤȤʤޤ +

+ +

+ץꥱ󤬻դ顼Ǥбʤϡΰ +ϾȽλ̵뤹뤳Ȥˤʤޤ +ˤꡢǤ̾ (ʤ) 顼ǤȤޤäƱ +ޤ +

+ + +

WAVE (PCM)

+ +

+WAVE (PCM) βǡ EPWING ˤ¸ߤޤ +(Żҥ֥åˤ CD-DA βǡޤEB 饤֥ +ǤбƤޤ) +

+ +

+WAVE βǡФˤϡޤƥȥǡ椫 WAVE +λȾޤ +ȳϤȽλɽץ󥹤ؤΥեå +EB_HOOK_BEGIN_WAVE EB_HOOK_END_WAVE +줾줢ޤΤǡѤޤ +

+ +

+եå EB_HOOK_BEGIN_WAVE եåؿϤΤ +argv[2] argv[3] ǡγϰ֤ +ڡֹȥեåȡargv[4] argv[5] +λ֤ΥڡֹȥեåȤȤʤޤ +

+ +

+γϰ֤Ƚλ֤ؿ eb_set_binary_wave() Ϥơ +ΰ֤ˤ벻ǡ򤳤줫ФȤ EB 饤֥ޤ +

+ +
+
+/* eb_set_binary_wave() δؿץȥ */
+EB_Error_Code
+eb_set_binary_wave(EB_Book *book, EB_Position *start_position,
+EB_Position *end_position);
+
+
+ +

+Ƹϡºݤ˲ǡФޤ +ˤϡ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

MPEG1 ư

+ +

+MPEG1 ưǡ EPWING ˤ¸ߤޤ +ưǡ EPWING CD-ROM movie Ȥǥ쥯ȥβˡ +ư˰ĤΥեˤǼƤޤ +

+ +

+ƥȥǡ¸ߤ롢MPEG ǡλȳϤȽλɽ +ץ󥹤ؤΥեå EB_HOOK_BEGIN_MPEG +EB_HOOK_END_MPEG Ѥ뤳Ȥǡ MPEG +ե̾Ǥޤ +

+ +

+Ūˤϡեå EB_HOOK_BEGIN_MPEG եåؿϤ +Τargv[2] argv[5] 碌ư +Υե̾ɽ褦ˤʤäƤޤ +

+ +

+MPEG ưΥǡˤϡΥե̾ +eb_set_binary_mpeg() ϤơΥեưǡ +줫Фݤ EB 饤֥ޤ +ե̾ϡΤ褦ˤ argv + 2 +(&argv[2] ǤƱ) Ϥޤ +

+ +
+
+if (eb_set_binary_mpeg(&book, argv + 2) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+ϡºݤưǡФޤ +ˤϡϤ¾ΥХʥǡƱͤ eb_read_binary() +Ѥޤ +eb_read_binary() λȤˤĤƤϡ +֥Υǡ 򻲾ȤΤ 򻲾ȤƤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/binary.h>
+
+
+ + +

EB_Error_Code eb_set_binary_mono_graphic (EB_Book *book, const EB_Position *position, int width, height)

+ +

+ؿ eb_set_binary_mono_graphic() ϡΥǤΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֡width, height +ˤϿǤȹ⤵Ϥޤ +ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +Żҥ֥åǤȹ⤵ͤξ󤬥ƥȥǡ˵Ƥʤ +ᡢ0 ϤȤˤʤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֡⤵ͤ餫ˤ EB 饤֥꤬ȽǤ +ȤϡEB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +ΥǤΥǡϡ1 ԥ 1bit Ƥ BMP ˤʤä +ޤ +

+ + +

EB_Error_Code eb_set_binary_color_graphic (EB_Book *book, const EB_Position *position)

+ +

+ؿ eb_set_binary_color_graphic() ϡEPWING Υ顼Ǥ +ǡ򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + position ϿǤΰ֤Ϥޤ +֤ξϡǤλȸǤƥȥǡ˵ܤƤꡢ̾ +եåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+餫ᡢǤФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +Ǥΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˿ǥǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +顼ǥǡϡJPEG BMP (DIB) ΤηˤʤäƤޤ +

+ + +

EB_Error_Code eb_set_binary_wave (EB_Book *book, const EB_Position *start_position, EB_Position *end_position)

+ +

+ؿ eb_set_binary_wave() ϡWAVE (PCM) βΥǡ +򤳤줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + start_position end_position ˤϲǡ +γϰ֤Ϥޤ +֤ξϡǡλȸǤƥȥǡ˵ܤƤꡢ +̾ϥեåؿ̤褦ˤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +ǡΰ֤餫ˤ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+δؿϡºݤ˲ǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_set_binary_mpeg (EB_Book *book, const unsigned int *argv)

+ +

+ؿ eb_set_binary_mpeg() ϡMPEG1 ưΥǡ +줫褦ȤƤ뤳Ȥ EB 饤֥ޤ + argv ˤưǡΥե̾Ϥޤ +Υե̾ʸǤϤʤեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 argv[2] + argv[5] ʬϤޤ +Ĥޤꡢեåؿΰ argv + 2 +eb_set_binary_mpeg() ؤΰ argv Ȥ +Ϥޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ˱顼ɤ֤ޤ +

+ +

+餫ᡢưǡФȤƤܤ򤷤Ƥʤ +ʤޤ +book ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB +֤ޤ +¸ߤʤưե̾ EB 饤֥꤬ȽǤȤϡ +EB_ERR_NO_SUCH_BINARY ֤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ +

+δؿϡºݤưǡɤ߹ळȤϤޤ +ɤ߹ߤˤϡeb_read_binary() Ѥޤ +

+ + +

EB_Error_Code eb_read_binary (EB_Book *book, size_t binary_max_length, char *binary, ssize_t *binary_length)

+ +

+ؿ eb_read_binary() ϡХʥǡɤ߹ߤޤ +ɤ߹⤦ȤƤХʥǡϡ +

+ +
    +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+Τ줫δؿǡEB 饤֥ΤƤɬפޤ +

+ +

+ɤ߹ǡϰ binary λؤΰ˽񤭹ޤޤ +ޤΤȤ񤭹ޤ줿Хȿϡbinary_length λؤ +ΰ˥åȤޤ +񤭹ޤХȿϡĹǤ binary_max_length +˻ꤷͤޤǤȤʤޤ +

+ +

+δؿϡäɤ߹ǡνü˥ʥʸղä褦ʻ +ޤ +ɤ߹ޤǡХʥʤΤǡ˥ʥʸи +ޤ +

+ +

+δؿƤӽФǡХʥǡΤ쵤˼ +ɬפϤޤ +֤ƤӽФС³ǡɤ߹ޤޤ +

+ +

+ʲ˵󤲤ؿƤӽФȡХʥǡɤ߹ߤ˴ؤ +ֵϿꥻåȤޤΤǡʾɤ߹ߤϤǤʤʤޤ +

+ +
    +
  • eb_set_subbook() +
  • eb_unset_subbook() +
  • eb_load_all_subbooks() +
  • eb_bind() +
  • eb_finalize_book() +
  • eb_set_binary_mono_graphic() +
  • eb_set_binary_color_graphic() +
  • eb_set_binary_wave() +
  • eb_set_binary_mpeg() +
+ +

+eb_read_binary() 򷫤֤Ƥ硢Хʥǡ + binary Ƭ񤭹ޤ졢*binary_length +ͤ⡢β eb_read_binary() θƤӽФǽ񤭹ޤ줿 +Хȿˤʤޤ +

+ +

+ǡνüȡʾ夳δؿƤǤؿ binary +ˤϲ񤭹ޤ*binary_length 0 񤭹ߡ +EB_SUCCESS ֤ޤ +

+ +

+ȡδؿ EB_SUCCESS ֤ޤ +Ԥȡbinary_length ؤΰ -1 񤭹ߡ +顼ɤ֤ޤ +ξ硢Хʥǡɤ߹߾֤εϿꥻåȤޤΤǡ +ǡ³ɤ߹ळȤϤǤʤʤޤ +

+ +

+餫ᡢbook Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_SUB ֤ޤ +ޤƬ˵󤲤ؿθƤӽФƤʤ֤ǤδؿƤ֤ȡ +EB_ERR_NO_CUR_BINARY ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_file_name (const unsigned int *argv, char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡưǡΥե̾ +̾ʸѴޤ +

+ +

+EB 饤֥ǤϡưǡΥե̾ϥեåؿ +EB_HOOK_BEGIN_MPEG Ϥ줿 4 Ĥ int +(argv[2] argv[5]) ˤäɽޤ +

+ +

+ưǡɤ߹ݤϡ򤽤Τޤ eb_set_binary_mpeg() +ϤɤΤǤե̾̾ʸϡδؿ +Ѥޤ +ȤСġư˰դ ID Τ褦ʤΤ򿶤ꤿϡե +̾ ID ȤƻȤɤΤޤ +ʤδؿѴե̾ˤϥѥޤޤƤޤ +

+ +

+եåؿΰ argv + 2 򤳤δؿؤΰ argv +ȤϤȡcomposed_file_name ؤΰˡʸ +Ѵ줿ե̾Ǽޤ +ե̾ϺĹ EB_MAX_DIRECTORY_NAME_LENGTH (= 8) Х +ˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ʤǼ줿ե̾ϡºݤ¸ߤե̾Ȥϼ㴳ۤʤä +ǽޤ +ȤСѻʸȾʸҤ̵ͭʤɤΰ㤤ޤ +δؿϡޤʸ˵ŪѴʤΤǡե뤬º +뤫ɤΥåϤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +

EB_Error_Code eb_compose_movie_path_name (EB_Book *book, const unsigned int *argv, char *composed_path_name)

+ +

+ؿ eb_compose_movie_path_name() ϡưǡΥե̾ +̾ʸѴޤ +ƯϡҤδؿ eb_compose_movie_file_name() ɤ +Ƥޤeb_compose_movie_path_name() ֤ե̾ +ϡХѥηˤʤäƤۤʤޤ +

+ +

eb_compose_movie_path_name() Ǥϡե̾º +뤫ɤΥåԤȤ⡢礭ʰ㤤Ǥ +ե̾ʸѴǡѻʸȾʸΰ㤤Ҥ +̵ͭϡºߤΥե˹碌ĴΤ֤ޤ +äơѥʬӤƤ⡢ +eb_compose_movie_file_name() ֤ե̾Ȥɬ +פޤ +

+ +

+ book ϡưեϿƤܤ򤷤 +ʤФʤޤ +ܤ򤷤ƤʤСEB_ERR_NO_CUR_SUB ֤ޤ +

+ +

+ argv ΰ̣ϡeb_compose_movie_file_name() +ƱǤ +

+ +

+ե̾Ѵȡؿ composed_path_name +ؤΰˡʸѴ줿ưե̾Ǽ +EB_SUCCESS ֤ޤ +ե̾ϺĹ EB_MAX_PATH_LENGTH ХȤˤʤޤ +ĹˤϽüΥʥʸʬޤǤޤΤǡǼΰˤϤ⤦ +1 Х;͵פޤ +

+ +

+ե̾ºߤʤȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ + +

EB_Error_Code eb_decompose_movie_file_name (unsigned int *argv, const char *composed_file_name)

+ +

+ؿ eb_compose_movie_file_name() ϡ +eb_compose_movie_file_name() Ȥ礦ɵդƯ򤷤ޤ +Ĥޤꡢ̾ʸѴ줿ưǡΥե̾ +composed_file_name 4 Ĥ int argv +ᤷޤ +äơargv λؤΰϡʤȤ int ͤ 4 +ǼǤ礭ɬפǤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +

+ + +

appendix ǡ

+ +

+appendix (Ͽ) Ȥ CD-ROM Ҥǡ +ȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +ebappendix ޥɤѤޤ +(ܤ ebappendix ޥɤΥޥ˥奢 +Ρappendix (Ͽ) Ȥϡפ򻲾ȤΤ) +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
    +
  • ʸζڤꥳ +
  • ʸ +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalog ⤷ +catalogs ե뤬¸ߤܤΥǡб +֥ǥ쥯ȥ֤Ƥޤ +

+ +

+ץꥱ appendix бʸζڤꥳɤξȤ +褦ˤ뤳Ȥᤷޤ +ʸˤĤƤϡΥեȤ򤽤ΤޤɽǤΤ +СбɬϤʤ˳Ǥʸζڤꥳɤϡ +ʤʸɽǤʤҤбǤޤ +(ڤꥳɤˤĤƤϡֶڤꥳɤ 򻲾ȤΤ) +

+ + + +

EB_Appendix ֥

+ +

+CD-ROM Τ򰷤ˤ EB_Book ֥Ȥ +Ѥޤappendix 򰷤ˤ EB_Appendix ֥ +Ȥޤ +EB_Appendix ֥Ȥ뤿δؿϡ +EB_Book ΤΤȤϰۤʤޤϤ褯Ƥޤ +

+ +

+EB_Appendix ֥Ȥϡġ appendix Ф 1 +ĺɬפޤ +

+ +
+
+EB_Appendix app;
+
+
+ +

+󡢥֥Ȥΰϡmalloc() dzݤƤ +ޤ +

+ +
+
+EB_Appendix *app_pointer;
+
+app_pointer = (EB_Appendix *) malloc(sizeof(EB_Appendix));
+
+
+ +

+֥ȤϡȤɬ eb_initialize_appendix() +ȤؿȤʤƤϤʤޤ +EB_Book ֥ȤǤ eb_initialize_book() +ǽɬפޤƱǤ +

+ +
+
+eb_initialize_appendix(&app);
+eb_initialize_appendix(app_pointer);
+
+
+ +

+³ơ֥Ȥ appendix μΤ˷դ뤿ˡ +eb_bind_appendix() ƤӽФޤ +ϡEB_Book ֥Ȥ eb_bind() +ޤ +

+ +
+
+ţ¡
+֥ȡ
+
+
+⡲䡡
+ʡˡ
+
+
+ +

+ºݤΥץǤϡΤ褦ˤޤ +

+ +
+
+if (eb_bind_appendix(&app, "/mnt/dict") != EB_SUCCESS) {
+    printf("eb_bind_appendix() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() Ϥ appendix Υѥ +(Ǥ /mnt/dict) appendix Υȥåץǥ쥯ȥꡢ +Ĥޤ catalog ޤ catalogs եΤ +ǥ쥯ȥꤷޤ +ѥˤϡ֥̻ (: ebnet://localhost/dict.app) +ꤹ뤳ȤǽǤ +

+ +

+EB_Appendix ֥ȤȤä顢 +eb_finalize_appendix() ƤǸ򤷤ޤ +֥Ȥ appendix Ȥηդ򤫤줿֤ꡢ +dzƤ줿ϲ졢Ƥե⤹٤ +Ĥޤ +

+ +
+
+eb_finalize_appendix(&app);
+eb_finalize_appendix(app_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_appendix() ƤʤС֥Ȥ +ΰ˲뤳ȤǤޤ +

+ +
+
+free(app_pointer);
+
+
+ + +

+ +

+CD-ROM Ʊͤˡappendix ˤܤ¸ߤޤ +appendix ܤ⡢ܥɤȤäƼ̤ޤ +ġܥɤϡappendix ƱΤʤ褦ˤʤäƤޤ +

+ +

+CD-ROM Τ٤ƤܤܥɤؿȤ +eb_subbook_list() ޤappendix ˤ +eb_appendix_subbook_list() ȤƱͤδؿޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+EB_Subbook_Code sub_codes[EB_MAX_SUBBOOKS];
+int sub_count;
+
+if (eb_appendix_subbook_list(&app, sub_codes, &sub_count)
+    != EB_SUCCESS) {
+    printf("eb_appendix_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_appendix_subbook_list() ȡΤ٤Ƥ +ܥɤ sub_codes[] ˳Ǽޤ +Ƭܥɤ sub_codes[0] ɽ졢 +ɤ sub_codes[1]Ȥˤʤޤ +ܤθĿϡsub_count ˳Ǽޤ +

+ +

+EB_Book Ʊͤ EB_Appendix ֥ +Ǥ⡢ӤĤ줿 CD-ROM ҤǤդܤǡ + (current subbook) Ȥƻꤹ뤳ȤǤޤ +ʣܤƱ򤹤뤳ȤϤǤޤ +ڤꥳɤ䳰ʸȤä appendix ΥǡؤΥ +ϡܤФƤԤޤ +

+ +

+ʲϡƬ (sub_codes[0]) 򤹤Ǥ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * Ǥ˽Ҥ˷դƤȲꤷƤޤ*/
+if (eb_set_appendix_subbook(&app, sub_codes[0]) != EB_SUCCESS) {
+    printf("eb_subbook_list() failed\n");
+    return;
+}
+
+
+ +

+eb_bind_appendix() EB_Appendix ֥ + appendix ˷դľϡܤ򤵤Ƥʤ֤ +ʤäƤޤ +

+ + +

ʸζڤꥳ

+ +

+CD-ROM ҤˤäƤϡEB 饤֥꤬ʸɽ֤ +ߤʤȤޤ +(ܤϡֶڤꥳɤ 򻲾ȤΤ) +ϡʸζڤꥳɤο¬ EB 饤֥꤬ä˵ +ΤǤappendix ǡȤȤǡڤꥳɤ EB 饤֥ +˶Ƥ뤳ȤǤޤ +

+ +

+CD-ROM Ҥʸؿ eb_read_text() + 2 EB_Appendix * ȤΤǤ appendix +֥ȤϤƤ褦ˤޤ +

+ +
+
+/* book, app ϡ줾 EB_Book
+ *  EB_Appendix Υ֥Ȥǡɤ⤹Ǥ
+ * ܤȲꤷƤޤ*/
+#define MAX_LENGTH 1000
+char buffer[MAX_LENGTH + 1];
+ssize_t text_length;
+
+if (eb_read_text(&book, &app, NULL, NULL, MAX_LENGTH,
+    text, &text_length) != EB_SUCCESS) {
+    fprintf(stderr, "an error occurs.\n");
+    return;
+}
+
+
+ +

+eb_read_text() ϡϤ줿 appendix ֥Ȥܤ +ѤߤǡĶڤꥳɤξäƤСζڤꥳɤ +Ѥޤ +

+ + +

ʸ

+ +

+CD-ROM ҤϡƤ볰ξȤƥեȤΥǡѰդ +ޤ +ĤޤꡢγɤΤ褦ʸʤΤ桼ʬ褦ˤˤϡ +ץꥱ󤬥եȤɽ뤷ޤ +Ǥϡƥȥ󥿡եѤץꥱǤϡ +ʸγʬޤäʬޤ +¿ѤƤҤǤϡʸǽ˶ᤤ֤ˤʤ뤫Τޤ +

+ +

+ EB 饤֥ǤϡؤȤʤʸ appendix +Ǥ褦ˤƤޤ +appendix ѰդƤ˸¤ꡢץꥱϳΥե +褹ˤʸϤ뤳ȤˤС +ƥȥ󥿡եѤץꥱǤҤɤ߰פ +ʤޤ +

+ +

+appendix ƤʸФؿϡ2 Ĥޤ +ȾѳѤ eb_narrow_alt_character_text() ѳѤ +eb_wide_alt_character_text() Ǥ +ɤ⡢ȤѤޤ +

+ +

+ʲǤϡȾѳʸֹ 0xa121 Фʸ +buffer ˳ǼƤޤ +

+ +
+
+/* app  EB_Appendix Υ֥Ȥǡ
+ * ǤܤǤȲꤷƤޤ*/
+char buffer[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
+
+if (eb_narrow_alt_character_text(&app, buffer, 0xa121)
+    != EB_SUCCESS) {
+    printf("eb_narrow_alt_character_text() failed\n");
+    return;
+}
+
+
+ +

+ϸġܤФƤΤǡʸФˤϡ +餫ܤ򤷤Ƥɬפޤ +ΥեȤФݤϡ˲äƳΡֹ⤵פ򤷤Ƥ +ɬפޤʸˤϹ⤵γǰʤΤɬפޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡbuffer +Ϥ⤦ 1 Хʬ;͵Ƥޤ +

+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

EB_Appendix

+ +

+EB_Appendix ϡ CD-ROM Ҥɽޤ +CD-ROM ҤؤΥϡ٤ƤηΥ֥Ȥ𤷤ƹԤޤ +Ʊʣ CD-ROM Ҥ˥ݤϡҰ˥֥Ȥ +ɬפޤ +

+ +

+EB_Appendix ֥Ȥϡ٤ EB 饤֥꤬ +ѰդƤؿǹԤޤ +ץꥱץϡľ EB_Appendix ֥ +ΥФ򻲾ȤꡢåȤꤹ٤ǤϤޤ +

+ +

+EB_Appendix ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_book() ƤǽʤƤ +ʤޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/appendix.h>
+
+
+ + +

void eb_initialize_appendix (EB_Appendix *app)

+ +

+ؿ eb_initialize_appendix() ϡapp λؤ +EB_Appendix ֥Ȥޤ +EB_Appendix ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_appendix() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

void eb_finalize_appendix (EB_Appendix *app)

+ +

+ؿ eb_finalize_appendix() ϡapp ؤ +EB_Appendix ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ appendix ȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_appendix() Ƥ֤Ȥǡ +֥ȤѤ뤳ȤǤޤ +

+ + +

EB_Error_Code eb_bind_appendix (EB_Appendix *app, const char *path)

+ +

+ؿ eb_bind_appendix() ϡapp λؤ +EB_Appendix ֥Ȥ򡢥ѥ path ˤ +appendix ˷դޤ +ѥˤϡappendix Υȥåץǥ쥯ȥ꤫֥̻Ҥꤷޤ +appendix Υȥåץǥ쥯ȥȤϡcatalog 뤤 +catalogs ե¸ߤǥ쥯ȥؤޤ +

+ +

+֥ȤǤappendix ˷դƤ硢 appendix Ȥ +դ򤤤Ƥ顢path ˤ appendix ˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤܤ̤ξ֤ˤʤޤ +Ԥȡ֥Ȥ appendix Ȥηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ˡpath ХѥΤȤϡХѥѴ̤ +Ĺ˼ޤäƤʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +

+ + +

int eb_is_appendix_bound (EB_Appendix *app)

+ +

+ؿ eb_is_appendix_bound() ϡapp appendix +դƤ뤫ɤĴ٤ޤ +դƤ 1 ֤Ǥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_appendix_path (EB_Appendix *app, char *path)

+ +

+ؿ eb_appendix_path() ϡapp ˷դƤ +appendix Υѥ⤷ϱ֥̻Ҥpath λؤΰ +˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡpath λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫Ҥ˷դƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOK ֤ޤ +

+ +

+path ˽񤭹ѥ̾ΥХȿϡĹ +EB_MAX_PATH_LENGTH ˤʤޤ +ĹϡΥʥʸޤߤޤ +ؿ֤ѥ줿ˤʤäƤΤǡ +eb_bind_appendix() ϤȤΤΤƱȤϸ¤ޤ +ȤСХѥäϡХѥѴޤ +

+ + +

EB_Error_Code eb_load_all_appendix_subbooks (EB_Appendix *app)

+ +

+ؿ eb_load_all_appendix_subbooks() ϡapp +Τ٤Ƥܤޤ +̾ܤνϡܤ򤵤줿Ȥ˼ưŪ +ԤޤδؿϽݤǹԤޤ +оݤȤʤΤϡδؿƤӽФǤޤƤʤ +٤ƤܤǤ +δؿϡɥư륵ХץꥱʤɤͭǤ +饤Ȥ³ˤδؿƤ֤Ȥǡܤν +˥饤ȤԤʤƺѤߤޤ +

+ +

+оݤȤʤä٤ƤܤνСؿ +EB_SUCCESS ֤ޤ +Ǥ˼ԤϡĤܤνᡢ򼨤 +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ +

+δؿƤӽФȡapp ϡܤ򤷤Ƥʤ֤ +ʤޤ +

+ + +

EB_Error_Code eb_appendix_subbook_list (EB_Book *app, EB_Subbook_Code *subbook_list, int *subbook_count)

+ +

+ؿ eb_appendix_subbook_list() ϡapp +٤ܤܥɤ EB_Subbook_Code ˤơ +subbook_list λؤΰ˽񤭹ߤޤ +ϡ EB_MAX_SUBBOOKS ĤǤޤ +äơappendix ϿƤܤθĿ subbook_count +ؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_count λؤΰ 0 񤭹ߡ +顼ɤ֤ޤ +

+ +

+app ϡ餫 appendix ˷դƤʤƤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook (EB_Book *app, EB_Subbook_Code *subbook_code)

+ +

+ؿ eb_appendix_subbook() ϡapp +ܤܥɤ subbook_code λؤΰ˽񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡsubbook_code λؤΰ +EB_SUBBOOK_INVALID 񤭹ߡ򼨤顼ɤ +֤ޤ +

+ +

+餫ᡢapp Ϥ줫ܤ򤷤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory (EB_Book *app, char *directory)

+ +

+ؿ eb_appendix_subbook_directory() ϡapp +ǸܤΥǡե᤿ǥ쥯ȥ̾ +directory λؤΰ˽񤭹ߤޤ +

+ +

+ǥ쥯ȥ̾ʸĹϡĹ +EB_MAX_DIRECTORY_NAME_LENGTH ХȤǤ +ĹˡΥʥʸϴޤߤޤ +ǥ쥯ȥ̾ ASCII οѾʸǹޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡdirectory λؤΰ˶ʸ񤭹ߡ +򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp Τ줫ܤ򤵤ƤʤƤ +ʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +

+ + +

EB_Error_Code eb_appendix_subbook_directory2 (EB_Book *app, EB_Subbook_Code subbook_code, char *directory)

+ +

+eb_appendix_subbook_directory() ȻƤޤ +ܤǤϤʤ subbook_code ǻꤵ줿ܤ +ǥ쥯ȥ̾񤭹ۤʤޤ +

+ +

+app ܤ򤷤ƤʤƤ⹽ޤ󤬡餫 +appendix ˷դƤʤФʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

EB_Error_Code eb_set_appendix_subbook (EB_Book *app, EB_Subbook_Code code)

+ +

+ؿ eb_set_appendix_subbook() ϡapp +code 򤷤ޤ +Ǥܤ򤷤Ƥϡä̤ξ֤ˤƤ +subbook_code 򤷤ޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +ΤȤ̤ξ֤Ȥʤꡢƥȥǡɤ߹ߡ +Хʥǡɤ߹ߤˤĤƤξֵϿϡ٤ƥꥻåȤޤ +Ԥȡܤ̤ξ֤ˤơ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp appendix ˷դƤʤ +ʤޤ +ӤĤƤʤϡEB_ERR_UNBOUND_APP ֤ޤ +

+ + +

void eb_unset_appendix_subbook (EB_Book *app)

+ +

+ؿ eb_unset_appendix_subbook() ϡapp +Ƥܤ̤ξ֤ˤޤ +app appendix ˷դƤʤܤ򤵤Ƥʤ +ϡ⤷ޤ +

+ + +

int eb_have_stop_code (EB_Book *app)

+ +

+ؿ eb_have_stop_code() ϡapp ܤ +ڤꥳɤƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 ֤ޤ +Ƥʤ⤽ܤ򤵤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_stop_code (EB_Book *app, int *stop_code)

+ +

+ؿ eb_stop_code() ϡapp ܤ +Ƥڤꥳɤ stop_code λؤΰ˽񤭹ߤޤ +stop_code[0], stop_code[1] ˡڤꥳɤ +ȤƤ줾 0x0000 0xffff 񤭹ޤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡؿ stop_code[0] stop_code[1] + -1 񤭹ߡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤڤꥳɤƤʤϡEB_ERR_NO_STOPCODE +֤ޤ +

+ + +

int eb_have_narrow_alt (EB_Book *app)

+ +

int eb_have_wide_alt (EB_Book *app)

+ +

+ؿ eb_have_narrow_alt() ϡܤȾѳФ +ʸƤ뤫ɤĴ٤ޤ +Ʊͤˡؿ eb_have_wide_alt() ϡѳФ +ʸƤ뤫ɤĴ٤ޤ +

+ +

+Ƥ 1 Ƥʤ 0 ֤ޤ +app ܤ򤷤Ƥʤ 0 ֤ޤ +

+ + +

EB_Error_Code eb_narrow_alt_start (EB_Book *app, int *start)

+ +

EB_Error_Code eb_wide_alt_start (EB_Book *app, int *start)

+ +

+ؿ eb_narrow_alt_start() ϡapp +ˤȾѳФʸϰϤĴ١Ƭʸֹ +(ȾѳʸֹǺǾΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_end (EB_Book *app, int *end)

+ +

EB_Error_Code eb_wide_alt_end (EB_Book *app, int *end)

+ +

+ؿ eb_narrow_alt_end() ϡapp +ˤȾѳФʸϰϤĴ١Ǹʸֹ +(ȾѳʸֹǺΤ) start λؤΰ +񤭹ߤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+ؿ eb_wide_font_start() ϡȾѳǤϤʤѳ +ĤĴ٤Ȥơeb_narrow_font_start() Ʊ +Ǥ +

+ + +

EB_Error_Code eb_narrow_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

EB_Error_Code eb_wide_alt_character_text (EB_Book *app, int character_number, char *text)

+ +

+ؿ eb_narrow_alt_character_text() ϡbook +ܤƤ롢ȾѳʸФޤ +ʸֹcharacter_number ǻꤷޤ +

+ +

+ȡؿʸ text λؤΰ˽񤭹ߡ +EB_SUCCESS ֤ޤ +Ԥȡtext λؤΰ˶ʸ񤭹ߡ򼨤 +顼ɤ֤ޤ +

+ +

+ʸϺĹ EB_MAX_ALTERNATION_TEXT_LENGTH Х +(= 31 Х) Ǥ +ĹˤϥʥʸʬϴޤǤʤΤǡtext +ΰˤϤ⤦ 1 ХʬɬפǤ +

+ +

+ʸ󤬤ɤʸɤǽ񤫤Ƥ뤫ϡappendix ˤ +ϿƤޤ +appendix ɬνҤбƺΤʤΤǡҤ +ʸɤ鼡Τ褦ȽǤСʤǤ礦 +

+ +
    +
  • Ҥ ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +
  • ʳξ硢ʸܸ EUC +
+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ʸֹ character_number ϰϳˤϡ +EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+ܤȾѳФʸ (character_number ˸¤餺 +ޤä) ƤʤϡEB_ERR_NO_ALT ֤ޤ +ǤϤʤʸֹˤĤƤȾѳФʸ +ƤΤΡcharacter_number Фʸ +¸ߤʤ硢ؿ EB_SUCCESS ֤text +λؤΰˤ϶ʸ󤬽񤭹ޤޤ +

+ +

+ؿ eb_wide_alt_character_text() ϡȾѳǤϤʤ +ѳФʸФȤơ +eb_narrow_alt_character_text() ƱǤ +

+ + +

EB_Error_Code eb_backward_narrow_alt_character (EB_Book *book, int n, int *character_number)

+ +

EB_Error_Code eb_backward_wide_alt_character (EB_Book *book, int n, int *character_number)

+ +

+ؿ eb_forward_narrow_alt_character() ϡapp +ܤˤƤ롢ȾѳФʸ +ʸֹ character_number n ĸ˰֤ +ʸʸֹޤ +

+ +

+ޤؿƤӽФݤˡcharacter_number λؤΰ +ʸֹ񤭹Ǥޤ +ؿνȡäȤ n ʬʸֹ +˽񤭴äƤޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ򼨤顼ɤ֤ޤ +

+ +

+餫ᡢapp ܤ򤷤ƤʤƤϤʤޤ +򤷤ƤʤϡEB_ERR_NO_CUR_APPSUB ֤ޤ +ܤȾѳФʸƤʤϡ +EB_ERR_NO_ALT ֤ޤ +

+ +

+n ĸˤ⤦ʤ䡢ƤӽФݤ +character_number λؤΰ˽񤭹Ǥäʸֹ椬 +ϰϳˤ EB_ERR_NO_SUCH_CHAR_TEXT ֤ޤ +

+ +

+n ˤοꤹ뤳ȤǤޤ +ξ硢θƤӽФˤʤޤ +

+ +
+
+/* n < 0 Ȥ */
+eb_backward_narrow_font_character (book, -n, character_number);
+
+
+ +

+ؿ eb_forward_wide_alt_character() ϡȾѳǤϤʤ +ѳˤĤȤơ +eb_forward_narrow_alt_character() ƱǤ +

+ + +

ץץ

+ + + + +

оνҰ

+ +

+EBNET Ф֥ԤݡФΥ饤ȤФ +ĤƤҤ appendix ǡΰ뤳Ȥ +Ǥޤ +

+ +

+ΤȤEBNET Фꤹ֥һҤˤϡνҤ +appendix ǡФ륢Ȥϰۤʤꡢ̾ϻꤷޤ +ʤ̷ϼΤ褦ˤʤޤ +

+ +
+
+ebnet://ۥ:ݡ/
+
+
+ +

+ `/' ϤʤƤ⹽ޤ +: Ȥ³ݡֹϾάǽǡξ +22010 ֥ݡȤѤ뤳Ȥ̣ޤ +

+ +

+ebinfo ޥɤ --book-list ץεưϡEB 饤֥ +ΤεǽˤäƼƤޤ +(ebinfo ˤĤƤξܺ٤ϡ +@pxref{Book list on EBNET server, , EBNET ФνҰ, ebinfo-ja, ebinfo-ja}) +

+ +
+
+% ebinfo --book-list ebnet://localhost
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

.app ˤʤäƤΤ appendix ǡǡ +¾ϽΤǤ +ν encycl Фƥʤ顢 +֥̻Ҥ ebnet://localhost/encycl ˤʤޤ +

+ +

+ʤ饤ȤФƥĤƤʤҤ appendix ǡ +ϡ¦ǰޤ +

+ + + +

EB_BookList ֥

+ +

+EBNET Ф󶡤Ҥ appendix ǡΰˤϡ +ޤ EB_BookList Υ֥ȤѰդɬפޤ +

+ +
+
+EB_BookList bl;
+
+
+ +

+֥Ȥΰϡmalloc() dzݤƤ⹽ޤ +

+ +
+
+EB_BookList *bl_pointer;
+
+bl_pointer = (EB_BookList *) malloc(sizeof(EB_BookList));
+
+
+ +

+EB_Book ֥ȤƱͤˡEB_BookList +֥ȤȤȤɬפޤ +ϡeb_initialize_booklist() ȤؿǹԤޤ +

+ +
+
+eb_initialize_booklist(&bl);
+eb_initialize_booklist(bl_pointer);
+
+
+ +

+λ顢ΥФȥ֥ȤӤĤޤ +ȤСebnet://localhost ɽ륵ФФơ +֥ȤӤĤˤϼΤ褦ˤޤ +

+ +
+
+if (eb_bind_booklist(&bl, "ebnet://localhost") != EB_SUCCESS) {
+    printf("eb_bind_booklist() failed\n");
+    return;
+}
+
+
+ +

+Ϥ礦ɡEB_Book ֥ȤФ +eb_bind() Ƥ֤ΤƱǤ +

+ +

+ơ褦䤯ҰξФȤǤޤ +ˤ eb_booklist_book_count(), +eb_booklist_book_name(), eb_booklist_book_title() +Ȥ 3 ĤδؿѤޤ +δؿϤ줾졢饤ȤǽʽҤοƽ + appendix ǡ̾ (̻ҤȤƻꤹ̾)ƽ + appendix ǡ̾뤳ȤǤޤ +

+ +
+
+char *name, *title;
+int count, i;
+
+count = eb_booklist_book_count(&bl);
+for (i = 0; i < count; i++) {
+    if (eb_booklist_book_name(&bl, i, &name) != EB_SUCCESS) {
+        printf("eb_booklist_book_name(%d) failed\n", i);
+        return;
+    }
+    if (eb_booklist_book_title(&bl, i, &title) != EB_SUCCESS) {
+        printf("eb_booklist_book_title(%d) failed\n", i);
+        return;
+    }
+    printf("name = %s, title = %s\n", name, title);
+}
+
+
+ +

+EB_BookList ֥ȤȤä顢ɬ +Ԥޤ +

+ +
+
+eb_finalize_booklist(&bl);
+eb_finalize_booklist(bl_pointer);
+
+
+ +

+֥Ȥΰ malloc() dzݤϡ +eb_finalize_booklist() ƤʤС֥Ȥΰ +˲뤳ȤǤޤ +

+ +
+
+free(bl_pointer);
+
+
+ + +

ǡξܺ

+ +

+ƤǡȤˤϡΤ褦˥إåե +ɤ߹Dz +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

EB_BookList

+ +

+EB_BookList ϡEBNET о夬ȤäƤҤ +appendix ΰݤѤ륪ȤηǤ +

+ +

+EB_BookList ֥ȤѤݤϡޤΥ֥ +Ф eb_initialize_booklist() Ƥǽɬפ +ޤ +

+ + +

ؿξܺ

+ +

+ƤؿȤˤϡΤ褦˥إåեɤ߹ + +

+ +
+
+#include <eb/booklist.h>
+
+
+ + +

void eb_initialize_booklist (EB_BookList *bl)

+ +

+ؿ eb_initialize_booklist() ϡbl λؤ +EB_BookList ֥Ȥޤ +EB_BookList ֥ȤФ EB 饤֥¾δؿ +ƤˡɬΥ֥ȤʤƤϤʤޤ +Ƥʤ֥ȤФơEB 饤֥¾δؿƤ +ư̤Ǥ +ޤǤ˽֥ȤФơ + eb_initialize_booklist() ƤǤϤޤ +Ƥư̤Ǥ +

+ + +

EB_Error_Code eb_bind_booklist (EB_BookList *bl, const char *path)

+ +

+ؿ eb_bind_booklist() ϡapp λؤ +EB_BookList ֥Ȥ򡢱֥һ path +ǻꤵ줿 EBNET Ф˷դޤ +

+ +

+֥ȤǤ˥Ф˷դƤ硢ΥФȤηդ +򤤤Ƥ顢path ˤ륵Ф˷դޤ +

+ +

+ȡؿ EB_SUCCESS ֤ޤ +Ԥȡ֥Ȥ򥵡ФȤηդ򤫤줿֤ˤơ +򼨤顼ɤ֤ޤ +

+ +

+path ϡEB_MAX_PATH_LENGTH ХȤ˼ޤ +ʤƤϤʤޤ +ĶȡEB_ERR_TOO_LONG_FILE_NAME ֤ޤ +ޤ̾ꤷƤʤ֥һҤǤʤФʤޤ +ʳηȡEB_ERR_BAD_FILE_NAME ֤ޤ +

+ +

+ѤƤ EB 饤֥ΥХʥ꤬֥бΤΤ +硢EB_ERR_EBNET_UNSUPPORTED ֤ޤ +

+ + +

void eb_finalize_booklist (EB_BookList *bl)

+ +

+ؿ eb_finalize_booklist() ϡbl ؤ +EB_BookList ֥ȤθԤޤ +

+ +

+֥ȤƤƴƤϤ٤Ʋ졢 +եǥץ⤹٤Ĥޤ +֥Ȥ EBNET ФȷդƤϡդ򤫤ޤ +

+ +

+򤷤֥ȤФ eb_bind_booklist() Ƥ +Ȥǡ֥ȤѤ뤳ȤǤޤ +

+ + +

int eb_booklist_book_count (EB_BookList *bl)

+ +

+ؿ eb_booklist_book_count() ϡEBNET Ф +饤ȤФƥĤƤҤ appendix ǡο +ޤ +

+ +

bl λؤ EB_BookList ֥Ȥϡ +餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +

+ + +

EB_Error_Code eb_booklist_book_name (EB_BookList *bl, int i, char **name)

+ +

EB_Error_Code eb_booklist_book_title (EB_BookList *bl, int i, char **title)

+ +

+ؿ eb_booklist_book_name() ϡEBNET ФνҤ +appendix ǡ̾Τޤ +Ǹ̾ΡפȤϡ֥̻Ҥǻꤹ̾ΤȤǤ +Ĥޤꡢebnet://localhost/dict dict ʬ +ؤޤ +Ʊͤˡؿ eb_booklist_book_title() ϡҤ appendix +̾ޤ +

+ +

+δؿ⡢EBNET оβܤνҤ⤷ appendix ξ +Τ򡢰 i ǻꤷޤ +Ƭ 1 ܤǤϤʤ 0 ܤˤʤޤ +

+ +

+ȡؿϽҤ̾Ρ̾ؤΥݥ󥿤 *name, +*title ˽񤭹ߡEB_SUCCESS ֤ޤ +ʤΥݥͤ ֥ bl ݻƤ +ʸؤ褦ˤʤäƤޤ +bl Ф eb_finalize_booklist() Ƥ +ޤȡʸ⻲ԲǽˤʤäƤޤޤΤǡդƲ +

+ +

bl λؤ EB_BookList ֥ +ϡ餫 EBNET Ф˷ӤĤƤɬפޤ +ӤĤƤʤϡEB_ERR_UNBOUND_BOOKLIST ֤ޤ +ޤi 0 ʾ夫ĥФ󶡤ƤҤ appendix +̤ǤʤФʤޤ +ʳͤΤȤϡEB_ERR_NO_SUCH_BOOK ֤ޤ +

+ + +

ץץ

+ + + + +

+ + +

ǡκ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ + + + +

ؿκ

+ +

+ؿ̾Ƭ eb_ ϾάƤޤ +

+ + + + +

κ

+ +

+̾Ƭ EB_ ϾάƤޤ +

+ + + + + diff --git a/lib/ebu/doc/ebappendix-01.html b/lib/ebu/doc/ebappendix-01.html new file mode 100644 index 0000000..8a53d2d --- /dev/null +++ b/lib/ebu/doc/ebappendix-01.html @@ -0,0 +1,72 @@ + + + + + + +ebappendix ޥ + + + +

+[] [] [ܼ] +

+
+

appendix (Ͽ) Ȥ

+ +

+appendix (Ͽ) Ȥ CD-ROM ҤǡΤȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
+
ʸζڤꥳ
+
+ʤ EB 饤֥Ȥä CD-ROM Τñݡ +ñλսǡEB 饤֥꤬ʸνϤߤ뤳Ȥ +ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ + +ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ڤꥳ (stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +appendix ζڤꥳɤϡνҤڤꥳɤ EB 饤֥ +˶Ƥ뤿Ѥޤ + +
ʸ
+
+¿ CD-ROM Ҥϡ (ȼʸ) äƤꡢʸ +γȤäƤޤ +CD-ROM ҤǤϳΥӥåȥޥåץեȤѰդƤꡢ +饤ȥץꥱ󤬳ϤˤϡΥեȤ +ʤƤϤʤޤ + +appendix Ǥϡ ʸ (alternation text) +뤳ȤǤޤ +ץꥱϡӥåȥޥåץեȤ褹ˡ +ʸϤ뤳ȤˤƤɤǤ礦 +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalogcatalogs +ե뤬¸ߤܤΥǡб륵֥ǥ쥯ȥ֤ +ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebappendix-02.html b/lib/ebu/doc/ebappendix-02.html new file mode 100644 index 0000000..720baf1 --- /dev/null +++ b/lib/ebu/doc/ebappendix-02.html @@ -0,0 +1,39 @@ + + + + + + +ebappendix ޥ + + + +

+[] [] [ܼ] +

+
+

ebappendix ޥɤȤ

+ +

+appendix ϥХʥΥǡեǹޤΤǡľ +ԽΤưפǤϤޤ +ǡEB 饤֥Ǥ ebappendix ޥɤѰդƤޤ +ebappendix ޥɤϡƥȷǽ񤫤줿ǡɤ߹ߡ +Хʥ appendix ޤ +

+ +

+EB 饤֥θ FTP +ftp://ftp.sra.co.jp/pub/misc/eb/appendix/ +ˤϡˤĤνѤ appendix ֤Ƥޤ +˺ܤäƤʤ CD-ROM Ѥ appendix Ѱդϡ +ebappendix ޥɤȤޤ礦 +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebappendix-03.html b/lib/ebu/doc/ebappendix-03.html new file mode 100644 index 0000000..0345bec --- /dev/null +++ b/lib/ebu/doc/ebappendix-03.html @@ -0,0 +1,406 @@ + + + + + + +ebappendix ޥ + + + +

+[] [] [ܼ] +

+
+

appendix Υǡν

+ +

+ξϤǤϡappendix Υǡνޤ +ǡ֥ǡפȸäƤΤϡebappendix ɤ߹ +ƥȷǽ񤫤줿ǡΤȤǤ +

+ +

+appendix 뤿ˤϡ˵󤲤륽ǡե뤬ɬפǤ +Υե򤹤٤ơƱǥ쥯ȥѰդ褦ˤޤ +

+ +
+
catalog.app ޤ catalogs.app
+
+appendix ˤɬcatalog ޤ catalogs Ȥ +̾Υե뤬ɬפǤ +catalog.app, catalogs.app ϤȤʤ +եǤ +appendix ˼ϿƤ (subbook) +(ܤ +catalog(s).app ν +򻲾) ΰ򵭤ޤ + +
.app
+
+appendix ϿƤܤ줾ФơĤѰդɬפ +ޤ ( ʬϡºݤϸġܤ̾ˤʤޤ) +appendix ΥᥤǡǤ롢ʸζڤꥳɤ䳰ʸϡ +Υե˵ޤ +
+ + + +

catalog(s).app Ȥ

+ +

+CD-ROM ҤƱͤˡappendix ѥåˤɬ catalog +⤷ catalogs Ȥ̾ΥեΤɤ餫 +ɬפǤ +catalog.app, catalogs.app եϡ +Ȥʤޤ +

+ +

+ebappendix ޥɤ appendix ݤˤϡ +catalog.app catalogs.app Τɤ餫ɬ +ѰդƤɬפޤ +

+ +

+ebappendix ɸưǤϡcatalog.app Ȥ +ե̾ˤƤȡե̾ catalog +ʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤Żҥ֥å˻ˤʤޤ +

+ +

+ȿФˡcatalogs.app Ȥե̾ˤƤȡ +ե̾ catalogs ˤʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤EPWING ˻ˤʤޤ +

+ +

+EPWING νҤФŻҥ֥å appendix ѤƤ⡢ +ưΤΤˤϻپ㤬ޤ +դƱͤǤ +

+ + +

catalog(s).app ν

+ +

+catalog(s).app ˤϡҤ˼ϿƤܤΥǥ쥯ȥ̾ +1 Ԥ 1 ĤĽ¤٤ޤ +ܤΥǥ쥯ȥ̾ϡebinfo ޥɤȤưפʬޤ +

+ +

+ʲϡebinfo μ¹Ǥ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+μѤ appendix 硢catalog(s).app ˤϼ +褦˵ޤ +

+ +
+
+ejdict
+howto
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +

+ +

+ǥ쥯ȥ̾ʸʸϡƱΤȤưޤ +ޤԤӤӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+ɬȤνҤܤ٤ƤƱ catalog(s).app +褦ˤƲ +

+ + +

.app Ȥ

+ +

+appendix ϿƤܤ줾Фơǡե +.app Ѱդɬפޤ + ʬϡºݤˤϸġܤλѤ +ǥ쥯ȥ̾ˤʤޤ +

+ +

+ȤСǤϡҤ ejdict howto +Ȥǥ쥯ȥ̾äܤäƤޤ +ξ硢Ѱդե ejdict.app howto.app +ˤʤޤ +

+ +

+.app ե appendix ΥᥤǡǤ롢 +ʸζڤꥳɤ䳰ʸϿ appendix +furoku Ȥäեˤʤޤ +(appendix Żҥ֥å appendixEPWING + furoku Ȥե̾ˤʤޤ) +

+ + +

.app ʸˡ

+ +

+ܤΥǡ򵭤ե.app +ǤϡԡӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+¾ιԤϤ٤ơñȻؼ (single directive) +ʣؼ (group directive) Τ줫ǤʤƤϤʤޤ +ñȻؼҤʣؼҤϡɤΤ褦ʽƤ⺹٤ޤ +

+ +

+ñȻؼҤȤϡ1 ԤǴ뤹ؼҤǤ +ñȻؼҤΰ̷ϼ̤Ǥ +

+ +
+
+ؼҤ̾    ؼҤ
+
+
+ +

+ʲǤϡstop-code ؼҤ̾ +0x1f09 0x0001 ͤǤ +

+ +
+
+stop-code          0x1f09 0x0001
+
+
+ +

+ؼ̾ʸȾʸ϶̤ޤΤǡstop-code +Stop-Code Ƚ񤯤ȤϤǤޤ +ؼҤ̾ͤζڤˤϡ򤫥֤Ѥޤ +Ϣ³ȥ֤Ƭӹˤä硢̵뤵ޤ +

+ +

+ʣؼҤȤϡҤեʣԤϤؼҤǤ +ʣؼҤΰ̷ϼ̤Ǥ +

+ +
+
+begin ʣؼҤ̾
+    ؼҤ̾    ؼҤ
+             : 
+             : (֤)
+             : 
+end
+
+
+ +

+ begin ʣؼҤγϤɽޤ +begin ϸ ʣؼҤ̾ Ȥ +ޤ +begin ʣؼҤ̾ ϶򤫥֤Ƕڤꡢ +ξȤƱԤ֤ޤ + end ϡʣؼҤνλɽޤ +end ϡñȤ 1 Ԥˤ֤ޤ +

+ +

+ΤȤ .app ǻѤǤʣؼҤ̾ϡ +narrow wide 2 ĤǤ +줾 ؼ ϡbegin end +ιԤδ֤֤ޤ +ؼҤ˴ؤ뵭ҤΰŪʵ§ϡñȻؼҤѤޤ +(ȤСؼҤ̾ ؼҤ ϶ +֤Ƕڤ뤳Ȥʤ) +

+ +

+ʲϡ narrow ʣؼҤεǤ +

+ +
+
+begin narrow
+    range-start     0xa121
+    range-end       0xa123
+    0xa121          []
+    0xa122          []
+    0xa123          [޲]
+end
+
+
+ + +

.app ñȻؼ

+ +

+ñȻؼҤˤϼΤ褦ʤΤޤ +

+ +
+
character-code
+
+appendix ʸɤꤷޤ +ʸɤɬCD-ROM Ҥ˹碌褦ˤޤ +CD-ROM Ҥʸɤϡebinfo ޥɤνϤ򸫤гǧ +Ǥޤ + +CD-ROM Ҥ ISO 8859-1 ǽ񤫤ƤϡؼҤͤȤ +ISO8859-1 ꤷޤ +ʳξϡJISX0208 ꤷƲ + +
+
+character-code          JISX0208
+
+
+ +λؼҤϡ.app եɬ +ʤФʤޤ +ʤäꡢٰʾȥ顼ˤʤޤ + +
stop-code
+
+ܤʸζڤꥳɤꤷޤ +ؼҤͤϡڤꥳɤʸֹ 2 Ľ¤٤Τˤʤޤ + +
+
+stop-code          0x1f09 0x0001
+
+
+ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ǵޤ +1ܤʸֹϡ0x1f09 0x1f41 +ʤФʤޤ +ʳȥ顼ˤʤޤ + +ebstopcode ޥɤȤȡܤŬڤʶڤꥳɤ +ꤹ뤳ȤǤޤ (ܤ +ebstopcode ޥɤΥޥ˥奢 򻲾Ȥ +) + +λؼҤʤƤ⹽ޤ󤬡ٰʾȥ顼ˤʤޤ +
+ + +

.app ʣؼ

+ +

+narrow wide ʣؼҤϡ줾ܤ +ФȾѳѳФʸ뤿Ѥޤ +ܤƤƤ⡢ʸѤɬפʤС +narrow, wide ʣؼҤ򵭽ҤɬפϤޤ +

+ +

+narrow wide ʣؼǤؼҤϡ +ޤäƱǤ +ؼҤˤϼΤ褦ʤΤޤ +

+ +
+
range-start
+
+ϰϤ򵭤ޤ +ϰ֤ʸֹ range-start ǡλ֤ʸֹ +range-end ǻꤷޤ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ޤ +ʲϵǤ + +
+
+    range-start     0xa121
+    range-end       0xa123
+
+
+ +ϰϤϡebinfo ޥɤνϷ̤ +ȾѥեȤʸ (narrow font characters) +ѥեȤʸ (wide font characters) +ǵ줿ϰϤȰפ褦ˤƲ + +narrow wide ʣؼǤϡ +ɬ󤺤 range-start range-end +ʤФʤޤ +ʤäꡢٰʾꤹȥ顼ˤʤޤ + +
0xhhhh
+
+hhhh ϡ4 16ʿǤ +ʸֹ 0xhhhh ѳʤȾѳФơ +ʸޤ + +
+
+    0xa121          [̾]
+
+
+ +appendix ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +ޤ +ʳξϡʸܸ EUC ޤ +⡢ʸϺĹ 31 ХȤޤǤǡĶȥ顼 +ʤޤ + +range-start, range-end ǻꤷϰ +٤ƤˤĤơʸꤹɬפϤޤ +ƱʣؼǡĤʸֹγФʸ +ǤΤϰޤǤǤ +ʣꤷ褦Ȥȡ顼ˤʤޤ +ޤϰϳʸֹʸ褦ȤƤ⡢Ϥꥨ顼 +ʤޤ + +CD-ROM ҤɤΤ褦ʳƤΤϡebfont ޥ +Ĵ٤뤳ȤǤޤ (ܤ +ebfont ޥɤΥޥ˥奢 򻲾ȤΤ) +
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebappendix-04.html b/lib/ebu/doc/ebappendix-04.html new file mode 100644 index 0000000..3e2ca97 --- /dev/null +++ b/lib/ebu/doc/ebappendix-04.html @@ -0,0 +1,262 @@ + + + + + + +ebappendix ޥ + + + +

+[] [ܼ] +

+
+

appendix

+ +

+appendix Υǡ񤱤顢ebappendix ޥɤѤ +ºݤ (Хʥ) appendix ޤ +

+ +

+ʲξϤǤ ebappendix μ¹ˡˤĤƾܤޤ +

+ + + +

ebappendix μ¹

+ +

+ebappendix ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebappendix ϥǥ쥯ȥΥѥ
+
+
+ +

+ϥǥ쥯ȥΥѥ ˤϡɤ߹ appendix ǡ +ǥ쥯ȥꡢĤޤ catalog.app ޤ catalogs.app +ե뤬¸ߤǥ쥯ȥꤷޤ +άϡȥǥ쥯ȥꤷȤߤʤޤ +

+ +

+ɸǤϡϥեϥȥǥ쥯ȥ˺ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebappendix ϥȥǥ쥯ȥʳξ˽Ϥ뤳Ȥ +Ǥޤ +

+ +
+
+% ebappendix --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+⤷ϥǥ쥯ȥ꤬¸ߤƤʤСưŪ ebappendix +ޤ +

+ +

+¹Ԥȡebappendix Ͻϥǥ쥯ȥβ˥֥ǥ쥯ȥ +ꡢĤΥեޤ +

+ + +

appendix CD-ROM ҤνŤ͹碌

+ +

+HDD ˥ԡ CD-ROM ҤƱǥ쥯ȥˡappendix Ťͤ +֤ȤǤޤ +

+ +

+ˤϡebappendix --output-directory +--no-catalog ץȤޤ +--output-directory ץˤϡCD-ROM Ҥ +ȥåץǥ쥯ȥꤷޤ +

+ +
+
+% ebappendix --no-catalog --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+ʤappendix η (Żҥ֥å EPWING ) CD-ROM Ҥ˹碌 +褦ˤޤ +(ܤ +catalog(s).app ν +򻲾) +

+ +

+ebappendix μ¹ CD-ROM ҤΥǥ쥯ȥ깽 +ɤΤ褦ѲΤ򵭤Ƥߤޤ +ޤŻҥ֥åξǤ¹Υǥ쥯ȥ깽Τ褦 +ʤäƤȤޤ +

+ +
+
+catalog
+ejdict/start
+howto/start
+
+
+ +

+ebappendix appendix Ť͹碌ȡΤ褦ʹ +ʤޤ +

+ +
+
+catalog
+ejdict/start
+ejdict/appendix   appendix Υե
+howto/start
+howto/appendix    appendix Υե
+
+
+ +

+ƱͤˡEPWING Ǽ¹Υǥ쥯ȥ깽Τ褦ˤʤäƤ +ȡ +

+ +
+
+catalogs
+ejdict/data/honmon
+howto/data/honmon
+
+
+ +

+¹ԸϡΤ褦ʹˤʤޤ +

+ +
+
+catalogs
+ejdict/data/honmon
+ejdict/data/furoku   appendix Υե
+howto/data/honmon
+howto/data/furoku    appendix Υե
+
+
+ +

+CD-ROM ҤˤäƤϡǥ쥯ȥ̾ʸäƤ뤳Ȥ +ޤebappendix Ϥ򸡽ФޤΤǡ̾ʸ +Ѥǥ쥯ȥӺäƤޤȤϤޤ +

+ +

+--no-catalog ץꤹȡebappendixcatalog catalogs ե +ʤʤޤ + appendix EB 饤֥Υץꥱ󤫤Ȥݤϡ +CD-ROM Ҥ˺ǽ餫ѰդƤ catalog +catalogs ե CD-ROM ҡappendix Ѥ +եȤήѤ뤳Ȥˤʤޤ +

+ +

+appendix ΥեϡCD-ROM ҤΥեʬ +ȤʤäƤ뤿ᡢǽȤʤäƤޤ +--no-catalog ץꤷ˺ȡ +ebappendix CD-ROM ҤΥե +ƤޤޤΤǡդƲ +

+ + +

ebappendix Υץ

+ +

+ebappendix ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤ + +

+ +
+
-b Ҥη
+
--booktype Ҥη
+
+appendix Żҥ֥åEPWING ΤɤηΥ쥤Ȥ˻ƺ +Τꤷޤ +Żҥ֥åʤ ebEPWING ʤ epwing +Ȼꤷޤ + +Υץꤷʤä硢ΤǤɤη +Τꤵޤ +ޤϥǥ쥯ȥ catalog.app ե뤬¸ߤ +줬ɤ߹ޤ졢Żҥ֥å appendix ޤ +catalog.app ʤ catalogs.app +¸ߤФ줬ɤ߹ޤ졢EPWING appendix ޤ +(catalogs.app catalog.app ʤС顼 +ˤʤޤ) + +
-d
+
--debug
+
--verbose
+
+ǥХåѤΥåɸ२顼Ϥ˽Ϥޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-n
+
--no-catalog
+
+ե (catalog catalogs) +ޤ +ΥץϡҤ appendix Ʊǥ쥯ȥ˽Ť͹碌ݤ +ͭǤ +(ܤ +appendix CD-ROM ҤνŤ͹碌 +򻲾ȤΤ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+Υǥ쥯ȥꤷޤ +Υץάȡȥǥ쥯ȥ (.) +Ϥޤ +ǥ쥯ȥ꤬¸ߤʤСưŪޤ + +
-t
+
--test
+
+եϤޤ +ϥեɤ߹ǡƤΥåԤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebappendix-cat.html b/lib/ebu/doc/ebappendix-cat.html new file mode 100644 index 0000000..e3e9188 --- /dev/null +++ b/lib/ebu/doc/ebappendix-cat.html @@ -0,0 +1,747 @@ + + + + + + +ebappendix ޥ + + + +

ebappendix ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +

appendix (Ͽ) Ȥ

+ +

+appendix (Ͽ) Ȥ CD-ROM ҤǡΤȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
+
ʸζڤꥳ
+
+ʤ EB 饤֥Ȥä CD-ROM Τñݡ +ñλսǡEB 饤֥꤬ʸνϤߤ뤳Ȥ +ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ + +ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ڤꥳ (stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +appendix ζڤꥳɤϡνҤڤꥳɤ EB 饤֥ +˶Ƥ뤿Ѥޤ + +
ʸ
+
+¿ CD-ROM Ҥϡ (ȼʸ) äƤꡢʸ +γȤäƤޤ +CD-ROM ҤǤϳΥӥåȥޥåץեȤѰդƤꡢ +饤ȥץꥱ󤬳ϤˤϡΥեȤ +ʤƤϤʤޤ + +appendix Ǥϡ ʸ (alternation text) +뤳ȤǤޤ +ץꥱϡӥåȥޥåץեȤ褹ˡ +ʸϤ뤳ȤˤƤɤǤ礦 +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalogcatalogs +ե뤬¸ߤܤΥǡб륵֥ǥ쥯ȥ֤ +ޤ +

+ + +

ebappendix ޥɤȤ

+ +

+appendix ϥХʥΥǡեǹޤΤǡľ +ԽΤưפǤϤޤ +ǡEB 饤֥Ǥ ebappendix ޥɤѰդƤޤ +ebappendix ޥɤϡƥȷǽ񤫤줿ǡɤ߹ߡ +Хʥ appendix ޤ +

+ +

+EB 饤֥θ FTP +ftp://ftp.sra.co.jp/pub/misc/eb/appendix/ +ˤϡˤĤνѤ appendix ֤Ƥޤ +˺ܤäƤʤ CD-ROM Ѥ appendix Ѱդϡ +ebappendix ޥɤȤޤ礦 +

+ + +

appendix Υǡν

+ +

+ξϤǤϡappendix Υǡνޤ +ǡ֥ǡפȸäƤΤϡebappendix ɤ߹ +ƥȷǽ񤫤줿ǡΤȤǤ +

+ +

+appendix 뤿ˤϡ˵󤲤륽ǡե뤬ɬפǤ +Υե򤹤٤ơƱǥ쥯ȥѰդ褦ˤޤ +

+ +
+
catalog.app ޤ catalogs.app
+
+appendix ˤɬcatalog ޤ catalogs Ȥ +̾Υե뤬ɬפǤ +catalog.app, catalogs.app ϤȤʤ +եǤ +appendix ˼ϿƤ (subbook) +(ܤ +catalog(s).app ν +򻲾) ΰ򵭤ޤ + +
.app
+
+appendix ϿƤܤ줾ФơĤѰդɬפ +ޤ ( ʬϡºݤϸġܤ̾ˤʤޤ) +appendix ΥᥤǡǤ롢ʸζڤꥳɤ䳰ʸϡ +Υե˵ޤ +
+ + + +

catalog(s).app Ȥ

+ +

+CD-ROM ҤƱͤˡappendix ѥåˤɬ catalog +⤷ catalogs Ȥ̾ΥեΤɤ餫 +ɬפǤ +catalog.app, catalogs.app եϡ +Ȥʤޤ +

+ +

+ebappendix ޥɤ appendix ݤˤϡ +catalog.app catalogs.app Τɤ餫ɬ +ѰդƤɬפޤ +

+ +

+ebappendix ɸưǤϡcatalog.app Ȥ +ե̾ˤƤȡե̾ catalog +ʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤Żҥ֥å˻ˤʤޤ +

+ +

+ȿФˡcatalogs.app Ȥե̾ˤƤȡ +ե̾ catalogs ˤʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤EPWING ˻ˤʤޤ +

+ +

+EPWING νҤФŻҥ֥å appendix ѤƤ⡢ +ưΤΤˤϻپ㤬ޤ +դƱͤǤ +

+ + +

catalog(s).app ν

+ +

+catalog(s).app ˤϡҤ˼ϿƤܤΥǥ쥯ȥ̾ +1 Ԥ 1 ĤĽ¤٤ޤ +ܤΥǥ쥯ȥ̾ϡebinfo ޥɤȤưפʬޤ +

+ +

+ʲϡebinfo μ¹Ǥ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+μѤ appendix 硢catalog(s).app ˤϼ +褦˵ޤ +

+ +
+
+ejdict
+howto
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +

+ +

+ǥ쥯ȥ̾ʸʸϡƱΤȤưޤ +ޤԤӤӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+ɬȤνҤܤ٤ƤƱ catalog(s).app +褦ˤƲ +

+ + +

.app Ȥ

+ +

+appendix ϿƤܤ줾Фơǡե +.app Ѱդɬפޤ + ʬϡºݤˤϸġܤλѤ +ǥ쥯ȥ̾ˤʤޤ +

+ +

+ȤСǤϡҤ ejdict howto +Ȥǥ쥯ȥ̾äܤäƤޤ +ξ硢Ѱդե ejdict.app howto.app +ˤʤޤ +

+ +

+.app ե appendix ΥᥤǡǤ롢 +ʸζڤꥳɤ䳰ʸϿ appendix +furoku Ȥäեˤʤޤ +(appendix Żҥ֥å appendixEPWING + furoku Ȥե̾ˤʤޤ) +

+ + +

.app ʸˡ

+ +

+ܤΥǡ򵭤ե.app +ǤϡԡӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+¾ιԤϤ٤ơñȻؼ (single directive) +ʣؼ (group directive) Τ줫ǤʤƤϤʤޤ +ñȻؼҤʣؼҤϡɤΤ褦ʽƤ⺹٤ޤ +

+ +

+ñȻؼҤȤϡ1 ԤǴ뤹ؼҤǤ +ñȻؼҤΰ̷ϼ̤Ǥ +

+ +
+
+ؼҤ̾    ؼҤ
+
+
+ +

+ʲǤϡstop-code ؼҤ̾ +0x1f09 0x0001 ͤǤ +

+ +
+
+stop-code          0x1f09 0x0001
+
+
+ +

+ؼ̾ʸȾʸ϶̤ޤΤǡstop-code +Stop-Code Ƚ񤯤ȤϤǤޤ +ؼҤ̾ͤζڤˤϡ򤫥֤Ѥޤ +Ϣ³ȥ֤Ƭӹˤä硢̵뤵ޤ +

+ +

+ʣؼҤȤϡҤեʣԤϤؼҤǤ +ʣؼҤΰ̷ϼ̤Ǥ +

+ +
+
+begin ʣؼҤ̾
+    ؼҤ̾    ؼҤ
+             : 
+             : (֤)
+             : 
+end
+
+
+ +

+ begin ʣؼҤγϤɽޤ +begin ϸ ʣؼҤ̾ Ȥ +ޤ +begin ʣؼҤ̾ ϶򤫥֤Ƕڤꡢ +ξȤƱԤ֤ޤ + end ϡʣؼҤνλɽޤ +end ϡñȤ 1 Ԥˤ֤ޤ +

+ +

+ΤȤ .app ǻѤǤʣؼҤ̾ϡ +narrow wide 2 ĤǤ +줾 ؼ ϡbegin end +ιԤδ֤֤ޤ +ؼҤ˴ؤ뵭ҤΰŪʵ§ϡñȻؼҤѤޤ +(ȤСؼҤ̾ ؼҤ ϶ +֤Ƕڤ뤳Ȥʤ) +

+ +

+ʲϡ narrow ʣؼҤεǤ +

+ +
+
+begin narrow
+    range-start     0xa121
+    range-end       0xa123
+    0xa121          []
+    0xa122          []
+    0xa123          [޲]
+end
+
+
+ + +

.app ñȻؼ

+ +

+ñȻؼҤˤϼΤ褦ʤΤޤ +

+ +
+
character-code
+
+appendix ʸɤꤷޤ +ʸɤɬCD-ROM Ҥ˹碌褦ˤޤ +CD-ROM Ҥʸɤϡebinfo ޥɤνϤ򸫤гǧ +Ǥޤ + +CD-ROM Ҥ ISO 8859-1 ǽ񤫤ƤϡؼҤͤȤ +ISO8859-1 ꤷޤ +ʳξϡJISX0208 ꤷƲ + +
+
+character-code          JISX0208
+
+
+ +λؼҤϡ.app եɬ +ʤФʤޤ +ʤäꡢٰʾȥ顼ˤʤޤ + +
stop-code
+
+ܤʸζڤꥳɤꤷޤ +ؼҤͤϡڤꥳɤʸֹ 2 Ľ¤٤Τˤʤޤ + +
+
+stop-code          0x1f09 0x0001
+
+
+ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ǵޤ +1ܤʸֹϡ0x1f09 0x1f41 +ʤФʤޤ +ʳȥ顼ˤʤޤ + +ebstopcode ޥɤȤȡܤŬڤʶڤꥳɤ +ꤹ뤳ȤǤޤ (ܤ +ebstopcode ޥɤΥޥ˥奢 򻲾Ȥ +) + +λؼҤʤƤ⹽ޤ󤬡ٰʾȥ顼ˤʤޤ +
+ + +

.app ʣؼ

+ +

+narrow wide ʣؼҤϡ줾ܤ +ФȾѳѳФʸ뤿Ѥޤ +ܤƤƤ⡢ʸѤɬפʤС +narrow, wide ʣؼҤ򵭽ҤɬפϤޤ +

+ +

+narrow wide ʣؼǤؼҤϡ +ޤäƱǤ +ؼҤˤϼΤ褦ʤΤޤ +

+ +
+
range-start
+
+ϰϤ򵭤ޤ +ϰ֤ʸֹ range-start ǡλ֤ʸֹ +range-end ǻꤷޤ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ޤ +ʲϵǤ + +
+
+    range-start     0xa121
+    range-end       0xa123
+
+
+ +ϰϤϡebinfo ޥɤνϷ̤ +ȾѥեȤʸ (narrow font characters) +ѥեȤʸ (wide font characters) +ǵ줿ϰϤȰפ褦ˤƲ + +narrow wide ʣؼǤϡ +ɬ󤺤 range-start range-end +ʤФʤޤ +ʤäꡢٰʾꤹȥ顼ˤʤޤ + +
0xhhhh
+
+hhhh ϡ4 16ʿǤ +ʸֹ 0xhhhh ѳʤȾѳФơ +ʸޤ + +
+
+    0xa121          [̾]
+
+
+ +appendix ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +ޤ +ʳξϡʸܸ EUC ޤ +⡢ʸϺĹ 31 ХȤޤǤǡĶȥ顼 +ʤޤ + +range-start, range-end ǻꤷϰ +٤ƤˤĤơʸꤹɬפϤޤ +ƱʣؼǡĤʸֹγФʸ +ǤΤϰޤǤǤ +ʣꤷ褦Ȥȡ顼ˤʤޤ +ޤϰϳʸֹʸ褦ȤƤ⡢Ϥꥨ顼 +ʤޤ + +CD-ROM ҤɤΤ褦ʳƤΤϡebfont ޥ +Ĵ٤뤳ȤǤޤ (ܤ +ebfont ޥɤΥޥ˥奢 򻲾ȤΤ) +
+ + +

appendix

+ +

+appendix Υǡ񤱤顢ebappendix ޥɤѤ +ºݤ (Хʥ) appendix ޤ +

+ +

+ʲξϤǤ ebappendix μ¹ˡˤĤƾܤޤ +

+ + + +

ebappendix μ¹

+ +

+ebappendix ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebappendix ϥǥ쥯ȥΥѥ
+
+
+ +

+ϥǥ쥯ȥΥѥ ˤϡɤ߹ appendix ǡ +ǥ쥯ȥꡢĤޤ catalog.app ޤ catalogs.app +ե뤬¸ߤǥ쥯ȥꤷޤ +άϡȥǥ쥯ȥꤷȤߤʤޤ +

+ +

+ɸǤϡϥեϥȥǥ쥯ȥ˺ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebappendix ϥȥǥ쥯ȥʳξ˽Ϥ뤳Ȥ +Ǥޤ +

+ +
+
+% ebappendix --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+⤷ϥǥ쥯ȥ꤬¸ߤƤʤСưŪ ebappendix +ޤ +

+ +

+¹Ԥȡebappendix Ͻϥǥ쥯ȥβ˥֥ǥ쥯ȥ +ꡢĤΥեޤ +

+ + +

appendix CD-ROM ҤνŤ͹碌

+ +

+HDD ˥ԡ CD-ROM ҤƱǥ쥯ȥˡappendix Ťͤ +֤ȤǤޤ +

+ +

+ˤϡebappendix --output-directory +--no-catalog ץȤޤ +--output-directory ץˤϡCD-ROM Ҥ +ȥåץǥ쥯ȥꤷޤ +

+ +
+
+% ebappendix --no-catalog --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+ʤappendix η (Żҥ֥å EPWING ) CD-ROM Ҥ˹碌 +褦ˤޤ +(ܤ +catalog(s).app ν +򻲾) +

+ +

+ebappendix μ¹ CD-ROM ҤΥǥ쥯ȥ깽 +ɤΤ褦ѲΤ򵭤Ƥߤޤ +ޤŻҥ֥åξǤ¹Υǥ쥯ȥ깽Τ褦 +ʤäƤȤޤ +

+ +
+
+catalog
+ejdict/start
+howto/start
+
+
+ +

+ebappendix appendix Ť͹碌ȡΤ褦ʹ +ʤޤ +

+ +
+
+catalog
+ejdict/start
+ejdict/appendix   appendix Υե
+howto/start
+howto/appendix    appendix Υե
+
+
+ +

+ƱͤˡEPWING Ǽ¹Υǥ쥯ȥ깽Τ褦ˤʤäƤ +ȡ +

+ +
+
+catalogs
+ejdict/data/honmon
+howto/data/honmon
+
+
+ +

+¹ԸϡΤ褦ʹˤʤޤ +

+ +
+
+catalogs
+ejdict/data/honmon
+ejdict/data/furoku   appendix Υե
+howto/data/honmon
+howto/data/furoku    appendix Υե
+
+
+ +

+CD-ROM ҤˤäƤϡǥ쥯ȥ̾ʸäƤ뤳Ȥ +ޤebappendix Ϥ򸡽ФޤΤǡ̾ʸ +Ѥǥ쥯ȥӺäƤޤȤϤޤ +

+ +

+--no-catalog ץꤹȡebappendixcatalog catalogs ե +ʤʤޤ + appendix EB 饤֥Υץꥱ󤫤Ȥݤϡ +CD-ROM Ҥ˺ǽ餫ѰդƤ catalog +catalogs ե CD-ROM ҡappendix Ѥ +եȤήѤ뤳Ȥˤʤޤ +

+ +

+appendix ΥեϡCD-ROM ҤΥեʬ +ȤʤäƤ뤿ᡢǽȤʤäƤޤ +--no-catalog ץꤷ˺ȡ +ebappendix CD-ROM ҤΥե +ƤޤޤΤǡդƲ +

+ + +

ebappendix Υץ

+ +

+ebappendix ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤ + +

+ +
+
-b Ҥη
+
--booktype Ҥη
+
+appendix Żҥ֥åEPWING ΤɤηΥ쥤Ȥ˻ƺ +Τꤷޤ +Żҥ֥åʤ ebEPWING ʤ epwing +Ȼꤷޤ + +Υץꤷʤä硢ΤǤɤη +Τꤵޤ +ޤϥǥ쥯ȥ catalog.app ե뤬¸ߤ +줬ɤ߹ޤ졢Żҥ֥å appendix ޤ +catalog.app ʤ catalogs.app +¸ߤФ줬ɤ߹ޤ졢EPWING appendix ޤ +(catalogs.app catalog.app ʤС顼 +ˤʤޤ) + +
-d
+
--debug
+
--verbose
+
+ǥХåѤΥåɸ२顼Ϥ˽Ϥޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-n
+
--no-catalog
+
+ե (catalog catalogs) +ޤ +ΥץϡҤ appendix Ʊǥ쥯ȥ˽Ť͹碌ݤ +ͭǤ +(ܤ +appendix CD-ROM ҤνŤ͹碌 +򻲾ȤΤ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+Υǥ쥯ȥꤷޤ +Υץάȡȥǥ쥯ȥ (.) +Ϥޤ +ǥ쥯ȥ꤬¸ߤʤСưŪޤ + +
-t
+
--test
+
+եϤޤ +ϥեɤ߹ǡƤΥåԤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebappendix-toc.html b/lib/ebu/doc/ebappendix-toc.html new file mode 100644 index 0000000..e898871 --- /dev/null +++ b/lib/ebu/doc/ebappendix-toc.html @@ -0,0 +1,19 @@ + diff --git a/lib/ebu/doc/ebappendix.html b/lib/ebu/doc/ebappendix.html new file mode 100644 index 0000000..98177c7 --- /dev/null +++ b/lib/ebu/doc/ebappendix.html @@ -0,0 +1,56 @@ + + + + + + +ebappendix ޥ + + + +

+[] [ܼ] +

+
+

ebappendix ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebappendix.html.in b/lib/ebu/doc/ebappendix.html.in new file mode 100644 index 0000000..5e680c4 --- /dev/null +++ b/lib/ebu/doc/ebappendix.html.in @@ -0,0 +1,729 @@ + + + + + + +ebappendix ޥ + + + +

ebappendix ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +

appendix (Ͽ) Ȥ

+ +

+appendix (Ͽ) Ȥ CD-ROM ҤǡΤȤǤ +appendix CD-ROM ҤνǼҤ󶡤ƤΤǤϤʤ +EB 饤֥˸ͭΤΤǤ +

+ +

+appendix ϰʲΥǡ CD-ROM ҤФ󶡤ޤ +

+ +
+
ʸζڤꥳ
+
+ʤ EB 饤֥Ȥä CD-ROM Τñݡ +ñλսǡEB 饤֥꤬ʸνϤߤ뤳Ȥ +ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ + +ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ڤꥳ (stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +appendix ζڤꥳɤϡνҤڤꥳɤ EB 饤֥ +˶Ƥ뤿Ѥޤ + +
ʸ
+
+¿ CD-ROM Ҥϡ (ȼʸ) äƤꡢʸ +γȤäƤޤ +CD-ROM ҤǤϳΥӥåȥޥåץեȤѰդƤꡢ +饤ȥץꥱ󤬳ϤˤϡΥեȤ +ʤƤϤʤޤ + +appendix Ǥϡ ʸ (alternation text) +뤳ȤǤޤ +ץꥱϡӥåȥޥåץեȤ褹ˡ +ʸϤ뤳ȤˤƤɤǤ礦 +
+ +

+appendix Υ쥤Ȥ CD-ROM ҤΤΤȤ褯Ƥޤ +ȥåץǥ쥯ȥˤ catalogcatalogs +ե뤬¸ߤܤΥǡб륵֥ǥ쥯ȥ֤ +ޤ +

+ + +

ebappendix ޥɤȤ

+ +

+appendix ϥХʥΥǡեǹޤΤǡľ +ԽΤưפǤϤޤ +ǡEB 饤֥Ǥ ebappendix ޥɤѰդƤޤ +ebappendix ޥɤϡƥȷǽ񤫤줿ǡɤ߹ߡ +Хʥ appendix ޤ +

+ +

+EB 饤֥θ FTP +ftp://ftp.sra.co.jp/pub/misc/eb/appendix/ +ˤϡˤĤνѤ appendix ֤Ƥޤ +˺ܤäƤʤ CD-ROM Ѥ appendix Ѱդϡ +ebappendix ޥɤȤޤ礦 +

+ + +

appendix Υǡν

+ +

+ξϤǤϡappendix Υǡνޤ +ǡ֥ǡפȸäƤΤϡebappendix ɤ߹ +ƥȷǽ񤫤줿ǡΤȤǤ +

+ +

+appendix 뤿ˤϡ˵󤲤륽ǡե뤬ɬפǤ +Υե򤹤٤ơƱǥ쥯ȥѰդ褦ˤޤ +

+ +
+
catalog.app ޤ catalogs.app
+
+appendix ˤɬcatalog ޤ catalogs Ȥ +̾Υե뤬ɬפǤ +catalog.app, catalogs.app ϤȤʤ +եǤ +appendix ˼ϿƤ (subbook) +(ܤ +catalog(s).app ν +򻲾) ΰ򵭤ޤ + +
.app
+
+appendix ϿƤܤ줾ФơĤѰդɬפ +ޤ ( ʬϡºݤϸġܤ̾ˤʤޤ) +appendix ΥᥤǡǤ롢ʸζڤꥳɤ䳰ʸϡ +Υե˵ޤ +
+ + + +

catalog(s).app Ȥ

+ +

+CD-ROM ҤƱͤˡappendix ѥåˤɬ catalog +⤷ catalogs Ȥ̾ΥեΤɤ餫 +ɬפǤ +catalog.app, catalogs.app եϡ +Ȥʤޤ +

+ +

+ebappendix ޥɤ appendix ݤˤϡ +catalog.app catalogs.app Τɤ餫ɬ +ѰդƤɬפޤ +

+ +

+ebappendix ɸưǤϡcatalog.app Ȥ +ե̾ˤƤȡե̾ catalog +ʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤Żҥ֥å˻ˤʤޤ +

+ +

+ȿФˡcatalogs.app Ȥե̾ˤƤȡ +ե̾ catalogs ˤʤޤ +ޤappendix ΤΥǥ쥯ȥ깽¤EPWING ˻ˤʤޤ +

+ +

+EPWING νҤФŻҥ֥å appendix ѤƤ⡢ +ưΤΤˤϻپ㤬ޤ +դƱͤǤ +

+ + +

catalog(s).app ν

+ +

+catalog(s).app ˤϡҤ˼ϿƤܤΥǥ쥯ȥ̾ +1 Ԥ 1 ĤĽ¤٤ޤ +ܤΥǥ쥯ȥ̾ϡebinfo ޥɤȤưפʬޤ +

+ +

+ʲϡebinfo μ¹Ǥ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+μѤ appendix 硢catalog(s).app ˤϼ +褦˵ޤ +

+ +
+
+ejdict
+howto
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +

+ +

+ǥ쥯ȥ̾ʸʸϡƱΤȤưޤ +ޤԤӤӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+ɬȤνҤܤ٤ƤƱ catalog(s).app +褦ˤƲ +

+ + +

.app Ȥ

+ +

+appendix ϿƤܤ줾Фơǡե +.app Ѱդɬפޤ + ʬϡºݤˤϸġܤλѤ +ǥ쥯ȥ̾ˤʤޤ +

+ +

+ȤСǤϡҤ ejdict howto +Ȥǥ쥯ȥ̾äܤäƤޤ +ξ硢Ѱդե ejdict.app howto.app +ˤʤޤ +

+ +

+.app ե appendix ΥᥤǡǤ롢 +ʸζڤꥳɤ䳰ʸϿ appendix +furoku Ȥäեˤʤޤ +(appendix Żҥ֥å appendixEPWING + furoku Ȥե̾ˤʤޤ) +

+ + +

.app ʸˡ

+ +

+ܤΥǡ򵭤ե.app +ǤϡԡӶʳκǽʸϥå嵭 (#) +ǤԤ̵뤵ޤ +

+ +

+¾ιԤϤ٤ơñȻؼ (single directive) +ʣؼ (group directive) Τ줫ǤʤƤϤʤޤ +ñȻؼҤʣؼҤϡɤΤ褦ʽƤ⺹٤ޤ +

+ +

+ñȻؼҤȤϡ1 ԤǴ뤹ؼҤǤ +ñȻؼҤΰ̷ϼ̤Ǥ +

+ +
+
+ؼҤ̾    ؼҤ
+
+
+ +

+ʲǤϡstop-code ؼҤ̾ +0x1f09 0x0001 ͤǤ +

+ +
+
+stop-code          0x1f09 0x0001
+
+
+ +

+ؼ̾ʸȾʸ϶̤ޤΤǡstop-code +Stop-Code Ƚ񤯤ȤϤǤޤ +ؼҤ̾ͤζڤˤϡ򤫥֤Ѥޤ +Ϣ³ȥ֤Ƭӹˤä硢̵뤵ޤ +

+ +

+ʣؼҤȤϡҤեʣԤϤؼҤǤ +ʣؼҤΰ̷ϼ̤Ǥ +

+ +
+
+begin ʣؼҤ̾
+    ؼҤ̾    ؼҤ
+             : 
+             : (֤)
+             : 
+end
+
+
+ +

+ begin ʣؼҤγϤɽޤ +begin ϸ ʣؼҤ̾ Ȥ +ޤ +begin ʣؼҤ̾ ϶򤫥֤Ƕڤꡢ +ξȤƱԤ֤ޤ + end ϡʣؼҤνλɽޤ +end ϡñȤ 1 Ԥˤ֤ޤ +

+ +

+ΤȤ .app ǻѤǤʣؼҤ̾ϡ +narrow wide 2 ĤǤ +줾 ؼ ϡbegin end +ιԤδ֤֤ޤ +ؼҤ˴ؤ뵭ҤΰŪʵ§ϡñȻؼҤѤޤ +(ȤСؼҤ̾ ؼҤ ϶ +֤Ƕڤ뤳Ȥʤ) +

+ +

+ʲϡ narrow ʣؼҤεǤ +

+ +
+
+begin narrow
+    range-start     0xa121
+    range-end       0xa123
+    0xa121          []
+    0xa122          []
+    0xa123          [޲]
+end
+
+
+ + +

.app ñȻؼ

+ +

+ñȻؼҤˤϼΤ褦ʤΤޤ +

+ +
+
character-code
+
+appendix ʸɤꤷޤ +ʸɤɬCD-ROM Ҥ˹碌褦ˤޤ +CD-ROM Ҥʸɤϡebinfo ޥɤνϤ򸫤гǧ +Ǥޤ + +CD-ROM Ҥ ISO 8859-1 ǽ񤫤ƤϡؼҤͤȤ +ISO8859-1 ꤷޤ +ʳξϡJISX0208 ꤷƲ + +
+
+character-code          JISX0208
+
+
+ +λؼҤϡ.app եɬ +ʤФʤޤ +ʤäꡢٰʾȥ顼ˤʤޤ + +
stop-code
+
+ܤʸζڤꥳɤꤷޤ +ؼҤͤϡڤꥳɤʸֹ 2 Ľ¤٤Τˤʤޤ + +
+
+stop-code          0x1f09 0x0001
+
+
+ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ǵޤ +1ܤʸֹϡ0x1f09 0x1f41 +ʤФʤޤ +ʳȥ顼ˤʤޤ + +ebstopcode ޥɤȤȡܤŬڤʶڤꥳɤ +ꤹ뤳ȤǤޤ (ܤ +ebstopcode ޥɤΥޥ˥奢 򻲾Ȥ +) + +λؼҤʤƤ⹽ޤ󤬡ٰʾȥ顼ˤʤޤ +
+ + +

.app ʣؼ

+ +

+narrow wide ʣؼҤϡ줾ܤ +ФȾѳѳФʸ뤿Ѥޤ +ܤƤƤ⡢ʸѤɬפʤС +narrow, wide ʣؼҤ򵭽ҤɬפϤޤ +

+ +

+narrow wide ʣؼǤؼҤϡ +ޤäƱǤ +ؼҤˤϼΤ褦ʤΤޤ +

+ +
+
range-start
+
+ϰϤ򵭤ޤ +ϰ֤ʸֹ range-start ǡλ֤ʸֹ +range-end ǻꤷޤ +ʸֹϡ0x ʤ 0X ³ 16ʿ 4 +ޤ +ʲϵǤ + +
+
+    range-start     0xa121
+    range-end       0xa123
+
+
+ +ϰϤϡebinfo ޥɤνϷ̤ +ȾѥեȤʸ (narrow font characters) +ѥեȤʸ (wide font characters) +ǵ줿ϰϤȰפ褦ˤƲ + +narrow wide ʣؼǤϡ +ɬ󤺤 range-start range-end +ʤФʤޤ +ʤäꡢٰʾꤹȥ顼ˤʤޤ + +
0xhhhh
+
+hhhh ϡ4 16ʿǤ +ʸֹ 0xhhhh ѳʤȾѳФơ +ʸޤ + +
+
+    0xa121          [̾]
+
+
+ +appendix ISO 8859-1 ǽ񤫤Ƥϡʸ ISO 8859-1 +ޤ +ʳξϡʸܸ EUC ޤ +⡢ʸϺĹ 31 ХȤޤǤǡĶȥ顼 +ʤޤ + +range-start, range-end ǻꤷϰ +٤ƤˤĤơʸꤹɬפϤޤ +ƱʣؼǡĤʸֹγФʸ +ǤΤϰޤǤǤ +ʣꤷ褦Ȥȡ顼ˤʤޤ +ޤϰϳʸֹʸ褦ȤƤ⡢Ϥꥨ顼 +ʤޤ + +CD-ROM ҤɤΤ褦ʳƤΤϡebfont ޥ +Ĵ٤뤳ȤǤޤ (ܤ +ebfont ޥɤΥޥ˥奢 򻲾ȤΤ) +
+ + +

appendix

+ +

+appendix Υǡ񤱤顢ebappendix ޥɤѤ +ºݤ (Хʥ) appendix ޤ +

+ +

+ʲξϤǤ ebappendix μ¹ˡˤĤƾܤޤ +

+ + + +

ebappendix μ¹

+ +

+ebappendix ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebappendix ϥǥ쥯ȥΥѥ
+
+
+ +

+ϥǥ쥯ȥΥѥ ˤϡɤ߹ appendix ǡ +ǥ쥯ȥꡢĤޤ catalog.app ޤ catalogs.app +ե뤬¸ߤǥ쥯ȥꤷޤ +άϡȥǥ쥯ȥꤷȤߤʤޤ +

+ +

+ɸǤϡϥեϥȥǥ쥯ȥ˺ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebappendix ϥȥǥ쥯ȥʳξ˽Ϥ뤳Ȥ +Ǥޤ +

+ +
+
+% ebappendix --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+⤷ϥǥ쥯ȥ꤬¸ߤƤʤСưŪ ebappendix +ޤ +

+ +

+¹Ԥȡebappendix Ͻϥǥ쥯ȥβ˥֥ǥ쥯ȥ +ꡢĤΥեޤ +

+ + +

appendix CD-ROM ҤνŤ͹碌

+ +

+HDD ˥ԡ CD-ROM ҤƱǥ쥯ȥˡappendix Ťͤ +֤ȤǤޤ +

+ +

+ˤϡebappendix --output-directory +--no-catalog ץȤޤ +--output-directory ץˤϡCD-ROM Ҥ +ȥåץǥ쥯ȥꤷޤ +

+ +
+
+% ebappendix --no-catalog --output-directory ϥǥ쥯ȥΥѥ \
+  ϥǥ쥯ȥΥѥ
+
+
+ +

+ʤappendix η (Żҥ֥å EPWING ) CD-ROM Ҥ˹碌 +褦ˤޤ +(ܤ +catalog(s).app ν +򻲾) +

+ +

+ebappendix μ¹ CD-ROM ҤΥǥ쥯ȥ깽 +ɤΤ褦ѲΤ򵭤Ƥߤޤ +ޤŻҥ֥åξǤ¹Υǥ쥯ȥ깽Τ褦 +ʤäƤȤޤ +

+ +
+
+catalog
+ejdict/start
+howto/start
+
+
+ +

+ebappendix appendix Ť͹碌ȡΤ褦ʹ +ʤޤ +

+ +
+
+catalog
+ejdict/start
+ejdict/appendix   appendix Υե
+howto/start
+howto/appendix    appendix Υե
+
+
+ +

+ƱͤˡEPWING Ǽ¹Υǥ쥯ȥ깽Τ褦ˤʤäƤ +ȡ +

+ +
+
+catalogs
+ejdict/data/honmon
+howto/data/honmon
+
+
+ +

+¹ԸϡΤ褦ʹˤʤޤ +

+ +
+
+catalogs
+ejdict/data/honmon
+ejdict/data/furoku   appendix Υե
+howto/data/honmon
+howto/data/furoku    appendix Υե
+
+
+ +

+CD-ROM ҤˤäƤϡǥ쥯ȥ̾ʸäƤ뤳Ȥ +ޤebappendix Ϥ򸡽ФޤΤǡ̾ʸ +Ѥǥ쥯ȥӺäƤޤȤϤޤ +

+ +

+--no-catalog ץꤹȡebappendixcatalog catalogs ե +ʤʤޤ + appendix EB 饤֥Υץꥱ󤫤Ȥݤϡ +CD-ROM Ҥ˺ǽ餫ѰդƤ catalog +catalogs ե CD-ROM ҡappendix Ѥ +եȤήѤ뤳Ȥˤʤޤ +

+ +

+appendix ΥեϡCD-ROM ҤΥեʬ +ȤʤäƤ뤿ᡢǽȤʤäƤޤ +--no-catalog ץꤷ˺ȡ +ebappendix CD-ROM ҤΥե +ƤޤޤΤǡդƲ +

+ + +

ebappendix Υץ

+ +

+ebappendix ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤ + +

+ +
+
-b Ҥη
+
--booktype Ҥη
+
+appendix Żҥ֥åEPWING ΤɤηΥ쥤Ȥ˻ƺ +Τꤷޤ +Żҥ֥åʤ ebEPWING ʤ epwing +Ȼꤷޤ + +Υץꤷʤä硢ΤǤɤη +Τꤵޤ +ޤϥǥ쥯ȥ catalog.app ե뤬¸ߤ +줬ɤ߹ޤ졢Żҥ֥å appendix ޤ +catalog.app ʤ catalogs.app +¸ߤФ줬ɤ߹ޤ졢EPWING appendix ޤ +(catalogs.app catalog.app ʤС顼 +ˤʤޤ) + +
-d
+
--debug
+
--verbose
+
+ǥХåѤΥåɸ२顼Ϥ˽Ϥޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-n
+
--no-catalog
+
+ե (catalog catalogs) +ޤ +ΥץϡҤ appendix Ʊǥ쥯ȥ˽Ť͹碌ݤ +ͭǤ +(ܤ +appendix CD-ROM ҤνŤ͹碌 +򻲾ȤΤ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+Υǥ쥯ȥꤷޤ +Υץάȡȥǥ쥯ȥ (.) +Ϥޤ +ǥ쥯ȥ꤬¸ߤʤСưŪޤ + +
-t
+
--test
+
+եϤޤ +ϥեɤ߹ǡƤΥåԤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebfont-01.html b/lib/ebu/doc/ebfont-01.html new file mode 100644 index 0000000..73a7a66 --- /dev/null +++ b/lib/ebu/doc/ebfont-01.html @@ -0,0 +1,30 @@ + + + + + + +ebfont ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+ebfont ޥɤϡCD-ROM ҤγΥӥåȥޥåץǡ +ɤ߹ߡꤵ줿Ѵե˽񤭽Фޤ +ebfont EB 饤֥ѤƤꡢ饤֥Ȱ +ۤƤޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebfont-02.html b/lib/ebu/doc/ebfont-02.html new file mode 100644 index 0000000..a43f29a --- /dev/null +++ b/lib/ebu/doc/ebfont-02.html @@ -0,0 +1,67 @@ + + + + + + +ebfont ޥ + + + +

+[] [] [ܼ] +

+
+

Ȥ

+ +

+CD-ROM Ҥ¿ϡҸͭʸ (local characters) +ޤ +ȤСCD-ROM Ҥ˻ȤʸåȤȯäƤʤᡢ +¼ˤȯƤΤޤ +

+ +

+CD-ROM ҤϡΥӥåȥޥåץǡäƤޤ +ebfont ޥɤϡCD-ROM ҤΥӥåȥޥåץǡɤߡ +ꤵ줿Ѵե˽񤭽Фޤ +ebfont ϡXBMXPMGIFBMPPNG ΤΤ줫 +ޤʣβե뤳ȤǤޤ +ä˻꤬ʤСXBM 򤵤ޤ +

+ +

Ⱦ (narrow) +(wide) 2 ʬवޤ +ȾѤʸΥӥåȥޥåץǡǤϡ⤵ȾʬǤ +ѤʸΥӥåȥޥåץǡǤϡ⤵ϤۤƱǤ +CD-ROM Ҥϡξμγ뤳Ȥǽǡ +ebfont ξμβեޤ +

+ +

+CD-ROM ҤλͽǤϡȾѤѤξγФ +4 ΥƤޤ +⤵ϼ̤Ǥ +

+ + + + + + + +
Ⱦ
16 8x16 16x16
24 16x24 24x24
30 16x30 32x30
48 24x48 48x48
+ +

+ä˻꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤ +եޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebfont-03.html b/lib/ebu/doc/ebfont-03.html new file mode 100644 index 0000000..57e8055 --- /dev/null +++ b/lib/ebu/doc/ebfont-03.html @@ -0,0 +1,249 @@ + + + + + + +ebfont ޥ + + + +

+[] [] [ܼ] +

+
+

ebfont μ¹

+ +

+ebfont ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebfont ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebfont
+
+
+ +

+ξ硢ebfont ϥȥǥ쥯ȥβ˲ե +ޤ +ΤȤե̾ΰ̷ϼ̤Ǥ +

+ +
+
+//narrow/ʸֹ.ĥ
+//wide/ʸֹ.ĥ
+
+
+ +

+ĥ xbmxpmgif +bmp png Τ줫ǡʸֹ +16 ʿ 4 (0 9 a +f) ǡΤ褦ˤʤޤ +

+ +
+
+ejdict/16/narrow/a121.xbm
+ejdict/16/wide/a321.xbm
+
+
+ +

+ejdict/16/xbm/narrow ʤɤ֤Υǥ쥯ȥϡ⤷ +̵ ebfont ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebfont ϥȥǥ쥯ȥʳΥǥ쥯ȥ +եϤ뤳ȤǤޤ +Υȥåץǥ쥯ȥϡebfont ¹Ԥ˺ +ʤФʤޤ +

+ +
+
+% ebfont --output-directory ǥ쥯ȥ ҤؤΥѥ
+
+
+ + + +

+ +

+ebfont XBM, XPM, GIF89a, BMP, PNG βե +뤳ȤǤޤ + --image-format (-i) ץ +ꤷޤ +--image-format ץϰļꡢ˥ +(,) Ƕڤäơ̾¤٤ƽ񤭤ޤ +ȤСʲΥޥɤ¹Ԥȡebfont XPM +GIF βեޤ +

+ +
+
+% ebfont --image-format xpm,gif ҤؤΥѥ
+
+
+ +

+--image-format ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --image-format xpm --image-format gif ҤؤΥѥ
+
+
+ +

+XPM, GIF, PNG ǤϡʿϹ (RGB #000000) ˡ +طʿƩˤʤޤ +BMP ǤϡʿϹˡطʿ (RGB #ffffff) +ʤޤ +

+ +

+ebzip GIF βݤ LZW ̥르ꥺ +ȤʤᡢեΥ礭ʤޤ +

+ + +

+ +

+ä˻꤬ʤСebfont ϡȾѤѤ줾ˤĤơ +⤵ 16 ԥΥեȤβեޤ +--font-height (-f) ץѤ뤳Ȥǡ +¾ι⤵ΥեȤβե뤳ȤǤޤ +--font-height ץϰļꡢ˥ +(,) ǶڤäơեȤι⤵¤٤ƽ񤭤ޤ +եȤι⤵ϡ162430 +48 Τ줫ǤʤƤϤޤ +ȤСʲΥޥɤ¹Ԥȡebfont Ϲ⤵ +16 ԥ 24 ԥΥեȤβեޤ +

+ +
+
+% ebfont --font-height 16,24 ҤؤΥѥ
+
+
+ +

+--font-height ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --font-height 16 --font-height 24 ҤؤΥѥ
+
+
+ + +

+ +

+ʤˤꤷʤȡebzip Ϥ٤Ƥ (subbook) оݤ +Ʋեޤ--subbook (-S) +ץȤȡꤷܤβե뤳ȤǤޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) ǶڤäơܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥ, ebfont english +french βեޤ +

+ +
+
+% ebfont --subbook english,french /mnt/cdrom
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --subbook english --subbook french /mnt/cdrom
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebfont-04.html b/lib/ebu/doc/ebfont-04.html new file mode 100644 index 0000000..d88ad42 --- /dev/null +++ b/lib/ebu/doc/ebfont-04.html @@ -0,0 +1,91 @@ + + + + + + +ebfont ޥ + + + +

+[] [ܼ] +

+
+

ebfont Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-d
+
--debug
+
--verbose
+
+ǥХåѤξɸ२顼Ϥ˽Ϥޤ + +
-f
+
--font-height
+
+⤵ γβեޤ + ϡ⤵򥫥 (,) Ƕڤä¤٤Τ +ʤƤϤʤޤ +⤵λȤƵΤϡ1624 +3048 Ǥ +꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤΤΤ +ޤ +(ܤϡֹ⤵򻲾ȤΤȡ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--image-format
+
+ βեޤ + ϡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤʤޤ +бƤ̾ xbmxpm +gifbmpgifpng +Ǥ +ꤷʤäȤϡebfont XBM βե +ޤ +(ܤϡֲ򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
ǥ쥯ȥ ʲ˽Ϥޤ +ꤷʤäȤϡebfont ϥȥǥ쥯ȥ +(.) β˲եޤ +(ܤϡebfont μ¹ԡ +򻲾ȤΤȡ) + +
-S
+
--subbook
+
+ebfont ˡɤܤγΤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤʤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܡ򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebfont-cat.html b/lib/ebu/doc/ebfont-cat.html new file mode 100644 index 0000000..5c60ad6 --- /dev/null +++ b/lib/ebu/doc/ebfont-cat.html @@ -0,0 +1,397 @@ + + + + + + +ebfont ޥ + + + +

ebfont ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebfont ޥɤϡCD-ROM ҤγΥӥåȥޥåץǡ +ɤ߹ߡꤵ줿Ѵե˽񤭽Фޤ +ebfont EB 饤֥ѤƤꡢ饤֥Ȱ +ۤƤޤ +

+ + +

Ȥ

+ +

+CD-ROM Ҥ¿ϡҸͭʸ (local characters) +ޤ +ȤСCD-ROM Ҥ˻ȤʸåȤȯäƤʤᡢ +¼ˤȯƤΤޤ +

+ +

+CD-ROM ҤϡΥӥåȥޥåץǡäƤޤ +ebfont ޥɤϡCD-ROM ҤΥӥåȥޥåץǡɤߡ +ꤵ줿Ѵե˽񤭽Фޤ +ebfont ϡXBMXPMGIFBMPPNG ΤΤ줫 +ޤʣβե뤳ȤǤޤ +ä˻꤬ʤСXBM 򤵤ޤ +

+ +

Ⱦ (narrow) +(wide) 2 ʬवޤ +ȾѤʸΥӥåȥޥåץǡǤϡ⤵ȾʬǤ +ѤʸΥӥåȥޥåץǡǤϡ⤵ϤۤƱǤ +CD-ROM Ҥϡξμγ뤳Ȥǽǡ +ebfont ξμβեޤ +

+ +

+CD-ROM ҤλͽǤϡȾѤѤξγФ +4 ΥƤޤ +⤵ϼ̤Ǥ +

+ + + + + + + +
Ⱦ
16 8x16 16x16
24 16x24 24x24
30 16x30 32x30
48 24x48 48x48
+ +

+ä˻꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤ +եޤ +

+ + +

ebfont μ¹

+ +

+ebfont ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebfont ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebfont
+
+
+ +

+ξ硢ebfont ϥȥǥ쥯ȥβ˲ե +ޤ +ΤȤե̾ΰ̷ϼ̤Ǥ +

+ +
+
+//narrow/ʸֹ.ĥ
+//wide/ʸֹ.ĥ
+
+
+ +

+ĥ xbmxpmgif +bmp png Τ줫ǡʸֹ +16 ʿ 4 (0 9 a +f) ǡΤ褦ˤʤޤ +

+ +
+
+ejdict/16/narrow/a121.xbm
+ejdict/16/wide/a321.xbm
+
+
+ +

+ejdict/16/xbm/narrow ʤɤ֤Υǥ쥯ȥϡ⤷ +̵ ebfont ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebfont ϥȥǥ쥯ȥʳΥǥ쥯ȥ +եϤ뤳ȤǤޤ +Υȥåץǥ쥯ȥϡebfont ¹Ԥ˺ +ʤФʤޤ +

+ +
+
+% ebfont --output-directory ǥ쥯ȥ ҤؤΥѥ
+
+
+ + + +

+ +

+ebfont XBM, XPM, GIF89a, BMP, PNG βե +뤳ȤǤޤ + --image-format (-i) ץ +ꤷޤ +--image-format ץϰļꡢ˥ +(,) Ƕڤäơ̾¤٤ƽ񤭤ޤ +ȤСʲΥޥɤ¹Ԥȡebfont XPM +GIF βեޤ +

+ +
+
+% ebfont --image-format xpm,gif ҤؤΥѥ
+
+
+ +

+--image-format ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --image-format xpm --image-format gif ҤؤΥѥ
+
+
+ +

+XPM, GIF, PNG ǤϡʿϹ (RGB #000000) ˡ +طʿƩˤʤޤ +BMP ǤϡʿϹˡطʿ (RGB #ffffff) +ʤޤ +

+ +

+ebzip GIF βݤ LZW ̥르ꥺ +ȤʤᡢեΥ礭ʤޤ +

+ + +

+ +

+ä˻꤬ʤСebfont ϡȾѤѤ줾ˤĤơ +⤵ 16 ԥΥեȤβեޤ +--font-height (-f) ץѤ뤳Ȥǡ +¾ι⤵ΥեȤβե뤳ȤǤޤ +--font-height ץϰļꡢ˥ +(,) ǶڤäơեȤι⤵¤٤ƽ񤭤ޤ +եȤι⤵ϡ162430 +48 Τ줫ǤʤƤϤޤ +ȤСʲΥޥɤ¹Ԥȡebfont Ϲ⤵ +16 ԥ 24 ԥΥեȤβեޤ +

+ +
+
+% ebfont --font-height 16,24 ҤؤΥѥ
+
+
+ +

+--font-height ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --font-height 16 --font-height 24 ҤؤΥѥ
+
+
+ + +

+ +

+ʤˤꤷʤȡebzip Ϥ٤Ƥ (subbook) оݤ +Ʋեޤ--subbook (-S) +ץȤȡꤷܤβե뤳ȤǤޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) ǶڤäơܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥ, ebfont english +french βեޤ +

+ +
+
+% ebfont --subbook english,french /mnt/cdrom
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --subbook english --subbook french /mnt/cdrom
+
+
+ + +

ebfont Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-d
+
--debug
+
--verbose
+
+ǥХåѤξɸ२顼Ϥ˽Ϥޤ + +
-f
+
--font-height
+
+⤵ γβեޤ + ϡ⤵򥫥 (,) Ƕڤä¤٤Τ +ʤƤϤʤޤ +⤵λȤƵΤϡ1624 +3048 Ǥ +꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤΤΤ +ޤ +(ܤϡֹ⤵򻲾ȤΤȡ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--image-format
+
+ βեޤ + ϡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤʤޤ +бƤ̾ xbmxpm +gifbmpgifpng +Ǥ +ꤷʤäȤϡebfont XBM βե +ޤ +(ܤϡֲ򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
ǥ쥯ȥ ʲ˽Ϥޤ +ꤷʤäȤϡebfont ϥȥǥ쥯ȥ +(.) β˲եޤ +(ܤϡebfont μ¹ԡ +򻲾ȤΤȡ) + +
-S
+
--subbook
+
+ebfont ˡɤܤγΤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤʤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܡ򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebfont-toc.html b/lib/ebu/doc/ebfont-toc.html new file mode 100644 index 0000000..3270ed9 --- /dev/null +++ b/lib/ebu/doc/ebfont-toc.html @@ -0,0 +1,11 @@ + diff --git a/lib/ebu/doc/ebfont.html b/lib/ebu/doc/ebfont.html new file mode 100644 index 0000000..dc20499 --- /dev/null +++ b/lib/ebu/doc/ebfont.html @@ -0,0 +1,48 @@ + + + + + + +ebfont ޥ + + + +

+[] [ܼ] +

+
+

ebfont ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebfont.html.in b/lib/ebu/doc/ebfont.html.in new file mode 100644 index 0000000..6eb4c92 --- /dev/null +++ b/lib/ebu/doc/ebfont.html.in @@ -0,0 +1,387 @@ + + + + + + +ebfont ޥ + + + +

ebfont ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebfont ޥɤϡCD-ROM ҤγΥӥåȥޥåץǡ +ɤ߹ߡꤵ줿Ѵե˽񤭽Фޤ +ebfont EB 饤֥ѤƤꡢ饤֥Ȱ +ۤƤޤ +

+ + +

Ȥ

+ +

+CD-ROM Ҥ¿ϡҸͭʸ (local characters) +ޤ +ȤСCD-ROM Ҥ˻ȤʸåȤȯäƤʤᡢ +¼ˤȯƤΤޤ +

+ +

+CD-ROM ҤϡΥӥåȥޥåץǡäƤޤ +ebfont ޥɤϡCD-ROM ҤΥӥåȥޥåץǡɤߡ +ꤵ줿Ѵե˽񤭽Фޤ +ebfont ϡXBMXPMGIFBMPPNG ΤΤ줫 +ޤʣβե뤳ȤǤޤ +ä˻꤬ʤСXBM 򤵤ޤ +

+ +

Ⱦ (narrow) +(wide) 2 ʬवޤ +ȾѤʸΥӥåȥޥåץǡǤϡ⤵ȾʬǤ +ѤʸΥӥåȥޥåץǡǤϡ⤵ϤۤƱǤ +CD-ROM Ҥϡξμγ뤳Ȥǽǡ +ebfont ξμβեޤ +

+ +

+CD-ROM ҤλͽǤϡȾѤѤξγФ +4 ΥƤޤ +⤵ϼ̤Ǥ +

+ + + + + + + +
Ⱦ
16 8x16 16x16
24 16x24 24x24
30 16x30 32x30
48 24x48 48x48
+ +

+ä˻꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤ +եޤ +

+ + +

ebfont μ¹

+ +

+ebfont ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebfont ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebfont
+
+
+ +

+ξ硢ebfont ϥȥǥ쥯ȥβ˲ե +ޤ +ΤȤե̾ΰ̷ϼ̤Ǥ +

+ +
+
+//narrow/ʸֹ.ĥ
+//wide/ʸֹ.ĥ
+
+
+ +

+ĥ xbmxpmgif +bmp png Τ줫ǡʸֹ +16 ʿ 4 (0 9 a +f) ǡΤ褦ˤʤޤ +

+ +
+
+ejdict/16/narrow/a121.xbm
+ejdict/16/wide/a321.xbm
+
+
+ +

+ejdict/16/xbm/narrow ʤɤ֤Υǥ쥯ȥϡ⤷ +̵ ebfont ޤ +

+ +

+--output-directory ץꤹ뤳Ȥǡ +ebfont ϥȥǥ쥯ȥʳΥǥ쥯ȥ +եϤ뤳ȤǤޤ +Υȥåץǥ쥯ȥϡebfont ¹Ԥ˺ +ʤФʤޤ +

+ +
+
+% ebfont --output-directory ǥ쥯ȥ ҤؤΥѥ
+
+
+ + + +

+ +

+ebfont XBM, XPM, GIF89a, BMP, PNG βե +뤳ȤǤޤ + --image-format (-i) ץ +ꤷޤ +--image-format ץϰļꡢ˥ +(,) Ƕڤäơ̾¤٤ƽ񤭤ޤ +ȤСʲΥޥɤ¹Ԥȡebfont XPM +GIF βեޤ +

+ +
+
+% ebfont --image-format xpm,gif ҤؤΥѥ
+
+
+ +

+--image-format ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --image-format xpm --image-format gif ҤؤΥѥ
+
+
+ +

+XPM, GIF, PNG ǤϡʿϹ (RGB #000000) ˡ +طʿƩˤʤޤ +BMP ǤϡʿϹˡطʿ (RGB #ffffff) +ʤޤ +

+ +

+ebzip GIF βݤ LZW ̥르ꥺ +ȤʤᡢեΥ礭ʤޤ +

+ + +

+ +

+ä˻꤬ʤСebfont ϡȾѤѤ줾ˤĤơ +⤵ 16 ԥΥեȤβեޤ +--font-height (-f) ץѤ뤳Ȥǡ +¾ι⤵ΥեȤβե뤳ȤǤޤ +--font-height ץϰļꡢ˥ +(,) ǶڤäơեȤι⤵¤٤ƽ񤭤ޤ +եȤι⤵ϡ162430 +48 Τ줫ǤʤƤϤޤ +ȤСʲΥޥɤ¹Ԥȡebfont Ϲ⤵ +16 ԥ 24 ԥΥեȤβեޤ +

+ +
+
+% ebfont --font-height 16,24 ҤؤΥѥ
+
+
+ +

+--font-height ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --font-height 16 --font-height 24 ҤؤΥѥ
+
+
+ + +

+ +

+ʤˤꤷʤȡebzip Ϥ٤Ƥ (subbook) оݤ +Ʋեޤ--subbook (-S) +ץȤȡꤷܤβե뤳ȤǤޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) ǶڤäơܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥ, ebfont english +french βեޤ +

+ +
+
+% ebfont --subbook english,french /mnt/cdrom
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebfont --subbook english --subbook french /mnt/cdrom
+
+
+ + +

ebfont Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-d
+
--debug
+
--verbose
+
+ǥХåѤξɸ२顼Ϥ˽Ϥޤ + +
-f
+
--font-height
+
+⤵ γβեޤ + ϡ⤵򥫥 (,) Ƕڤä¤٤Τ +ʤƤϤʤޤ +⤵λȤƵΤϡ1624 +3048 Ǥ +꤬ʤСebfont Ϲ⤵ 16 ԥΥեȤΤΤ +ޤ +(ܤϡֹ⤵򻲾ȤΤȡ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--image-format
+
+ βեޤ + ϡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤʤޤ +бƤ̾ xbmxpm +gifbmpgifpng +Ǥ +ꤷʤäȤϡebfont XBM βե +ޤ +(ܤϡֲ򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
ǥ쥯ȥ ʲ˽Ϥޤ +ꤷʤäȤϡebfont ϥȥǥ쥯ȥ +(.) β˲եޤ +(ܤϡebfont μ¹ԡ +򻲾ȤΤȡ) + +
-S
+
--subbook
+
+ebfont ˡɤܤγΤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤʤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܡ򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebinfo-01.html b/lib/ebu/doc/ebinfo-01.html new file mode 100644 index 0000000..02748e5 --- /dev/null +++ b/lib/ebu/doc/ebinfo-01.html @@ -0,0 +1,29 @@ + + + + + + +ebinfo ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+ebinfo ޥɤ CD-ROM Ҥ˴ؤ͡ʾϤޤ +ebinfo EB 饤֥ѤƤꡢ饤֥Ȱ +Ƥޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo-02.html b/lib/ebu/doc/ebinfo-02.html new file mode 100644 index 0000000..7ae6404 --- /dev/null +++ b/lib/ebu/doc/ebinfo-02.html @@ -0,0 +1,111 @@ + + + + + + +ebinfo ޥ + + + +

+[] [] [ܼ] +

+
+

ebinfo μ¹

+ +

+ebinfo ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebinfo
+
+
+ +

+ξ硢ebinfo ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +ebinfo ϻꤵ줿Ҥ˴ؤ򡢼Τ褦ʴǽ +ޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+ (subbook) ʣ縡 (multi-search) бƤ硢 +--multi-search-m) ץꤹȡ +ebinfo ʣ縡˴ؤܺ٤ʾ碌ƽϤޤ +ʣ縡˴ؤϡΤ褦ʴˤʤޤ +

+ +
+
+  ʣ縡 1:
+    ٥ 1: ޤϰ
+    : ͭ
+    ٥ 2: 
+      : ̵
+    ٥ 3: ƥ
+      : ͭ
+    ٥ 4: ŵ
+      : ̵
+  ʣ縡 2:
+    ٥ 1: 
+      : ̵
+    ٥ 2: ̾
+      : ̵
+    ٥ 3: 
+      : ̵
+    ٥ 4: Ǽ
+      : ̵
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo-03.html b/lib/ebu/doc/ebinfo-03.html new file mode 100644 index 0000000..777c0a9 --- /dev/null +++ b/lib/ebu/doc/ebinfo-03.html @@ -0,0 +1,115 @@ + + + + + + +ebinfo ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥξܺ٤Ĥ

+ +

+Ǥϡebinfo Ϥξܺ٤ˤĤޤ +

+ +
+
disc type:
+
+νҤηEB/EBG/EBXA/EBXA-C/S-EBXA ޤ EPWING Ǥ + +
character code:
+
+νҤǻѤƤʸISO 8859-1 ޤ JIS X 0208 Ǥ + +
the number of subbooks:
+
+νҤ˼ϿƤ (subbbok) ο +
+ +

+äơνҤΤ줾ܤˤĤơʲξ󤬽Ϥޤ +

+ +
+
title:
+
+ܤ̾ +Ҥ JIS X 0208 ˽񤫤ƤȤϡ̾ EUC (Extended UNIX Code) +ɽޤ + +
directory:
+
+ܤ˴Ϣե뤬֤ǥ쥯ȥ̾ +ѾʸʸѴޤ + +
search methods:
+
+ܤбƤ븡ˡΰ +ΰϡʲ˵ˡΰ⤷鹽ޤ + +
+
copyright
+
+ɽ (copyright notice) +̩˸СϸˡǤϤʤΤǤCD-ROM Ҥ +ط顢ɽ褦ˤƤޤ + +
word
+
+׸ (Word search) + +
endword
+
+׸ (Endword search) + +
keyword
+
+︡ (Keyword search) + +
cross
+
+ (Keyword search) + +
multi
+
+ʣ縡 (Multi search) + +
menu
+
+˥塼 (Menu search). + +
graphic
+
+եå (Graphic search). + +
+ +

+ܤġեȤΥΰ +ΰˤϡ16, 24, 30, 48 Ȥ 4 ĤΥΰ⤷ +ޤ +

+ +

+ܤƤȾʸʸֹϰϡ +

+ +

+ܤƤʸʸֹϰϡ +

+ +
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo-04.html b/lib/ebu/doc/ebinfo-04.html new file mode 100644 index 0000000..36e916e --- /dev/null +++ b/lib/ebu/doc/ebinfo-04.html @@ -0,0 +1,81 @@ + + + + + + +ebinfo ޥ + + + +

+[] [] [ܼ] +

+
+

EBNET ФνҰ

+ +

+̾νϤˡebinfo EBNET ФƤ +ҤΰϤ뤳ȤǤޤ +ξΥޥɹԤγפϡΤ褦ˤʤޤ +

+ +
+
+% ebinfo --book-list ֥м̻
+
+
+ +

֥м̻ ϡ̾ޤޤʤ֥̻ +ˤʤޤ +ȤС +

+ +
+
+% ebinfo --book-list ebnet://dict.example.com
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

+̾פ .app դƤΤ appendix (Ͽ) +ʳϽΤǤ +Υ饤ȤФƥĤʤҤ appendix +Ϥޤ +

+ +

+³ơ encycl ȤҤξ򸫤ˤϡ +褦ˤޤ +

+ +
+
+% ebinfo ebnet://dict.example.com/cncyclopedia
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 1
+
+ 1:
+  ̾: ֥饦󥳥󥵥ɴʻŵ
+  ǥ쥯ȥ: brown
+  :    ʣ ˥塼
+  եȤ礭: 16 24
+  ȾѥեȤʸ: 0xa121 -- 0xa452
+  ѥեȤʸ: 0xa321 -- 0xa452
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo-05.html b/lib/ebu/doc/ebinfo-05.html new file mode 100644 index 0000000..900da0d --- /dev/null +++ b/lib/ebu/doc/ebinfo-05.html @@ -0,0 +1,53 @@ + + + + + + +ebinfo ޥ + + + +

+[] [ܼ] +

+
+

ebinfo Υץ

+ +

+ebinfo ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l
+
--book-list
+
+̾νϤˡEBNET ФƤҤΰϤޤ +ޥɹ԰ book-path ϱ֥̻ҤǤʤФʤޤ + +
-m
+
--multi-search
+
+ʣ縡 (multi search) ˴ؤ⡢碌ƽϤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo-cat.html b/lib/ebu/doc/ebinfo-cat.html new file mode 100644 index 0000000..1fb6e23 --- /dev/null +++ b/lib/ebu/doc/ebinfo-cat.html @@ -0,0 +1,325 @@ + + + + + + +ebinfo ޥ + + + +

ebinfo ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1997-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebinfo ޥɤ CD-ROM Ҥ˴ؤ͡ʾϤޤ +ebinfo EB 饤֥ѤƤꡢ饤֥Ȱ +Ƥޤ +

+ + +

ebinfo μ¹

+ +

+ebinfo ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebinfo
+
+
+ +

+ξ硢ebinfo ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +ebinfo ϻꤵ줿Ҥ˴ؤ򡢼Τ褦ʴǽ +ޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+ (subbook) ʣ縡 (multi-search) бƤ硢 +--multi-search-m) ץꤹȡ +ebinfo ʣ縡˴ؤܺ٤ʾ碌ƽϤޤ +ʣ縡˴ؤϡΤ褦ʴˤʤޤ +

+ +
+
+  ʣ縡 1:
+    ٥ 1: ޤϰ
+    : ͭ
+    ٥ 2: 
+      : ̵
+    ٥ 3: ƥ
+      : ͭ
+    ٥ 4: ŵ
+      : ̵
+  ʣ縡 2:
+    ٥ 1: 
+      : ̵
+    ٥ 2: ̾
+      : ̵
+    ٥ 3: 
+      : ̵
+    ٥ 4: Ǽ
+      : ̵
+
+
+ + +

Ϥξܺ٤Ĥ

+ +

+Ǥϡebinfo Ϥξܺ٤ˤĤޤ +

+ +
+
disc type:
+
+νҤηEB/EBG/EBXA/EBXA-C/S-EBXA ޤ EPWING Ǥ + +
character code:
+
+νҤǻѤƤʸISO 8859-1 ޤ JIS X 0208 Ǥ + +
the number of subbooks:
+
+νҤ˼ϿƤ (subbbok) ο +
+ +

+äơνҤΤ줾ܤˤĤơʲξ󤬽Ϥޤ +

+ +
+
title:
+
+ܤ̾ +Ҥ JIS X 0208 ˽񤫤ƤȤϡ̾ EUC (Extended UNIX Code) +ɽޤ + +
directory:
+
+ܤ˴Ϣե뤬֤ǥ쥯ȥ̾ +ѾʸʸѴޤ + +
search methods:
+
+ܤбƤ븡ˡΰ +ΰϡʲ˵ˡΰ⤷鹽ޤ + +
+
copyright
+
+ɽ (copyright notice) +̩˸СϸˡǤϤʤΤǤCD-ROM Ҥ +ط顢ɽ褦ˤƤޤ + +
word
+
+׸ (Word search) + +
endword
+
+׸ (Endword search) + +
keyword
+
+︡ (Keyword search) + +
cross
+
+ (Keyword search) + +
multi
+
+ʣ縡 (Multi search) + +
menu
+
+˥塼 (Menu search). + +
graphic
+
+եå (Graphic search). + +
+ +

+ܤġեȤΥΰ +ΰˤϡ16, 24, 30, 48 Ȥ 4 ĤΥΰ⤷ +ޤ +

+ +

+ܤƤȾʸʸֹϰϡ +

+ +

+ܤƤʸʸֹϰϡ +

+ +
+ + +

EBNET ФνҰ

+ +

+̾νϤˡebinfo EBNET ФƤ +ҤΰϤ뤳ȤǤޤ +ξΥޥɹԤγפϡΤ褦ˤʤޤ +

+ +
+
+% ebinfo --book-list ֥м̻
+
+
+ +

֥м̻ ϡ̾ޤޤʤ֥̻ +ˤʤޤ +ȤС +

+ +
+
+% ebinfo --book-list ebnet://dict.example.com
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

+̾פ .app դƤΤ appendix (Ͽ) +ʳϽΤǤ +Υ饤ȤФƥĤʤҤ appendix +Ϥޤ +

+ +

+³ơ encycl ȤҤξ򸫤ˤϡ +褦ˤޤ +

+ +
+
+% ebinfo ebnet://dict.example.com/cncyclopedia
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 1
+
+ 1:
+  ̾: ֥饦󥳥󥵥ɴʻŵ
+  ǥ쥯ȥ: brown
+  :    ʣ ˥塼
+  եȤ礭: 16 24
+  ȾѥեȤʸ: 0xa121 -- 0xa452
+  ѥեȤʸ: 0xa321 -- 0xa452
+
+
+ + +

ebinfo Υץ

+ +

+ebinfo ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l
+
--book-list
+
+̾νϤˡEBNET ФƤҤΰϤޤ +ޥɹ԰ book-path ϱ֥̻ҤǤʤФʤޤ + +
-m
+
--multi-search
+
+ʣ縡 (multi search) ˴ؤ⡢碌ƽϤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebinfo-toc.html b/lib/ebu/doc/ebinfo-toc.html new file mode 100644 index 0000000..e9c15af --- /dev/null +++ b/lib/ebu/doc/ebinfo-toc.html @@ -0,0 +1,7 @@ + diff --git a/lib/ebu/doc/ebinfo.html b/lib/ebu/doc/ebinfo.html new file mode 100644 index 0000000..0073fa8 --- /dev/null +++ b/lib/ebu/doc/ebinfo.html @@ -0,0 +1,44 @@ + + + + + + +ebinfo ޥ + + + +

+[] [ܼ] +

+
+

ebinfo ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1997-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebinfo.html.in b/lib/ebu/doc/ebinfo.html.in new file mode 100644 index 0000000..a8144d2 --- /dev/null +++ b/lib/ebu/doc/ebinfo.html.in @@ -0,0 +1,319 @@ + + + + + + +ebinfo ޥ + + + +

ebinfo ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1997-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebinfo ޥɤ CD-ROM Ҥ˴ؤ͡ʾϤޤ +ebinfo EB 饤֥ѤƤꡢ饤֥Ȱ +Ƥޤ +

+ + +

ebinfo μ¹

+ +

+ebinfo ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ѥϡʥѥ (: /mnt/dict) Ǥ֥̻ +(: ebnet://localhost/dict) Ǥ⹽ޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebinfo
+
+
+ +

+ξ硢ebinfo ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +ebinfo ϻꤵ줿Ҥ˴ؤ򡢼Τ褦ʴǽ +ޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+  1:
+  ̾: ¼ŵ軰ǡ
+  ǥ쥯ȥ: ejdict
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+  2:
+  ̾: νҤλȤ
+  ǥ쥯ȥ: howto
+  :    ˥塼 
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+ (subbook) ʣ縡 (multi-search) бƤ硢 +--multi-search-m) ץꤹȡ +ebinfo ʣ縡˴ؤܺ٤ʾ碌ƽϤޤ +ʣ縡˴ؤϡΤ褦ʴˤʤޤ +

+ +
+
+  ʣ縡 1:
+    ٥ 1: ޤϰ
+    : ͭ
+    ٥ 2: 
+      : ̵
+    ٥ 3: ƥ
+      : ͭ
+    ٥ 4: ŵ
+      : ̵
+  ʣ縡 2:
+    ٥ 1: 
+      : ̵
+    ٥ 2: ̾
+      : ̵
+    ٥ 3: 
+      : ̵
+    ٥ 4: Ǽ
+      : ̵
+
+
+ + +

Ϥξܺ٤Ĥ

+ +

+Ǥϡebinfo Ϥξܺ٤ˤĤޤ +

+ +
+
disc type:
+
+νҤηEB/EBG/EBXA/EBXA-C/S-EBXA ޤ EPWING Ǥ + +
character code:
+
+νҤǻѤƤʸISO 8859-1 ޤ JIS X 0208 Ǥ + +
the number of subbooks:
+
+νҤ˼ϿƤ (subbbok) ο +
+ +

+äơνҤΤ줾ܤˤĤơʲξ󤬽Ϥޤ +

+ +
+
title:
+
+ܤ̾ +Ҥ JIS X 0208 ˽񤫤ƤȤϡ̾ EUC (Extended UNIX Code) +ɽޤ + +
directory:
+
+ܤ˴Ϣե뤬֤ǥ쥯ȥ̾ +ѾʸʸѴޤ + +
search methods:
+
+ܤбƤ븡ˡΰ +ΰϡʲ˵ˡΰ⤷鹽ޤ + +
+
copyright
+
+ɽ (copyright notice) +̩˸СϸˡǤϤʤΤǤCD-ROM Ҥ +ط顢ɽ褦ˤƤޤ + +
word
+
+׸ (Word search) + +
endword
+
+׸ (Endword search) + +
keyword
+
+︡ (Keyword search) + +
cross
+
+ (Keyword search) + +
multi
+
+ʣ縡 (Multi search) + +
menu
+
+˥塼 (Menu search). + +
graphic
+
+եå (Graphic search). + +
+ +

+ܤġեȤΥΰ +ΰˤϡ16, 24, 30, 48 Ȥ 4 ĤΥΰ⤷ +ޤ +

+ +

+ܤƤȾʸʸֹϰϡ +

+ +

+ܤƤʸʸֹϰϡ +

+ +
+ + +

EBNET ФνҰ

+ +

+̾νϤˡebinfo EBNET ФƤ +ҤΰϤ뤳ȤǤޤ +ξΥޥɹԤγפϡΤ褦ˤʤޤ +

+ +
+
+% ebinfo --book-list ֥м̻
+
+
+ +

֥м̻ ϡ̾ޤޤʤ֥̻ +ˤʤޤ +ȤС +

+ +
+
+% ebinfo --book-list ebnet://dict.example.com
+̾             ̾
+encycl           ֥饦󥳥󥵥ɴʻŵ
+encycl.app       ֥饦󥳥󥵥ɴʻŵ (appendix)
+crossword        ɥѥ뼭ŵ
+travel           ɥȥ٥륬
+
+
+ +

+̾פ .app դƤΤ appendix (Ͽ) +ʳϽΤǤ +Υ饤ȤФƥĤʤҤ appendix +Ϥޤ +

+ +

+³ơ encycl ȤҤξ򸫤ˤϡ +褦ˤޤ +

+ +
+
+% ebinfo ebnet://dict.example.com/cncyclopedia
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 1
+
+ 1:
+  ̾: ֥饦󥳥󥵥ɴʻŵ
+  ǥ쥯ȥ: brown
+  :    ʣ ˥塼
+  եȤ礭: 16 24
+  ȾѥեȤʸ: 0xa121 -- 0xa452
+  ѥեȤʸ: 0xa321 -- 0xa452
+
+
+ + +

ebinfo Υץ

+ +

+ebinfo ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l
+
--book-list
+
+̾νϤˡEBNET ФƤҤΰϤޤ +ޥɹ԰ book-path ϱ֥̻ҤǤʤФʤޤ + +
-m
+
--multi-search
+
+ʣ縡 (multi search) ˴ؤ⡢碌ƽϤޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebrefile-01.html b/lib/ebu/doc/ebrefile-01.html new file mode 100644 index 0000000..12e2c15 --- /dev/null +++ b/lib/ebu/doc/ebrefile-01.html @@ -0,0 +1,72 @@ + + + + + + +ebrefile ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+ CD-ROM Ҥϡʣ (subbook) +äƤޤ +ȤФ CD-ROM ҤϹ켭ŵ¼ŵ±Ѽŵ 3 Ĥܤ +Ƥޤ +ġܤϡ켫ΤΩֽҡפˤʤäƤޤ +

+ +
+
+     (CD-ROM )
++-----------------------+
+|   [켭ŵ] ()   |
+|   [¼ŵ] ()   |
+|   [±Ѽŵ] ()   |
++-----------------------+
+
+
+ +

+EB/EBG/EBXA/EBXA-C/S-EBXA CD-ROM Ҥ catalog +ȤեEPWING CD-ROM Ҥ catalogs +ȤեäƤޤ +Υեϡ CD-ROM ҤˤϤɤܤƤΤ +Ƥޤ +ΥեϡCD-ROM ҤΥȥåץǥ쥯ȥ֤Ƥޤ +

+ +

+ebrefile ϸΥեɤߡ桼ꤵ줿 +ܤեޤ +Сebrefile ܤ򡢥ե +ޤ +CD-ROM Ҥ 3 ĤܤäƤ硢ebrefile +ΤǤդ 1 Ĥޤ 2 Ĥܤ򡢿ե +ळȤǤޤ +ϡɥǥ CD-ROM Ҥΰ򥳥ԡȤˡ +ebrefile Ǥ +ebrefile EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebrefile ϥե꡼եȥǤʤνҤͳ +ȤΤǤȤϸ¤ޤ +ebrefile ϡCD-ROM ҤΤեƤѹäޤ +ղ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebrefile-02.html b/lib/ebu/doc/ebrefile-02.html new file mode 100644 index 0000000..ddda7f3 --- /dev/null +++ b/lib/ebu/doc/ebrefile-02.html @@ -0,0 +1,254 @@ + + + + + + +ebrefile ޥ + + + +

+[] [] [ܼ] +

+
+

ebrefile μ¹

+ +

+ebrefile ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebrefile ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebrefile
+
+
+ +

+ξ硢ebrefile ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +

+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebrefile ebnet://localhost/cdrom
+ebrefile: ebnet ˤбƤޤ
+
+
+ + + +

ܤ

+ +

+ä˻꤬ʤȡebrefile ϡΥե +Ƥ뤹٤Ƥܤ򿷤ܤ˼ߤޤ +Ĥޤꡢեϡñ˸ΥեΥԡˤʤޤ +ο񤤤ϡΩޤ +ebrefile ϡ̾ --subbook (-S) +ץꤷƵưޤ +

+ +

+--subbook (-S) ץϰļꡢ +˥ (,) Ƕڤäơե +ߤܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢ̾ english +french, german ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥȡebrefile ܤȤ +english french +ޤ +

+ +
+
+% ebrefile --subbook english,french
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebrefile --subbook english --subbook french
+
+
+ +

+ebrefile ܤѤ뤳ȤϤǤޤΤǡ +--subbook ͿνǤդǤ +

+ +

+ǺƹϴλǤ +⤦ ebinfo ưƤߤޤ礦 + german äƤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+⤷CD-ROM Τ򤹤Ǥ˥ϡɥǥ˥ԡƤʤ顢 + german ΥեϺƤ⹽ޤ +ǥ쥯ȥ̾ʸǹƤʤ顢Τ褦ˤޤ +

+ +
+
+% rm -r german
+
+
+ +

+ebrefile ϡɤ߹եˤΤޤ޾񤭤 +ʥեޤΥեʣ +catalog(s).old Ȥե̾¸ޤ +ܤְ㤨Ƥޤäϡä󸵤ᤷޤ礦 +(ʲǤϡե뤬 catalogs ȲꤷƤޤ) +

+ +
+
+% mv catalogs.old catalogs
+
+
+ +

+ ¹Ի catalog(s).old ¸ߤƤȡ +˻Ĥޤ +ξ硢եʣϿ˺ޤΤǡդƲ +

+ + +

ebzip ȤϢ

+ +

+ebrefile ϡebzip Ȥ CD-ROM Ҥ򰵽̤ +ޥɤʻѤ뤳ȤǤޤ +(ebzip ޥɤ˴ؤƤξܺ٤ϡ +ebzip ޥɤΥޥ˥奢 򻲾ȤΤȡ) +̾ ebzip ebrefile ˤϥޥɹԤƱ +Ϳޤ +

+ +

+CD-ROM Ҥ /cdrom ˥ޥȤ졢νҤˤ +englishfrenchgerman Ȥ +3 ĤܤƤȤޤ +ʲ˵ˤäơ englishfrench +ϰ̤ƥȥǥ쥯ȥβ֤졢 german +ܤΥꥹȤޤ +

+ +
+
+% ebzip --subbook english,french /cdrom
+% ebrefile --subbook english,french /cdrom
+
+
+ +

+̤ե򥫥ȥǥ쥯ȥʳ֤ˤϡΤ褦ˤޤ +

+ +
+
+% ebzip --output-directory /dict --subbook english,french /cdrom
+% ebrefile --output-directory /dict --subbook english,french /cdrom
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebrefile-03.html b/lib/ebu/doc/ebrefile-03.html new file mode 100644 index 0000000..7a104ac --- /dev/null +++ b/lib/ebu/doc/ebrefile-03.html @@ -0,0 +1,59 @@ + + + + + + +ebrefile ޥ + + + +

+[] [ܼ] +

+
+

ebrefile Υץ

+ +

+ebrefile ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+ե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +(ܤϡebrefile μ¹ԡ +򻲾ȤΤ) + +
-S
+
--subbook
+
+ebrefile ե˼٤ܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܤ 򻲾ȤΤ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebrefile-cat.html b/lib/ebu/doc/ebrefile-cat.html new file mode 100644 index 0000000..c073f07 --- /dev/null +++ b/lib/ebu/doc/ebrefile-cat.html @@ -0,0 +1,363 @@ + + + + + + +ebrefile ޥ + + + +

ebrefile ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ CD-ROM Ҥϡʣ (subbook) +äƤޤ +ȤФ CD-ROM ҤϹ켭ŵ¼ŵ±Ѽŵ 3 Ĥܤ +Ƥޤ +ġܤϡ켫ΤΩֽҡפˤʤäƤޤ +

+ +
+
+     (CD-ROM )
++-----------------------+
+|   [켭ŵ] ()   |
+|   [¼ŵ] ()   |
+|   [±Ѽŵ] ()   |
++-----------------------+
+
+
+ +

+EB/EBG/EBXA/EBXA-C/S-EBXA CD-ROM Ҥ catalog +ȤեEPWING CD-ROM Ҥ catalogs +ȤեäƤޤ +Υեϡ CD-ROM ҤˤϤɤܤƤΤ +Ƥޤ +ΥեϡCD-ROM ҤΥȥåץǥ쥯ȥ֤Ƥޤ +

+ +

+ebrefile ϸΥեɤߡ桼ꤵ줿 +ܤեޤ +Сebrefile ܤ򡢥ե +ޤ +CD-ROM Ҥ 3 ĤܤäƤ硢ebrefile +ΤǤդ 1 Ĥޤ 2 Ĥܤ򡢿ե +ळȤǤޤ +ϡɥǥ CD-ROM Ҥΰ򥳥ԡȤˡ +ebrefile Ǥ +ebrefile EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebrefile ϥե꡼եȥǤʤνҤͳ +ȤΤǤȤϸ¤ޤ +ebrefile ϡCD-ROM ҤΤեƤѹäޤ +ղ +

+ + +

ebrefile μ¹

+ +

+ebrefile ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebrefile ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebrefile
+
+
+ +

+ξ硢ebrefile ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +

+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebrefile ebnet://localhost/cdrom
+ebrefile: ebnet ˤбƤޤ
+
+
+ + + +

ܤ

+ +

+ä˻꤬ʤȡebrefile ϡΥե +Ƥ뤹٤Ƥܤ򿷤ܤ˼ߤޤ +Ĥޤꡢեϡñ˸ΥեΥԡˤʤޤ +ο񤤤ϡΩޤ +ebrefile ϡ̾ --subbook (-S) +ץꤷƵưޤ +

+ +

+--subbook (-S) ץϰļꡢ +˥ (,) Ƕڤäơե +ߤܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢ̾ english +french, german ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥȡebrefile ܤȤ +english french +ޤ +

+ +
+
+% ebrefile --subbook english,french
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebrefile --subbook english --subbook french
+
+
+ +

+ebrefile ܤѤ뤳ȤϤǤޤΤǡ +--subbook ͿνǤդǤ +

+ +

+ǺƹϴλǤ +⤦ ebinfo ưƤߤޤ礦 + german äƤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+⤷CD-ROM Τ򤹤Ǥ˥ϡɥǥ˥ԡƤʤ顢 + german ΥեϺƤ⹽ޤ +ǥ쥯ȥ̾ʸǹƤʤ顢Τ褦ˤޤ +

+ +
+
+% rm -r german
+
+
+ +

+ebrefile ϡɤ߹եˤΤޤ޾񤭤 +ʥեޤΥեʣ +catalog(s).old Ȥե̾¸ޤ +ܤְ㤨Ƥޤäϡä󸵤ᤷޤ礦 +(ʲǤϡե뤬 catalogs ȲꤷƤޤ) +

+ +
+
+% mv catalogs.old catalogs
+
+
+ +

+ ¹Ի catalog(s).old ¸ߤƤȡ +˻Ĥޤ +ξ硢եʣϿ˺ޤΤǡդƲ +

+ + +

ebzip ȤϢ

+ +

+ebrefile ϡebzip Ȥ CD-ROM Ҥ򰵽̤ +ޥɤʻѤ뤳ȤǤޤ +(ebzip ޥɤ˴ؤƤξܺ٤ϡ +ebzip ޥɤΥޥ˥奢 򻲾ȤΤȡ) +̾ ebzip ebrefile ˤϥޥɹԤƱ +Ϳޤ +

+ +

+CD-ROM Ҥ /cdrom ˥ޥȤ졢νҤˤ +englishfrenchgerman Ȥ +3 ĤܤƤȤޤ +ʲ˵ˤäơ englishfrench +ϰ̤ƥȥǥ쥯ȥβ֤졢 german +ܤΥꥹȤޤ +

+ +
+
+% ebzip --subbook english,french /cdrom
+% ebrefile --subbook english,french /cdrom
+
+
+ +

+̤ե򥫥ȥǥ쥯ȥʳ֤ˤϡΤ褦ˤޤ +

+ +
+
+% ebzip --output-directory /dict --subbook english,french /cdrom
+% ebrefile --output-directory /dict --subbook english,french /cdrom
+
+
+ + +

ebrefile Υץ

+ +

+ebrefile ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+ե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +(ܤϡebrefile μ¹ԡ +򻲾ȤΤ) + +
-S
+
--subbook
+
+ebrefile ե˼٤ܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܤ 򻲾ȤΤ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebrefile-toc.html b/lib/ebu/doc/ebrefile-toc.html new file mode 100644 index 0000000..b3cff0b --- /dev/null +++ b/lib/ebu/doc/ebrefile-toc.html @@ -0,0 +1,9 @@ + diff --git a/lib/ebu/doc/ebrefile.html b/lib/ebu/doc/ebrefile.html new file mode 100644 index 0000000..916f6df --- /dev/null +++ b/lib/ebu/doc/ebrefile.html @@ -0,0 +1,46 @@ + + + + + + +ebrefile ޥ + + + +

+[] [ܼ] +

+
+

ebrefile ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebrefile.html.in b/lib/ebu/doc/ebrefile.html.in new file mode 100644 index 0000000..b30032a --- /dev/null +++ b/lib/ebu/doc/ebrefile.html.in @@ -0,0 +1,355 @@ + + + + + + +ebrefile ޥ + + + +

ebrefile ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ CD-ROM Ҥϡʣ (subbook) +äƤޤ +ȤФ CD-ROM ҤϹ켭ŵ¼ŵ±Ѽŵ 3 Ĥܤ +Ƥޤ +ġܤϡ켫ΤΩֽҡפˤʤäƤޤ +

+ +
+
+     (CD-ROM )
++-----------------------+
+|   [켭ŵ] ()   |
+|   [¼ŵ] ()   |
+|   [±Ѽŵ] ()   |
++-----------------------+
+
+
+ +

+EB/EBG/EBXA/EBXA-C/S-EBXA CD-ROM Ҥ catalog +ȤեEPWING CD-ROM Ҥ catalogs +ȤեäƤޤ +Υեϡ CD-ROM ҤˤϤɤܤƤΤ +Ƥޤ +ΥեϡCD-ROM ҤΥȥåץǥ쥯ȥ֤Ƥޤ +

+ +

+ebrefile ϸΥեɤߡ桼ꤵ줿 +ܤեޤ +Сebrefile ܤ򡢥ե +ޤ +CD-ROM Ҥ 3 ĤܤäƤ硢ebrefile +ΤǤդ 1 Ĥޤ 2 Ĥܤ򡢿ե +ळȤǤޤ +ϡɥǥ CD-ROM Ҥΰ򥳥ԡȤˡ +ebrefile Ǥ +ebrefile EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebrefile ϥե꡼եȥǤʤνҤͳ +ȤΤǤȤϸ¤ޤ +ebrefile ϡCD-ROM ҤΤեƤѹäޤ +ղ +

+ + +

ebrefile μ¹

+ +

+ebrefile ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebrefile ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebrefile
+
+
+ +

+ξ硢ebrefile ϥȥǥ쥯ȥ (.) +ꤵ줿ΤȽǤޤ +

+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebrefile ebnet://localhost/cdrom
+ebrefile: ebnet ˤбƤޤ
+
+
+ + + +

ܤ

+ +

+ä˻꤬ʤȡebrefile ϡΥե +Ƥ뤹٤Ƥܤ򿷤ܤ˼ߤޤ +Ĥޤꡢեϡñ˸ΥեΥԡˤʤޤ +ο񤤤ϡΩޤ +ebrefile ϡ̾ --subbook (-S) +ץꤷƵưޤ +

+ +

+--subbook (-S) ץϰļꡢ +˥ (,) Ƕڤäơե +ߤܤΥǥ쥯ȥ̾¤٤ƽ񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢ̾ english +french, german ȤȤʬޤ +

+ +

+Υޥɤ¹Ԥȡebrefile ܤȤ +english french +ޤ +

+ +
+
+% ebrefile --subbook english,french
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤ϡ̤ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebrefile --subbook english --subbook french
+
+
+ +

+ebrefile ܤѤ뤳ȤϤǤޤΤǡ +--subbook ͿνǤդǤ +

+ +

+ǺƹϴλǤ +⤦ ebinfo ưƤߤޤ礦 + german äƤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+⤷CD-ROM Τ򤹤Ǥ˥ϡɥǥ˥ԡƤʤ顢 + german ΥեϺƤ⹽ޤ +ǥ쥯ȥ̾ʸǹƤʤ顢Τ褦ˤޤ +

+ +
+
+% rm -r german
+
+
+ +

+ebrefile ϡɤ߹եˤΤޤ޾񤭤 +ʥեޤΥեʣ +catalog(s).old Ȥե̾¸ޤ +ܤְ㤨Ƥޤäϡä󸵤ᤷޤ礦 +(ʲǤϡե뤬 catalogs ȲꤷƤޤ) +

+ +
+
+% mv catalogs.old catalogs
+
+
+ +

+ ¹Ի catalog(s).old ¸ߤƤȡ +˻Ĥޤ +ξ硢եʣϿ˺ޤΤǡդƲ +

+ + +

ebzip ȤϢ

+ +

+ebrefile ϡebzip Ȥ CD-ROM Ҥ򰵽̤ +ޥɤʻѤ뤳ȤǤޤ +(ebzip ޥɤ˴ؤƤξܺ٤ϡ +ebzip ޥɤΥޥ˥奢 򻲾ȤΤȡ) +̾ ebzip ebrefile ˤϥޥɹԤƱ +Ϳޤ +

+ +

+CD-ROM Ҥ /cdrom ˥ޥȤ졢νҤˤ +englishfrenchgerman Ȥ +3 ĤܤƤȤޤ +ʲ˵ˤäơ englishfrench +ϰ̤ƥȥǥ쥯ȥβ֤졢 german +ܤΥꥹȤޤ +

+ +
+
+% ebzip --subbook english,french /cdrom
+% ebrefile --subbook english,french /cdrom
+
+
+ +

+̤ե򥫥ȥǥ쥯ȥʳ֤ˤϡΤ褦ˤޤ +

+ +
+
+% ebzip --output-directory /dict --subbook english,french /cdrom
+% ebrefile --output-directory /dict --subbook english,french /cdrom
+
+
+ + +

ebrefile Υץ

+ +

+ebrefile ޥɤϡŪʰʸץ̾ȳФ䤹 +Ĺץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+ե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +(ܤϡebrefile μ¹ԡ +򻲾ȤΤ) + +
-S
+
--subbook
+
+ebrefile ե˼٤ܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤϡܤ 򻲾ȤΤ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ + + diff --git a/lib/ebu/doc/ebstopcode-01.html b/lib/ebu/doc/ebstopcode-01.html new file mode 100644 index 0000000..17f3a7b --- /dev/null +++ b/lib/ebu/doc/ebstopcode-01.html @@ -0,0 +1,47 @@ + + + + + + +ebstopcode ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+ʤ EB 饤֥ΥץꥱȤä CD-ROM ҤΤ +ñݡñλսǡץꥱʸ +Ϥߤ뤳Ȥ򤢤ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ +

+ +

+ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ʸζڤꥳ (text stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +ξϡappendix (Ͽ) ȤΤѤơEB 饤֥ +ڤꥳɤ򶵤ƤʤƤϤʤޤ +

+ +

+ebstopcode ޥɤϡCD-ROM Ҥʸζڤꥳɤ +뤿ΥġǤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebstopcode-02.html b/lib/ebu/doc/ebstopcode-02.html new file mode 100644 index 0000000..5a94208 --- /dev/null +++ b/lib/ebu/doc/ebstopcode-02.html @@ -0,0 +1,143 @@ + + + + + + +ebstopcode ޥ + + + +

+[] [] [ܼ] +

+
+

ebstopcode μ¹

+ +

+ebstopcode ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebstopcode ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +֥Ѥμ̻ (ebnet://...) ꤹ뤳ȤǽǤ +ҤؤΥѥ ά줿ϡȥǥ쥯ȥ꤬ꤵ줿 +Τȸʤޤ +

+ +

+ ˤϡоݤȤܤΥǥ쥯ȥ̾ꤷޤ +ebinfo ޥɤѤȡCD-ROM ҤˤɤΤ褦ܤ +ޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ2 ĤܤҤˤϴޤޤƤꡢ̾ english + french ȤȤʬޤ +

+ +

+ english ζڤꥳɤϤˤϡʲ¹Ԥޤ +

+ +
+
+% ebstopcode /cdrom english
+
+
+ +

+ebstopcode ϡܤʸȶڤꥳɤθ򼡤Τ褦 +Ϥޤ +

+ +
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+A
+
+=== stop-code?: 0x1f09 0x0001 ===
+[̾] 1: A ַͭķշ
+
+=== stop-code?: 0x1f09 0x0001 ===
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+
+=== stop-code?: 0x1f09 0x0001 ===
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+(ʲά)
+
+
+ +

+stop-code?: Ƚ񤫤줿ԤϤ줾졢ڤꥳɤθ +Ƥޤ +ڤꥳɤȤƻꤹȡEB 饤֥Ϥʸ +Ϥߤޤ +

+ +

+ english ȤܤŬڤʶڤꥳɤϡ"0x1f41 0x0100" +ˤʤޤ +--no-candidate --code ץѤơ +ڤꥳɤƤߤޤ +

+ +
+
+% ebstopcode --no-candidate --code "0x1f41 0x0100" /cdrom english
+A
+[̾] 1: A ַͭķշ
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebstopcode-03.html b/lib/ebu/doc/ebstopcode-03.html new file mode 100644 index 0000000..0703d3c --- /dev/null +++ b/lib/ebu/doc/ebstopcode-03.html @@ -0,0 +1,74 @@ + + + + + + +ebstopcode ޥ + + + +

+[] [ܼ] +

+
+

ebstopcode Υץ

+ +

+ebstopcode ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳Ȥ +Ǥޤ +

+ +
+
-c
+
--code
+
+ ڤꥳɤ˻ꤷޤ (: "0x1f09 0x0001") +ebstopcode ϡ 򸫤ĤޤʸϤޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l Ĺ
+
--length Ĺ
+
+ʸǡĹ Ĺ ХȤޤǽϤޤ +Ĺ 0 ˤȡebstopcode ʸΤϤޤ +ΥץꤷʤäȤϡ2048 ˤʤޤ + +
-n
+
--no-candidates
+
+ڤꥳɤθϤʤ褦ˤޤ + +
-p ڡ:եå
+
--text-position ڡ:եå
+
+ʸǡνϤ򤳤ΰ֤鳫Ϥޤ +ڡ ˤ 0 礭 16եå ˤϡ +00x7FF δ֤ 16򤽤줾ꤷޤ +ΥץꤷʤäȤϡʸǡƬ֤Ϥޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +

+--code (-c) --length +(-l) ץϡߤˤ⤦ΥץǤäޤ +

+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebstopcode-cat.html b/lib/ebu/doc/ebstopcode-cat.html new file mode 100644 index 0000000..77be583 --- /dev/null +++ b/lib/ebu/doc/ebstopcode-cat.html @@ -0,0 +1,238 @@ + + + + + + +ebstopcode ޥ + + + +

ebstopcode ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ʤ EB 饤֥ΥץꥱȤä CD-ROM ҤΤ +ñݡñλսǡץꥱʸ +Ϥߤ뤳Ȥ򤢤ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ +

+ +

+ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ʸζڤꥳ (text stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +ξϡappendix (Ͽ) ȤΤѤơEB 饤֥ +ڤꥳɤ򶵤ƤʤƤϤʤޤ +

+ +

+ebstopcode ޥɤϡCD-ROM Ҥʸζڤꥳɤ +뤿ΥġǤ +

+ + +

ebstopcode μ¹

+ +

+ebstopcode ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebstopcode ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +֥Ѥμ̻ (ebnet://...) ꤹ뤳ȤǽǤ +ҤؤΥѥ ά줿ϡȥǥ쥯ȥ꤬ꤵ줿 +Τȸʤޤ +

+ +

+ ˤϡоݤȤܤΥǥ쥯ȥ̾ꤷޤ +ebinfo ޥɤѤȡCD-ROM ҤˤɤΤ褦ܤ +ޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ2 ĤܤҤˤϴޤޤƤꡢ̾ english + french ȤȤʬޤ +

+ +

+ english ζڤꥳɤϤˤϡʲ¹Ԥޤ +

+ +
+
+% ebstopcode /cdrom english
+
+
+ +

+ebstopcode ϡܤʸȶڤꥳɤθ򼡤Τ褦 +Ϥޤ +

+ +
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+A
+
+=== stop-code?: 0x1f09 0x0001 ===
+[̾] 1: A ַͭķշ
+
+=== stop-code?: 0x1f09 0x0001 ===
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+
+=== stop-code?: 0x1f09 0x0001 ===
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+(ʲά)
+
+
+ +

+stop-code?: Ƚ񤫤줿ԤϤ줾졢ڤꥳɤθ +Ƥޤ +ڤꥳɤȤƻꤹȡEB 饤֥Ϥʸ +Ϥߤޤ +

+ +

+ english ȤܤŬڤʶڤꥳɤϡ"0x1f41 0x0100" +ˤʤޤ +--no-candidate --code ץѤơ +ڤꥳɤƤߤޤ +

+ +
+
+% ebstopcode --no-candidate --code "0x1f41 0x0100" /cdrom english
+A
+[̾] 1: A ַͭķշ
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+
+ + +

ebstopcode Υץ

+ +

+ebstopcode ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳Ȥ +Ǥޤ +

+ +
+
-c
+
--code
+
+ ڤꥳɤ˻ꤷޤ (: "0x1f09 0x0001") +ebstopcode ϡ 򸫤ĤޤʸϤޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l Ĺ
+
--length Ĺ
+
+ʸǡĹ Ĺ ХȤޤǽϤޤ +Ĺ 0 ˤȡebstopcode ʸΤϤޤ +ΥץꤷʤäȤϡ2048 ˤʤޤ + +
-n
+
--no-candidates
+
+ڤꥳɤθϤʤ褦ˤޤ + +
-p ڡ:եå
+
--text-position ڡ:եå
+
+ʸǡνϤ򤳤ΰ֤鳫Ϥޤ +ڡ ˤ 0 礭 16եå ˤϡ +00x7FF δ֤ 16򤽤줾ꤷޤ +ΥץꤷʤäȤϡʸǡƬ֤Ϥޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +

+--code (-c) --length +(-l) ץϡߤˤ⤦ΥץǤäޤ +

+ + + diff --git a/lib/ebu/doc/ebstopcode-toc.html b/lib/ebu/doc/ebstopcode-toc.html new file mode 100644 index 0000000..d642742 --- /dev/null +++ b/lib/ebu/doc/ebstopcode-toc.html @@ -0,0 +1,5 @@ + diff --git a/lib/ebu/doc/ebstopcode.html b/lib/ebu/doc/ebstopcode.html new file mode 100644 index 0000000..c01728e --- /dev/null +++ b/lib/ebu/doc/ebstopcode.html @@ -0,0 +1,42 @@ + + + + + + +ebstopcode ޥ + + + +

+[] [ܼ] +

+
+

ebstopcode ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebstopcode.html.in b/lib/ebu/doc/ebstopcode.html.in new file mode 100644 index 0000000..f9968f9 --- /dev/null +++ b/lib/ebu/doc/ebstopcode.html.in @@ -0,0 +1,234 @@ + + + + + + +ebstopcode ޥ + + + +

ebstopcode ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 2003-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ʤ EB 饤֥ΥץꥱȤä CD-ROM ҤΤ +ñݡñλսǡץꥱʸ +Ϥߤ뤳Ȥ򤢤ʤϴԤΤǤϤʤǤ礦 +EB 饤֥ϤΤ褦ưݾڤ뤳ȤǤޤ +ʤʤ顢CD-ROM Ҥʸˤϡܤν򼨤¸ߤʤ +Ǥ +

+ +

+ˤ⡢¿ CD-ROM Ҥˤϡܤν򼨤ؤȤ +Ȥ롢ʸζڤꥳ (text stop code) ȤΤä +ޤ +̾EB 饤֥ϤζڤꥳɤưŪ˿¬褦ˤʤä +ΤǤäڤꥳɤƳФȤޤ +ξϡappendix (Ͽ) ȤΤѤơEB 饤֥ +ڤꥳɤ򶵤ƤʤƤϤʤޤ +

+ +

+ebstopcode ޥɤϡCD-ROM Ҥʸζڤꥳɤ +뤿ΥġǤ +

+ + +

ebstopcode μ¹

+ +

+ebstopcode ΰŪʵưˡϼ̤Ǥ +

+ +
+
+% ebstopcode ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +֥Ѥμ̻ (ebnet://...) ꤹ뤳ȤǽǤ +ҤؤΥѥ ά줿ϡȥǥ쥯ȥ꤬ꤵ줿 +Τȸʤޤ +

+ +

+ ˤϡоݤȤܤΥǥ쥯ȥ̾ꤷޤ +ebinfo ޥɤѤȡCD-ROM ҤˤɤΤ褦ܤ +ޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 2
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ2 ĤܤҤˤϴޤޤƤꡢ̾ english + french ȤȤʬޤ +

+ +

+ english ζڤꥳɤϤˤϡʲ¹Ԥޤ +

+ +
+
+% ebstopcode /cdrom english
+
+
+ +

+ebstopcode ϡܤʸȶڤꥳɤθ򼡤Τ褦 +Ϥޤ +

+ +
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+A
+
+=== stop-code?: 0x1f09 0x0001 ===
+[̾] 1: A ַͭķշ
+
+=== stop-code?: 0x1f09 0x0001 ===
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+
+=== stop-code?: 0x1f09 0x0001 ===
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+=== stop-code?: 0x1f09 0x0001 ===
+
+=== stop-code?: 0x1f41 0x0100 ===
+(ʲά)
+
+
+ +

+stop-code?: Ƚ񤫤줿ԤϤ줾졢ڤꥳɤθ +Ƥޤ +ڤꥳɤȤƻꤹȡEB 饤֥Ϥʸ +Ϥߤޤ +

+ +

+ english ȤܤŬڤʶڤꥳɤϡ"0x1f41 0x0100" +ˤʤޤ +--no-candidate --code ץѤơ +ڤꥳɤƤߤޤ +

+ +
+
+% ebstopcode --no-candidate --code "0x1f41 0x0100" /cdrom english
+A
+[̾] 1: A ַͭķշ
+2: ᡼ȥĹñ̡10ʬ 1 ᡼ȥ롣
+3: ڥήδñ̤ǡSIñ̷Ϥΰġ
+
+
+ + +

ebstopcode Υץ

+ +

+ebstopcode ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳Ȥ +Ǥޤ +

+ +
+
-c
+
--code
+
+ ڤꥳɤ˻ꤷޤ (: "0x1f09 0x0001") +ebstopcode ϡ 򸫤ĤޤʸϤޤ + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-l Ĺ
+
--length Ĺ
+
+ʸǡĹ Ĺ ХȤޤǽϤޤ +Ĺ 0 ˤȡebstopcode ʸΤϤޤ +ΥץꤷʤäȤϡ2048 ˤʤޤ + +
-n
+
--no-candidates
+
+ڤꥳɤθϤʤ褦ˤޤ + +
-p ڡ:եå
+
--text-position ڡ:եå
+
+ʸǡνϤ򤳤ΰ֤鳫Ϥޤ +ڡ ˤ 0 礭 16եå ˤϡ +00x7FF δ֤ 16򤽤줾ꤷޤ +ΥץꤷʤäȤϡʸǡƬ֤Ϥޤ + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ +
+ +

+--code (-c) --length +(-l) ץϡߤˤ⤦ΥץǤäޤ +

+ + + diff --git a/lib/ebu/doc/ebutils.css b/lib/ebu/doc/ebutils.css new file mode 100644 index 0000000..8c529a3 --- /dev/null +++ b/lib/ebu/doc/ebutils.css @@ -0,0 +1,37 @@ +body { + color: #000000; + background-color: #ffffff; +} + +td { + border-style: solid; + border-width: 1px; +} + +table { + border-style: solid; + border-width: 2px; +} + +h2 { + font-size: x-large; + background-color: #cfcfcf; + padding: 3px; + border-style: solid; + border-width: 1px; +} + +h3 { + font-size: large; + background-color: #cfcfcf; + padding: 3px; + border-style: solid; + border-width: 1px; +} + +h4 { + font-size: medium; + border-style: solid; + border-width: 2px; + padding: 8px; +} diff --git a/lib/ebu/doc/ebzip-01.html b/lib/ebu/doc/ebzip-01.html new file mode 100644 index 0000000..cc1c418 --- /dev/null +++ b/lib/ebu/doc/ebzip-01.html @@ -0,0 +1,42 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

Ϥ

+ +

+ebzip EB 饤֥ΥץꥱѤˡCD-ROM Ҥ +̡ĹԤޤ +EB 饤֥ΥץꥱϡǽŪˤϲ¤ʤ̤줿 +CD-ROM Ҥ˥Ǥޤ (®٤ϤȤνҤ٤ +ʤ뤫Τޤ) +̥ǡϡCPU μ䡢OSե륷ƥˤϰ¸Ƥޤ +Τǡebzip ǰ̤ե϶ѤǽǤ +ebzip EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebzip ϥե꡼եȥǤʤνҤͳ˻Ȥ +ΤǤȤϸ¤ޤ +CD-ROM ҤνǼҤϡɥǥ (¾) ˽Ҥ +ԡ뤳ȤĤƤʤΤǤСνҤΰ̤Ʋ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-02.html b/lib/ebu/doc/ebzip-02.html new file mode 100644 index 0000000..ae06966 --- /dev/null +++ b/lib/ebu/doc/ebzip-02.html @@ -0,0 +1,90 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

ưȥޥ̾

+ +

+ebzip ϻĤ ư (action) ⡼ɤ +Ƥޤ + (compression)Ĺ (uncompression) Ⱦ (information) Ǥ +

+ +
    +
  • (compression)
    + CD-ROM Ҥ򰵽̤ޤ + +
  • Ĺ (uncompression)
    +ebzip ǰ̤줿 CD-ROM ҤĹޤ + +
  • (information)
    +ebzip ǰ̤줿 CD-ROM Ҥΰ֤̾˴ؤ +Ϥޤ + +
+ +

+ebzip ϵưˡư˻Ѥ줿ޥ̾ +ޥɥ饤󥪥ץ󤫤ư⡼ɤꤷޤ +ebzip ΰμ¹Ԥδ֤ǡư⡼ɤѤ뤳Ȥ +ޤ +

+ +

+ebzip ebzipebunzip, +ebzipinfo Ȥۤʤ 3 ĤΥޥ̾ǥ󥹥ȡ +ޤ +(δĶǤϡebzipinfo ebzipinf +Ȥ̾ˤʤäƤޤ) + +

+ebunzip Ȥ̾ǵư줿ϡĹԤޤ +ebzipinfo Ȥ̾ǵư줿硢ϤԤޤ +ʳξϡ̤Ԥޤ +

+ +

+ޥɥ饤󥪥ץǤ⡢ư⡼ɤꤹ뤳ȤǤޤ +--compress (-z) ǰ̡--uncompress +(-u) ǿĹ--information (-i) +ǾϤԤޤ +ץϡưΥޥ̾ͥ褷ޤ +Ǥϡư⡼ɤֿĹפˤʤޤ +

+ +
+
+ebunzip
+ebzip --uncompress
+ebzipinfo --uncompress
+
+
+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebzip ebnet://localhost/cdrom
+ebzip: ebnet ˤбƤޤ
+
+
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-03.html b/lib/ebu/doc/ebzip-03.html new file mode 100644 index 0000000..e60c288 --- /dev/null +++ b/lib/ebu/doc/ebzip-03.html @@ -0,0 +1,57 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

ebzip μ¹

+ +

+ebinfoebunzipebzipinfo +Ūʵưˡϼ̤Ǥ +

+ +
+
+% ebzip ҤؤΥѥ
+% ebunzip ҤؤΥѥ
+% ebzipinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebzip
+% ebunzip
+% ebzipinfo
+
+
+ +

+ξϡȥǥ쥯ȥ (.) ꤵ줿Τ +ȽǤޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-04.html b/lib/ebu/doc/ebzip-04.html new file mode 100644 index 0000000..746e1ce --- /dev/null +++ b/lib/ebu/doc/ebzip-04.html @@ -0,0 +1,414 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

+ +

+ebzip (ebunzip --compress +ebzipinfo --compress ) CD-ROM Ҥΰ̤Ԥޤ +

+ + + +

̤μ¹ (1)

+ +

+ǤϡϡɥǥˤǤ˥ԡƤ CD-ROM Ҥ򰵽̤ˤ +ɤ餤ޤ +CD-ROM ҤǤ /dict ˥ԡƤΤΡޤ +ƤʤȲꤷޤ +νҤ /dict βˡΤ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+νҤ򰵽̤ˤϡΤ褦ˤޤ +

+ +
+
+% cd /dict
+% ebzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --output-directory /dict /dict
+
+
+ +

+̤ˤϡФ餯뤳Ȥޤ +̤δ֡ebzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start 򰵽 <==
+./dict/kanji/start.ebz ˽
+ 1.0% Ѥ (2097152 / 220069888 Х)
+ 1.9% Ѥ (4194304 / 220069888 Х)
+ 2.9% Ѥ (6291456 / 220069888 Х)
+        : (ά)
+λ (220069888 / 220069888 Х)
+220069888 -> 78163751 Х (35.5%)
+
+
+ +

+̤λȡ/dict βΥǥ쥯ȥ깽Ѳ +Τʬޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

.ebz ĤΥե +(/dict/language.ebz/dict/kanji/start.ebz +/dict/english/start.ebz) դƤޤ +餬̤줿եǤ +¾ΥեѲƤޤ +

+ +

+ebzip ̤եϡ +STARTHONMONHONMON2 +HONMONSLANGUAGE ե GAIJI +ǥ쥯ȥˤ볰եǤ +

+ + +

̤μ¹ (2)

+ +

+ǤϤ⤦̤ȤơCD-ROM ǥΥե򰵽̤ +ϡɥǥ֤ˡˤĤޤ + CD-ROM Ҥ /cdrom ˥ޥȤ졢Ҥ +/cdrom β˼Τ褦ʥեäƤȲꤷޤ +

+ +
+
+/cdrom/catalog
+/cdrom/language
+/cdrom/german/start
+/cdrom/french/start
+/cdrom/italian/start
+
+
+ +

+νҤ򰵽̤/dict β֤ˤϡΥޥɤ +¹Ԥޤ +

+ +
+
+% cd /dict
+% ebzip --keep /cdrom
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --keep --output-directory /dict /cdrom
+
+
+ +

+¦Υǥ쥯ȥ /dict ϶Ǥ⹽ޤ󤬡 +餫äƤʤФʤʤΤǡդƲ +Ǥϡ--keep ץȤäƤޤ +ä˻ꤷʤСebzip ϡ̸˸Υե +ޤ--keep ץϤο񤤤ޤ +

+ +

+/dict /cdrom Υǥ쥯ȥ깽ϤۤȤ +ƱǤ/dict βΰ̤줿եˤϳĥ +.ebz դƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/german/start.ebz
+/dict/french/start.ebz
+/dict/italian/start.ebz
+
+
+ +

+֤Υǥ쥯ȥ /dict/german/dict/french +/dict/italian ϡ⤷̵ ebzip ˤä +ޤ +catalog catalogs ϡ¦Υǥ쥯ȥ +˥ԡޤ +EB 饤֥꤬бƤʤե롢ǥ쥯ȥˤĤƤϡ +ebzip ̵뤷ޤ (̤⥳ԡ⤷ޤ) +

+ + +

̥٥

+ +

+ebzip ϡ0 5 Ȥ 6 Ĥΰ̥٥äƤޤ +̥٥ 0 ϡ̡ĹǤ®ǤΨϺǰǤ +̥٥ 5 ϡΨɤǤ̡ĹϺǤ٤ʤޤ +̥٥ϡ--level (-l) ץꤷޤ +

+ +
+
+% ebzip --level 2 --output-directory /dict /dict
+
+
+ +

+̵Υ٥ 0 (®ΨϺǰ) Ǥ +

+ + +

ƥ

+ +

+ebzip --test (-t) ץդ +Ǽ¹Ԥȡebzip ϰ̤ǡºݤΥեˤ +񤭹ޤʤʤޤ +̤˰̸Υե礭ΤꤿȤˡǤ +

+ +
+
+% ebzip --test /dict /dict
+
+
+ + +

ΰ

+ +

+ʤˤꤷʤȡebzip ϽҰΤ򰵽̤ޤ +--subbook (-S) --skip-content +(-s) ץȤȰ򰵽̤Ǥޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) Ƕڤäơ̤ܤΥǥ쥯ȥ̾¤٤ +񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+english german 򰵽̤ˤϡ +褦ˤޤ +

+ +
+
+% ebzip --subbook english,french /dict
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤̵뤵ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebzip --subbook english --subbook french /dict
+
+
+ +

+Ĥ (Ǥ german) Υեϰ̤뤳Ȥ +ԡ뤳Ȥ⤢ޤΤǡλǤϤޤνҤФ밵̤ +ȤϴλƤޤ +νҤѤ뤿ˤϡʤԤäƻĤܤ򰵽̤뤫 +ebrefile ޥɤȤäƻĤܤ catalog(s) +եϿꥹȤʤƤϤʤޤ +(ebrefile ޥɤˤĤƾܤϡ +ebrefile ޥ Υޥ˥奢ebzip ȤϢȡ׹򻲾ȤΤ) +

+ +

+ܤΰĤʣʬư̤硢٤ƤܤƱ̥٥ +ꤹɬפϤޤ +(ȤСenglish french ϥ٥ 0 ǰ̤ +german ϥ٥ 2 ǰ̤) +

+ +

+--skip-content (-s) --subbook +˻Ƥޤ--skip-content Ǥ̵뤹ե +ǡꤷޤ +

+ +
+
+% ebzip --skip-content sound,movie --subbook french /dict
+
+
+ +

+Ǥϡebzip ϲưեФޤ +ߤΤȤebzip ˤäǧǡϡ +̤Ǥ +

+ +
    +
  • font
    +Υե +
  • graphic
    +ǡ +
  • sound
    +ǡ +
  • movie
    +ưǡ +
+ + +

Ťեξ

+ +

+񤭹⤦Ȥե뤬Ǥ¸ߤȤebzip +񤭤ɤɤγǧƤޤ +

+ +
+
+==> /dict/science/data/honmon 򰵽 <==
+/dict/science/data/honmon.ebz ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/science/data/honmon.ebz
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+y n Ʋ +n ȡebzip ϤΥեФơ +˿ʤߤޤ +

+ +

+--force-overwrite ץꤹȡebzip +ϤǤ¸ߤƤե򡢳ǧʤ˾񤭤ޤ +Ʊͤˡ--no-overwrite ץꤹȡ +ebzip ϳǧʤˤΥեФƼ˿ʤߤޤ +

+ + +

̤줿Ҥΰ

+ +

+S-EBXA EPWING ʤˤƤⰵ̷ƤꡢCD-ROM +ˤϤΰ̷ºݤ˺ѤƤΤޤ +ΰ̷ϡebzip ΰ̷ȤϰۤʤΤǤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+ebzip Фơ˰̤Ƥ CD-ROM Ҥ򰵽̤褦 +̿ȡebzip ϤäҤĹƤ顢ebzip ΰ̷ +̤ľޤ +

+ +

+̤ ebzip ΰ̷ S-EBXA EPWING ΰ̷ⰵΨ +ɹǤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-05.html b/lib/ebu/doc/ebzip-05.html new file mode 100644 index 0000000..64b4260 --- /dev/null +++ b/lib/ebu/doc/ebzip-05.html @@ -0,0 +1,185 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

Ĺ

+ +

+ebunzip (ebzip --uncompress +ebzipinfo --uncompress Ʊ) ϡebzip +̤ CD-ROM ҤĹޤ +

+ + + +

Ĺμ¹

+ +

+Ĺνϡ̤ȤʤƤޤ +/dict β˰̤줿Ҥ֤ƤΤȲꤷޤ +νҤˤϡ/dict β˼Τ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

+νҤĹˤϡΥޥɤ¹Ԥޤ +

+ +
+
+% cd /dict
+% ebunzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebunzip --output-directory /dict /dict
+
+
+ +

+ĹˤϡФ餯뤳Ȥޤ +Ĺδ֡ebunzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+./kanji/start.ebz ˽
+ 5.1% Ѥ (4194304 / 82460672 Х)
+10.2% Ѥ (8388608 / 82460672 Х)
+15.3% Ѥ (12582912 / 82460672 Х)
+        : (ά)
+λ (82460672 / 82460672 Х)
+25681439 -> 82460672 Х
+
+
+ +

+Ĺδ֡ebunzip ϡǤ¸ߤե񤭤Ƥɤ +ɤǧƤޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+/dict/kanji/start ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/kanji/start
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+Ĺλȡ/dict βΥǥ쥯ȥ깽ϾѲ +ޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+Ĺ줿եϥե̾Ѳ +ĥ .ebz Ƥޤ +

+ + +

ĹΥץ

+ +

+¿Υץϡ̻ȿĹȤƱ̣äƤޤ +

+ +

+--keep ץꤹȡebunzip ϡ +Ĺ˰̥եʤʤޤ +

+ +

+--test ץꤹȡebunzip ϿĹ +ǡºݤΥեˤϽ񤭹ߤޤ +Υץϡե뤬̤ƤΤǧȤ +Ǥ +(--test ץˤĤƤξܺ٤ϡ +֥ƥȡ򻲾ȤΤ) +

+ +

+--subbook --skip-content ץ +ȡ˹פեĹޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡ 򻲾ȤΤ) +

+ +

+--force-overwrite --no-overwrite ץ +ꤹȡebunzip Ͼ񤭤Ƥɤɤγǧʤˡ +ե񤭤ФƼ˿ʤꤷޤ +(--force-overwrite --no-overwrite ץ +ˤĤƤξܺ٤ϡ +ָŤեξ񤭡 򻲾ȤΤ) +

+ +

+ebunzip ϡ--level ץ̵뤷ޤ +Ĺ --level ץꤹɬפϤޤ +

+ + +

̤줿ҤοĹ

+ +

+S-EBXA EPWING ʤǤⰵ̷ƤꡢCD-ROM Ҥˤ +ΰ̷ºݤ˺ѤƤΤޤ +S-EBXA EPWINGΰ̷ϡebzip ΰ̷Ȥϰۤʤޤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+S-EBXA ǰ̤줿 START ե䡢EPWING ǰ +줿 HONMON2, HONMONS եĹȡ +ĹΥեˤϳĥ .org ղäޤ +(: honmon2 honmon2.org) +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-06.html b/lib/ebu/doc/ebzip-06.html new file mode 100644 index 0000000..828a32a --- /dev/null +++ b/lib/ebu/doc/ebzip-06.html @@ -0,0 +1,80 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

+ +

+ebzipinfo (ebzip --information +ebunzip --information Ʊ) CD-ROM Ҥΰ֤̾ +ޤ +

+ + + +

Ϥμ¹

+ +

+/dict ˤ롢̤줿 CD-ROM ҤξϤˤ +Υޥɤ¹Ԥޤ +/dict ֤Ƥ롢̤줿 CD-ROM Ҥξ +ˤϡΤ褦ˤޤ +

+ +
+
+% ebzipifo /dict
+
+
+ +

+ebzipinfo ɸϤ˼Τ褦ʾϤޤ +

+ +
+
+==> /dict/spanish/spanish/start.ebz <==
+154290176 -> 54881862 Х (35.6%, ebzip ̥٥ 0)
+
+==> /dict/spanish/language.ebz <==
+compressed: 12288 -> 4121 Х (33.5%, ebzip ̥٥ 0)
+
+==> /dict/spanish/catalog <==
+2048 Х (󰵽)
+
+
+ + +

ϤΥץ

+ +

+--subbook --skip-content ץ +ꤹȡ˹פեξϤޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡򻲾ȤΤ) +

+ +

+ebzipinfo --force-overwrite +--keep--level--no-overwrite +--output-directory--quiet--silence +--test ץ̵뤷ޤ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-07.html b/lib/ebu/doc/ebzip-07.html new file mode 100644 index 0000000..75af881 --- /dev/null +++ b/lib/ebu/doc/ebzip-07.html @@ -0,0 +1,39 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

Ҥκ

+ +

+ebzip ϡϡɥǥ˰̤κǽϻä +ޤ + rm ޥɤȤäƲ +

+ +
+
+% rm -r /dict
+
+
+ +

+κȤϡդƹԤäƲ +

+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-08.html b/lib/ebu/doc/ebzip-08.html new file mode 100644 index 0000000..a212321 --- /dev/null +++ b/lib/ebu/doc/ebzip-08.html @@ -0,0 +1,152 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

ebzip Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-f
+
--force-overwrite
+
+ǧ᤺ˡ¸ߤƤե񤭤ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +ȤΤ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--information
+
+ꤵ줿 CD-ROM Ҥΰ֤̾Ϥޤ +(ܤϡ ־ϡ 򻲾ȤΤ) + +
-k
+
--keep
+
+¦Υե񤭹߽äƤ⡢б¦Υե +ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡְ̤μ¹ (2) +򻲾ȤΤ) + +
-l
+
--level
+
+̥٥ꤷޤ + ϡ012 +345 Τ줫ǤʤƤ +ޤ +٥ 0 ϡǤ®ΤΰΨϺǰǤ +٥ 3 ϡǤ٤ΤΰΨϺɤǤ +ꤷʤäȤΥ٥ 0 Ǥ +Υץϡ̰ʳưΤȤ̵뤵ޤ +(ܤϡְ̥٥ 򻲾ȤΤȡ) + +
-n
+
--no-overwrite
+
+¸ߤե뤬ä硢񤭤γǧ᤺ˡΥե +ФƼΥե˿ʤߤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+¦Υե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ + +
-q
+
--quiet
+
--silence
+
+󡢷ٹåϤޤ +̡Ĺ˽¦Υե뤬¸ߤƤȡ +ebzip Ϥν¦Υե񤭤ɤɤ +֤Ƥޤ +μˤϡ--force-overwrite(-f) +ޤ --no-overwrite(-n) ꤷƲ +ΥץϡϤưΤȤϡ̵뤵ޤ + +
-s
+
--skip-content
+
+̵뤹եΥǡꤷޤ + ϡǡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ebzip ߤΤȤǧǡ̾ϡ +font (Υե)graphic (ǡ) +sound (ǡ)movie (ưǡ) Ǥ +ꤷʤäȤϡɤΥե̵뤵ޤ + +
-S
+
--subbook
+
+̡ĹϤоݤȤܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤ ְΰ̡ 򻲾 +Τȡ) + +
-t
+
--test
+
+̡Ĺǡ򡢼ºݤΥեˤϽ񤭹ߤޤ +ΥץϡϤưΤȤ̵뤵ޤ +(ܤ ֥ƥȡ 򻲾ȤΤȡ) + +
-u
+
--uncompress
+
+CD-ROM ҤĹޤ +(ܤ ֿĹ 򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ + +
-z
+
--compress
+
+CD-ROM Ҥ򰵽̤ޤ +(ܤ ְ̡ 򻲾ȤΤȡ) + +
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-09.html b/lib/ebu/doc/ebzip-09.html new file mode 100644 index 0000000..eb7c2a6 --- /dev/null +++ b/lib/ebu/doc/ebzip-09.html @@ -0,0 +1,90 @@ + + + + + + +ebzip ޥ + + + +

+[] [] [ܼ] +

+
+

̷̤

+ +

+ɽϡ¡±Ѽŵ (EBXA) START ե +̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 154476544 bytes 100.0%
٥ 0 54922039 bytes 35.6%
٥ 1 49615791 bytes 32.1%
٥ 2 45983464 bytes 29.8%
٥ 3 43431397 bytes 28.1%
(: gzip -6) 38712247 bytes 25.0%
+ +

+ѡŵ (EBG) START ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 55511040 bytes 100.0%
٥ 0 25866491 bytes 46.6%
٥ 1 24419066 bytes 44.0%
٥ 2 23453212 bytes 42.2%
٥ 3 22748840 bytes 41.0%
(: gzip -6) 20930009 bytes 37.7%
+ +

+켭ŵ (EPWING V1) HONMON ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 23642112 bytes 100.0%
٥ 0 9927048 bytes 42.0%
٥ 1 9213184 bytes 39.0%
٥ 2 8767603 bytes 37.1%
٥ 3 8495563 bytes 35.9%
(: gzip -6) 8114658 bytes 34.3%
+ +

+켭ŵ (EPWING V5) HONMON2 ե򰵽̤: +

+ + + + + + + +
̥٥ ե륵 Ψ
(󰵽) 220069888 bytes 100.0%
(Υե) 149139690 bytes 67.8%
٥ 0 82973263 bytes 37.7%
٥ 1 78163751 bytes 35.5%
+ +

+ɴʻŵ (S-EBXA) START ե򰵽̤: +

+ + + + + + + +
̥٥ file size ratio
(󰵽) 225140735 bytes 100.0%
(Υե) 176467968 bytes 78.4%
٥ 0 146045331 bytes 64.9%
٥ 1 138137218 bytes 61.4%
+ + +
+

+[] [] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-10.html b/lib/ebu/doc/ebzip-10.html new file mode 100644 index 0000000..a033d1b --- /dev/null +++ b/lib/ebu/doc/ebzip-10.html @@ -0,0 +1,335 @@ + + + + + + +ebzip ޥ + + + +

+[] [ܼ] +

+
+

̥եη

+ +

+ξϤǤϡebzip äƤ밵̥եξܺ٤ˤĤ +ޤ +

+ + +

̥եγ

+ +

+̥եϼΤ褦ħäƤޤ +

+ +
    +
  • CPU μࡢڥ졼ƥ󥰥ƥࡢե륷ƥ˰¸ޤ + +
  • »̤Ǥ
    +̥եĹ뤳ȤˤäơΥեǤޤ + +
  • 6 Ĥΰ̥٥뤬ޤ
    +Ĺ®ΨɤΡ줫֤ȤǤޤ +
+ +

+̤줿եϡإåǥåӥǡ鹽 +졢νǥե֤ޤ +

+ +
+
++--------+-------------+-----------------------------+
+| إå |ǥå |          ǡ             |
++--------+-------------+-----------------------------+
+                                                     EOF
+
+
+ + +

ǡ

+ +

+Υեϡιǰ̤ޤ +

+ +

ebzip ϸΥեʬ䤷ޤ +ġ (slice) ϡΤΤС +Ʊ礭ˤʤäƤޤ +

+ +
+
++---------------+---------------+--   --+----------+
+|  饤 1   |  饤 2   |  ...  |饤 N|
++---------------+---------------+--   --+----------+
+                                                  EOF
+
+
+ +

+饤ϡ̥٥뤫ޤޤ +(̥٥ˤĤƤ ְ̥٥ +ȤΤ) +

+ + + + + + + + + +
̥٥ 饤礭
0 2048 Х
1 4096 Х
2 8192 Х
3 16384 Х
4 32768 Х
5 65536 Х
+ +

+ˡΥ饤饤ûä硢 +ebzip ϥ饤ƱˤʤޤǿФФ +ʬ 0x00 ޤ +

+ +
+
+                                                 ʬ
++---------------+---------------+--   --+---------+-----+
+|  饤 1   |  饤 2   |  ...  |  饤 N   |
++---------------+---------------+--   --+---------+-----+
+                                                        EOF
+
+
+ +

+Ǹˡebzip ϸġΥ饤RFC 1951 ˵Ƥ +DEFLATE ̥ǡǰ̤ޤ +ΤΤΥ饤ϡ¾Υ饤ȤΩư̤ޤ +̤줿饤Υӥåȿ 8 ܿǤʤС1 7 ӥåȤ +̤줿饤­8 ܿˤʤ褦ˤޤ +ˤꡢ̤줿줾Υ饤ϥХȤζ鳫Ϥޤ +­줿ӥåȤƤ̤ǤΥӥåȤϷ褷ƻѤޤ +

+ +
+
++------------+----------+--   --+--------------+
+| ̤줿 |̤줿|  ...  |  ̤줿  |
+| 饤 1 |饤 2|  ...  |  饤 N  |
++------------+----------+--   --+--------------+
+
+
+ +

+줬̥եˤ ǡ ˤʤꡢ̤줿 +饤鹽ޤ +

+ +

+Υ饤οФʬϡΥ饤ΰȤư̤ +ޤ +ebunzip Υ饤Ȥϡ饤Ĺ +鿭ФʬȤȤԤޤ +

+ +

+̤饤礭饤礭Ȥϡ +ebzip ϤΥ饤ΰ̥ǡѴޤ +ξ硢ebzip ϸΥǡ򤽤Υ饤ΰ̥ǡȤ +˵Ͽޤ +

+ +

+Υե뤬äȤϡ̥եΥǡϤޤ +

+ + +

ǥå

+ +

+̻ˡebzip ϰ̤ġΥ饤 +ǥå (index) Ͽޤ +ġΥǥåϡ̥եƬ鰵̤줿饤Ƭ +ޤǤεΥɽޤ +Υñ̤ϥХȤǤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+     |         |                        |         |
+ +---+         +----+                   +------+  +-----------+
+ V                  V                          V              V
++------------------+------------------+--   --+--------------+
+|    ̤줿    |    ̤줿    |  ...  |  ̤줿  |
+|    饤 1    |    饤 2    |  ...  |  饤 N  |
++------------------+------------------+--   --+--------------+
+
+
+ +

+ġΥǥå 2 5 ХȤ礭ޤ +ǥå礭ϡΥե礭Ƿޤޤ +

+ + + + + + + +
Υե礭 ǥå礭
0 65535 Х 2 Х
65535 16777215 Х 3 Х
16777216 4294967295 Х 4 Х
4294967296 1099511627775 Х 5 Х
+ +

+ǥåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +ȤС0x1234 ϼΤ褦˵Ͽޤ +ǽΥХȤ 0x12 ȤʤꡢΥХȤ 0x34 ˤʤޤ +

+ +
+
++---------+---------+
+|0001 0010|0011 0100|
++---------+---------+
+  (0x12)    (0x34)
+
+
+ +

+ǥåϡ̤줿饤 1 ΥǥåǻϤޤꡢθ +˰̤줿饤 2 Υǥå³ޤ +̤줿饤 N ΥǥåθˤϡֽüפؤΥǥå +֤ޤ +Υǥåϡ̤줿饤 N μΥХȤؤ +ǥåˤʤޤ +ޤ̤줿եΥ򼨤Ȥˤʤޤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+
+
+ +

+̤줿饤礭饤ȤϡΥ饤 +Υǡϼºݤˤϰ̤ƤʤȤ򼨤ޤ +

+ +

+Υե뤬äȤϡǥåϥǥåĤ +ޤ +Υǥåϰ̤줿ե礭ɽޤ +

+ + +

إå

+ +

+إå 22 ХȤʤޤ +Υեɤ鹽ޤ +

+ +
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+| ޥå ID  |*1| *2  |ե礭 | Adler-32  |   |
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+ 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21
+
+*1: zip ⡼ɤȰ̥٥
+*2: ͽΰ
+
+
+ +
+
ޥå ID (5 Х)
+
+0x45, 0x42, 0x5a, 0x69, 0x70 (ASCII ʸɽ EBZip) +Ȥꤷͤޤ + +
zip ⡼ (MSB ¦ 4 ӥå)
+
+̥⡼ɤɽޤ + (󰵽̻) ե礭 4294967295 Х (= 4GХ) +ΤȤ 1 (2 ʿ 0001)礭Ȥ 2 (2 ʿ 0002) +򥻥åȤޤ + +

+ե礭ͤѤΤϡŪʻˤޤ + EB Library ϰ̥⡼ 1 ꤷƤ餺ޤ 4GB Х +Ķե򰷤ޤǤ +4G ХȤĶե򰷤褦 EB Library ɤݤˡ +4G ХȤĶ顢̥⡼ɤ 2 ˥åȤפȤ롼 +ߤޤ +ˤꡢ EB Library 4GB ХȤĶե򰷤 +Ȥȡбΰ̥⡼ɤȤߤʤ졢顼ȯ褦ˤʤä +ޤ +

+ +
̥٥ (LSB ¦ 4 ӥå)
+
+̥٥ɽޤ + +
ͽΰ (2 Х)
+
+ͽ󤵤ƤޤȤƤޤ +0x0000 ޤ + +
ե礭 (6 Х)
+
+ (󰵽̻) ե礭ϿƤޤ + +
Adler-32 (4 Х)
+
+RFC 1950 ˵Ƥ Adler-32 Ȥ르ꥺѤƷ׻ +󰵽̥ǡΥåͤǤ + +
(4 Х)
+
+ΥեκǽǤ +˥åɸ 1970 ǯ 1 1 0 0 ʬ 0 äηвÿ +ɽޤ +
+ +

+zip ⡼ ̥٥ ϡξȤإå +5 Хܤޤ +zip ⡼ ϡͤκǤ礭ʬɽӥå +(most significant bit) ޤߡ̥٥ ϺǤ⾮ʬ +ɽӥå (least significant bit) ޤǤޤ +zip ⡼ 1 ḁ̇̄٥ 2 ʤ顢 +إå 5 Хܤ 0x12 ˤʤޤ +

+ +
+
+ MSB                         LSB
++---+---+---+---+---+---+---+---+
+| 0   0   0   1   0   0   1   0 | = 0x12
++---+---+---+---+---+---+---+---+
+  (zip ⡼)  |  (̥٥)
+
+
+ +

+إåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +

+ +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip-cat.html b/lib/ebu/doc/ebzip-cat.html new file mode 100644 index 0000000..e455d72 --- /dev/null +++ b/lib/ebu/doc/ebzip-cat.html @@ -0,0 +1,1349 @@ + + + + + + +ebzip ޥ + + + +

ebzip ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebzip EB 饤֥ΥץꥱѤˡCD-ROM Ҥ +̡ĹԤޤ +EB 饤֥ΥץꥱϡǽŪˤϲ¤ʤ̤줿 +CD-ROM Ҥ˥Ǥޤ (®٤ϤȤνҤ٤ +ʤ뤫Τޤ) +̥ǡϡCPU μ䡢OSե륷ƥˤϰ¸Ƥޤ +Τǡebzip ǰ̤ե϶ѤǽǤ +ebzip EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebzip ϥե꡼եȥǤʤνҤͳ˻Ȥ +ΤǤȤϸ¤ޤ +CD-ROM ҤνǼҤϡɥǥ (¾) ˽Ҥ +ԡ뤳ȤĤƤʤΤǤСνҤΰ̤Ʋ +

+ + +

ưȥޥ̾

+ +

+ebzip ϻĤ ư (action) ⡼ɤ +Ƥޤ + (compression)Ĺ (uncompression) Ⱦ (information) Ǥ +

+ +
    +
  • (compression)
    + CD-ROM Ҥ򰵽̤ޤ + +
  • Ĺ (uncompression)
    +ebzip ǰ̤줿 CD-ROM ҤĹޤ + +
  • (information)
    +ebzip ǰ̤줿 CD-ROM Ҥΰ֤̾˴ؤ +Ϥޤ + +
+ +

+ebzip ϵưˡư˻Ѥ줿ޥ̾ +ޥɥ饤󥪥ץ󤫤ư⡼ɤꤷޤ +ebzip ΰμ¹Ԥδ֤ǡư⡼ɤѤ뤳Ȥ +ޤ +

+ +

+ebzip ebzipebunzip, +ebzipinfo Ȥۤʤ 3 ĤΥޥ̾ǥ󥹥ȡ +ޤ +(δĶǤϡebzipinfo ebzipinf +Ȥ̾ˤʤäƤޤ) + +

+ebunzip Ȥ̾ǵư줿ϡĹԤޤ +ebzipinfo Ȥ̾ǵư줿硢ϤԤޤ +ʳξϡ̤Ԥޤ +

+ +

+ޥɥ饤󥪥ץǤ⡢ư⡼ɤꤹ뤳ȤǤޤ +--compress (-z) ǰ̡--uncompress +(-u) ǿĹ--information (-i) +ǾϤԤޤ +ץϡưΥޥ̾ͥ褷ޤ +Ǥϡư⡼ɤֿĹפˤʤޤ +

+ +
+
+ebunzip
+ebzip --uncompress
+ebzipinfo --uncompress
+
+
+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebzip ebnet://localhost/cdrom
+ebzip: ebnet ˤбƤޤ
+
+
+ + +

ebzip μ¹

+ +

+ebinfoebunzipebzipinfo +Ūʵưˡϼ̤Ǥ +

+ +
+
+% ebzip ҤؤΥѥ
+% ebunzip ҤؤΥѥ
+% ebzipinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebzip
+% ebunzip
+% ebzipinfo
+
+
+ +

+ξϡȥǥ쥯ȥ (.) ꤵ줿Τ +ȽǤޤ +

+ + +

+ +

+ebzip (ebunzip --compress +ebzipinfo --compress ) CD-ROM Ҥΰ̤Ԥޤ +

+ + + +

̤μ¹ (1)

+ +

+ǤϡϡɥǥˤǤ˥ԡƤ CD-ROM Ҥ򰵽̤ˤ +ɤ餤ޤ +CD-ROM ҤǤ /dict ˥ԡƤΤΡޤ +ƤʤȲꤷޤ +νҤ /dict βˡΤ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+νҤ򰵽̤ˤϡΤ褦ˤޤ +

+ +
+
+% cd /dict
+% ebzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --output-directory /dict /dict
+
+
+ +

+̤ˤϡФ餯뤳Ȥޤ +̤δ֡ebzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start 򰵽 <==
+./dict/kanji/start.ebz ˽
+ 1.0% Ѥ (2097152 / 220069888 Х)
+ 1.9% Ѥ (4194304 / 220069888 Х)
+ 2.9% Ѥ (6291456 / 220069888 Х)
+        : (ά)
+λ (220069888 / 220069888 Х)
+220069888 -> 78163751 Х (35.5%)
+
+
+ +

+̤λȡ/dict βΥǥ쥯ȥ깽Ѳ +Τʬޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

.ebz ĤΥե +(/dict/language.ebz/dict/kanji/start.ebz +/dict/english/start.ebz) դƤޤ +餬̤줿եǤ +¾ΥեѲƤޤ +

+ +

+ebzip ̤եϡ +STARTHONMONHONMON2 +HONMONSLANGUAGE ե GAIJI +ǥ쥯ȥˤ볰եǤ +

+ + +

̤μ¹ (2)

+ +

+ǤϤ⤦̤ȤơCD-ROM ǥΥե򰵽̤ +ϡɥǥ֤ˡˤĤޤ + CD-ROM Ҥ /cdrom ˥ޥȤ졢Ҥ +/cdrom β˼Τ褦ʥեäƤȲꤷޤ +

+ +
+
+/cdrom/catalog
+/cdrom/language
+/cdrom/german/start
+/cdrom/french/start
+/cdrom/italian/start
+
+
+ +

+νҤ򰵽̤/dict β֤ˤϡΥޥɤ +¹Ԥޤ +

+ +
+
+% cd /dict
+% ebzip --keep /cdrom
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --keep --output-directory /dict /cdrom
+
+
+ +

+¦Υǥ쥯ȥ /dict ϶Ǥ⹽ޤ󤬡 +餫äƤʤФʤʤΤǡդƲ +Ǥϡ--keep ץȤäƤޤ +ä˻ꤷʤСebzip ϡ̸˸Υե +ޤ--keep ץϤο񤤤ޤ +

+ +

+/dict /cdrom Υǥ쥯ȥ깽ϤۤȤ +ƱǤ/dict βΰ̤줿եˤϳĥ +.ebz դƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/german/start.ebz
+/dict/french/start.ebz
+/dict/italian/start.ebz
+
+
+ +

+֤Υǥ쥯ȥ /dict/german/dict/french +/dict/italian ϡ⤷̵ ebzip ˤä +ޤ +catalog catalogs ϡ¦Υǥ쥯ȥ +˥ԡޤ +EB 饤֥꤬бƤʤե롢ǥ쥯ȥˤĤƤϡ +ebzip ̵뤷ޤ (̤⥳ԡ⤷ޤ) +

+ + +

̥٥

+ +

+ebzip ϡ0 5 Ȥ 6 Ĥΰ̥٥äƤޤ +̥٥ 0 ϡ̡ĹǤ®ǤΨϺǰǤ +̥٥ 5 ϡΨɤǤ̡ĹϺǤ٤ʤޤ +̥٥ϡ--level (-l) ץꤷޤ +

+ +
+
+% ebzip --level 2 --output-directory /dict /dict
+
+
+ +

+̵Υ٥ 0 (®ΨϺǰ) Ǥ +

+ + +

ƥ

+ +

+ebzip --test (-t) ץդ +Ǽ¹Ԥȡebzip ϰ̤ǡºݤΥեˤ +񤭹ޤʤʤޤ +̤˰̸Υե礭ΤꤿȤˡǤ +

+ +
+
+% ebzip --test /dict /dict
+
+
+ + +

ΰ

+ +

+ʤˤꤷʤȡebzip ϽҰΤ򰵽̤ޤ +--subbook (-S) --skip-content +(-s) ץȤȰ򰵽̤Ǥޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) Ƕڤäơ̤ܤΥǥ쥯ȥ̾¤٤ +񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+english german 򰵽̤ˤϡ +褦ˤޤ +

+ +
+
+% ebzip --subbook english,french /dict
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤̵뤵ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebzip --subbook english --subbook french /dict
+
+
+ +

+Ĥ (Ǥ german) Υեϰ̤뤳Ȥ +ԡ뤳Ȥ⤢ޤΤǡλǤϤޤνҤФ밵̤ +ȤϴλƤޤ +νҤѤ뤿ˤϡʤԤäƻĤܤ򰵽̤뤫 +ebrefile ޥɤȤäƻĤܤ catalog(s) +եϿꥹȤʤƤϤʤޤ +(ebrefile ޥɤˤĤƾܤϡ +ebrefile ޥ Υޥ˥奢ebzip ȤϢȡ׹򻲾ȤΤ) +

+ +

+ܤΰĤʣʬư̤硢٤ƤܤƱ̥٥ +ꤹɬפϤޤ +(ȤСenglish french ϥ٥ 0 ǰ̤ +german ϥ٥ 2 ǰ̤) +

+ +

+--skip-content (-s) --subbook +˻Ƥޤ--skip-content Ǥ̵뤹ե +ǡꤷޤ +

+ +
+
+% ebzip --skip-content sound,movie --subbook french /dict
+
+
+ +

+Ǥϡebzip ϲưեФޤ +ߤΤȤebzip ˤäǧǡϡ +̤Ǥ +

+ +
    +
  • font
    +Υե +
  • graphic
    +ǡ +
  • sound
    +ǡ +
  • movie
    +ưǡ +
+ + +

Ťեξ

+ +

+񤭹⤦Ȥե뤬Ǥ¸ߤȤebzip +񤭤ɤɤγǧƤޤ +

+ +
+
+==> /dict/science/data/honmon 򰵽 <==
+/dict/science/data/honmon.ebz ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/science/data/honmon.ebz
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+y n Ʋ +n ȡebzip ϤΥեФơ +˿ʤߤޤ +

+ +

+--force-overwrite ץꤹȡebzip +ϤǤ¸ߤƤե򡢳ǧʤ˾񤭤ޤ +Ʊͤˡ--no-overwrite ץꤹȡ +ebzip ϳǧʤˤΥեФƼ˿ʤߤޤ +

+ + +

̤줿Ҥΰ

+ +

+S-EBXA EPWING ʤˤƤⰵ̷ƤꡢCD-ROM +ˤϤΰ̷ºݤ˺ѤƤΤޤ +ΰ̷ϡebzip ΰ̷ȤϰۤʤΤǤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+ebzip Фơ˰̤Ƥ CD-ROM Ҥ򰵽̤褦 +̿ȡebzip ϤäҤĹƤ顢ebzip ΰ̷ +̤ľޤ +

+ +

+̤ ebzip ΰ̷ S-EBXA EPWING ΰ̷ⰵΨ +ɹǤ +

+ + +

Ĺ

+ +

+ebunzip (ebzip --uncompress +ebzipinfo --uncompress Ʊ) ϡebzip +̤ CD-ROM ҤĹޤ +

+ + + +

Ĺμ¹

+ +

+Ĺνϡ̤ȤʤƤޤ +/dict β˰̤줿Ҥ֤ƤΤȲꤷޤ +νҤˤϡ/dict β˼Τ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

+νҤĹˤϡΥޥɤ¹Ԥޤ +

+ +
+
+% cd /dict
+% ebunzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebunzip --output-directory /dict /dict
+
+
+ +

+ĹˤϡФ餯뤳Ȥޤ +Ĺδ֡ebunzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+./kanji/start.ebz ˽
+ 5.1% Ѥ (4194304 / 82460672 Х)
+10.2% Ѥ (8388608 / 82460672 Х)
+15.3% Ѥ (12582912 / 82460672 Х)
+        : (ά)
+λ (82460672 / 82460672 Х)
+25681439 -> 82460672 Х
+
+
+ +

+Ĺδ֡ebunzip ϡǤ¸ߤե񤭤Ƥɤ +ɤǧƤޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+/dict/kanji/start ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/kanji/start
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+Ĺλȡ/dict βΥǥ쥯ȥ깽ϾѲ +ޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+Ĺ줿եϥե̾Ѳ +ĥ .ebz Ƥޤ +

+ + +

ĹΥץ

+ +

+¿Υץϡ̻ȿĹȤƱ̣äƤޤ +

+ +

+--keep ץꤹȡebunzip ϡ +Ĺ˰̥եʤʤޤ +

+ +

+--test ץꤹȡebunzip ϿĹ +ǡºݤΥեˤϽ񤭹ߤޤ +Υץϡե뤬̤ƤΤǧȤ +Ǥ +(--test ץˤĤƤξܺ٤ϡ +֥ƥȡ򻲾ȤΤ) +

+ +

+--subbook --skip-content ץ +ȡ˹פեĹޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡ 򻲾ȤΤ) +

+ +

+--force-overwrite --no-overwrite ץ +ꤹȡebunzip Ͼ񤭤Ƥɤɤγǧʤˡ +ե񤭤ФƼ˿ʤꤷޤ +(--force-overwrite --no-overwrite ץ +ˤĤƤξܺ٤ϡ +ָŤեξ񤭡 򻲾ȤΤ) +

+ +

+ebunzip ϡ--level ץ̵뤷ޤ +Ĺ --level ץꤹɬפϤޤ +

+ + +

̤줿ҤοĹ

+ +

+S-EBXA EPWING ʤǤⰵ̷ƤꡢCD-ROM Ҥˤ +ΰ̷ºݤ˺ѤƤΤޤ +S-EBXA EPWINGΰ̷ϡebzip ΰ̷Ȥϰۤʤޤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+S-EBXA ǰ̤줿 START ե䡢EPWING ǰ +줿 HONMON2, HONMONS եĹȡ +ĹΥեˤϳĥ .org ղäޤ +(: honmon2 honmon2.org) +

+ + +

+ +

+ebzipinfo (ebzip --information +ebunzip --information Ʊ) CD-ROM Ҥΰ֤̾ +ޤ +

+ + + +

Ϥμ¹

+ +

+/dict ˤ롢̤줿 CD-ROM ҤξϤˤ +Υޥɤ¹Ԥޤ +/dict ֤Ƥ롢̤줿 CD-ROM Ҥξ +ˤϡΤ褦ˤޤ +

+ +
+
+% ebzipifo /dict
+
+
+ +

+ebzipinfo ɸϤ˼Τ褦ʾϤޤ +

+ +
+
+==> /dict/spanish/spanish/start.ebz <==
+154290176 -> 54881862 Х (35.6%, ebzip ̥٥ 0)
+
+==> /dict/spanish/language.ebz <==
+compressed: 12288 -> 4121 Х (33.5%, ebzip ̥٥ 0)
+
+==> /dict/spanish/catalog <==
+2048 Х (󰵽)
+
+
+ + +

ϤΥץ

+ +

+--subbook --skip-content ץ +ꤹȡ˹פեξϤޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡򻲾ȤΤ) +

+ +

+ebzipinfo --force-overwrite +--keep--level--no-overwrite +--output-directory--quiet--silence +--test ץ̵뤷ޤ +

+ + +

Ҥκ

+ +

+ebzip ϡϡɥǥ˰̤κǽϻä +ޤ + rm ޥɤȤäƲ +

+ +
+
+% rm -r /dict
+
+
+ +

+κȤϡդƹԤäƲ +

+ + +

ebzip Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-f
+
--force-overwrite
+
+ǧ᤺ˡ¸ߤƤե񤭤ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +ȤΤ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--information
+
+ꤵ줿 CD-ROM Ҥΰ֤̾Ϥޤ +(ܤϡ ־ϡ 򻲾ȤΤ) + +
-k
+
--keep
+
+¦Υե񤭹߽äƤ⡢б¦Υե +ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡְ̤μ¹ (2) +򻲾ȤΤ) + +
-l
+
--level
+
+̥٥ꤷޤ + ϡ012 +345 Τ줫ǤʤƤ +ޤ +٥ 0 ϡǤ®ΤΰΨϺǰǤ +٥ 3 ϡǤ٤ΤΰΨϺɤǤ +ꤷʤäȤΥ٥ 0 Ǥ +Υץϡ̰ʳưΤȤ̵뤵ޤ +(ܤϡְ̥٥ 򻲾ȤΤȡ) + +
-n
+
--no-overwrite
+
+¸ߤե뤬ä硢񤭤γǧ᤺ˡΥե +ФƼΥե˿ʤߤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+¦Υե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ + +
-q
+
--quiet
+
--silence
+
+󡢷ٹåϤޤ +̡Ĺ˽¦Υե뤬¸ߤƤȡ +ebzip Ϥν¦Υե񤭤ɤɤ +֤Ƥޤ +μˤϡ--force-overwrite(-f) +ޤ --no-overwrite(-n) ꤷƲ +ΥץϡϤưΤȤϡ̵뤵ޤ + +
-s
+
--skip-content
+
+̵뤹եΥǡꤷޤ + ϡǡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ebzip ߤΤȤǧǡ̾ϡ +font (Υե)graphic (ǡ) +sound (ǡ)movie (ưǡ) Ǥ +ꤷʤäȤϡɤΥե̵뤵ޤ + +
-S
+
--subbook
+
+̡ĹϤоݤȤܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤ ְΰ̡ 򻲾 +Τȡ) + +
-t
+
--test
+
+̡Ĺǡ򡢼ºݤΥեˤϽ񤭹ߤޤ +ΥץϡϤưΤȤ̵뤵ޤ +(ܤ ֥ƥȡ 򻲾ȤΤȡ) + +
-u
+
--uncompress
+
+CD-ROM ҤĹޤ +(ܤ ֿĹ 򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ + +
-z
+
--compress
+
+CD-ROM Ҥ򰵽̤ޤ +(ܤ ְ̡ 򻲾ȤΤȡ) + +
+ + +

̷̤

+ +

+ɽϡ¡±Ѽŵ (EBXA) START ե +̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 154476544 bytes 100.0%
٥ 0 54922039 bytes 35.6%
٥ 1 49615791 bytes 32.1%
٥ 2 45983464 bytes 29.8%
٥ 3 43431397 bytes 28.1%
(: gzip -6) 38712247 bytes 25.0%
+ +

+ѡŵ (EBG) START ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 55511040 bytes 100.0%
٥ 0 25866491 bytes 46.6%
٥ 1 24419066 bytes 44.0%
٥ 2 23453212 bytes 42.2%
٥ 3 22748840 bytes 41.0%
(: gzip -6) 20930009 bytes 37.7%
+ +

+켭ŵ (EPWING V1) HONMON ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 23642112 bytes 100.0%
٥ 0 9927048 bytes 42.0%
٥ 1 9213184 bytes 39.0%
٥ 2 8767603 bytes 37.1%
٥ 3 8495563 bytes 35.9%
(: gzip -6) 8114658 bytes 34.3%
+ +

+켭ŵ (EPWING V5) HONMON2 ե򰵽̤: +

+ + + + + + + +
̥٥ ե륵 Ψ
(󰵽) 220069888 bytes 100.0%
(Υե) 149139690 bytes 67.8%
٥ 0 82973263 bytes 37.7%
٥ 1 78163751 bytes 35.5%
+ +

+ɴʻŵ (S-EBXA) START ե򰵽̤: +

+ + + + + + + +
̥٥ file size ratio
(󰵽) 225140735 bytes 100.0%
(Υե) 176467968 bytes 78.4%
٥ 0 146045331 bytes 64.9%
٥ 1 138137218 bytes 61.4%
+ + +

̥եη

+ +

+ξϤǤϡebzip äƤ밵̥եξܺ٤ˤĤ +ޤ +

+ + +

̥եγ

+ +

+̥եϼΤ褦ħäƤޤ +

+ +
    +
  • CPU μࡢڥ졼ƥ󥰥ƥࡢե륷ƥ˰¸ޤ + +
  • »̤Ǥ
    +̥եĹ뤳ȤˤäơΥեǤޤ + +
  • 6 Ĥΰ̥٥뤬ޤ
    +Ĺ®ΨɤΡ줫֤ȤǤޤ +
+ +

+̤줿եϡإåǥåӥǡ鹽 +졢νǥե֤ޤ +

+ +
+
++--------+-------------+-----------------------------+
+| إå |ǥå |          ǡ             |
++--------+-------------+-----------------------------+
+                                                     EOF
+
+
+ + +

ǡ

+ +

+Υեϡιǰ̤ޤ +

+ +

ebzip ϸΥեʬ䤷ޤ +ġ (slice) ϡΤΤС +Ʊ礭ˤʤäƤޤ +

+ +
+
++---------------+---------------+--   --+----------+
+|  饤 1   |  饤 2   |  ...  |饤 N|
++---------------+---------------+--   --+----------+
+                                                  EOF
+
+
+ +

+饤ϡ̥٥뤫ޤޤ +(̥٥ˤĤƤ ְ̥٥ +ȤΤ) +

+ + + + + + + + + +
̥٥ 饤礭
0 2048 Х
1 4096 Х
2 8192 Х
3 16384 Х
4 32768 Х
5 65536 Х
+ +

+ˡΥ饤饤ûä硢 +ebzip ϥ饤ƱˤʤޤǿФФ +ʬ 0x00 ޤ +

+ +
+
+                                                 ʬ
++---------------+---------------+--   --+---------+-----+
+|  饤 1   |  饤 2   |  ...  |  饤 N   |
++---------------+---------------+--   --+---------+-----+
+                                                        EOF
+
+
+ +

+Ǹˡebzip ϸġΥ饤RFC 1951 ˵Ƥ +DEFLATE ̥ǡǰ̤ޤ +ΤΤΥ饤ϡ¾Υ饤ȤΩư̤ޤ +̤줿饤Υӥåȿ 8 ܿǤʤС1 7 ӥåȤ +̤줿饤­8 ܿˤʤ褦ˤޤ +ˤꡢ̤줿줾Υ饤ϥХȤζ鳫Ϥޤ +­줿ӥåȤƤ̤ǤΥӥåȤϷ褷ƻѤޤ +

+ +
+
++------------+----------+--   --+--------------+
+| ̤줿 |̤줿|  ...  |  ̤줿  |
+| 饤 1 |饤 2|  ...  |  饤 N  |
++------------+----------+--   --+--------------+
+
+
+ +

+줬̥եˤ ǡ ˤʤꡢ̤줿 +饤鹽ޤ +

+ +

+Υ饤οФʬϡΥ饤ΰȤư̤ +ޤ +ebunzip Υ饤Ȥϡ饤Ĺ +鿭ФʬȤȤԤޤ +

+ +

+̤饤礭饤礭Ȥϡ +ebzip ϤΥ饤ΰ̥ǡѴޤ +ξ硢ebzip ϸΥǡ򤽤Υ饤ΰ̥ǡȤ +˵Ͽޤ +

+ +

+Υե뤬äȤϡ̥եΥǡϤޤ +

+ + +

ǥå

+ +

+̻ˡebzip ϰ̤ġΥ饤 +ǥå (index) Ͽޤ +ġΥǥåϡ̥եƬ鰵̤줿饤Ƭ +ޤǤεΥɽޤ +Υñ̤ϥХȤǤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+     |         |                        |         |
+ +---+         +----+                   +------+  +-----------+
+ V                  V                          V              V
++------------------+------------------+--   --+--------------+
+|    ̤줿    |    ̤줿    |  ...  |  ̤줿  |
+|    饤 1    |    饤 2    |  ...  |  饤 N  |
++------------------+------------------+--   --+--------------+
+
+
+ +

+ġΥǥå 2 5 ХȤ礭ޤ +ǥå礭ϡΥե礭Ƿޤޤ +

+ + + + + + + +
Υե礭 ǥå礭
0 65535 Х 2 Х
65535 16777215 Х 3 Х
16777216 4294967295 Х 4 Х
4294967296 1099511627775 Х 5 Х
+ +

+ǥåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +ȤС0x1234 ϼΤ褦˵Ͽޤ +ǽΥХȤ 0x12 ȤʤꡢΥХȤ 0x34 ˤʤޤ +

+ +
+
++---------+---------+
+|0001 0010|0011 0100|
++---------+---------+
+  (0x12)    (0x34)
+
+
+ +

+ǥåϡ̤줿饤 1 ΥǥåǻϤޤꡢθ +˰̤줿饤 2 Υǥå³ޤ +̤줿饤 N ΥǥåθˤϡֽüפؤΥǥå +֤ޤ +Υǥåϡ̤줿饤 N μΥХȤؤ +ǥåˤʤޤ +ޤ̤줿եΥ򼨤Ȥˤʤޤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+
+
+ +

+̤줿饤礭饤ȤϡΥ饤 +Υǡϼºݤˤϰ̤ƤʤȤ򼨤ޤ +

+ +

+Υե뤬äȤϡǥåϥǥåĤ +ޤ +Υǥåϰ̤줿ե礭ɽޤ +

+ + +

إå

+ +

+إå 22 ХȤʤޤ +Υեɤ鹽ޤ +

+ +
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+| ޥå ID  |*1| *2  |ե礭 | Adler-32  |   |
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+ 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21
+
+*1: zip ⡼ɤȰ̥٥
+*2: ͽΰ
+
+
+ +
+
ޥå ID (5 Х)
+
+0x45, 0x42, 0x5a, 0x69, 0x70 (ASCII ʸɽ EBZip) +Ȥꤷͤޤ + +
zip ⡼ (MSB ¦ 4 ӥå)
+
+̥⡼ɤɽޤ + (󰵽̻) ե礭 4294967295 Х (= 4GХ) +ΤȤ 1 (2 ʿ 0001)礭Ȥ 2 (2 ʿ 0002) +򥻥åȤޤ + +

+ե礭ͤѤΤϡŪʻˤޤ + EB Library ϰ̥⡼ 1 ꤷƤ餺ޤ 4GB Х +Ķե򰷤ޤǤ +4G ХȤĶե򰷤褦 EB Library ɤݤˡ +4G ХȤĶ顢̥⡼ɤ 2 ˥åȤפȤ롼 +ߤޤ +ˤꡢ EB Library 4GB ХȤĶե򰷤 +Ȥȡбΰ̥⡼ɤȤߤʤ졢顼ȯ褦ˤʤä +ޤ +

+ +
̥٥ (LSB ¦ 4 ӥå)
+
+̥٥ɽޤ + +
ͽΰ (2 Х)
+
+ͽ󤵤ƤޤȤƤޤ +0x0000 ޤ + +
ե礭 (6 Х)
+
+ (󰵽̻) ե礭ϿƤޤ + +
Adler-32 (4 Х)
+
+RFC 1950 ˵Ƥ Adler-32 Ȥ르ꥺѤƷ׻ +󰵽̥ǡΥåͤǤ + +
(4 Х)
+
+ΥեκǽǤ +˥åɸ 1970 ǯ 1 1 0 0 ʬ 0 äηвÿ +ɽޤ +
+ +

+zip ⡼ ̥٥ ϡξȤإå +5 Хܤޤ +zip ⡼ ϡͤκǤ礭ʬɽӥå +(most significant bit) ޤߡ̥٥ ϺǤ⾮ʬ +ɽӥå (least significant bit) ޤǤޤ +zip ⡼ 1 ḁ̇̄٥ 2 ʤ顢 +إå 5 Хܤ 0x12 ˤʤޤ +

+ +
+
+ MSB                         LSB
++---+---+---+---+---+---+---+---+
+| 0   0   0   1   0   0   1   0 | = 0x12
++---+---+---+---+---+---+---+---+
+  (zip ⡼)  |  (̥٥)
+
+
+ +

+إåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +

+ + + diff --git a/lib/ebu/doc/ebzip-toc.html b/lib/ebu/doc/ebzip-toc.html new file mode 100644 index 0000000..4b14e81 --- /dev/null +++ b/lib/ebu/doc/ebzip-toc.html @@ -0,0 +1,36 @@ + diff --git a/lib/ebu/doc/ebzip.html b/lib/ebu/doc/ebzip.html new file mode 100644 index 0000000..30fa174 --- /dev/null +++ b/lib/ebu/doc/ebzip.html @@ -0,0 +1,73 @@ + + + + + + +ebzip ޥ + + + +

+[] [ܼ] +

+
+

ebzip ޥ

+

+ʸ EB 饤֥С +4.5-20200413 +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +
+

+[] [ܼ] +

+ + diff --git a/lib/ebu/doc/ebzip.html.in b/lib/ebu/doc/ebzip.html.in new file mode 100644 index 0000000..ccbccc1 --- /dev/null +++ b/lib/ebu/doc/ebzip.html.in @@ -0,0 +1,1314 @@ + + + + + + +ebzip ޥ + + + +

ebzip ޥ

+

+ʸ EB 饤֥С + +бƤޤ +

+ +

+ܼ: +

+ + + +

+Copyright (c) 1998-2006 Motoyuki Kasahara +

+ + +

Ϥ

+ +

+ebzip EB 饤֥ΥץꥱѤˡCD-ROM Ҥ +̡ĹԤޤ +EB 饤֥ΥץꥱϡǽŪˤϲ¤ʤ̤줿 +CD-ROM Ҥ˥Ǥޤ (®٤ϤȤνҤ٤ +ʤ뤫Τޤ) +̥ǡϡCPU μ䡢OSե륷ƥˤϰ¸Ƥޤ +Τǡebzip ǰ̤ե϶ѤǽǤ +ebzip EB 饤֥ȰۤƤޤ +

+ +

+ʤϡʬνͭ CD-ROM ҤλѵʤƤϤޤ +ebzip ϥե꡼եȥǤʤνҤͳ˻Ȥ +ΤǤȤϸ¤ޤ +CD-ROM ҤνǼҤϡɥǥ (¾) ˽Ҥ +ԡ뤳ȤĤƤʤΤǤСνҤΰ̤Ʋ +

+ + +

ưȥޥ̾

+ +

+ebzip ϻĤ ư (action) ⡼ɤ +Ƥޤ + (compression)Ĺ (uncompression) Ⱦ (information) Ǥ +

+ +
    +
  • (compression)
    + CD-ROM Ҥ򰵽̤ޤ + +
  • Ĺ (uncompression)
    +ebzip ǰ̤줿 CD-ROM ҤĹޤ + +
  • (information)
    +ebzip ǰ̤줿 CD-ROM Ҥΰ֤̾˴ؤ +Ϥޤ + +
+ +

+ebzip ϵưˡư˻Ѥ줿ޥ̾ +ޥɥ饤󥪥ץ󤫤ư⡼ɤꤷޤ +ebzip ΰμ¹Ԥδ֤ǡư⡼ɤѤ뤳Ȥ +ޤ +

+ +

+ebzip ebzipebunzip, +ebzipinfo Ȥۤʤ 3 ĤΥޥ̾ǥ󥹥ȡ +ޤ +(δĶǤϡebzipinfo ebzipinf +Ȥ̾ˤʤäƤޤ) + +

+ebunzip Ȥ̾ǵư줿ϡĹԤޤ +ebzipinfo Ȥ̾ǵư줿硢ϤԤޤ +ʳξϡ̤Ԥޤ +

+ +

+ޥɥ饤󥪥ץǤ⡢ư⡼ɤꤹ뤳ȤǤޤ +--compress (-z) ǰ̡--uncompress +(-u) ǿĹ--information (-i) +ǾϤԤޤ +ץϡưΥޥ̾ͥ褷ޤ +Ǥϡư⡼ɤֿĹפˤʤޤ +

+ +
+
+ebunzip
+ebzip --uncompress
+ebzipinfo --uncompress
+
+
+ +

+֥ˤбƤޤΤǡ֥̻ҤϻѤǤޤ +

+ +
+
+% ebzip ebnet://localhost/cdrom
+ebzip: ebnet ˤбƤޤ
+
+
+ + +

ebzip μ¹

+ +

+ebinfoebunzipebzipinfo +Ūʵưˡϼ̤Ǥ +

+ +
+
+% ebzip ҤؤΥѥ
+% ebunzip ҤؤΥѥ
+% ebzipinfo ҤؤΥѥ
+
+
+ +

+ҤؤΥѥ ˤϡCD-ROM ҤΥȥåץǥ쥯ȥꡢĤޤ +catalog ޤ catalogs ե뤬¸ߤ +ǥ쥯ȥꤷޤ +ʣΥѥ񤯤ȤϤǤޤ󤬡ʲΤ褦ˡѥλʤȤ +Ǥޤ +

+ +
+
+% ebzip
+% ebunzip
+% ebzipinfo
+
+
+ +

+ξϡȥǥ쥯ȥ (.) ꤵ줿Τ +ȽǤޤ +

+ + +

+ +

+ebzip (ebunzip --compress +ebzipinfo --compress ) CD-ROM Ҥΰ̤Ԥޤ +

+ + + +

̤μ¹ (1)

+ +

+ǤϡϡɥǥˤǤ˥ԡƤ CD-ROM Ҥ򰵽̤ˤ +ɤ餤ޤ +CD-ROM ҤǤ /dict ˥ԡƤΤΡޤ +ƤʤȲꤷޤ +νҤ /dict βˡΤ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+νҤ򰵽̤ˤϡΤ褦ˤޤ +

+ +
+
+% cd /dict
+% ebzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --output-directory /dict /dict
+
+
+ +

+̤ˤϡФ餯뤳Ȥޤ +̤δ֡ebzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start 򰵽 <==
+./dict/kanji/start.ebz ˽
+ 1.0% Ѥ (2097152 / 220069888 Х)
+ 1.9% Ѥ (4194304 / 220069888 Х)
+ 2.9% Ѥ (6291456 / 220069888 Х)
+        : (ά)
+λ (220069888 / 220069888 Х)
+220069888 -> 78163751 Х (35.5%)
+
+
+ +

+̤λȡ/dict βΥǥ쥯ȥ깽Ѳ +Τʬޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

.ebz ĤΥե +(/dict/language.ebz/dict/kanji/start.ebz +/dict/english/start.ebz) դƤޤ +餬̤줿եǤ +¾ΥեѲƤޤ +

+ +

+ebzip ̤եϡ +STARTHONMONHONMON2 +HONMONSLANGUAGE ե GAIJI +ǥ쥯ȥˤ볰եǤ +

+ + +

̤μ¹ (2)

+ +

+ǤϤ⤦̤ȤơCD-ROM ǥΥե򰵽̤ +ϡɥǥ֤ˡˤĤޤ + CD-ROM Ҥ /cdrom ˥ޥȤ졢Ҥ +/cdrom β˼Τ褦ʥեäƤȲꤷޤ +

+ +
+
+/cdrom/catalog
+/cdrom/language
+/cdrom/german/start
+/cdrom/french/start
+/cdrom/italian/start
+
+
+ +

+νҤ򰵽̤/dict β֤ˤϡΥޥɤ +¹Ԥޤ +

+ +
+
+% cd /dict
+% ebzip --keep /cdrom
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebzip --keep --output-directory /dict /cdrom
+
+
+ +

+¦Υǥ쥯ȥ /dict ϶Ǥ⹽ޤ󤬡 +餫äƤʤФʤʤΤǡդƲ +Ǥϡ--keep ץȤäƤޤ +ä˻ꤷʤСebzip ϡ̸˸Υե +ޤ--keep ץϤο񤤤ޤ +

+ +

+/dict /cdrom Υǥ쥯ȥ깽ϤۤȤ +ƱǤ/dict βΰ̤줿եˤϳĥ +.ebz դƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/german/start.ebz
+/dict/french/start.ebz
+/dict/italian/start.ebz
+
+
+ +

+֤Υǥ쥯ȥ /dict/german/dict/french +/dict/italian ϡ⤷̵ ebzip ˤä +ޤ +catalog catalogs ϡ¦Υǥ쥯ȥ +˥ԡޤ +EB 饤֥꤬бƤʤե롢ǥ쥯ȥˤĤƤϡ +ebzip ̵뤷ޤ (̤⥳ԡ⤷ޤ) +

+ + +

̥٥

+ +

+ebzip ϡ0 5 Ȥ 6 Ĥΰ̥٥äƤޤ +̥٥ 0 ϡ̡ĹǤ®ǤΨϺǰǤ +̥٥ 5 ϡΨɤǤ̡ĹϺǤ٤ʤޤ +̥٥ϡ--level (-l) ץꤷޤ +

+ +
+
+% ebzip --level 2 --output-directory /dict /dict
+
+
+ +

+̵Υ٥ 0 (®ΨϺǰ) Ǥ +

+ + +

ƥ

+ +

+ebzip --test (-t) ץդ +Ǽ¹Ԥȡebzip ϰ̤ǡºݤΥեˤ +񤭹ޤʤʤޤ +̤˰̸Υե礭ΤꤿȤˡǤ +

+ +
+
+% ebzip --test /dict /dict
+
+
+ + +

ΰ

+ +

+ʤˤꤷʤȡebzip ϽҰΤ򰵽̤ޤ +--subbook (-S) --skip-content +(-s) ץȤȰ򰵽̤Ǥޤ +

+ +

+--subbook ץϰļꡢ˥ +(,) Ƕڤäơ̤ܤΥǥ쥯ȥ̾¤٤ +񤭤ޤ +ebinfo ޥɤѤȡʤνͭƤҤ +ɤΤ褦ܤޤޤƤΤΤ뤳ȤǤޤ +

+ +
+
+% ebinfo /mnt/cdrom
+ǥη: EB/EBG/EBXA/EBXA-C/S-EBXA
+ʸ: JIS X 0208
+ܤο: 3
+
+ 1:
+  ̾: ¼ŵǡ
+  ǥ쥯ȥ: english
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 0xa121 -- 0xa24e
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 2:
+  ̾: CD-ROM ʩ¼ŵ軰ǡ
+  ǥ쥯ȥ: french
+  :    ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+ 3:
+  ̾: ݥå¼ŵ軰ǡ
+  ǥ쥯ȥ: german
+  : ˥塼
+  եȤ礭: 16 24 30 48
+  ȾѥեȤʸ: 
+  ѥեȤʸ: 0xa321 -- 0xa27e
+
+
+ +

+(ebinfo ޥɤ˴ؤƤξܺ٤ϡ +ebinfo ޥɤΥޥ˥奢 򻲾ȤΤȡ) +Ǥϡ3 ĤܤҤˤϴޤޤƤꡢΥǥ쥯ȥ̾ +english, french, german +ȤȤʬޤ +

+ +

+english german 򰵽̤ˤϡ +褦ˤޤ +

+ +
+
+% ebzip --subbook english,french /dict
+
+
+ +

+ǥ쥯ȥ̾ʸʸΰ㤤̵뤵ޤ +--subbook ΰϡΤ褦ʬƽ񤯤ȤǤޤ +

+ +
+
+% ebzip --subbook english --subbook french /dict
+
+
+ +

+Ĥ (Ǥ german) Υեϰ̤뤳Ȥ +ԡ뤳Ȥ⤢ޤΤǡλǤϤޤνҤФ밵̤ +ȤϴλƤޤ +νҤѤ뤿ˤϡʤԤäƻĤܤ򰵽̤뤫 +ebrefile ޥɤȤäƻĤܤ catalog(s) +եϿꥹȤʤƤϤʤޤ +(ebrefile ޥɤˤĤƾܤϡ +ebrefile ޥ Υޥ˥奢ebzip ȤϢȡ׹򻲾ȤΤ) +

+ +

+ܤΰĤʣʬư̤硢٤ƤܤƱ̥٥ +ꤹɬפϤޤ +(ȤСenglish french ϥ٥ 0 ǰ̤ +german ϥ٥ 2 ǰ̤) +

+ +

+--skip-content (-s) --subbook +˻Ƥޤ--skip-content Ǥ̵뤹ե +ǡꤷޤ +

+ +
+
+% ebzip --skip-content sound,movie --subbook french /dict
+
+
+ +

+Ǥϡebzip ϲưեФޤ +ߤΤȤebzip ˤäǧǡϡ +̤Ǥ +

+ +
    +
  • font
    +Υե +
  • graphic
    +ǡ +
  • sound
    +ǡ +
  • movie
    +ưǡ +
+ + +

Ťեξ

+ +

+񤭹⤦Ȥե뤬Ǥ¸ߤȤebzip +񤭤ɤɤγǧƤޤ +

+ +
+
+==> /dict/science/data/honmon 򰵽 <==
+/dict/science/data/honmon.ebz ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/science/data/honmon.ebz
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+y n Ʋ +n ȡebzip ϤΥեФơ +˿ʤߤޤ +

+ +

+--force-overwrite ץꤹȡebzip +ϤǤ¸ߤƤե򡢳ǧʤ˾񤭤ޤ +Ʊͤˡ--no-overwrite ץꤹȡ +ebzip ϳǧʤˤΥեФƼ˿ʤߤޤ +

+ + +

̤줿Ҥΰ

+ +

+S-EBXA EPWING ʤˤƤⰵ̷ƤꡢCD-ROM +ˤϤΰ̷ºݤ˺ѤƤΤޤ +ΰ̷ϡebzip ΰ̷ȤϰۤʤΤǤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+ebzip Фơ˰̤Ƥ CD-ROM Ҥ򰵽̤褦 +̿ȡebzip ϤäҤĹƤ顢ebzip ΰ̷ +̤ľޤ +

+ +

+̤ ebzip ΰ̷ S-EBXA EPWING ΰ̷ⰵΨ +ɹǤ +

+ + +

Ĺ

+ +

+ebunzip (ebzip --uncompress +ebzipinfo --uncompress Ʊ) ϡebzip +̤ CD-ROM ҤĹޤ +

+ + + +

Ĺμ¹

+ +

+Ĺνϡ̤ȤʤƤޤ +/dict β˰̤줿Ҥ֤ƤΤȲꤷޤ +νҤˤϡ/dict β˼Τ褦ʥեäƤޤ +

+ +
+
+/dict/catalog
+/dict/language.ebz
+/dict/kanji/start.ebz
+/dict/english/start.ebz
+
+
+ +

+νҤĹˤϡΥޥɤ¹Ԥޤ +

+ +
+
+% cd /dict
+% ebunzip
+
+
+ +

+ϼΤ褦ˤƤƱǤ +

+ +
+
+% ebunzip --output-directory /dict /dict
+
+
+ +

+ĹˤϡФ餯뤳Ȥޤ +Ĺδ֡ebunzip ϡΤ褦˾Τ餻å +ޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+./kanji/start.ebz ˽
+ 5.1% Ѥ (4194304 / 82460672 Х)
+10.2% Ѥ (8388608 / 82460672 Х)
+15.3% Ѥ (12582912 / 82460672 Х)
+        : (ά)
+λ (82460672 / 82460672 Х)
+25681439 -> 82460672 Х
+
+
+ +

+Ĺδ֡ebunzip ϡǤ¸ߤե񤭤Ƥɤ +ɤǧƤޤ +

+ +
+
+==> /dict/kanji/start.ebz Ĺ <==
+/dict/kanji/start ˽
+
+ե뤬Ǥ¸ߤޤ: /dict/kanji/start
+񤭤ޤ (Ϥ:y, :n)?
+
+
+ +

+Ĺλȡ/dict βΥǥ쥯ȥ깽ϾѲ +ޤ +

+ +
+
+/dict/catalog
+/dict/language
+/dict/kanji/start
+/dict/english/start
+
+
+ +

+Ĺ줿եϥե̾Ѳ +ĥ .ebz Ƥޤ +

+ + +

ĹΥץ

+ +

+¿Υץϡ̻ȿĹȤƱ̣äƤޤ +

+ +

+--keep ץꤹȡebunzip ϡ +Ĺ˰̥եʤʤޤ +

+ +

+--test ץꤹȡebunzip ϿĹ +ǡºݤΥեˤϽ񤭹ߤޤ +Υץϡե뤬̤ƤΤǧȤ +Ǥ +(--test ץˤĤƤξܺ٤ϡ +֥ƥȡ򻲾ȤΤ) +

+ +

+--subbook --skip-content ץ +ȡ˹פեĹޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡ 򻲾ȤΤ) +

+ +

+--force-overwrite --no-overwrite ץ +ꤹȡebunzip Ͼ񤭤Ƥɤɤγǧʤˡ +ե񤭤ФƼ˿ʤꤷޤ +(--force-overwrite --no-overwrite ץ +ˤĤƤξܺ٤ϡ +ָŤեξ񤭡 򻲾ȤΤ) +

+ +

+ebunzip ϡ--level ץ̵뤷ޤ +Ĺ --level ץꤹɬפϤޤ +

+ + +

̤줿ҤοĹ

+ +

+S-EBXA EPWING ʤǤⰵ̷ƤꡢCD-ROM Ҥˤ +ΰ̷ºݤ˺ѤƤΤޤ +S-EBXA EPWINGΰ̷ϡebzip ΰ̷Ȥϰۤʤޤ +

+ +

+ebzip S-EBXA EPWING ̷ǰ̤줿 CD-ROM Ҥ +Ĺ뤳ȤǤޤ̤뤳ȤϤǤޤ +

+ +

+S-EBXA ǰ̤줿 START ե䡢EPWING ǰ +줿 HONMON2, HONMONS եĹȡ +ĹΥեˤϳĥ .org ղäޤ +(: honmon2 honmon2.org) +

+ + +

+ +

+ebzipinfo (ebzip --information +ebunzip --information Ʊ) CD-ROM Ҥΰ֤̾ +ޤ +

+ + + +

Ϥμ¹

+ +

+/dict ˤ롢̤줿 CD-ROM ҤξϤˤ +Υޥɤ¹Ԥޤ +/dict ֤Ƥ롢̤줿 CD-ROM Ҥξ +ˤϡΤ褦ˤޤ +

+ +
+
+% ebzipifo /dict
+
+
+ +

+ebzipinfo ɸϤ˼Τ褦ʾϤޤ +

+ +
+
+==> /dict/spanish/spanish/start.ebz <==
+154290176 -> 54881862 Х (35.6%, ebzip ̥٥ 0)
+
+==> /dict/spanish/language.ebz <==
+compressed: 12288 -> 4121 Х (33.5%, ebzip ̥٥ 0)
+
+==> /dict/spanish/catalog <==
+2048 Х (󰵽)
+
+
+ + +

ϤΥץ

+ +

+--subbook --skip-content ץ +ꤹȡ˹פեξϤޤ +(ΥץˤĤƤξܺ٤ϡ +ְΰ̡򻲾ȤΤ) +

+ +

+ebzipinfo --force-overwrite +--keep--level--no-overwrite +--output-directory--quiet--silence +--test ץ̵뤷ޤ +

+ + +

Ҥκ

+ +

+ebzip ϡϡɥǥ˰̤κǽϻä +ޤ + rm ޥɤȤäƲ +

+ +
+
+% rm -r /dict
+
+
+ +

+κȤϡդƹԤäƲ +

+ + +

ebzip Υץ

+ +

+ebzip ޥɤϡŪʰʸץ̾ȳФ䤹Ĺ +ץ̾ξ򰷤ȤǤޤ +Ĺץ̾ɽˤϡ- ǤϤʤ -- +Ѥޤ +ץ̾դ˷ޤϰǡ̾θʬά뤳ȤǤޤ +

+ +
+
-f
+
--force-overwrite
+
+ǧ᤺ˡ¸ߤƤե񤭤ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +ȤΤ) + +
-h
+
--help
+
+إץåɸϤ˽Ϥơλޤ + +
-i
+
--information
+
+ꤵ줿 CD-ROM Ҥΰ֤̾Ϥޤ +(ܤϡ ־ϡ 򻲾ȤΤ) + +
-k
+
--keep
+
+¦Υե񤭹߽äƤ⡢б¦Υե +ޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡְ̤μ¹ (2) +򻲾ȤΤ) + +
-l
+
--level
+
+̥٥ꤷޤ + ϡ012 +345 Τ줫ǤʤƤ +ޤ +٥ 0 ϡǤ®ΤΰΨϺǰǤ +٥ 3 ϡǤ٤ΤΰΨϺɤǤ +ꤷʤäȤΥ٥ 0 Ǥ +Υץϡ̰ʳưΤȤ̵뤵ޤ +(ܤϡְ̥٥ 򻲾ȤΤȡ) + +
-n
+
--no-overwrite
+
+¸ߤե뤬ä硢񤭤γǧ᤺ˡΥե +ФƼΥե˿ʤߤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ +(ܤϡָŤեξ񤭡 +򻲾ȤΤȡ) + +
-o ǥ쥯ȥ
+
--output-directory ǥ쥯ȥ
+
+¦Υե֤ǥ쥯ȥꤷޤ +ꤷʤäȤϡȥǥ쥯ȥ (.) ˤʤޤ +ΥץϡϤưΤȤ䡢--test +(-t) ץꤷȤ̵뤵ޤ + +
-q
+
--quiet
+
--silence
+
+󡢷ٹåϤޤ +̡Ĺ˽¦Υե뤬¸ߤƤȡ +ebzip Ϥν¦Υե񤭤ɤɤ +֤Ƥޤ +μˤϡ--force-overwrite(-f) +ޤ --no-overwrite(-n) ꤷƲ +ΥץϡϤưΤȤϡ̵뤵ޤ + +
-s
+
--skip-content
+
+̵뤹եΥǡꤷޤ + ϡǡ̾򥫥 (,) Ƕڤä +¤٤ΤǤʤƤϤޤ +ebzip ߤΤȤǧǡ̾ϡ +font (Υե)graphic (ǡ) +sound (ǡ)movie (ưǡ) Ǥ +ꤷʤäȤϡɤΥե̵뤵ޤ + +
-S
+
--subbook
+
+̡ĹϤоݤȤܤꤷޤ + ϡܤΥǥ쥯ȥ̾򥫥 (,) +ڤä¤٤ΤǤʤƤϤޤ +ꤷʤäȤϡ٤Ƥܤоݤˤʤޤ +(ܤ ְΰ̡ 򻲾 +Τȡ) + +
-t
+
--test
+
+̡Ĺǡ򡢼ºݤΥեˤϽ񤭹ߤޤ +ΥץϡϤưΤȤ̵뤵ޤ +(ܤ ֥ƥȡ 򻲾ȤΤȡ) + +
-u
+
--uncompress
+
+CD-ROM ҤĹޤ +(ܤ ֿĹ 򻲾ȤΤȡ) + +
-v
+
--version
+
+СֹɸϤ˽Ϥơλޤ + +
-z
+
--compress
+
+CD-ROM Ҥ򰵽̤ޤ +(ܤ ְ̡ 򻲾ȤΤȡ) + +
+ + +

̷̤

+ +

+ɽϡ¡±Ѽŵ (EBXA) START ե +̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 154476544 bytes 100.0%
٥ 0 54922039 bytes 35.6%
٥ 1 49615791 bytes 32.1%
٥ 2 45983464 bytes 29.8%
٥ 3 43431397 bytes 28.1%
(: gzip -6) 38712247 bytes 25.0%
+ +

+ѡŵ (EBG) START ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 55511040 bytes 100.0%
٥ 0 25866491 bytes 46.6%
٥ 1 24419066 bytes 44.0%
٥ 2 23453212 bytes 42.2%
٥ 3 22748840 bytes 41.0%
(: gzip -6) 20930009 bytes 37.7%
+ +

+켭ŵ (EPWING V1) HONMON ե򰵽̤: +

+ + + + + + + + + +
̥٥ ե륵 Ψ
(Υե) 23642112 bytes 100.0%
٥ 0 9927048 bytes 42.0%
٥ 1 9213184 bytes 39.0%
٥ 2 8767603 bytes 37.1%
٥ 3 8495563 bytes 35.9%
(: gzip -6) 8114658 bytes 34.3%
+ +

+켭ŵ (EPWING V5) HONMON2 ե򰵽̤: +

+ + + + + + + +
̥٥ ե륵 Ψ
(󰵽) 220069888 bytes 100.0%
(Υե) 149139690 bytes 67.8%
٥ 0 82973263 bytes 37.7%
٥ 1 78163751 bytes 35.5%
+ +

+ɴʻŵ (S-EBXA) START ե򰵽̤: +

+ + + + + + + +
̥٥ file size ratio
(󰵽) 225140735 bytes 100.0%
(Υե) 176467968 bytes 78.4%
٥ 0 146045331 bytes 64.9%
٥ 1 138137218 bytes 61.4%
+ + +

̥եη

+ +

+ξϤǤϡebzip äƤ밵̥եξܺ٤ˤĤ +ޤ +

+ + +

̥եγ

+ +

+̥եϼΤ褦ħäƤޤ +

+ +
    +
  • CPU μࡢڥ졼ƥ󥰥ƥࡢե륷ƥ˰¸ޤ + +
  • »̤Ǥ
    +̥եĹ뤳ȤˤäơΥեǤޤ + +
  • 6 Ĥΰ̥٥뤬ޤ
    +Ĺ®ΨɤΡ줫֤ȤǤޤ +
+ +

+̤줿եϡإåǥåӥǡ鹽 +졢νǥե֤ޤ +

+ +
+
++--------+-------------+-----------------------------+
+| إå |ǥå |          ǡ             |
++--------+-------------+-----------------------------+
+                                                     EOF
+
+
+ + +

ǡ

+ +

+Υեϡιǰ̤ޤ +

+ +

ebzip ϸΥեʬ䤷ޤ +ġ (slice) ϡΤΤС +Ʊ礭ˤʤäƤޤ +

+ +
+
++---------------+---------------+--   --+----------+
+|  饤 1   |  饤 2   |  ...  |饤 N|
++---------------+---------------+--   --+----------+
+                                                  EOF
+
+
+ +

+饤ϡ̥٥뤫ޤޤ +(̥٥ˤĤƤ ְ̥٥ +ȤΤ) +

+ + + + + + + + + +
̥٥ 饤礭
0 2048 Х
1 4096 Х
2 8192 Х
3 16384 Х
4 32768 Х
5 65536 Х
+ +

+ˡΥ饤饤ûä硢 +ebzip ϥ饤ƱˤʤޤǿФФ +ʬ 0x00 ޤ +

+ +
+
+                                                 ʬ
++---------------+---------------+--   --+---------+-----+
+|  饤 1   |  饤 2   |  ...  |  饤 N   |
++---------------+---------------+--   --+---------+-----+
+                                                        EOF
+
+
+ +

+Ǹˡebzip ϸġΥ饤RFC 1951 ˵Ƥ +DEFLATE ̥ǡǰ̤ޤ +ΤΤΥ饤ϡ¾Υ饤ȤΩư̤ޤ +̤줿饤Υӥåȿ 8 ܿǤʤС1 7 ӥåȤ +̤줿饤­8 ܿˤʤ褦ˤޤ +ˤꡢ̤줿줾Υ饤ϥХȤζ鳫Ϥޤ +­줿ӥåȤƤ̤ǤΥӥåȤϷ褷ƻѤޤ +

+ +
+
++------------+----------+--   --+--------------+
+| ̤줿 |̤줿|  ...  |  ̤줿  |
+| 饤 1 |饤 2|  ...  |  饤 N  |
++------------+----------+--   --+--------------+
+
+
+ +

+줬̥եˤ ǡ ˤʤꡢ̤줿 +饤鹽ޤ +

+ +

+Υ饤οФʬϡΥ饤ΰȤư̤ +ޤ +ebunzip Υ饤Ȥϡ饤Ĺ +鿭ФʬȤȤԤޤ +

+ +

+̤饤礭饤礭Ȥϡ +ebzip ϤΥ饤ΰ̥ǡѴޤ +ξ硢ebzip ϸΥǡ򤽤Υ饤ΰ̥ǡȤ +˵Ͽޤ +

+ +

+Υե뤬äȤϡ̥եΥǡϤޤ +

+ + +

ǥå

+ +

+̻ˡebzip ϰ̤ġΥ饤 +ǥå (index) Ͽޤ +ġΥǥåϡ̥եƬ鰵̤줿饤Ƭ +ޤǤεΥɽޤ +Υñ̤ϥХȤǤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+     |         |                        |         |
+ +---+         +----+                   +------+  +-----------+
+ V                  V                          V              V
++------------------+------------------+--   --+--------------+
+|    ̤줿    |    ̤줿    |  ...  |  ̤줿  |
+|    饤 1    |    饤 2    |  ...  |  饤 N  |
++------------------+------------------+--   --+--------------+
+
+
+ +

+ġΥǥå 2 5 ХȤ礭ޤ +ǥå礭ϡΥե礭Ƿޤޤ +

+ + + + + + + +
Υե礭 ǥå礭
0 65535 Х 2 Х
65535 16777215 Х 3 Х
16777216 4294967295 Х 4 Х
4294967296 1099511627775 Х 5 Х
+ +

+ǥåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +ȤС0x1234 ϼΤ褦˵Ͽޤ +ǽΥХȤ 0x12 ȤʤꡢΥХȤ 0x34 ˤʤޤ +

+ +
+
++---------+---------+
+|0001 0010|0011 0100|
++---------+---------+
+  (0x12)    (0x34)
+
+
+ +

+ǥåϡ̤줿饤 1 ΥǥåǻϤޤꡢθ +˰̤줿饤 2 Υǥå³ޤ +̤줿饤 N ΥǥåθˤϡֽüפؤΥǥå +֤ޤ +Υǥåϡ̤줿饤 N μΥХȤؤ +ǥåˤʤޤ +ޤ̤줿եΥ򼨤Ȥˤʤޤ +

+ +
+
++---------+---------+--           --+---------+---------+
+|ǥ |ǥ |  ...........  |ǥ |ǥ |
+| 1   | 2   |  ...........  | N   | END |
++---------+---------+--           --+---------+---------+
+
+
+ +

+̤줿饤礭饤ȤϡΥ饤 +Υǡϼºݤˤϰ̤ƤʤȤ򼨤ޤ +

+ +

+Υե뤬äȤϡǥåϥǥåĤ +ޤ +Υǥåϰ̤줿ե礭ɽޤ +

+ + +

إå

+ +

+إå 22 ХȤʤޤ +Υեɤ鹽ޤ +

+ +
+
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+| ޥå ID  |*1| *2  |ե礭 | Adler-32  |   |
++--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+ 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21
+
+*1: zip ⡼ɤȰ̥٥
+*2: ͽΰ
+
+
+ +
+
ޥå ID (5 Х)
+
+0x45, 0x42, 0x5a, 0x69, 0x70 (ASCII ʸɽ EBZip) +Ȥꤷͤޤ + +
zip ⡼ (MSB ¦ 4 ӥå)
+
+̥⡼ɤɽޤ + (󰵽̻) ե礭 4294967295 Х (= 4GХ) +ΤȤ 1 (2 ʿ 0001)礭Ȥ 2 (2 ʿ 0002) +򥻥åȤޤ + +

+ե礭ͤѤΤϡŪʻˤޤ + EB Library ϰ̥⡼ 1 ꤷƤ餺ޤ 4GB Х +Ķե򰷤ޤǤ +4G ХȤĶե򰷤褦 EB Library ɤݤˡ +4G ХȤĶ顢̥⡼ɤ 2 ˥åȤפȤ롼 +ߤޤ +ˤꡢ EB Library 4GB ХȤĶե򰷤 +Ȥȡбΰ̥⡼ɤȤߤʤ졢顼ȯ褦ˤʤä +ޤ +

+ +
̥٥ (LSB ¦ 4 ӥå)
+
+̥٥ɽޤ + +
ͽΰ (2 Х)
+
+ͽ󤵤ƤޤȤƤޤ +0x0000 ޤ + +
ե礭 (6 Х)
+
+ (󰵽̻) ե礭ϿƤޤ + +
Adler-32 (4 Х)
+
+RFC 1950 ˵Ƥ Adler-32 Ȥ르ꥺѤƷ׻ +󰵽̥ǡΥåͤǤ + +
(4 Х)
+
+ΥեκǽǤ +˥åɸ 1970 ǯ 1 1 0 0 ʬ 0 äηвÿ +ɽޤ +
+ +

+zip ⡼ ̥٥ ϡξȤإå +5 Хܤޤ +zip ⡼ ϡͤκǤ礭ʬɽӥå +(most significant bit) ޤߡ̥٥ ϺǤ⾮ʬ +ɽӥå (least significant bit) ޤǤޤ +zip ⡼ 1 ḁ̇̄٥ 2 ʤ顢 +إå 5 Хܤ 0x12 ˤʤޤ +

+ +
+
+ MSB                         LSB
++---+---+---+---+---+---+---+---+
+| 0   0   0   1   0   0   1   0 | = 0x12
++---+---+---+---+---+---+---+---+
+  (zip ⡼)  |  (̥٥)
+
+
+ +

+إåǤΡʣХȤʤͤϤ٤ơͤ礭ʬ +ɽХ (most significant byte) 褿ǵϿޤ +

+ + + diff --git a/lib/ebu/doc/html-include b/lib/ebu/doc/html-include new file mode 100644 index 0000000..9b95750 --- /dev/null +++ b/lib/ebu/doc/html-include @@ -0,0 +1,211 @@ +#! /usr/bin/perl +# +# Copyright (c) 2005-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +# +# html-include -- tiny file inclusion processoor for HTML. +# +# Usage: +# html-include [-o output-file] [input-file] +# +# `html-include' extracts file inclusion directives in HTML, and output +# the result. The following is file inclusion directive line that +# `html-include' recognizes: +# +# +# +# Note that "[ \t]*$|) { + # + # This is file inclusion directive line. + # + if (++$i >= $max_nest_level) { + die "$0: too deep inclusion\n"; + } + + $in_files[$i] = {'handle' => new FileHandle, + 'name' => search_file($1), + 'lineno' => 0}; + if (!$in_files[$i]->{handle}->open('<' . $in_files[$i]->{name})) { + die "$0: failed to open the file, $!: " . + $in_files[$i]->{name} . "\n"; + } + + if ($comment_mode) { + print $out_file->{handle}->printf("\n", + $in_files[$i]->{name}, + $in_files[$i]->{lineno} + 1); + } + } else { + $out_file->{handle}->print($_, "\n"); + } + + $out_file->{lineno}++; + } + + $in_files[$i]->{handle}->close(); + last if (--$i < 0); + + if ($comment_mode) { + $out_file->{handle}->printf("\n", + $in_files[$i]->{name}, + $in_files[$i]->{lineno} + 1); + } +} + + +sub search_file ($) { + my ($file) = @_; + + foreach my $dir (@search_paths) { + return "$dir/$file" if (-r "$dir/$file"); + } + + return $file; +} diff --git a/lib/ebu/doc/html-index b/lib/ebu/doc/html-index new file mode 100644 index 0000000..0d284d2 --- /dev/null +++ b/lib/ebu/doc/html-index @@ -0,0 +1,157 @@ +#! /usr/bin/perl +# +# Copyright (c) 2005 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +# +# html-index -- make index page of HTML files. +# +# Usage: +# html-index [option...] input-file... +# +# `html-index' reads HTML files, and generates their indice. The indice +# are created from tags in the HTML files. Since `html-index' +# doesn't parse HTML precisely, `<' and `>' in tag must be in the same +# line and be the following form: +# +# +# +# The corresponding reference in the index looks like: +# +# name +# +# or, if two or more input files are specified: +# +# name +# +# `category' above is category name of index. It is used to generate +# more than one indice: function index and concept index, for example. +# By default, the script generates `index-.html' for each index +# category. +# +# In input HTML files, the following line has the special meaning: +# +# +# +# It sets file name in in the indice. +# +# Options: +# -p prefix set prefix of index files. +# (default: `index-') +# -s suffix set suffix of index files. +# (default: `html') +# -h do not output file name in . +# + +require 5.005; +use Getopt::Std; + +# +# Usage +# +my $usage = "Usage: $0 [-p prefix] [-s suffix] [-h] file...\n"; + +# +# Variables +# +my $out_prefix = 'index'; +my $out_suffix = 'html'; +my %indice = (); +my $fragment_only = 0; + +# +# Parse command line arguments. +# +my %options; +getopts('p:s:h', \%options) or die $usage; +die $usage if (@ARGV == 0); + +$out_prefix = $options{p} if (defined($options{p})); +$out_suffix = $options{s} if (defined($options{s})); +$fragment_only = 1 if (defined($options{h}) || @ARGV == 1); + +# +# Read HTML files. +# +for (my $i = 0; $i < @ARGV; $i++) { + my $in_file_name = $ARGV[$i]; + if (!open(IN_FILE, "< $in_file_name")) { + die "$0: failed to open the file, $!: $in_file_name\n"; + } + + while () { + chomp; + if (m|^[ \t]*$|) { + $in_file_name = $1; + } elsif (m||) { + my $name = $1; + if ($name =~ m|^([a-z_][0-9a-z_]+):(.+)$|) { + my $type = $1; + my $value = $2; + if (!defined($indice{$type})) { + $indice{$type} = {}; + } + $indice{$type}->{$value} = $in_file_name; + } + } + } + + close(IN_FILE); +} + +# +# Generate index files. +# +foreach my $i (sort {uc($a) cmp uc($b)} keys(%indice)) { + my $out_file_name = sprintf("%s-%s.%s", $out_prefix, $i, $out_suffix); + + if (!open(OUT_FILE, "> $out_file_name")) { + die "$0: failed to open the file, $!: $out_file_name\n"; + } + + print OUT_FILE "
\n"; + my $prev_head_char = ''; + + foreach my $j (sort(keys(%{$indice{$i}}))) { + my $cur_head_char = uc(substr($j, 0, 1)); + if ($cur_head_char ne $prev_head_char) { + print OUT_FILE '
', $cur_head_char, "\n"; + } + + if ($fragment_only) { + printf(OUT_FILE "
%s\n", + $i, $j, $j); + } else { + printf(OUT_FILE "
%s\n", + $indice{$i}->{$j}, $i, $j, $j); + } + $prev_head_char = $cur_head_char; + } + + print OUT_FILE "
\n"; + close(OUT_FILE); +} diff --git a/lib/ebu/doc/html-split b/lib/ebu/doc/html-split new file mode 100644 index 0000000..d95eeb7 --- /dev/null +++ b/lib/ebu/doc/html-split @@ -0,0 +1,238 @@ +#! /usr/bin/perl +# +# Copyright (c) 2005-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +# +# html-split -- split an HTML file. +# +# Usage: +# html-split [option...] input-file +# +# `html-split' splits an HTML file with heading tags (

...

). +# Suppose that `input-file' is `foo.html', HTML files splitted by +# `html-split' are `foo-0.html', `foo-1.html', and so on. +# +# Options: +# -Z do not add `-0' to the first split. +# -l LEVEL split with this heading level +# (default: h2) +# -p PREFIX prefix of splitted HTML files. +# -s SUFFIX suffix of splitted HTML files. +# (default: html) +# -w WIDTH minimum width of split number. +# (default: 1) +# -t TOC fragment name of `Table of Contents'. +# (default: toc) +# + +require 5.005; +use Getopt::Std; +use File::Basename; + +# +# Usage +# +my $usage = "Usage: $0 [option...] input-file\n"; + +# +# Variables +# +my $in_file; +my $out_prefix; +my $out_suffix; +my $counter_width = 1; +my $split_level = 2; +my $toc_tag = 'toc'; +my $supress_zero_flag = 0; + +my @toc = (); +my @indice = (); +my @preamble = (); +my $toc_page = 0; + +# +# Parse command line arguments. +# +my %options; +getopts('Zl:w:p:s:t:', \%options) or die $usage; +die $usage if (@ARGV != 1); + +$in_file = $ARGV[0]; +if (defined($options{l})) { + $options{l} =~ s/^h//; + $split_level = $options{l}; +} +$counter_width = $options{w} if (defined($options{w})); +$supress_zero_flag = defined($options{Z}); +$toc_tag = $options{t} if (defined($options{t})); + +if (defined($options{p})) { + $out_prefix = $options{p}; +} else { + $out_prefix = basename($in_file, '.htm', '.html'); +} + +if (defined($options{s})) { + $out_suffix = $options{s}; +} elsif ($in_file =~ m|\.htm$|) { + $out_suffix = 'htm'; +} else { + $out_suffix = 'html'; +} + +# +# Read an HTML file. +# +if (!open(IN_FILE, "< $in_file")) { + die "$0: failed to open the file, $!: $in_file\n"; +} + +my $toc_found = 0; +my $page = 0; + +while () { + last if (m|^|); + push(@preamble, $_); +} + +while () { + chomp; + last if (m|^|); + if (m|^| && $1 <= $split_level) { + $page++ if (@toc > 0); + push(@toc, $_); + } + if (m||) { + my $tag = $1; + if ($tag eq $toc_tag) { + $toc_page = $page; + $toc_found = 1; + } + push(@indice, {'tag' => $tag, 'page' => $page}); + } +} + +close(IN_FILE); + +if (!$toc_found) { + die "$0: not found\n"; +} + +# +# Generate splitted HTML files. +# +if (!open(IN_FILE, "< $in_file")) { + die "$0: failed to open the file, $!: $in_file\n"; +} + +while () { + last if (m|^|); +} + +for (my $page = 0; $page < @toc; $page++) { + my $bar = ''; + if ($page > 0) { + $bar .= sprintf("[] ", + splitted_file_name($page - 1)); + } + + if ($page + 1 < @toc) { + $bar .= sprintf("[] ", + splitted_file_name($page + 1)); + } + + $bar .= sprintf("[ܼ] ", + splitted_file_name($toc_page), $toc_tag); + + my $out_file = splitted_file_name($page); + if (!open(OUT_FILE, "> $out_file")) { + die "$0: failed to open the file, $!: $out_file\n"; + } + + foreach my $j (@preamble) { + print OUT_FILE $j; + } + + print OUT_FILE "\n"; + print OUT_FILE "

\n", $bar, "\n

\n
\n"; + print OUT_FILE $toc[$page], "\n"; + + for (;;) { + $_ = ; + chomp; + if (!defined($_) || m|^|) { + 1 while (); + last; + } + elsif (m|^| && $1 <= $split_level) { + next if ($page == 0 && $_ eq $toc[$page]); + last; + } + 1 while (s||&rewrite_href($1)|e); + print OUT_FILE $_, "\n"; + } + + print OUT_FILE "
\n

\n", $bar, "\n

\n"; + print OUT_FILE "\n"; + print OUT_FILE "\n"; + + close(OUT_FILE); +} + +close(IN_FILE); + +# +# Return n'th splitted file name. +# +sub splitted_file_name ($) { + my ($n) = @_; + + if ($n == 0 && $supress_zero_flag) { + return sprintf("%s.%s", $out_prefix, $out_suffix); + } else { + return sprintf("%s-%0${counter_width}d.%s", + $out_prefix, $n, $out_suffix); + } +} + +# +# Rewrite
. +# +sub rewrite_href ($) { + my ($tag) = @_; + + for (my $i = 0; $i < @indice; $i++) { + if ($indice[$i]->{tag} eq $tag) { + return sprintf("", + splitted_file_name($indice[$i]->{page}), $tag); + } + } + + warn "$0: unknown tag \`$tag'\n"; + return ""; +} diff --git a/lib/ebu/doc/html-toc b/lib/ebu/doc/html-toc new file mode 100644 index 0000000..3e5828f --- /dev/null +++ b/lib/ebu/doc/html-toc @@ -0,0 +1,151 @@ +#! /usr/bin/perl +# +# Copyright (c) 2005-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +# +# html-toc -- make `table of contents' of HTML files. +# +# Usage: +# html-index [option...] input-file... +# +# `html-toc' reads HTML files, and generates `table of contents' (TOC) +# of the HTML files. The TOC is created from

...

tags and +# tag in the HTML files. Since `html-toc' doesn't parse +# HTML precisely, the tags must be the following form: +# +# heading +# +# where `?' is 1..6. Note that and above must be in the same +# line. +# +# `html-toc' outputs TOC to standard out by default. +# +# Options: +# -o file specify output file. +# -h do not output file name in . +# -m level minimum target heading level +# (default: h1) +# -M level maximum target heading level +# (default: h6) + +require 5.005; +use Getopt::Std; + +# +# Usage +# +my $usage = "Usage: $0 [option...] input-file...\n"; + +# +# Variables +# +my $out_file = '-'; +my @preamble = (); +my $fragment_only = 0; +my $min_level = 1; +my $max_level = 6; + +# +# Parse command line arguments. +# +my %options; +getopts('o:hm:M:', \%options) or die $usage; +die $usage if (@ARGV == 0); + +$fragment_only = 1 if (defined($options{h}) || @ARGV == 1); +$out_file = $options{o} if (defined($options{o})); +if (defined($options{m})) { + $options{m} =~ s/^h//; + $min_level = $options{m}; +} +if (defined($options{M})) { + $options{M} =~ s/^h//; + $max_level = $options{M}; +} + +# +# Read an HTML file. +# +$current_level = $min_level; + +if ($out_file eq '-') { + $out_file = 'stdout'; + open(OUT_FILE, ">& STDOUT"); +} else { + if (!open(OUT_FILE, "> $out_file")) { + die "$0: failed to open the file, $!: $out_file\n"; + } +} + +print OUT_FILE "\n"; + } + while ($current_level < $level) { + print OUT_FILE ' ' x ($current_level - $min_level + 1); + print OUT_FILE "
    \n"; + $current_level++; + } + + print OUT_FILE ' ' x ($current_level - $min_level + 1); + if ($fragment_only) { + print OUT_FILE sprintf("
  • %s\n", + $tag, $heading); + } else { + print OUT_FILE sprintf("
  • %s\n", + $in_file, $tag, $heading); + } + } + } + + close(IN_FILE); +} + +while ($current_level > $min_level) { + $current_level--; + print OUT_FILE ' ' x ($current_level - $min_level + 1); + print OUT_FILE "
\n"; +} + +print OUT_FILE "\n"; + +close(OUT_FILE); diff --git a/lib/ebu/doc/version.html b/lib/ebu/doc/version.html new file mode 100644 index 0000000..8c23b2d --- /dev/null +++ b/lib/ebu/doc/version.html @@ -0,0 +1 @@ +4.5-20200413 diff --git a/lib/ebu/ebappendix/Makefile b/lib/ebu/ebappendix/Makefile new file mode 100644 index 0000000..4b1eecd --- /dev/null +++ b/lib/ebu/ebappendix/Makefile @@ -0,0 +1,421 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebappendix/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = ebappendix +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebappendix +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebappendix +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +bin_SCRIPTS = ebuappendix +EXTRA_DIST = ebappendix.in +CLEANFILES = ebuappendix ebappendix.tmp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebappendix/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebappendix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-binSCRIPTS + + +ebuappendix: ebappendix.in $(top_srcdir)/libebutils/getopt_long.pl Makefile + rm -f ebuappendix + sed -e 's;\@PERL\@;$(PERL);' \ + $(srcdir)/ebappendix.in | sed '/^$$/q' > ebappendix.tmp + cat $(top_srcdir)/libebutils/getopt_long.pl >> ebappendix.tmp + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@MAILING_ADDRESS\@;$(MAILING_ADDRESS);' \ + $(srcdir)/ebappendix.in | sed '1,/^$$/d' >> ebappendix.tmp + cp ebappendix.tmp ebuappendix + chmod +x ebuappendix + rm -f ebappendix.tmp +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebappendix/Makefile.am b/lib/ebu/ebappendix/Makefile.am new file mode 100644 index 0000000..3358568 --- /dev/null +++ b/lib/ebu/ebappendix/Makefile.am @@ -0,0 +1,16 @@ +bin_SCRIPTS = ebuappendix + +EXTRA_DIST = ebappendix.in +CLEANFILES = ebuappendix ebappendix.tmp + +ebuappendix: ebappendix.in $(top_srcdir)/libebutils/getopt_long.pl Makefile + rm -f ebuappendix + sed -e 's;\@PERL\@;$(PERL);' \ + $(srcdir)/ebappendix.in | sed '/^$$/q' > ebappendix.tmp + cat $(top_srcdir)/libebutils/getopt_long.pl >> ebappendix.tmp + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@MAILING_ADDRESS\@;$(MAILING_ADDRESS);' \ + $(srcdir)/ebappendix.in | sed '1,/^$$/d' >> ebappendix.tmp + cp ebappendix.tmp ebuappendix + chmod +x ebuappendix + rm -f ebappendix.tmp diff --git a/lib/ebu/ebappendix/Makefile.in b/lib/ebu/ebappendix/Makefile.in new file mode 100644 index 0000000..3d894e2 --- /dev/null +++ b/lib/ebu/ebappendix/Makefile.in @@ -0,0 +1,421 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ebappendix +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +bin_SCRIPTS = ebuappendix +EXTRA_DIST = ebappendix.in +CLEANFILES = ebuappendix ebappendix.tmp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebappendix/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebappendix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-binSCRIPTS + + +ebuappendix: ebappendix.in $(top_srcdir)/libebutils/getopt_long.pl Makefile + rm -f ebuappendix + sed -e 's;\@PERL\@;$(PERL);' \ + $(srcdir)/ebappendix.in | sed '/^$$/q' > ebappendix.tmp + cat $(top_srcdir)/libebutils/getopt_long.pl >> ebappendix.tmp + sed -e 's;\@VERSION\@;$(VERSION);' \ + -e 's;\@MAILING_ADDRESS\@;$(MAILING_ADDRESS);' \ + $(srcdir)/ebappendix.in | sed '1,/^$$/d' >> ebappendix.tmp + cp ebappendix.tmp ebuappendix + chmod +x ebuappendix + rm -f ebappendix.tmp +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebappendix/ebappendix.in b/lib/ebu/ebappendix/ebappendix.in new file mode 100644 index 0000000..60a2626 --- /dev/null +++ b/lib/ebu/ebappendix/ebappendix.in @@ -0,0 +1,757 @@ +#! @PERL@ + +# +# Copyright (c) 1997-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +require 5.005; +use File::Basename; + +# Program name, program version and mailing address. +my $progname='ebappendix'; +my $version = '@VERSION@'; +my $mailing_address = '@MAILING_ADDRESS@'; + +# Help message. +my $help = "Usage: $progname [option...] [input-directory] +Options: + -b BOOK-TYPE --book-type BOOK-TYPE + make an appendix as BOOK-TYPE; eb or epwing + (default: depend on \`catalog(s).app\') + -d --debug --verbose debug mode + -h --help output this help, then exit + -n --no-catalog don't output a catalog file + -o DIRECTORY --output-directory DIRECTORY + output files to DIRECTORY + (default: .) + -t --test only check for input files + -v --version output version number, then exit + +Argument: + input-directory input files at this directory + (default: .) + +Report bugs to $mailing_address. +"; + +# `try ...' message. +my $tryhelp = "try \`$0 --help\' for more information\n"; + +# Disc type: `eb' or `epwing'. +my $disc = ''; + +# Read files on the directory. +my $indir = '.'; + +# Create files under the directory. +my $outdir = '.'; + +# The maximum number of subbooks in a book. +my $max_subbooks = 50; + +# Subbook list. +my @subbooks = (); + +# The maximum length of an alternation text for a character. +my $maxlen_alt = 31; + +# The maximum length of a subbook name. +my $maxlen_subname = 8; + +# Page size. +my $size_page = 2048; + +# File mode for mkdir. +my $dirmode = umask ^ 0777; + +# Test mode flag. +my $check_only = 0; + +# Debug mode flag. +my $debug = 0; + +# No-catalog mode. +my $no_catalog = 0; + +# Show help then exit. +my $help_only = 0; + +# Show version then exit. +my $version_only = 0; + +# Command line options. +@long_options = ('-b --book-type required-argument', + '-d --debug --verbose no-argument', + '-h --help no-argument', + '-n --no-catalog no-argument', + '-o --output-directory required-argument', + '-t --test no-argument', + '-v --version no-argument'); + +# +# Parse command line options. +# +&getopt_initialize(@long_options); +while (($optname, $optarg) = &getopt_long) { + if ($optname eq '-b') { + if ($optarg !~ /^(eb|epwing)$/i) { + warn "$0: unknown book type \`$optarg\'\n"; + die $tryhelp; + } + $disc = lc($optarg); + } elsif ($optname eq '-d') { + $debug = 1; + } elsif ($optname eq '-h') { + print $help; + exit(0); + } elsif ($optname eq '-n') { + $no_catalog = 1; + } elsif ($optname eq '-o') { + $outdir = $optarg; + } elsif ($optname eq '-v') { + print "$progname (EB Library) version $version\n"; + print $copyright; + exit(0); + } elsif ($optname eq '-t') { + $check_only = 1; + } else { + die $tryhelp; + } +} + +$indir = shift if (0 < @ARGV); +if (@ARGV != 0) { + warn "$0: too many arguments\n"; + die $tryhelp; +} + +# +# Remove a slash (`/') in the tail of the directory names. +# +$indir =~ s/\/$//; +$outdir =~ s/\/$//; + +# +# Compose filenames. +# +my $infile = find_file($indir, 'catalog.app', 'undef'); +if (!defined($infile)) { + $infile = find_file($indir, 'catalogs.app', 'undef'); +} +if (!defined($infile)) { + die "catalog(s).app: no such file\n"; +} + +if ($disc ne 'eb' && $disc ne 'epwing') { + if (basename($infile) =~ /^catalog\.app/i) { + $disc = 'eb'; + } else { + $disc = 'epwing'; + } +} + +my $outfile; +if ($disc eq 'eb') { + $outfile = find_file($outdir, 'catalog', 'default'); +} else { + $outfile = find_file($outdir, 'catalogs', 'default'); +} + +# +# Open the `CATALOG(S).APP' file to read. +# +if (!open(CATALOG_APP, $infile)) { + die "$infile: cannot open the file, $!\n"; +} + +# +# Read a subbook list from `CATALOG(S).APP'. +# +while () { + s/^\s+//; + s/\s+$//; + next if (/^$/ || /^\#/); + push(@subbooks, lc($_)); +} + +# +# Checks for subbook names. +# +die "$infile: no subbooks described\n" if (@subbooks == 0); +die "$infile: too many subbooks\n" if ($max_subbooks < @subbooks); +foreach my $sub (@subbooks) { + die "$infile: invalid subbook name \`$sub\'\n" + if ($sub !~ /\w{1,$maxlen_subname}/); +} + +# +# Close the file `CATALOG(S).APP'. +# +close(CATALOG_APP); + +# +# Create the `CATALOG(S)' file. +# +if (!$check_only && !$no_catalog) { + # + # Open the `CATALOG(S)' file to write. + # + if (!open(CATALOG, "> $outfile")) { + die "$outfile: cannot open the file, $!\n"; + } + + # + # Write the number of subbooks in the book. + # + print CATALOG "\0", pack('C', scalar(@subbooks)), "\0" x 14; + + # + # Write subbook names. + # + for (my $i = 0; $i < @subbooks; $i++) { + if ($disc eq 'eb') { + print CATALOG pack('C', $i + 1), "\0"; + print CATALOG "\0" x 30; + print CATALOG uc($subbooks[$i]); + print CATALOG "\0" x ($maxlen_subname - length($subbooks[$i])); + } else { + print CATALOG pack('C', $i + 1), "\0"; + print CATALOG "\0" x 80; + print CATALOG uc($subbooks[$i]); + print CATALOG "\0" x ($maxlen_subname - length($subbooks[$i])); + print CATALOG "\0" x 74; + } + } + + # + # Close the `CATALOG(S)' file. + # + close(CATALOG); +} + +# +# Create `APPENDIX (or FUROKU)' files. +# +foreach my $sub (@subbooks) { + # + # Compose filenames. + # + $infile = find_file($indir, "$sub.app"); + die "$sub.app: no such file\n" if (!defined($infile)); + + if ($disc eq 'eb') { + $outfile = find_file($outdir, "$sub/appendix", 'default'); + } else { + $outfile = find_file($outdir, "$sub/data/furoku", 'default'); + } + $outfile =~ s|//+|/|g; + + # + # Open the `.APP' file to read. + # + if (!open(SUBBOOK_APP, $infile)) { + warn "$infile: cannot open the file, $!\n"; + next; + } + warn "$infile: debug: opened\n" if ($debug); + + my $narrow_def = 0; + my $narrow_start = 0; + my $narrow_start_def = 0; + my $narrow_end = 0; + my $narrow_end_def = 0; + my $narrow_len = 0; + my %narrow_alt = (); + my %narrow_lineno = (); + + my $wide_def = 0; + my $wide_start = 0; + my $wide_start_def = 0; + my $wide_end = 0; + my $wide_end_def = 0; + my $wide_len = 0; + my %wide_alt = (); + my %wide_lineno = (); + + my @stop = (); + my $stop_def = 0; + my $code = 'JISX0208'; + my $code_def = 0; + my $block = ''; + + my $start = \$narrow_start; + my $start_def = \$narrow_start_def; + my $end = \$narrow_end; + my $end_def = \$narrow_end_def; + my $alt = \%narrow_alt; + my $lineno = \%narrow_lineno; + + # + # Parse each line in `.APP'. + # + while () { + s/^\s+//; + s/\s+$//; + next if (/^$/ || /^\#/); + + my ($key, $arg) = split(/[ \t]+/, $_, 2); + + if ($key eq 'begin') { + # + # `begin ...' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: missing argument to \`$key\'\n" if ($arg eq ''); + + if ($arg eq 'narrow') { + # + # `begin narrow' + # + die "$infile:$.: block \`$arg\' is redefined\n" + if (0 < $narrow_def++); + + $block = $arg; + $start = \$narrow_start; + $start_def = \$narrow_start_def; + $end = \$narrow_end; + $end_def = \$narrow_end_def; + $alt = \%narrow_alt; + $lineno = \%narrow_lineno; + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($arg eq 'wide') { + # + # `begin wide' + # + die "$infile:$.: block \`$arg\' is redefined\n" + if (0 < $wide_def++); + + $block = $arg; + $start = \$wide_start; + $start_def = \$wide_start_def; + $end = \$wide_end; + $end_def = \$wide_end_def; + $alt = \%wide_alt; + $lineno = \%wide_lineno; + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } else { + die "$infile:$.: invalid argument \`$arg\'\n"; + } + + } elsif ($key eq 'end') { + # + # `end' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block eq ''); + die "$infile:$.: not allowed argument to \`$key\'\n" + if ($arg ne ''); + + $block = ''; + warn "$infile:$.: debug: $key\n" if ($debug); + + } elsif ($key eq 'range-start') { + # + # `range-start' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($arg !~ /^0[xX]([0-9a-fA-F]{4})$/); + die "$infile:$.: \`$key\' is redefined\n" if (0 < $$start_def++); + + $$start = hex($1); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key eq 'range-end') { + # + # `range-end' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($arg !~ /^0[xX]([0-9a-fA-F]{4})$/); + die "$infile:$.: \`$key\' is redefined\n" if (0 < $$end_def++); + + $$end = hex($1); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key =~ /^0[xX]/) { + # + # `0x' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($key !~ /^0[xX]([0-9a-fA-F]{4})$/); + + my $ch = hex($1); + $arg = &convert_to_euc($arg); + my $len = length($arg); + + die "$infile:$.: alternation string too long\n" + if ($maxlen_alt < $len); + die "$infile:$.: character \`$key\' redefined\n" + if (defined($alt->{$ch})); + + $alt->{$ch} = $arg; + $lineno->{$ch} = $.; + warn "$infile:$.: debug: $key\n" if ($debug); + + } elsif ($key eq 'character-code') { + # + # `character-code' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: \`$key\' redefined\n" if (0 < $code_def++); + die "$infile:$.: invalid character code \`$arg\'\n" + if ($arg !~ /^(JISX0208|ISO8859-1|UTF-8)$/i); + $code = uc($arg); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key eq 'stop-code') { + # + # `stop-code' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: \`$key\' redefined\n" if (0 < $stop_def++); + die "$infile:$.: invalid stop-code \`$arg\'\n" + if ($arg !~ /^0x1f(09|41)\s*0x([0-9a-f]{2})([0-9a-f]{2})$/i); + @stop = (0x1f, hex($1), hex($2), hex($3)); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } else { + die "$infile:$.: unknown keyword \`$key\'\n"; + } + } + # End of parsing each line in `.APP'. + + # + # Close the `.APP' file. + # + close(SUBBOOK_APP); + warn "$infile: debug: closed\n" if ($debug); + + # + # Check for `character-code' definition. + # + die "$infile: missing \`character-code\'\n" + if ($code_def == 0 && ($narrow_def != 0 || $wide_def != 0)); + + # + # Check for the range of alternation. + # + if (0 < $narrow_def) { + die "$infile: missing \`range-start\' in the narrow block\n" + if ($narrow_start_def == 0); + die "$infile: missing \`range-end\' in the narrow block\n" + if ($narrow_end_def == 0); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $narrow_len = (($narrow_end >> 8) - ($narrow_start >> 8)) * 0x5e + + (($narrow_end & 0xff) - ($narrow_start & 0xff)) + 1; + } else { + $narrow_len = (($narrow_end >> 8) - ($narrow_start >> 8)) * 0xfe + + (($narrow_end & 0xff) - ($narrow_start & 0xff)) + 1; + } + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + while (my ($key, $arg) = each(%narrow_alt)) { + warn "$infile:$narrow_lineno{$key}: out of range\n" + if ($key < $narrow_start || $narrow_end < $key + || ($key & 0xff) < 0x21 || 0x7e < ($key & 0xff)); + } + } else { + while (my ($key, $arg) = each(%narrow_alt)) { + warn "$infile:$narrow_lineno{$key}: out of range\n" + if ($key < $narrow_start || $narrow_end < $key + || ($key & 0xff) < 0x01 || 0xfe < ($key & 0xff)); + } + } + } + + if (0 < $wide_def) { + die "$infile: missing \`range-start\' in the wide block\n" + if ($wide_start_def == 0); + die "$infile: missing \`range-end\' in the wide block\n" + if ($wide_end_def == 0); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $wide_len = (($wide_end >> 8) - ($wide_start >> 8)) * 0x5e + + (($wide_end & 0xff) - ($wide_start & 0xff)) + 1; + } else { + $wide_len = (($wide_end >> 8) - ($wide_start >> 8)) * 0xfe + + (($wide_end & 0xff) - ($wide_start & 0xff)) + 1; + } + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + while (my ($key, $arg) = each(%wide_alt)) { + warn "$infile:$wide_lineno{$key}: out of range\n" + if ($key < $wide_start || $wide_end < $key + || ($key & 0xff) < 0x21 || 0x7f < ($key & 0xff)); + } + } else { + while (my ($key, $arg) = each(%wide_alt)) { + warn "$infile:$wide_lineno{$key}: out of range\n" + if ($key < $wide_start || $wide_end < $key + || ($key & 0xff) < 0x01 || 0xfe < ($key & 0xff)); + } + } + } + + next if ($check_only); + + # + # Create a subdirectory for the subbook, if missing. + # + my $outsubdir = dirname($outfile); + if (mkinstalldirs($outsubdir, $dirmode)) { + warn "$outdir: debug: directory cleated\n" if ($debug); + } else { + die "$outdir: cannot create the directory, $!\n"; + } + + # + # Open the file `APPENDIX (or FUROKU)' to read. + # + if (!open(APPENDIX, "> $outfile")) { + die "$outfile: cannot open the file, $!\n"; + } + warn "$outfile: debug: opened\n" if ($debug); + + # + # Fill the index page with zero. + # + seek(APPENDIX, 0, 0); + print APPENDIX "\0" x $size_page; + + # + # Output alternation text for narrow font characters. + # + my $narrow_page = 0; + if (0 < $narrow_def) { + $narrow_page = int(1 + tell(APPENDIX) / $size_page); + + # + # Output alternation text. + # + my $i = $narrow_start; + while ($i <= $narrow_end) { + if (defined($narrow_alt{$i})) { + print APPENDIX $narrow_alt{$i}, "\0", + "\0" x ($maxlen_alt - length($narrow_alt{$i})); + } else { + print APPENDIX "\0" x 32; + } + printf STDERR "$outfile: debug: wrote 0x%04x\n", $i + if ($debug); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $i += (($i & 0xff) < 0x7e) ? 1 : 0xa3; + } else { + $i += (($i & 0xff) < 0xfe) ? 1 : 3; + } + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + } + + # + # Output alternation text for wide font characters. + # + my $wide_page = 0; + if (0 < $wide_def) { + $wide_page = 1 + int(tell(APPENDIX) / $size_page); + + # + # Output alternation text. + # + my $i = $wide_start; + while ($i <= $wide_end) { + if (defined($wide_alt{$i})) { + print APPENDIX $wide_alt{$i}, "\0", + "\0" x ($maxlen_alt - length($wide_alt{$i})); + } else { + print APPENDIX "\0" x 32; + } + printf STDERR "$outfile: debug: wrote 0x%04x\n", $i + if ($debug); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $i += (($i & 0xff) < 0x7e) ? 1 : 0xa3; + } else { + $i += (($i & 0xff) < 0xfe) ? 1 : 3; + } + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + } + + # + # Output a stop-code. + # + my $stop_page = 1 + int(tell(APPENDIX) / $size_page); + if (0 < $stop_def) { + print APPENDIX "\0\1", pack("C4", @stop); + warn "$outfile: debug: wrote stop-code\n" if ($debug); + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + + # + # Output an index page. + # + my %character_code_table = ( + 'ISO8859-1' => "\0\001", + 'JISX0208' => "\0\002", + 'UTF-8' => "\0\004", + ); + seek(APPENDIX, 0, 0); + print APPENDIX "\0\3", $character_code_table{$code}, "\0" x 12; + + if (0 < $narrow_def) { + print APPENDIX pack("N", $narrow_page), "\0" x 6, + pack("n n", $narrow_start, $narrow_len), "\0\0"; + } else { + print APPENDIX "\0" x 16; + } + + if (0 < $wide_def) { + print APPENDIX pack("N", $wide_page), "\0" x 6, + pack("n n", $wide_start, $wide_len), "\0\0"; + } else { + print APPENDIX "\0" x 16; + } + + if (0 < $stop_def) { + print APPENDIX pack("N", $stop_page), "\0" x 12; + } else { + print APPENDIX "\0" x 16; + } + + close(APPENDIX); + warn "$outfile: debug: closed\n" if ($debug); +} + +exit; + +# +# Find file $target under $dir. +# +sub find_file { + my ($dir, $target, $mode) = @_; + my $result = $dir; + my @target_entries = split(/\/+/, $target); + + for (my $i = 0; $i < @target_entries; $i++) { + my $found; + my $normalized_target_entry = lc($target_entries[$i]); + $normalized_target_entry =~ s/;\d$//; + $normalized_target_entry =~ s/\.$//; + + if (opendir(DIR, $result)) { + while (my $entry = readdir(DIR)) { + if ($i < @target_entries - 1) { + next if (! -d "$result/$entry"); + } else { + next if (! -f "$result/$entry"); + } + my $normalized_entry = lc($entry); + $normalized_entry =~ s/;\d$//; + $normalized_entry =~ s/\.$//; + if ($normalized_target_entry eq $normalized_entry) { + $found = $entry; + last; + } + } + closedir(DIR); + } + + if (defined($found)) { + $result = $result . '/' . $found; + } elsif ($mode eq 'undef') { + return undef; + } else { + $result = $result . '/' . $target_entries[$i]; + } + } + + return $result; +} + +sub dirname { + my ($dir) = @_; + my $result; + + if ($dir !~ /\//) { + $result = '.'; + } else { + $result = $dir; + $result =~ s/\/+[^\/]+$//; + } + + return $result; +} + +sub mkinstalldirs { + my ($dir, $mode) = @_; + my $path = ''; + + foreach my $d (split(/\/+/, $dir)) { + if ($path eq '') { + $path = ($dir =~ /^\//) ? '/' : $d; + } else { + $path = "$path/$d"; + } + next if (-d $path); + return 0 if (!mkdir($path, $mode)); + } + + return 1; +} + +# +# Convert a string to EUC JP. +# +sub convert_to_euc { + my ($s) = @_; + while ($s =~ /\033(\([BJ]|\$[\@B])/) { + $s =~ s/\033\$[\@B]([^\033]*)/&convert_to_euc_tr($1)/eg; + $s =~ s/\033\([BJ]([^\033]*)/$1/eg; + } + return $s; +} + +sub convert_to_euc_tr { + my ($s) = @_; + $s =~ tr/\041-\176/\241-\376/; + return $s; +} + +# Local Variables: +# mode: perl +# End: diff --git a/lib/ebu/ebappendix/ebuappendix b/lib/ebu/ebappendix/ebuappendix new file mode 100644 index 0000000..e99b50f --- /dev/null +++ b/lib/ebu/ebappendix/ebuappendix @@ -0,0 +1,1119 @@ +#! /usr/bin/perl + +# -*- Perl -*- +# Copyright (c) 1997-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + +# +# This program is a Perl package running on Perl 4.036 or later. +# The package provides routines to process command line options like +# as GNU getopt_long(). +# +# Version: +# 2.0 +# +# Interface: +# +# &getopt_initialize(LIST) +# Set a list of command line options and initialize internal data +# for &getopt_long. +# You must call the routine before calling &getopt_long. +# Format of each element in the LIST is: +# +# `CANONICAL-OPTION-NAME [ALIAS-OPTION-NAME...] ARGUMENT-FLAG' +# +# CANONICAL-OPTION-NAME, ALIAS-OPTION-NAME and ARGUMENT-FLAG fields +# are separated by spaces or tabs. +# +# CANONICAL-OPTION-NAME and ALIAS-OPTION-NAME must be either a single +# character option including preceding `-' (e.g. `-v'), or a long +# name option including preceding `--' (e.g. `--version'). Whether +# CANONICAL-OPTION-NAME is single character option or long name +# option is not significant. +# +# ARGUMENT-FLAG must be `no-argument', `required-argument' or +# `optional-argument'. If it is set to `required-argument', the +# option always takes an argument. If set to `optional-argument', +# an argument to the option is optional. +# +# You can put a special element `+' or `-' at the first element in +# LIST. See `Details about Option Processing:' for details. +# If succeeded to initialize, 1 is returned. Otherwise 0 is +# returned. +# +# &getopt_long +# Get a option name, and if exists, its argument of the leftmost +# option in @ARGV. +# +# An option name and its argument are returned as a list with two +# elements; the first element is CANONICAL-OPTION-NAME of the option, +# and second is its argument. +# Upon return, the option and its argument are removed from @ARGV. +# When you have already got all options in @ARGV, an empty list is +# returned. In this case, only non-option elements are left in +# @ARGV. +# +# When an error occurs, an error message is output to standard +# error, and the option name in a returned list is set to `?'. +# +# Example: +# +# &getopt_intialize('--help -h no-argument', '--version -v no-argument') +# || die; +# +# while (($name, $arg) = &getopt_long) { +# die "For help, type \`$0 --help\'\n" if ($name eq '?'); +# $opts{$name} = $arg; +# } +# +# Details about Option Processing: +# +# * There are three processing modes: +# 1. PERMUTE +# It permutes the contents of ARGV as it scans, so that all the +# non-option ARGV-elements are at the end. This mode is default. +# 2. REQUIRE_ORDER +# It stops option processing when the first non-option is seen. +# This mode is chosen if the environment variable POSIXLY_CORRECT +# is defined, or the first element in the option list is `+'. +# 3. RETURN_IN_ORDER +# It describes each non-option ARGV-element as if it were the +# argument of an option with an empty name. +# This mode is chosen if the first element in the option list is +# `-'. +# +# * An argument starting with `-' and not exactly `-', is a single +# character option. +# If the option takes an argument, it must be specified at just +# behind the option name (e.g. `-f/tmp/file'), or at the next +# ARGV-element of the option name (e.g. `-f /tmp/file'). +# If the option doesn't have an argument, other single character +# options can be followed within an ARGV-element. For example, +# `-l -g -d' is identical to `-lgd'. +# +# * An argument starting with `--' and not exactly `--', is a long +# name option. +# If the option has an argument, it can be specified at behind the +# option name preceded by `=' (e.g. `--option=argument'), or at the +# next ARGV-element of the option name (e.g. `--option argument'). +# Long name options can be abbreviated as long as the abbreviation +# is unique. +# +# * The special argument `--' forces an end of option processing. +# + +{ + package getopt_long; + + $initflag = 0; + $REQUIRE_ORDER = 0; + $PERMUTE = 1; + $RETURN_IN_ORDER = 2; +} + + +# +# Initialize the internal data. +# +sub getopt_initialize { + local(@fields); + local($name, $flag, $canon); + local($_); + + # + # Determine odering. + # + if ($_[$[] eq '+') { + $getopt_long'ordering = $getopt_long'REQUIRE_ORDER; + shift(@_); + } elsif ($_[$[] eq '-') { + $getopt_long'ordering = $getopt_long'RETURN_IN_ORDER; + shift(@_); + } elsif (defined($ENV{'POSIXLY_CORRECT'})) { + $getopt_long'ordering = $getopt_long'REQUIRE_ORDER; + } else { + $getopt_long'ordering = $getopt_long'PERMUTE; + } + + # + # Parse an option list. + # + %getopt_long'optnames = (); + %getopt_long'argflags = (); + + foreach (@_) { + @fields = split(/[ \t]+/, $_); + if (@fields < 2) { + warn "$0: (getopt_initialize) too few fields \`$arg\'\n"; + return 0; + } + $flag = pop(@fields); + if ($flag ne 'no-argument' && $flag ne 'required-argument' + && $flag ne 'optional-argument') { + warn "$0: (getopt_initialize) invalid argument flag \`$flag\'\n"; + return 0; + } + + $canon = ''; + foreach $name (@fields) { + if ($name !~ /^-([^-]|-.+)$/) { + warn "$0: (getopt_initialize) invalid option name \`$name\'\n"; + return 0; + } elsif (defined($getopt_long'optnames{$name})) { + warn "$0: (getopt_initialize) redefined option \`$name\'\n"; + return 0; + } + $canon = $name if ($canon eq ''); + $getopt_long'optnames{$name} = $canon; + $getopt_long'argflags{$name} = $flag; + } + } + + $getopt_long'endflag = 0; + $getopt_long'shortrest = ''; + @getopt_long'nonopts = (); + + $getopt_long'initflag = 1; +} + + +# +# When it comes to the end of options, restore PERMUTEd non-option +# arguments to @ARGV. +# +sub getopt_end { + $getopt_long'endflag = 1; + unshift(@ARGV, @getopt_long'nonopts); +} + + +# +# Scan elements of @ARGV for getting an option. +# +sub getopt_long { + local($name, $arg) = ('', 1); + local($patt, $key, $ambig, $ch); + local($_); + + &getopt_initialize(@_) if (!$getopt_long'initflag); + return () if ($getopt_long'endflag); + + # + # Take the next argument from @ARGV. + # + if ($getopt_long'shortrest ne '') { + $_ = '-'.$getopt_long'shortrest; + } elsif (@ARGV == 0) { + &getopt_end; + return (); + } elsif ($getopt_long'ordering == $getopt_long'REQUIRE_ORDER) { + $_ = shift(@ARGV); + if (!/^-./) { + push(@getopt_long'nonopts, $_); + &getopt_end; + return (); + } + } elsif ($getopt_long'ordering == $getopt_long'PERMUTE) { + for (;;) { + if (@ARGV == 0) { + &getopt_end; + return (); + } + $_ = shift(@ARGV); + last if (/^-./); + push(@getopt_long'nonopts, $_); + } + } else { # RETURN_IN_ORDER + $_ = shift(@ARGV); + } + + # + # Check for the special option `--'. + # + if ($_ eq '--' && $getopt_long'shortrest eq '') { + # + # `--' indicates the end of the option list. + # + &getopt_end; + return (); + } + + # + # Check for long and short options. + # + if (/^(--[^=]+)/ && $getopt_long'shortrest eq '') { + # + # Long style option, which start with `--'. + # Abbreviations for option names are allowed as long as + # they are unique. + # + $patt = $1; + if (defined($getopt_long'optnames{$patt})) { + $name = $patt; + } else { + $ambig = 0; + foreach $key (keys(%getopt_long'optnames)) { + if (index($key, $patt) == 0) { + if ($name eq '') { + $name = $key; + } else { + $ambig = 1; + } + } + } + if ($ambig) { + warn "$0: option \`$_\' is ambiguous\n"; + return ('?', ''); + } + if ($name eq '') { + warn "$0: unrecognized option \`$_\'\n"; + return ('?', ''); + } + } + + if ($getopt_long'argflags{$name} eq 'required-argument') { + if (/=(.*)$/) { + $arg = $1; + } elsif (0 < @ARGV) { + $arg = shift(@ARGV); + } else { + warn "$0: option \`$_\' requires an argument\n"; + return ('?', ''); + } + } elsif ($getopt_long'argflags{$name} eq 'optional-argument') { + if (/=(.*)$/) { + $arg = $1; + } elsif (0 < @ARGV && $ARGV[$[] !~ /^-./) { + $arg = shift(@ARGV); + } else { + $arg = ''; + } + } elsif (/=(.*)$/) { + warn "$0: option \`$name\' doesn't allow an argument\n"; + return ('?', ''); + } + } elsif (/^(-(.))(.*)/) { + # + # Short style option, which start with `-' (not `--'). + # + ($name, $ch, $getopt_long'shortrest) = ($1, $2, $3); + + if (defined($getopt_long'optnames{$name})) { + if ($getopt_long'argflags{$name} eq 'required-argument') { + if ($getopt_long'shortrest ne '') { + $arg = $getopt_long'shortrest; + $getopt_long'shortrest = ''; + } elsif (0 < @ARGV) { + $arg = shift(@ARGV); + } else { + # 1003.2 specifies the format of this message. + warn "$0: option requires an argument -- $ch\n"; + return ('?', ''); + } + } elsif ($getopt_long'argflags{$name} eq 'optional-argument') { + if ($getopt_long'shortrest ne '') { + $arg = $getopt_long'shortrest; + $getopt_long'shortrest = ''; + } elsif (0 < @ARGV && $ARGV[$[] !~ /^-./) { + $arg = shift(@ARGV); + } else { + $arg = ''; + } + } + } elsif (defined($ENV{'POSIXLY_CORRECT'})) { + # 1003.2 specifies the format of this message. + warn "$0: illegal option -- $ch\n"; + return ('?', ''); + } else { + warn "$0: invalid option -- $ch\n"; + return ('?', ''); + } + } else { + # + # Only RETURN_IN_ORDER falled into here. + # + $arg = $_; + } + + return ($getopt_long'optnames{$name}, $arg); +} + +1; +# +# Copyright (c) 1997-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +require 5.005; +use File::Basename; + +# Program name, program version and mailing address. +my $progname='ebappendix'; +my $version = '4.5-20200413'; +my $mailing_address = 'kzhr@d1.dion.ne.jp'; + +# Help message. +my $help = "Usage: $progname [option...] [input-directory] +Options: + -b BOOK-TYPE --book-type BOOK-TYPE + make an appendix as BOOK-TYPE; eb or epwing + (default: depend on \`catalog(s).app\') + -d --debug --verbose debug mode + -h --help output this help, then exit + -n --no-catalog don't output a catalog file + -o DIRECTORY --output-directory DIRECTORY + output files to DIRECTORY + (default: .) + -t --test only check for input files + -v --version output version number, then exit + +Argument: + input-directory input files at this directory + (default: .) + +Report bugs to $mailing_address. +"; + +# `try ...' message. +my $tryhelp = "try \`$0 --help\' for more information\n"; + +# Disc type: `eb' or `epwing'. +my $disc = ''; + +# Read files on the directory. +my $indir = '.'; + +# Create files under the directory. +my $outdir = '.'; + +# The maximum number of subbooks in a book. +my $max_subbooks = 50; + +# Subbook list. +my @subbooks = (); + +# The maximum length of an alternation text for a character. +my $maxlen_alt = 31; + +# The maximum length of a subbook name. +my $maxlen_subname = 8; + +# Page size. +my $size_page = 2048; + +# File mode for mkdir. +my $dirmode = umask ^ 0777; + +# Test mode flag. +my $check_only = 0; + +# Debug mode flag. +my $debug = 0; + +# No-catalog mode. +my $no_catalog = 0; + +# Show help then exit. +my $help_only = 0; + +# Show version then exit. +my $version_only = 0; + +# Command line options. +@long_options = ('-b --book-type required-argument', + '-d --debug --verbose no-argument', + '-h --help no-argument', + '-n --no-catalog no-argument', + '-o --output-directory required-argument', + '-t --test no-argument', + '-v --version no-argument'); + +# +# Parse command line options. +# +&getopt_initialize(@long_options); +while (($optname, $optarg) = &getopt_long) { + if ($optname eq '-b') { + if ($optarg !~ /^(eb|epwing)$/i) { + warn "$0: unknown book type \`$optarg\'\n"; + die $tryhelp; + } + $disc = lc($optarg); + } elsif ($optname eq '-d') { + $debug = 1; + } elsif ($optname eq '-h') { + print $help; + exit(0); + } elsif ($optname eq '-n') { + $no_catalog = 1; + } elsif ($optname eq '-o') { + $outdir = $optarg; + } elsif ($optname eq '-v') { + print "$progname (EB Library) version $version\n"; + print $copyright; + exit(0); + } elsif ($optname eq '-t') { + $check_only = 1; + } else { + die $tryhelp; + } +} + +$indir = shift if (0 < @ARGV); +if (@ARGV != 0) { + warn "$0: too many arguments\n"; + die $tryhelp; +} + +# +# Remove a slash (`/') in the tail of the directory names. +# +$indir =~ s/\/$//; +$outdir =~ s/\/$//; + +# +# Compose filenames. +# +my $infile = find_file($indir, 'catalog.app', 'undef'); +if (!defined($infile)) { + $infile = find_file($indir, 'catalogs.app', 'undef'); +} +if (!defined($infile)) { + die "catalog(s).app: no such file\n"; +} + +if ($disc ne 'eb' && $disc ne 'epwing') { + if (basename($infile) =~ /^catalog\.app/i) { + $disc = 'eb'; + } else { + $disc = 'epwing'; + } +} + +my $outfile; +if ($disc eq 'eb') { + $outfile = find_file($outdir, 'catalog', 'default'); +} else { + $outfile = find_file($outdir, 'catalogs', 'default'); +} + +# +# Open the `CATALOG(S).APP' file to read. +# +if (!open(CATALOG_APP, $infile)) { + die "$infile: cannot open the file, $!\n"; +} + +# +# Read a subbook list from `CATALOG(S).APP'. +# +while () { + s/^\s+//; + s/\s+$//; + next if (/^$/ || /^\#/); + push(@subbooks, lc($_)); +} + +# +# Checks for subbook names. +# +die "$infile: no subbooks described\n" if (@subbooks == 0); +die "$infile: too many subbooks\n" if ($max_subbooks < @subbooks); +foreach my $sub (@subbooks) { + die "$infile: invalid subbook name \`$sub\'\n" + if ($sub !~ /\w{1,$maxlen_subname}/); +} + +# +# Close the file `CATALOG(S).APP'. +# +close(CATALOG_APP); + +# +# Create the `CATALOG(S)' file. +# +if (!$check_only && !$no_catalog) { + # + # Open the `CATALOG(S)' file to write. + # + if (!open(CATALOG, "> $outfile")) { + die "$outfile: cannot open the file, $!\n"; + } + + # + # Write the number of subbooks in the book. + # + print CATALOG "\0", pack('C', scalar(@subbooks)), "\0" x 14; + + # + # Write subbook names. + # + for (my $i = 0; $i < @subbooks; $i++) { + if ($disc eq 'eb') { + print CATALOG pack('C', $i + 1), "\0"; + print CATALOG "\0" x 30; + print CATALOG uc($subbooks[$i]); + print CATALOG "\0" x ($maxlen_subname - length($subbooks[$i])); + } else { + print CATALOG pack('C', $i + 1), "\0"; + print CATALOG "\0" x 80; + print CATALOG uc($subbooks[$i]); + print CATALOG "\0" x ($maxlen_subname - length($subbooks[$i])); + print CATALOG "\0" x 74; + } + } + + # + # Close the `CATALOG(S)' file. + # + close(CATALOG); +} + +# +# Create `APPENDIX (or FUROKU)' files. +# +foreach my $sub (@subbooks) { + # + # Compose filenames. + # + $infile = find_file($indir, "$sub.app"); + die "$sub.app: no such file\n" if (!defined($infile)); + + if ($disc eq 'eb') { + $outfile = find_file($outdir, "$sub/appendix", 'default'); + } else { + $outfile = find_file($outdir, "$sub/data/furoku", 'default'); + } + $outfile =~ s|//+|/|g; + + # + # Open the `.APP' file to read. + # + if (!open(SUBBOOK_APP, $infile)) { + warn "$infile: cannot open the file, $!\n"; + next; + } + warn "$infile: debug: opened\n" if ($debug); + + my $narrow_def = 0; + my $narrow_start = 0; + my $narrow_start_def = 0; + my $narrow_end = 0; + my $narrow_end_def = 0; + my $narrow_len = 0; + my %narrow_alt = (); + my %narrow_lineno = (); + + my $wide_def = 0; + my $wide_start = 0; + my $wide_start_def = 0; + my $wide_end = 0; + my $wide_end_def = 0; + my $wide_len = 0; + my %wide_alt = (); + my %wide_lineno = (); + + my @stop = (); + my $stop_def = 0; + my $code = 'JISX0208'; + my $code_def = 0; + my $block = ''; + + my $start = \$narrow_start; + my $start_def = \$narrow_start_def; + my $end = \$narrow_end; + my $end_def = \$narrow_end_def; + my $alt = \%narrow_alt; + my $lineno = \%narrow_lineno; + + # + # Parse each line in `.APP'. + # + while () { + s/^\s+//; + s/\s+$//; + next if (/^$/ || /^\#/); + + my ($key, $arg) = split(/[ \t]+/, $_, 2); + + if ($key eq 'begin') { + # + # `begin ...' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: missing argument to \`$key\'\n" if ($arg eq ''); + + if ($arg eq 'narrow') { + # + # `begin narrow' + # + die "$infile:$.: block \`$arg\' is redefined\n" + if (0 < $narrow_def++); + + $block = $arg; + $start = \$narrow_start; + $start_def = \$narrow_start_def; + $end = \$narrow_end; + $end_def = \$narrow_end_def; + $alt = \%narrow_alt; + $lineno = \%narrow_lineno; + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($arg eq 'wide') { + # + # `begin wide' + # + die "$infile:$.: block \`$arg\' is redefined\n" + if (0 < $wide_def++); + + $block = $arg; + $start = \$wide_start; + $start_def = \$wide_start_def; + $end = \$wide_end; + $end_def = \$wide_end_def; + $alt = \%wide_alt; + $lineno = \%wide_lineno; + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } else { + die "$infile:$.: invalid argument \`$arg\'\n"; + } + + } elsif ($key eq 'end') { + # + # `end' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block eq ''); + die "$infile:$.: not allowed argument to \`$key\'\n" + if ($arg ne ''); + + $block = ''; + warn "$infile:$.: debug: $key\n" if ($debug); + + } elsif ($key eq 'range-start') { + # + # `range-start' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($arg !~ /^0[xX]([0-9a-fA-F]{4})$/); + die "$infile:$.: \`$key\' is redefined\n" if (0 < $$start_def++); + + $$start = hex($1); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key eq 'range-end') { + # + # `range-end' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($arg !~ /^0[xX]([0-9a-fA-F]{4})$/); + die "$infile:$.: \`$key\' is redefined\n" if (0 < $$end_def++); + + $$end = hex($1); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key =~ /^0[xX]/) { + # + # `0x' + # + die "$infile:$.: unexpected \`$key\'\n" + if ($block ne 'narrow' && $block ne 'wide'); + die "$infile:$.: incorrect hexadecimal number.\n" + if ($key !~ /^0[xX]([0-9a-fA-F]{4})$/); + + my $ch = hex($1); + $arg = &convert_to_euc($arg); + my $len = length($arg); + + die "$infile:$.: alternation string too long\n" + if ($maxlen_alt < $len); + die "$infile:$.: character \`$key\' redefined\n" + if (defined($alt->{$ch})); + + $alt->{$ch} = $arg; + $lineno->{$ch} = $.; + warn "$infile:$.: debug: $key\n" if ($debug); + + } elsif ($key eq 'character-code') { + # + # `character-code' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: \`$key\' redefined\n" if (0 < $code_def++); + die "$infile:$.: invalid character code \`$arg\'\n" + if ($arg !~ /^(JISX0208|ISO8859-1|UTF-8)$/i); + $code = uc($arg); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } elsif ($key eq 'stop-code') { + # + # `stop-code' + # + die "$infile:$.: unexpected \`$key\'\n" if ($block ne ''); + die "$infile:$.: \`$key\' redefined\n" if (0 < $stop_def++); + die "$infile:$.: invalid stop-code \`$arg\'\n" + if ($arg !~ /^0x1f(09|41)\s*0x([0-9a-f]{2})([0-9a-f]{2})$/i); + @stop = (0x1f, hex($1), hex($2), hex($3)); + warn "$infile:$.: debug: $key $arg\n" if ($debug); + + } else { + die "$infile:$.: unknown keyword \`$key\'\n"; + } + } + # End of parsing each line in `.APP'. + + # + # Close the `.APP' file. + # + close(SUBBOOK_APP); + warn "$infile: debug: closed\n" if ($debug); + + # + # Check for `character-code' definition. + # + die "$infile: missing \`character-code\'\n" + if ($code_def == 0 && ($narrow_def != 0 || $wide_def != 0)); + + # + # Check for the range of alternation. + # + if (0 < $narrow_def) { + die "$infile: missing \`range-start\' in the narrow block\n" + if ($narrow_start_def == 0); + die "$infile: missing \`range-end\' in the narrow block\n" + if ($narrow_end_def == 0); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $narrow_len = (($narrow_end >> 8) - ($narrow_start >> 8)) * 0x5e + + (($narrow_end & 0xff) - ($narrow_start & 0xff)) + 1; + } else { + $narrow_len = (($narrow_end >> 8) - ($narrow_start >> 8)) * 0xfe + + (($narrow_end & 0xff) - ($narrow_start & 0xff)) + 1; + } + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + while (my ($key, $arg) = each(%narrow_alt)) { + warn "$infile:$narrow_lineno{$key}: out of range\n" + if ($key < $narrow_start || $narrow_end < $key + || ($key & 0xff) < 0x21 || 0x7e < ($key & 0xff)); + } + } else { + while (my ($key, $arg) = each(%narrow_alt)) { + warn "$infile:$narrow_lineno{$key}: out of range\n" + if ($key < $narrow_start || $narrow_end < $key + || ($key & 0xff) < 0x01 || 0xfe < ($key & 0xff)); + } + } + } + + if (0 < $wide_def) { + die "$infile: missing \`range-start\' in the wide block\n" + if ($wide_start_def == 0); + die "$infile: missing \`range-end\' in the wide block\n" + if ($wide_end_def == 0); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $wide_len = (($wide_end >> 8) - ($wide_start >> 8)) * 0x5e + + (($wide_end & 0xff) - ($wide_start & 0xff)) + 1; + } else { + $wide_len = (($wide_end >> 8) - ($wide_start >> 8)) * 0xfe + + (($wide_end & 0xff) - ($wide_start & 0xff)) + 1; + } + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + while (my ($key, $arg) = each(%wide_alt)) { + warn "$infile:$wide_lineno{$key}: out of range\n" + if ($key < $wide_start || $wide_end < $key + || ($key & 0xff) < 0x21 || 0x7f < ($key & 0xff)); + } + } else { + while (my ($key, $arg) = each(%wide_alt)) { + warn "$infile:$wide_lineno{$key}: out of range\n" + if ($key < $wide_start || $wide_end < $key + || ($key & 0xff) < 0x01 || 0xfe < ($key & 0xff)); + } + } + } + + next if ($check_only); + + # + # Create a subdirectory for the subbook, if missing. + # + my $outsubdir = dirname($outfile); + if (mkinstalldirs($outsubdir, $dirmode)) { + warn "$outdir: debug: directory cleated\n" if ($debug); + } else { + die "$outdir: cannot create the directory, $!\n"; + } + + # + # Open the file `APPENDIX (or FUROKU)' to read. + # + if (!open(APPENDIX, "> $outfile")) { + die "$outfile: cannot open the file, $!\n"; + } + warn "$outfile: debug: opened\n" if ($debug); + + # + # Fill the index page with zero. + # + seek(APPENDIX, 0, 0); + print APPENDIX "\0" x $size_page; + + # + # Output alternation text for narrow font characters. + # + my $narrow_page = 0; + if (0 < $narrow_def) { + $narrow_page = int(1 + tell(APPENDIX) / $size_page); + + # + # Output alternation text. + # + my $i = $narrow_start; + while ($i <= $narrow_end) { + if (defined($narrow_alt{$i})) { + print APPENDIX $narrow_alt{$i}, "\0", + "\0" x ($maxlen_alt - length($narrow_alt{$i})); + } else { + print APPENDIX "\0" x 32; + } + printf STDERR "$outfile: debug: wrote 0x%04x\n", $i + if ($debug); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $i += (($i & 0xff) < 0x7e) ? 1 : 0xa3; + } else { + $i += (($i & 0xff) < 0xfe) ? 1 : 3; + } + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + } + + # + # Output alternation text for wide font characters. + # + my $wide_page = 0; + if (0 < $wide_def) { + $wide_page = 1 + int(tell(APPENDIX) / $size_page); + + # + # Output alternation text. + # + my $i = $wide_start; + while ($i <= $wide_end) { + if (defined($wide_alt{$i})) { + print APPENDIX $wide_alt{$i}, "\0", + "\0" x ($maxlen_alt - length($wide_alt{$i})); + } else { + print APPENDIX "\0" x 32; + } + printf STDERR "$outfile: debug: wrote 0x%04x\n", $i + if ($debug); + + if ($code eq 'JISX0208' || $code eq 'UTF-8') { + $i += (($i & 0xff) < 0x7e) ? 1 : 0xa3; + } else { + $i += (($i & 0xff) < 0xfe) ? 1 : 3; + } + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + } + + # + # Output a stop-code. + # + my $stop_page = 1 + int(tell(APPENDIX) / $size_page); + if (0 < $stop_def) { + print APPENDIX "\0\1", pack("C4", @stop); + warn "$outfile: debug: wrote stop-code\n" if ($debug); + } + my $pad = $size_page - tell(APPENDIX) % $size_page; + print APPENDIX "\0" x $pad if ($pad != 0); + + # + # Output an index page. + # + my %character_code_table = ( + 'ISO8859-1' => "\0\001", + 'JISX0208' => "\0\002", + 'UTF-8' => "\0\004", + ); + seek(APPENDIX, 0, 0); + print APPENDIX "\0\3", $character_code_table{$code}, "\0" x 12; + + if (0 < $narrow_def) { + print APPENDIX pack("N", $narrow_page), "\0" x 6, + pack("n n", $narrow_start, $narrow_len), "\0\0"; + } else { + print APPENDIX "\0" x 16; + } + + if (0 < $wide_def) { + print APPENDIX pack("N", $wide_page), "\0" x 6, + pack("n n", $wide_start, $wide_len), "\0\0"; + } else { + print APPENDIX "\0" x 16; + } + + if (0 < $stop_def) { + print APPENDIX pack("N", $stop_page), "\0" x 12; + } else { + print APPENDIX "\0" x 16; + } + + close(APPENDIX); + warn "$outfile: debug: closed\n" if ($debug); +} + +exit; + +# +# Find file $target under $dir. +# +sub find_file { + my ($dir, $target, $mode) = @_; + my $result = $dir; + my @target_entries = split(/\/+/, $target); + + for (my $i = 0; $i < @target_entries; $i++) { + my $found; + my $normalized_target_entry = lc($target_entries[$i]); + $normalized_target_entry =~ s/;\d$//; + $normalized_target_entry =~ s/\.$//; + + if (opendir(DIR, $result)) { + while (my $entry = readdir(DIR)) { + if ($i < @target_entries - 1) { + next if (! -d "$result/$entry"); + } else { + next if (! -f "$result/$entry"); + } + my $normalized_entry = lc($entry); + $normalized_entry =~ s/;\d$//; + $normalized_entry =~ s/\.$//; + if ($normalized_target_entry eq $normalized_entry) { + $found = $entry; + last; + } + } + closedir(DIR); + } + + if (defined($found)) { + $result = $result . '/' . $found; + } elsif ($mode eq 'undef') { + return undef; + } else { + $result = $result . '/' . $target_entries[$i]; + } + } + + return $result; +} + +sub dirname { + my ($dir) = @_; + my $result; + + if ($dir !~ /\//) { + $result = '.'; + } else { + $result = $dir; + $result =~ s/\/+[^\/]+$//; + } + + return $result; +} + +sub mkinstalldirs { + my ($dir, $mode) = @_; + my $path = ''; + + foreach my $d (split(/\/+/, $dir)) { + if ($path eq '') { + $path = ($dir =~ /^\//) ? '/' : $d; + } else { + $path = "$path/$d"; + } + next if (-d $path); + return 0 if (!mkdir($path, $mode)); + } + + return 1; +} + +# +# Convert a string to EUC JP. +# +sub convert_to_euc { + my ($s) = @_; + while ($s =~ /\033(\([BJ]|\$[\@B])/) { + $s =~ s/\033\$[\@B]([^\033]*)/&convert_to_euc_tr($1)/eg; + $s =~ s/\033\([BJ]([^\033]*)/$1/eg; + } + return $s; +} + +sub convert_to_euc_tr { + my ($s) = @_; + $s =~ tr/\041-\176/\241-\376/; + return $s; +} + +# Local Variables: +# mode: perl +# End: diff --git a/lib/ebu/ebfont/.deps/ebfont.Po b/lib/ebu/ebfont/.deps/ebfont.Po new file mode 100644 index 0000000..52b675a --- /dev/null +++ b/lib/ebu/ebfont/.deps/ebfont.Po @@ -0,0 +1,303 @@ +ebfont.o: ebfont.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/libintl.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../libebutils/getopt.h \ + ../libebutils/getumask.h ../libebutils/makedir.h ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebfont/.libs/ebufont b/lib/ebu/ebfont/.libs/ebufont new file mode 100644 index 0000000..f4c90e2 Binary files /dev/null and b/lib/ebu/ebfont/.libs/ebufont differ diff --git a/lib/ebu/ebfont/Makefile b/lib/ebu/ebfont/Makefile new file mode 100644 index 0000000..94022f2 --- /dev/null +++ b/lib/ebu/ebfont/Makefile @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebfont/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = ebufont$(EXEEXT) +subdir = ebfont +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebufont_OBJECTS = ebfont.$(OBJEXT) +ebufont_OBJECTS = $(am_ebufont_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebufont_SOURCES) +DIST_SOURCES = $(ebufont_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebfont +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebfont +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebufont_SOURCES = ebfont.c +ebufont_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebufont_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebfont/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebfont/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebufont$(EXEEXT): $(ebufont_OBJECTS) $(ebufont_DEPENDENCIES) + @rm -f ebufont$(EXEEXT) + $(LINK) $(ebufont_OBJECTS) $(ebufont_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/ebfont.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebfont/Makefile.am b/lib/ebu/ebfont/Makefile.am new file mode 100644 index 0000000..c3e4c28 --- /dev/null +++ b/lib/ebu/ebfont/Makefile.am @@ -0,0 +1,14 @@ +localedir = $(datadir)/locale + +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a + +bin_PROGRAMS = ebufont + +ebufont_SOURCES = ebfont.c +ebufont_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebufont_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) diff --git a/lib/ebu/ebfont/Makefile.in b/lib/ebu/ebfont/Makefile.in new file mode 100644 index 0000000..0448b8e --- /dev/null +++ b/lib/ebu/ebfont/Makefile.in @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ebufont$(EXEEXT) +subdir = ebfont +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebufont_OBJECTS = ebfont.$(OBJEXT) +ebufont_OBJECTS = $(am_ebufont_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebufont_SOURCES) +DIST_SOURCES = $(ebufont_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebufont_SOURCES = ebfont.c +ebufont_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebufont_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebfont/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebfont/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebufont$(EXEEXT): $(ebufont_OBJECTS) $(ebufont_DEPENDENCIES) + @rm -f ebufont$(EXEEXT) + $(LINK) $(ebufont_OBJECTS) $(ebufont_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebfont.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebfont/ebfont.c b/lib/ebu/ebfont/ebfont.c new file mode 100644 index 0000000..4a2d89d --- /dev/null +++ b/lib/ebu/ebfont/ebfont.c @@ -0,0 +1,1063 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebu/font.h" + +#ifdef HAVE_GETOPT_LOG +#include +#else +#include "getopt.h" +#endif +#include "getumask.h" +#include "makedir.h" +#include "ebutils.h" + +#ifndef HAVE_STRCASECMP +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Trick for difference of path notation between UNIX and DOS. + */ +#ifndef DOS_FILE_PATH +#define F_(path1, path2) (path1) +#else +#define F_(path1, path2) (path2) +#endif + +/* + * Command line options. + */ +static const char *short_options = "df:hi:o:S:v"; +static struct option long_options[] = { + {"debug", no_argument, NULL, 'd'}, + {"verbose", no_argument, NULL, 'd'}, + {"font-height", required_argument, NULL, 'f'}, + {"help", no_argument, NULL, 'h'}, + {"image-format", required_argument, NULL, 'i'}, + {"subbook", required_argument, NULL, 'S'}, + {"output-directory", required_argument, NULL, 'o'}, + {"version", no_argument, NULL, 'v'}, + {NULL, 0, NULL, 0} +}; + +/* + * Supported image formats. + */ +typedef int Image_Format_Code; + +typedef struct { + const char *name; + const char *suffix; + EB_Error_Code (*function)(const char *bitmap_data, int width, int height, + char *image_data, size_t *image_size); +} Image_Format; + +static Image_Format image_formats[] = { + {"xbm", "xbm", eb_bitmap_to_xbm}, + {"xpm", "xpm", eb_bitmap_to_xpm}, + {"gif", "gif", eb_bitmap_to_gif}, + {"bmp", "bmp", eb_bitmap_to_bmp}, + {"png", "png", eb_bitmap_to_png}, + {NULL, NULL, NULL} +}; + +#define MAX_IMAGE_FORMATS 5 +#define MAX_LENGTH_IMAGE_NAME 3 +#define MAX_LENGTH_IMAGE_SUFFIX 3 + +/* + * Program name and version. + */ +static const char *program_name = "ebfont"; +static const char *program_version = VERSION; +static const char *invoked_name; + +/* + * Debug flag. + */ +static int debug_flag; + +/* + * List of target subbook names. + */ +char subbook_name_list[EB_MAX_SUBBOOKS][EB_MAX_DIRECTORY_NAME_LENGTH + 1]; +int subbook_name_count = 0; + +/* + * List of target subbook codes. + */ +static EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; +static int subbook_count = 0; + +/* + * List of target font heights. + */ +static EB_Font_Code font_list[EB_MAX_FONTS]; +static int font_count = 0; + +/* + * Target Image formats. + */ +static Image_Format_Code image_list[MAX_IMAGE_FORMATS]; +static int image_count = 0; + +/* + * Defaults and limitations. + */ +#define DEFAULT_FONT_HEIGHT "16" +#define DEFAULT_IMAGE_FORMAT "xbm" +#define DEFAULT_BOOK_DIRECTORY "." +#define DEFAULT_OUTPUT_DIRECTORY "." + +#define MAX_LENGTH_FONT_NAME 2 +#define MAX_LENGTH_STRING 255 + +/* + * Unexported functions. + */ +static int parse_font_argument(const char *argument, EB_Font_Code *font_list, + int *font_count); +static int parse_image_argument(const char *argument, + Image_Format_Code *image_list, int *image_count); +static void output_help(void); +static int make_book_fonts(EB_Book *book, const char *out_path, + EB_Subbook_Code *subbook_list, int subbook_count, EB_Font_Code *font_list, + int font_count, Image_Format_Code *image_list, int image_count); +static int make_subbook_fonts(EB_Book *book, const char *subbook_path, + EB_Font_Code *font_list, int font_count, Image_Format_Code *image_list, + int image_count); +static int make_subbook_size_fonts(EB_Book *book, const char *font_path, + Image_Format_Code *image_list, int image_count); +static int make_subbook_size_image_fonts(EB_Book *book, const char *image_path, + Image_Format_Code image); +static int save_image_file(const char *file_name, const char *image_data, + size_t image_size); + + +int +main(int argc, char *argv[]) +{ + const char *book_path; + char out_path[PATH_MAX + 1]; + EB_Error_Code error_code; + EB_Book book; + int ch; + + invoked_name = argv[0]; + debug_flag = 0; + strcpy(out_path, DEFAULT_OUTPUT_DIRECTORY); + + /* + * Initialize locale data. + */ +#ifdef ENABLE_NLS +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain(TEXT_DOMAIN_NAME, LOCALEDIR); + textdomain(TEXT_DOMAIN_NAME); +#endif + + /* + * Initialize `book'. + */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto die; + } + eb_initialize_book(&book); + + /* + * Parse command line options. + */ + for (;;) { + ch = getopt_long(argc, argv, short_options, long_options, NULL); + if (ch == -1) + break; + switch (ch) { + case 'd': + /* + * Option `-d'. Debug mode. + */ + debug_flag = 1; + break; + + case 'f': + /* + * Option `-f'. Generate fonts with HEIGHT. + */ + if (parse_font_argument(optarg, font_list, &font_count) < 0) { + output_try_help(invoked_name); + goto die; + } + break; + + case 'h': + /* + * Option `-h'. Display help message, then exit. + */ + output_help(); + exit(0); + + case 'i': + /* + * Option `-i'. Generate fonts as FORMAT. + */ + if (parse_image_argument(optarg, image_list, &image_count) < 0) { + output_try_help(invoked_name); + goto die; + } + break; + + case 'o': + /* + * Option `-o'. Output fonts under DIRECTORY. + * The file names of fonts are: + * "//fonts//{narrow,wide}/ + * ." + * + * : is `optarg'. + * : require EB_MAX_DIRECTORY_NAME_LENGTH characters. + * fonts: require 5 characters. + * : require 2 characters ("16", "24", "32", or "48"). + * {narrow,wide}: + * requre 6 characters (= strlen("narrow")). + * : requre 4 characters. ("0000" ... "ffff") + * : requre MAX_LENGTH_IMAGE_SUFFIX characters. + */ + if (PATH_MAX < strlen(optarg)) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + goto die; + } + strcpy(out_path, optarg); + canonicalize_path(out_path); + if (PATH_MAX < strlen(out_path) + 1 + EB_MAX_DIRECTORY_NAME_LENGTH + + 1 + 5 + 1 + 2 + 1 + 6 + 1 + 4 + 1 + + MAX_LENGTH_IMAGE_SUFFIX) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + goto die; + } + break; + + case 'S': + /* + * Option `-S'. Specify target subbooks. + */ + if (parse_subbook_name_argument(invoked_name, optarg, + subbook_name_list, &subbook_name_count) < 0) { + output_try_help(invoked_name); + goto die; + } + break; + + case 'v': + /* + * Option `-v'. Display version number, then exit. + */ + output_version(program_name, program_version); + exit(0); + + default: + output_try_help(invoked_name); + goto die; + } + } + + /* + * Check the number of rest arguments. + */ + if (1 < argc - optind) { + fprintf(stderr, _("%s: too many arguments\n"), invoked_name); + output_try_help(invoked_name); + goto die; + } + + if (image_count == 0) + parse_image_argument(DEFAULT_IMAGE_FORMAT, image_list, &image_count); + + if (font_count == 0) + parse_font_argument(DEFAULT_FONT_HEIGHT, font_list, &font_count); + + /* + * Set a book path. + */ + if (argc == optind) + book_path = DEFAULT_BOOK_DIRECTORY; + else + book_path = argv[optind]; + + /* + * Bind a book. + */ + error_code = eb_bind(&book, book_path); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto die; + } + + /* + * For each targe subbook, convert a subbook-names to a subbook-codes. + * If no subbook is specified by `--subbook'(`-S'), set all subbooks + * as the target. + */ + if (subbook_name_count == 0) { + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto die; + } + } else { + int i; + EB_Subbook_Code sub; + + for (i = 0; i < subbook_name_count; i++) { + error_code = find_subbook(&book, subbook_name_list[i], &sub); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: unknown subbook name `%s'\n"), + invoked_name, subbook_name_list[i]); + } + subbook_list[subbook_count++] = sub; + } + } + + /* + * Make image files for fonts in the book. + */ + if (make_book_fonts(&book, out_path, subbook_list, subbook_count, + font_list, font_count, image_list, image_count) < 0) + goto die; + + /* + * Dispose the book. + */ + eb_finalize_book(&book); + eb_finalize_library(); + + return 0; + + /* + * A critical error occurs... + */ + die: + fflush(stderr); + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} + + +/* + * Parse an argument to option `--font-height (-f)' + */ +static int +parse_font_argument(const char *argument, EB_Font_Code *font_list, + int *font_count) +{ + const char *argument_p = argument; + char font_name[MAX_LENGTH_FONT_NAME + 1]; + char *font_name_p; + EB_Font_Code font_code; + int i; + + while (*argument_p != '\0') { + /* + * Take a next element in the argument. + */ + i = 0; + font_name_p = font_name; + while (*argument_p != ',' && *argument_p != '\0' + && i < MAX_LENGTH_FONT_NAME) { + *font_name_p = *argument_p; + i++; + font_name_p++; + argument_p++; + } + *font_name_p = '\0'; + if (*argument_p == ',') + argument_p++; + else if (*argument_p != '\0') { + fprintf(stderr, _("%s: unknown font height `%s...'\n"), + invoked_name, font_name); + goto failed; + } + + /* + * Check for the font name. + */ + if (strcmp(font_name, "16") == 0) + font_code = EB_FONT_16; + else if (strcmp(font_name, "24") == 0) + font_code = EB_FONT_24; + else if (strcmp(font_name, "30") == 0) + font_code = EB_FONT_30; + else if (strcmp(font_name, "48") == 0) + font_code = EB_FONT_48; + else { + fprintf(stderr, _("%s: unknown font height `%s'\n"), + invoked_name, font_name); + fflush(stderr); + goto failed; + } + + /* + * If the font name is not found in `font_list', it is added to + * the list. + */ + for (i = 0; i < *font_count; i++) { + if (*(font_list + i) == font_code) + break; + } + if (*font_count <= i) { + *(font_list + i) = font_code; + (*font_count)++; + } + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Parse an argument to option `--font-image-format (-i)' + */ +static int +parse_image_argument(const char *argument, Image_Format_Code *image_list, + int *image_count) +{ + const char *argument_p = argument; + char image_name[MAX_LENGTH_IMAGE_NAME + 1]; + char *image_name_p; + int image_code; + int i; + + while (*argument_p != '\0') { + /* + * Take a next element in the argument. + */ + i = 0; + image_name_p = image_name; + while (*argument_p != ',' && *argument_p != '\0' + && i < MAX_LENGTH_IMAGE_NAME) { + *image_name_p = *argument_p; + i++; + image_name_p++; + argument_p++; + } + *image_name_p = '\0'; + if (*argument_p == ',') + argument_p++; + else if (*argument_p != '\0') { + fprintf(stderr, _("%s: unknown image format name `%s...'\n"), + invoked_name, image_name); + goto failed; + } + + /* + * Check for the image-format name. + */ + for (i = 0; i < MAX_IMAGE_FORMATS; i++) { + if (strcasecmp((image_formats + i)->name, image_name) == 0) + break; + } + if (MAX_IMAGE_FORMATS <= i) { + fprintf(stderr, _("%s: unknown image format name `%s'\n"), + invoked_name, image_name); + goto failed; + } + image_code = i; + + /* + * If the image-format name is not found in `image_list', it + * is added to the list. + */ + for (i = 0; i < *image_count; i++) { + if (*(image_list + i) == image_code) + break; + } + if (*image_count <= i) { + *(image_list + i) = image_code; + (*image_count)++; + } + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Output help message to standard out, then exit. + */ +static void +output_help(void) +{ + printf(_("Usage: %s [option...] [book-directory]\n"), program_name); + printf(_("Options:\n")); + printf(_(" -d --debug --verbose degug mode\n")); + printf(_(" -f HEIGHT[,HEIGHT...] --font-height HEIGHT[,HEIGHT...]\n")); + printf(_(" generate fonts with HEIGHT; 16, 24, 30 or 48\n")); + printf(_(" (default: %s)\n"), + DEFAULT_FONT_HEIGHT); + printf(_(" -h --help display this help, then exit\n")); + printf(_(" -i FORMAT[,FORMAT...] --image-format FORMAT[,FORMAT...]\n")); + printf(_(" generate fonts as FORMAT;\n")); + printf(_(" xbm, xpm, gif, bmp or png\n")); + printf(_(" (default: %s)\n"), + DEFAULT_IMAGE_FORMAT); + printf(_(" -o DIRECTORY --output-directory DIRECTORY\n")); + printf(_(" output fonts under DIRECTORY\n")); + printf(_(" (default: %s)\n"), + DEFAULT_OUTPUT_DIRECTORY); + printf(_(" -S SUBBOOK[,SUBBOOK...] --subbook SUBBOOK[,SUBBOOK...]\n")); + printf(_(" target subbook\n")); + printf(_(" (default: all subbooks)\n")); + printf(_(" -v --version display version number, then exit\n")); + printf(_("\nArgument:\n")); + printf(_(" book-directory top directory of a CD-ROM book\n")); + printf(_(" (default: %s)\n"), + DEFAULT_BOOK_DIRECTORY); + printf(_("\nReport bugs to %s.\n"), MAILING_ADDRESS); + fflush(stdout); +} + + +/* + * Make font-files in the `book_path'. + */ +static int +make_book_fonts(EB_Book *book, const char *out_path, + EB_Subbook_Code *subbook_list, int subbook_count, EB_Font_Code *font_list, + int font_count, Image_Format_Code *image_list, int image_count) +{ + EB_Error_Code error_code; + char subbook_path[PATH_MAX + 1]; + char subbook_directory[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int i; + + /* + * If `book_path' represents "/", replace it to an empty string, + * or `file_name' starts with double slashes. + */ + if (strcmp(out_path, "/") == 0) + out_path++; + + for (i = 0; i < subbook_count; i++) { + /* + * Set the current subbook to `subbook_list[i]'. + */ + error_code = eb_set_subbook(book, subbook_list[i]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%d\n", invoked_name, + eb_error_message(error_code), subbook_list[i]); + goto failed; + } + + /* + * Get directory name of the subbook. + */ + error_code = eb_subbook_directory(book, subbook_directory); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%d\n", invoked_name, + eb_error_message(error_code), subbook_list[i]); + goto failed; + } + + /* + * Output debug information. + */ + if (debug_flag) { + fprintf(stderr, "%s: debug: subbook %s\n", invoked_name, + subbook_directory); + } + + /* + * Make a directory for the subbook. + */ + sprintf(subbook_path, F_("%s/%s", "%s\\%s"), + out_path, subbook_directory); + if (make_missing_directory(subbook_path, 0777 ^ get_umask()) < 0) + goto failed; + + /* + * Make fonts in the subbook. + */ + if (make_subbook_fonts(book, subbook_path, font_list, font_count, + image_list, image_count) < 0) + goto failed; + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Make font-files in the current subbook. + */ +static int +make_subbook_fonts(EB_Book *book, const char *subbook_path, + EB_Font_Code *font_list, int font_count, Image_Format_Code *image_list, + int image_count) +{ + EB_Error_Code error_code; + char subbook_directory[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char font_path[PATH_MAX + 1]; + int font_height; + int i; + + /* + * Get the current subbook name. + */ + error_code = eb_subbook_directory(book, subbook_directory); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto failed; + } + + if (debug_flag) { + fprintf(stderr, "%s: debug: subbook %s:\n", invoked_name, + subbook_directory); + } + + for (i = 0; i < font_count; i++) { + /* + * Set the current font to `font_list[i]'. + */ + if (!eb_have_font(book, font_list[i])) + continue; + error_code = eb_set_font(book, font_list[i]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d\n", invoked_name, + eb_error_message(error_code), subbook_directory, i); + goto failed; + } + + /* + * Output debug information. + */ + if (debug_flag) { + fprintf(stderr, "%s: debug: font %d\n", invoked_name, + font_list[i]); + } + + /* + * Make a directory for the font. + */ + eb_font_height2(font_list[i], &font_height); + sprintf(font_path, F_("%s/%d", "%s\\%d"), subbook_path, font_height); + if (make_missing_directory(font_path, 0777 ^ get_umask()) < 0) + goto failed; + + /* + * Make font-files with the size. + */ + if (make_subbook_size_fonts(book, font_path, image_list, image_count) + < 0) + goto failed; + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Make font-files of the current font. + */ +static int +make_subbook_size_fonts(EB_Book *book, const char *font_path, + Image_Format_Code *image_list, int image_count) +{ + EB_Error_Code error_code; + char subbook_directory[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int i; + + /* + * Get the current subbook name. + */ + error_code = eb_subbook_directory(book, subbook_directory); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto failed; + } + + for (i = 0; i < image_count; i++) { + /* + * Output debug information. + */ + if (debug_flag) { + fprintf(stderr, "%s: debug: image %s\n", invoked_name, + image_formats[image_list[i]].name); + } + + /* + * Make font-files as the image format. + */ + if (make_subbook_size_image_fonts(book, font_path, image_list[i]) < 0) + goto failed; + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Make font-files of the current font as the image format. + */ +static int +make_subbook_size_image_fonts(EB_Book *book, const char *image_path, + Image_Format_Code image) +{ + EB_Error_Code error_code; + char subbook_directory[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char type_path[PATH_MAX + 1]; + char file_name[PATH_MAX + 1]; + char bitmap_data[EB_SIZE_WIDE_FONT_48]; + char image_data[EB_SIZE_FONT_IMAGE]; + size_t image_size; + int image_width; + int image_height; + int character_number; + + /* + * Get the current subbook name. + */ + error_code = eb_subbook_directory(book, subbook_directory); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto failed; + } + + /* + * Get the current font size. + */ + error_code = eb_font_height(book, &image_height); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s\n", invoked_name, + eb_error_message(error_code), subbook_directory); + goto failed; + } + + /* + * Make the bitmap files of narrow fonts. + */ + if (eb_have_narrow_font(book)) { + /* + * Get narrow font information. + */ + error_code = eb_narrow_font_width(book, &image_width); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=narrow\n", + invoked_name, eb_error_message(error_code), subbook_directory, + image_height); + goto failed; + } + error_code = eb_narrow_font_start(book, &character_number); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=narrow\n", + invoked_name, eb_error_message(error_code), subbook_directory, + image_height); + goto failed; + } + + /* + * Make a directory for the narrow font. + */ + sprintf(type_path, F_("%s/narrow", "%s\\narrow"), image_path); + if (make_missing_directory(type_path, 0777 ^ get_umask()) < 0) + goto failed; + + while (0 <= character_number) { + /* + * Output debug information. + */ + if (debug_flag) { + fprintf(stderr, "%s: debug: character %04x\n", invoked_name, + character_number); + } + + /* + * Generate a bitmap file for the character `character_number'. + */ + sprintf(file_name, F_("%s/%04x.%s", "%s\\%04x.%s"), + type_path, character_number, image_formats[image].suffix); + error_code = eb_narrow_font_character_bitmap(book, + character_number, bitmap_data); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=narrow, \ +character=0x%04x\n", + invoked_name, eb_error_message(error_code), + subbook_directory, image_height, character_number); + goto failed; + } + + error_code = (image_formats[image].function)(bitmap_data, + image_width, image_height, image_data, &image_size); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=narrow, \ +character=0x%04x\n", + invoked_name, eb_error_message(error_code), + subbook_directory, image_height, character_number); + goto failed; + } + if (save_image_file(file_name, image_data, image_size) < 0) + goto failed; + + /* + * Toward next charahacter. + */ + eb_forward_narrow_font_character(book, 1, &character_number); + } + } + + /* + * Make the bitmap files of wide fonts. + */ + if (eb_have_wide_font(book)) { + /* + * Get wide font information. + */ + error_code = eb_wide_font_width(book, &image_width); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=wide\n", + invoked_name, eb_error_message(error_code), subbook_directory, + image_height); + goto failed; + } + error_code = eb_wide_font_start(book, &character_number); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=wide\n", + invoked_name, eb_error_message(error_code), subbook_directory, + image_height); + goto failed; + } + + /* + * Make a directory for the wide font. + */ + sprintf(type_path, F_("%s/wide", "%s\\wide"), image_path); + if (make_missing_directory(type_path, 0777 ^ get_umask()) < 0) + goto failed; + + while (0 <= character_number) { + /* + * Output debug information. + */ + if (debug_flag) { + fprintf(stderr, "%s: debug: character %04x\n", invoked_name, + character_number); + } + + /* + * Generate a bitmap file for the character `character_number'. + */ + sprintf(file_name, F_("%s/%04x.%s", "%s\\%04x.%s"), + type_path, character_number, image_formats[image].suffix); + error_code = eb_wide_font_character_bitmap(book, character_number, + bitmap_data); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=wide, \ +character=0x%04x\n", + invoked_name, eb_error_message(error_code), + subbook_directory, image_height, character_number); + goto failed; + } + + error_code = (image_formats[image].function)(bitmap_data, + image_width, image_height, image_data, &image_size); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: subbook=%s, font=%d, type=narrow, \ +character=0x%04x\n", + invoked_name, eb_error_message(error_code), + subbook_directory, image_height, character_number); + goto failed; + } + if (save_image_file(file_name, image_data, image_size) < 0) + goto failed; + + /* + * Toward next charahacter. + */ + eb_forward_wide_font_character(book, 1, &character_number); + } + } + + return 0; + + /* + * An error occurs... + */ + failed: + fflush(stderr); + return -1; +} + + +/* + * Save an image file. + */ +static int +save_image_file(const char *file_name, const char *image_data, + size_t image_size) +{ + int file = -1; + +#ifdef O_CREAT + file = open(file_name, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, + 0666 ^ get_umask()); +#else + file = creat(file_name, 0666 ^ get_umask()); +#endif + + if (file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + if (write(file, image_data, image_size) != image_size) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + if (close(file) < 0) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + file = -1; + goto failed; + } + + return 0; + + /* + * An error occurs... + */ + failed: + if (0 <= file && close(file) < 0) { + fprintf(stderr, _("%s: failed to close the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + } + + return -1; +} + diff --git a/lib/ebu/ebfont/ebufont b/lib/ebu/ebfont/ebufont new file mode 100644 index 0000000..939ff15 --- /dev/null +++ b/lib/ebu/ebfont/ebufont @@ -0,0 +1,210 @@ +#! /bin/bash + +# ebufont - temporary wrapper script for .libs/ebufont +# Generated by libtool (GNU libtool) 2.4.6 +# +# The ebufont program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../ebu/libebu.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "ebufont:ebufont:$LINENO: libtool wrapper (GNU libtool) 2.4.6" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "ebufont:ebufont:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "ebufont:ebufont:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='ebufont' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/mnt/d/files/projects/ebclient/lib/ebu/ebu/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/lib/ebu/ebinfo/.deps/ebinfo.Po b/lib/ebu/ebinfo/.deps/ebinfo.Po new file mode 100644 index 0000000..fe9595f --- /dev/null +++ b/lib/ebu/ebinfo/.deps/ebinfo.Po @@ -0,0 +1,245 @@ +ebinfo.o: ebinfo.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h ../ebu/eb.h ../ebu/defs.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h ../ebu/sysdefs.h \ + ../ebu/zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/booklist.h ../libebutils/getopt.h \ + ../libebutils/ebutils.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/libintl.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +../ebu/eb.h: + +../ebu/defs.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/booklist.h: + +../libebutils/getopt.h: + +../libebutils/ebutils.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: diff --git a/lib/ebu/ebinfo/.libs/ebuinfo b/lib/ebu/ebinfo/.libs/ebuinfo new file mode 100644 index 0000000..0ae1bcf Binary files /dev/null and b/lib/ebu/ebinfo/.libs/ebuinfo differ diff --git a/lib/ebu/ebinfo/Makefile b/lib/ebu/ebinfo/Makefile new file mode 100644 index 0000000..d4dcd8a --- /dev/null +++ b/lib/ebu/ebinfo/Makefile @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebinfo/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = ebuinfo$(EXEEXT) +subdir = ebinfo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebuinfo_OBJECTS = ebinfo.$(OBJEXT) +ebuinfo_OBJECTS = $(am_ebuinfo_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebuinfo_SOURCES) +DIST_SOURCES = $(ebuinfo_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebinfo +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebinfo +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebuinfo_SOURCES = ebinfo.c +ebuinfo_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuinfo_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebinfo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebinfo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebuinfo$(EXEEXT): $(ebuinfo_OBJECTS) $(ebuinfo_DEPENDENCIES) + @rm -f ebuinfo$(EXEEXT) + $(LINK) $(ebuinfo_OBJECTS) $(ebuinfo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/ebinfo.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebinfo/Makefile.am b/lib/ebu/ebinfo/Makefile.am new file mode 100644 index 0000000..98e0e53 --- /dev/null +++ b/lib/ebu/ebinfo/Makefile.am @@ -0,0 +1,14 @@ +localedir = $(datadir)/locale + +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a + +bin_PROGRAMS = ebuinfo + +ebuinfo_SOURCES = ebinfo.c +ebuinfo_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuinfo_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) diff --git a/lib/ebu/ebinfo/Makefile.in b/lib/ebu/ebinfo/Makefile.in new file mode 100644 index 0000000..0c042a4 --- /dev/null +++ b/lib/ebu/ebinfo/Makefile.in @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ebuinfo$(EXEEXT) +subdir = ebinfo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebuinfo_OBJECTS = ebinfo.$(OBJEXT) +ebuinfo_OBJECTS = $(am_ebuinfo_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebuinfo_SOURCES) +DIST_SOURCES = $(ebuinfo_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebuinfo_SOURCES = ebinfo.c +ebuinfo_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuinfo_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebinfo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebinfo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebuinfo$(EXEEXT): $(ebuinfo_OBJECTS) $(ebuinfo_DEPENDENCIES) + @rm -f ebuinfo$(EXEEXT) + $(LINK) $(ebuinfo_OBJECTS) $(ebuinfo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebinfo.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebinfo/ebinfo.c b/lib/ebu/ebinfo/ebinfo.c new file mode 100644 index 0000000..c3a92f5 --- /dev/null +++ b/lib/ebu/ebinfo/ebinfo.c @@ -0,0 +1,631 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebu/font.h" +#include "ebu/booklist.h" + +#ifdef HAVE_GETOPT_LOG +#include +#else +#include "getopt.h" +#endif +#include "ebutils.h" + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Unexported functions. + */ +static void output_error_message(EB_Error_Code error_code); +static EB_Error_Code output_booklist(const char *url); +static EB_Error_Code output_information(const char *book_path, int multi_flag); +static EB_Error_Code output_multi_information(EB_Book *book); +static void output_help(void); + +/* + * Program name and version. + */ +static const char *program_name = "ebinfo"; +static const char *program_version = VERSION; +static const char *invoked_name; + +/* + * Command line options. + */ +static const char *short_options = "hlmv"; +static struct option long_options[] = { + {"help", no_argument, NULL, 'h'}, + {"book-list", no_argument, NULL, 'l'}, + {"multi-search", no_argument, NULL, 'm'}, + {"version", no_argument, NULL, 'v'}, + {NULL, 0, NULL, 0} +}; + +/* + * Default output directory + */ +#define DEFAULT_BOOK_DIRECTORY "." + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + int ch; + char *book_path; + int booklist_flag; + int multi_flag; + + invoked_name = argv[0]; + + /* + * Initialize locale data. + */ +#ifdef ENABLE_NLS +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain(TEXT_DOMAIN_NAME, LOCALEDIR); + textdomain(TEXT_DOMAIN_NAME); +#endif + + /* + * Parse command line options. + */ + multi_flag = 0; + booklist_flag = 0; + + for (;;) { + ch = getopt_long(argc, argv, short_options, long_options, NULL); + if (ch == -1) + break; + switch (ch) { + case 'h': + /* + * Option `-h'. Display help message, then exit. + */ + output_help(); + exit(0); + + case 'l': + /* + * Option `-l'. Display book list on an EBNET server. + */ + booklist_flag = 1; + break; + + case 'm': + /* + * Option `-m'. Also output multi-search information. + */ + multi_flag = 1; + break; + + case 'v': + /* + * Option `-v'. Display version number, then exit. + */ + output_version(program_name, program_version); + exit(0); + + default: + output_try_help(invoked_name); + exit(1); + } + } + + /* + * Check the number of rest arguments. + */ + if (1 < argc - optind) { + fprintf(stderr, _("%s: too many arguments\n"), invoked_name); + output_try_help(invoked_name); + exit(1); + } + + /* + * Output information about the book. + */ + if (argc == optind) + book_path = DEFAULT_BOOK_DIRECTORY; + else + book_path = argv[optind]; + + if (booklist_flag) + error_code = output_booklist(book_path); + else + error_code = output_information(book_path, multi_flag); + if (error_code != EB_SUCCESS) + exit(1); + + return 0; +} + + +/* + * Output an error message to standard error. + */ +static void +output_error_message(EB_Error_Code error_code) +{ + fprintf(stderr, "%s: %s\n", invoked_name, eb_error_message(error_code)); + fflush(stderr); +} + + +/* + * Output a list of books that an EBNET server provides. + */ +static EB_Error_Code +output_booklist(const char *url) +{ + EB_BookList booklist; + EB_Error_Code error_code; + int book_count; + char *name; + char *title; + size_t name_length; + int i; + + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return error_code; + } + + eb_initialize_booklist(&booklist); + + error_code = eb_bind_booklist(&booklist, url); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return error_code; + } + + printf("%-20s %s\n", _("Name"), _("Title")); + + error_code = eb_booklist_book_count(&booklist, &book_count); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return error_code; + } + + for (i = 0; i < book_count; i++) { + error_code = eb_booklist_book_name(&booklist, i, &name); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + break; + } + error_code = eb_booklist_book_title(&booklist, i, &title); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + break; + } + + name_length = strlen(name); + + printf("%-20s ", name); + fputs_eucjp_to_locale(title, stdout); + if (4 < name_length && strcmp(name + name_length - 4, ".app") == 0) + fputs(" (appendix)", stdout); + fputc('\n', stdout); + } + + eb_finalize_booklist(&booklist); + eb_finalize_library(); + + return EB_SUCCESS; +} + + +/* + * Output information about the book at `path'. + * If `multi_flag' is enabled, multi-search information are also output. + */ +static EB_Error_Code +output_information(const char *book_path, int multi_flag) +{ + EB_Book book; + EB_Error_Code return_code = EB_SUCCESS; + EB_Error_Code error_code; + EB_Disc_Code disc_code; + EB_Character_Code character_code; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + EB_Font_Code font_list[EB_MAX_FONTS]; + char title[EB_MAX_TITLE_LENGTH + 1]; + char directory[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int font_height, font_start, font_end; + int subbook_count; + int font_count; + int i, j; + + /* + * Start to use a book. + */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + goto failed; + } + eb_initialize_book(&book); + error_code = eb_bind(&book, book_path); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + goto failed; + } + + /* + * Output disc type. + */ + error_code = eb_disc_type(&book, &disc_code); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + goto failed; + } + printf(_("disc type: ")); + if (disc_code == EB_DISC_EB) + printf("EB/EBG/EBXA/EBXA-C/S-EBXA\n"); + else + printf("EPWING\n"); + + /* + * Output character code. + */ + error_code = eb_character_code(&book, &character_code); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + goto failed; + } + printf(_("character code: ")); + switch (character_code) { + case EB_CHARCODE_ISO8859_1: + printf("ISO 8859-1\n"); + break; + case EB_CHARCODE_JISX0208: + printf("JIS X 0208\n"); + break; + case EB_CHARCODE_JISX0208_GB2312: + printf("JIS X 0208 + GB 2312\n"); + break; + case EB_CHARCODE_UTF8: + printf("UTF-8\n"); + break; + default: + printf(_("unknown\n")); + break; + } + + /* + * Output the number of subbooks in the book. + */ + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + goto failed; + } + printf(_("the number of subbooks: %d\n\n"), subbook_count); + + /* + * Output information about each subbook. + */ + for (i = 0; i < subbook_count; i++) { + printf(_("subbook %d:\n"), i + 1); + + /* + * Output a title of the subbook. + */ + error_code = eb_subbook_title2(&book, subbook_list[i], title); + if (error_code != EB_SUCCESS) { + return_code = error_code; + continue; + } + fputs(_(" title: "), stdout); + fputs_eucjp_to_locale(title, stdout); + fputc('\n', stdout); + + /* + * Output a directory name of the subbook. + */ + error_code = eb_subbook_directory2(&book, subbook_list[i], directory); + if (error_code != EB_SUCCESS) { + return_code = error_code; + continue; + } + printf(_(" directory: %s\n"), directory); + + /* + * Set the current subbook to `i'. + */ + error_code = eb_set_subbook(&book, subbook_list[i]); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + continue; + } + + /* + * Output supported methods. + */ + printf(_(" search methods: ")); + if (eb_have_word_search(&book)) + fputs(_("word "), stdout); + if (eb_have_endword_search(&book)) + fputs(_("endword "), stdout); + if (eb_have_keyword_search(&book)) + fputs(_("keyword "), stdout); + if (eb_have_cross_search(&book)) + fputs(_("cross "), stdout); + if (eb_have_multi_search(&book)) + fputs(_("multi "), stdout); + if (eb_have_menu(&book)) + fputs(_("menu "), stdout); + if (eb_have_image_menu(&book)) + fputs(_("image-menu "), stdout); + if (eb_have_copyright(&book)) + fputs(_("copyright "), stdout); + if (eb_have_color_chart(&book)) + fputs(_("color-chart "), stdout); + fputc('\n', stdout); + + /* + * Output a font list. + */ + fputs(_(" font sizes: "), stdout); + error_code = eb_font_list(&book, font_list, &font_count); + if (error_code != EB_SUCCESS) { + fputc('\n', stdout); + output_error_message(error_code); + return_code = error_code; + } else { + for (j = 0; j < font_count; j++) { + error_code = eb_font_height2(font_list[j], &font_height); + if (error_code == EB_SUCCESS) + printf("%d ", font_height); + else { + output_error_message(error_code); + return_code = error_code; + } + } + fputc('\n', stdout); + } + + /* + * Output character range of the narrow font. + */ + fputs(_(" narrow font characters: "), stdout); + if (eb_have_narrow_font(&book)) { + do { + error_code = eb_set_font(&book, font_list[0]); + if (error_code != EB_SUCCESS) + break; + error_code = eb_narrow_font_start(&book, &font_start); + if (error_code != EB_SUCCESS) + break; + error_code = eb_narrow_font_end(&book, &font_end); + if (error_code != EB_SUCCESS) + break; + } while (0); + + if (error_code == EB_SUCCESS) + printf("0x%04x -- 0x%04x\n", font_start, font_end); + else { + fputc('\n', stdout); + output_error_message(error_code); + return_code = error_code; + } + } else { + fputc('\n', stdout); + } + + /* + * Output character range of the wide font. + */ + printf(_(" wide font characters: ")); + if (eb_have_wide_font(&book)) { + do { + error_code = eb_set_font(&book, font_list[0]); + if (error_code != EB_SUCCESS) + break; + error_code = eb_wide_font_start(&book, &font_start); + if (error_code != EB_SUCCESS) + break; + error_code = eb_wide_font_end(&book, &font_end); + if (error_code != EB_SUCCESS) + break; + } while (0); + + if (error_code == EB_SUCCESS) + printf("0x%04x -- 0x%04x\n", font_start, font_end); + else { + fputc('\n', stdout); + output_error_message(error_code); + return_code = error_code; + } + } else { + fputc('\n', stdout); + } + + if (multi_flag) { + error_code = output_multi_information(&book); + if (error_code != EB_SUCCESS) + return_code = error_code; + } + fputc('\n', stdout); + } + fflush(stdout); + + /* + * End to use the book. + */ + eb_finalize_book(&book); + eb_finalize_library(); + + return return_code; + + /* + * An error occurs... + */ + failed: + fflush(stdout); + fflush(stderr); + eb_finalize_book(&book); + eb_finalize_library(); + + return return_code; +} + +/* + * Output information about multi searches. + */ +static EB_Error_Code +output_multi_information(EB_Book *book) +{ + EB_Error_Code return_code = EB_SUCCESS; + EB_Error_Code error_code; + EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES]; + int multi_count; + int entry_count; + char search_title[EB_MAX_MULTI_TITLE_LENGTH + 1]; + char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1]; + int i, j; + + /* + * Get a list of mutli search codes. + */ + error_code = eb_multi_search_list(book, multi_list, &multi_count); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + multi_count = 0; + } + + /* + * Output information. + */ + for (i = 0; i < multi_count; i++) { + printf(_(" multi search %d:\n"), i + 1); + error_code = eb_multi_entry_count(book, multi_list[i], &entry_count); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + continue; + } + + error_code = eb_multi_title(book, multi_list[i], search_title); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + continue; + } + fputs(_(" title: "), stdout); + fputs_eucjp_to_locale(search_title, stdout); + fputc('\n', stdout); + + for (j = 0; j < entry_count; j++) { + error_code = eb_multi_entry_label(book, multi_list[i], j, + entry_label); + if (error_code != EB_SUCCESS) { + output_error_message(error_code); + return_code = error_code; + continue; + } + + printf(_(" label %d: "), j + 1); + fputs_eucjp_to_locale(entry_label, stdout); + fputc('\n', stdout); + + fputs(_(" candidates: "), stdout); + if (eb_multi_entry_have_candidates(book, multi_list[i], j)) + fputs(_("exist\n"), stdout); + else + fputs(_("not-exist\n"), stdout); + } + } + + fflush(stdout); + + return return_code; +} + + +/* + * Output help message to stdandard out. + */ +static void +output_help(void) +{ + printf(_("Usage: %s [option...] [book-directory]\n"), + program_name); + printf(_("Options:\n")); + printf(_(" -h --help display this help, then exit\n")); + printf(_(" -l --book-list output a list of books on an EBENT server\n")); + printf(_(" -m --multi-search also output multi-search information\n")); + printf(_(" -v --version display version number, then exit\n")); + printf(_("\nArgument:\n")); + printf(_(" book-directory top directory of a CD-ROM book\n")); + printf(_(" (default: %s)\n"), + DEFAULT_BOOK_DIRECTORY); + printf(_("\nReport bugs to %s.\n"), MAILING_ADDRESS); + fflush(stdout); +} + + diff --git a/lib/ebu/ebinfo/ebuinfo b/lib/ebu/ebinfo/ebuinfo new file mode 100644 index 0000000..1e9db27 --- /dev/null +++ b/lib/ebu/ebinfo/ebuinfo @@ -0,0 +1,210 @@ +#! /bin/bash + +# ebuinfo - temporary wrapper script for .libs/ebuinfo +# Generated by libtool (GNU libtool) 2.4.6 +# +# The ebuinfo program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../ebu/libebu.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "ebuinfo:ebuinfo:$LINENO: libtool wrapper (GNU libtool) 2.4.6" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "ebuinfo:ebuinfo:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "ebuinfo:ebuinfo:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='ebuinfo' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/mnt/d/files/projects/ebclient/lib/ebu/ebu/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/lib/ebu/ebrefile/.deps/ebrefile.Po b/lib/ebu/ebrefile/.deps/ebrefile.Po new file mode 100644 index 0000000..3c2976d --- /dev/null +++ b/lib/ebu/ebrefile/.deps/ebrefile.Po @@ -0,0 +1,372 @@ +ebrefile.o: ebrefile.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h \ + ../ebu/zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/build-post.h ../ebu/defs.h ../libebutils/ebutils.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/ebutils.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebrefile/.libs/eburefile b/lib/ebu/ebrefile/.libs/eburefile new file mode 100644 index 0000000..1ec507f Binary files /dev/null and b/lib/ebu/ebrefile/.libs/eburefile differ diff --git a/lib/ebu/ebrefile/Makefile b/lib/ebu/ebrefile/Makefile new file mode 100644 index 0000000..10b3247 --- /dev/null +++ b/lib/ebu/ebrefile/Makefile @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebrefile/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = eburefile$(EXEEXT) +subdir = ebrefile +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_eburefile_OBJECTS = ebrefile.$(OBJEXT) +eburefile_OBJECTS = $(am_eburefile_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(eburefile_SOURCES) +DIST_SOURCES = $(eburefile_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebrefile +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebrefile +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +eburefile_SOURCES = ebrefile.c +eburefile_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +eburefile_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebrefile/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebrefile/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +eburefile$(EXEEXT): $(eburefile_OBJECTS) $(eburefile_DEPENDENCIES) + @rm -f eburefile$(EXEEXT) + $(LINK) $(eburefile_OBJECTS) $(eburefile_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/ebrefile.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebrefile/Makefile.am b/lib/ebu/ebrefile/Makefile.am new file mode 100644 index 0000000..77983f8 --- /dev/null +++ b/lib/ebu/ebrefile/Makefile.am @@ -0,0 +1,14 @@ +localedir = $(datadir)/locale + +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a + +bin_PROGRAMS = eburefile + +eburefile_SOURCES = ebrefile.c +eburefile_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +eburefile_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) diff --git a/lib/ebu/ebrefile/Makefile.in b/lib/ebu/ebrefile/Makefile.in new file mode 100644 index 0000000..aa1f47b --- /dev/null +++ b/lib/ebu/ebrefile/Makefile.in @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = eburefile$(EXEEXT) +subdir = ebrefile +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_eburefile_OBJECTS = ebrefile.$(OBJEXT) +eburefile_OBJECTS = $(am_eburefile_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(eburefile_SOURCES) +DIST_SOURCES = $(eburefile_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +eburefile_SOURCES = ebrefile.c +eburefile_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +eburefile_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebrefile/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebrefile/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +eburefile$(EXEEXT): $(eburefile_OBJECTS) $(eburefile_DEPENDENCIES) + @rm -f eburefile$(EXEEXT) + $(LINK) $(eburefile_OBJECTS) $(eburefile_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebrefile.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebrefile/ebrefile.c b/lib/ebu/ebrefile/ebrefile.c new file mode 100644 index 0000000..717cd61 --- /dev/null +++ b/lib/ebu/ebrefile/ebrefile.c @@ -0,0 +1,814 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +#ifndef HAVE_STRCASECMP +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* + * stat macros. + */ +#ifndef S_ISREG +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +/* + * rename() on Windows complains if the new file already exists. + * We fake rename() here for Windows. + */ +#ifdef WIN32 +#include +#define rename(old, new) \ + (MoveFileEx((old), (new), MOVEFILE_REPLACE_EXISTING) ? 0 : -1) +#endif + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebu/build-post.h" + +#include "ebutils.h" + +#ifdef HAVE_GETOPT_LOG +#include +#else +#include "getopt.h" +#endif +#include "getumask.h" +#include "makedir.h" +#include "samefile.h" +#include "yesno.h" + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +#define DEFAULT_BOOK_DIRECTORY "." +#define DEFAULT_OUTPUT_DIRECTORY "." + +/* + * Unexported functions. + */ +static void output_help(void); +static int refile_book(const char *out_path, const char *in_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count); +static int refile_catalog(const char *out_catalog_name, + const char *in_catalog_name, EB_Disc_Code disc_code, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count); +static int copy_file(const char *out_file_name, const char *in_file_name); +static void trap(int signal_number); +static int find_subbook_name(char + subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count, const char *pattern); + +/* + * Command line options. + */ +static const char *short_options = "ho:S:v"; +static struct option long_options[] = { + {"help", no_argument, NULL, 'h'}, + {"output-directory", required_argument, NULL, 'o'}, + {"subbook", required_argument, NULL, 'S'}, + {"version", no_argument, NULL, 'v'}, + {NULL, 0, NULL, 0} +}; + +/* + * Program name and version. + */ +const char *program_name = "ebrefile"; +const char *program_version = VERSION; +const char *invoked_name; + +/* + * File names to be deleted when signal is received. + */ +static const char *trap_file_name = NULL; +static int trap_file = -1; + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + char out_path[PATH_MAX + 1]; + char book_path[PATH_MAX + 1]; + char subbook_name_list[EB_MAX_SUBBOOKS][EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int subbook_name_count = 0; + int ch; + + invoked_name = argv[0]; + strcpy(out_path, DEFAULT_OUTPUT_DIRECTORY); + + /* + * Initialize locale data. + */ +#ifdef ENABLE_NLS +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain(TEXT_DOMAIN_NAME, LOCALEDIR); + textdomain(TEXT_DOMAIN_NAME); +#endif + + /* + * Initialize `book'. + */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto die; + } + + /* + * Parse command line options. + */ + for (;;) { + ch = getopt_long(argc, argv, short_options, long_options, NULL); + if (ch == -1) + break; + switch (ch) { + case 'h': + /* + * Option `-h'. Display help message, then exit. + */ + output_help(); + exit(0); + + case 'o': + /* + * Option `-o'. Output files under DIRECOTRY. + * The length of the file name + * "/catalogs.bak;1" + * must not exceed PATH_MAX. + */ + if (PATH_MAX < strlen(optarg)) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + exit(1); + } + strcpy(out_path, optarg); + canonicalize_path(out_path); + if (PATH_MAX + < strlen(out_path) + (1 + EB_MAX_DIRECTORY_NAME_LENGTH + 6)) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + goto die; + } + break; + + case 'S': + /* + * Option `-S'. Specify target subbooks. + */ + if (parse_subbook_name_argument(invoked_name, optarg, + subbook_name_list, &subbook_name_count) < 0) + exit(1); + break; + + case 'v': + /* + * Option `-v'. Display version number, then exit. + */ + output_version(program_name, program_version); + exit(0); + + default: + output_try_help(invoked_name); + goto die; + } + } + + /* + * Check the number of rest arguments. + */ + if (1 < argc - optind) { + fprintf(stderr, _("%s: too many arguments\n"), invoked_name); + output_try_help(invoked_name); + goto die; + } + + /* + * Set a book path. + */ + if (argc == optind) + strcpy(book_path, DEFAULT_BOOK_DIRECTORY); + else + strcpy(book_path, argv[optind]); + + if (is_ebnet_url(book_path)) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(EB_ERR_EBNET_UNSUPPORTED)); + goto die; + } + canonicalize_path(book_path); + + if (PATH_MAX + < strlen(book_path) + (1 + EB_MAX_DIRECTORY_NAME_LENGTH + 6)) { + fprintf(stderr, _("%s: too long book directory path\n"), + invoked_name); + goto die; + } + + /* + * Set signals. + */ +#ifdef SIGHUP + signal(SIGHUP, trap); +#endif + signal(SIGINT, trap); +#ifdef SIGQUIT + signal(SIGQUIT, trap); +#endif +#ifdef SIGTERM + signal(SIGTERM, trap); +#endif + + /* + * Refile a catalog. + */ + if (refile_book(out_path, book_path, subbook_name_list, + subbook_name_count) < 0) + goto die; + + eb_finalize_library(); + + return 0; + + /* + * A critical error occurs... + */ + die: + eb_finalize_library(); + exit(1); +} + + +/* + * Output help message to stdandard out. + */ +static void +output_help(void) +{ + printf(_("Usage: %s [option...] [book-directory]\n"), program_name); + printf(_("Options:\n")); + printf(_(" -h --help display this help, then exit\n")); + printf(_(" -o DIRECTORY --output-directory DIRECTORY\n")); + printf(_(" ouput files under DIRECTORY\n")); + printf(_(" (default: %s)\n"), + DEFAULT_OUTPUT_DIRECTORY); + printf(_(" -S SUBBOOK[,SUBBOOK...] --subbook SUBBOOK[,SUBBOOK...]\n")); + printf(_(" target subbook\n")); + printf(_(" (default: all subbooks)\n")); + printf(_(" -v --version display version number, then exit\n")); + printf(_("\nArgument:\n")); + printf(_(" book-directory top directory of a CD-ROM book\n")); + printf(_(" (default: %s)\n"), + DEFAULT_BOOK_DIRECTORY); + + printf(_("\nReport bugs to %s.\n"), MAILING_ADDRESS); + fflush(stdout); +} + + +/* + * Read a catalog file in `in_path' and create refiled catalog file + * in `out_path'. + */ +static int +refile_book(const char *out_path, const char *in_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count) +{ + char in_file_name[PATH_MAX + 1]; + char out_file_name[PATH_MAX + 1]; + char tmp_file_name[PATH_MAX + 1]; + char old_file_name[PATH_MAX + 1]; + char in_base_name[EB_MAX_FILE_NAME_LENGTH + 1]; + EB_Disc_Code disc_code; + struct stat out_status; + struct stat old_status; + + /* + * Find a catalog file. + */ + if (eb_find_file_name(in_path, "catalog", in_base_name) + == EB_SUCCESS) { + disc_code = EB_DISC_EB; + } else if (eb_find_file_name(in_path, "catalogs", in_base_name) + == EB_SUCCESS) { + disc_code = EB_DISC_EPWING; + } else { + fprintf(stderr, _("%s: no catalog file: %s\n"), invoked_name, in_path); + return -1; + } + + /* + * Set file names. + */ + eb_compose_path_name(in_path, in_base_name, in_file_name); + eb_compose_path_name(out_path, in_base_name, out_file_name); + + strcpy(old_file_name, out_file_name); + eb_fix_path_name_suffix(old_file_name, ".old"); + strcpy(tmp_file_name, out_file_name); + eb_fix_path_name_suffix(tmp_file_name, ".tmp"); + + /* + * Copy the original catalog file. + */ + if (stat(old_file_name, &old_status) < 0 + && errno == ENOENT + && stat(out_file_name, &out_status) == 0 + && S_ISREG(out_status.st_mode)) { + trap_file_name = old_file_name; + if (copy_file(old_file_name, out_file_name) < 0) + return -1; + trap_file_name = NULL; + } + + /* + * Refile the catalog file. + */ + trap_file_name = tmp_file_name; + if (refile_catalog(tmp_file_name, in_file_name, disc_code, + subbook_name_list, subbook_name_count) < 0) { + unlink(tmp_file_name); + rename(old_file_name, out_file_name); + return -1; + } + if (rename(tmp_file_name, out_file_name) < 0) { + fprintf(stderr, _("%s: failed to move the file, %s: %s -> %s\n"), + invoked_name, strerror(errno), tmp_file_name, out_file_name); + unlink(tmp_file_name); + return -1; + } + + trap_file_name = NULL; + + return 0; +} + + +/* + * Read a catalog file `in_catalog_name' and create refiled catalog file + * as `out_catalog_name'. + */ +static int +refile_catalog(const char *out_catalog_name, const char *in_catalog_name, + EB_Disc_Code disc_code, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count) +{ + char buffer[EB_SIZE_PAGE]; + char directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int in_subbook_count; + int in_file = -1; + int out_file = -1; + int subbbook_map_table[EB_MAX_SUBBOOKS]; + off_t out_file_offset; + size_t catalog_size; + int i, j; + + for (i = 0; i < EB_MAX_SUBBOOKS; i++) + subbbook_map_table[i] = EB_SUBBOOK_INVALID; + + if (disc_code == EB_DISC_EB) + catalog_size = EB_SIZE_EB_CATALOG; + else + catalog_size = EB_SIZE_EPWING_CATALOG; + + /* + * Open input file. + */ + in_file = open(in_catalog_name, O_RDONLY | O_BINARY); + if (in_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), in_catalog_name); + goto failed; + } + + /* + * Open output file. + */ +#ifdef O_CREAT + out_file = open(out_catalog_name, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, + 0666 ^ get_umask()); +#else + out_file = creat(out_catalog_name, 0666 ^ get_umask()); +#endif + trap_file = out_file; + if (out_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + + /* + * Copy header. + */ + if (read(in_file, buffer, 16) != 16) { + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), in_catalog_name); + goto failed; + } + in_subbook_count = eb_uint2(buffer); + + if (write(out_file, buffer, 16) != 16) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + out_file_offset = 16; + + /* + * Copy basic information of subbooks. + */ + for (i = 0; i < in_subbook_count; i++) { + /* + * Read subbook entry. + */ + if (read(in_file, buffer, catalog_size) != catalog_size) { + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), in_catalog_name); + goto failed; + } + + /* + * Check whether `subbook_name_list' has a directory name of + * this subbook. If not, we ignore this subbook. + */ + if (disc_code == EB_DISC_EB) { + strncpy(directory_name, buffer + 2 + EB_MAX_EB_TITLE_LENGTH, + EB_MAX_DIRECTORY_NAME_LENGTH); + } else { + strncpy(directory_name, buffer + 2 + EB_MAX_EPWING_TITLE_LENGTH, + EB_MAX_DIRECTORY_NAME_LENGTH); + } + directory_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + + if (subbook_name_count == 0) + subbbook_map_table[i] = i; + else { + int subbook_index; + + subbook_index = find_subbook_name(subbook_name_list, + subbook_name_count, directory_name); + if (subbook_index < 0) + continue; + subbbook_map_table[i] = subbook_index; + } + + /* + * Write the subbook entry. + */ + if (write(out_file, buffer, catalog_size) != catalog_size) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + + out_file_offset += catalog_size; + } + + /* + * Copy extended information of subbooks. + */ + if (disc_code == EB_DISC_EPWING) { + for (i = 0; i < in_subbook_count; i++) { + if (read(in_file, buffer, catalog_size) != catalog_size) { + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), in_catalog_name); + goto failed; + } + if (subbbook_map_table[i] == EB_SUBBOOK_INVALID) + continue; + if (write(out_file, buffer, catalog_size) != catalog_size) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + + out_file_offset += catalog_size; + } + } + + /* + * Check whether all subbooks in `subbook_name_list' are found. + */ + for (i = 0; i < subbook_name_count; i++) { + for (j = 0; j < in_subbook_count; j++) { + if (subbbook_map_table[j] == i) + break; + } + if (in_subbook_count <= j) { + fprintf(stderr, _("%s: warning: no such subbook: %s\n"), + invoked_name, subbook_name_list[i]); + } + } + + /* + * Copy rest of the catalog file. + */ + for (;;) { + ssize_t read_length; + + read_length = read(in_file, buffer, EB_SIZE_PAGE); + if (read_length == 0) { + break; + } else if (read_length < 0) { + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), in_catalog_name); + goto failed; + } + if (write(out_file, buffer, read_length) != read_length) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + out_file_offset += read_length; + } + + /* + * Fill the current page with 0. + */ + if (0 < out_file_offset % EB_SIZE_PAGE) { + size_t pad_length; + + pad_length = EB_SIZE_PAGE - (out_file_offset % EB_SIZE_PAGE); + memset(buffer, 0, EB_SIZE_PAGE); + if (write(out_file, buffer, pad_length) != pad_length) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + } + + /* + * Fix the number of subbook. + */ + if (subbook_name_count == 0) { + buffer[0] = (in_subbook_count >> 8) & 0xff; + buffer[1] = in_subbook_count & 0xff; + } else { + buffer[0] = (subbook_name_count >> 8) & 0xff; + buffer[1] = subbook_name_count & 0xff; + } + if (lseek(out_file, 0, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + if (write(out_file, buffer, 2) != 2) { + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), out_catalog_name); + goto failed; + } + + /* + * Close files. + */ + close(in_file); + close(out_file); + trap_file = -1; + + return 0; + + /* + * An error occurs... + */ + failed: + if (0 <= in_file) + close(in_file); + if (0 <= out_file) + close(out_file); + return -1; +} + + +/* + * Copy a file from `in_file_name' to `out_file_name'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +static int +copy_file(const char *out_file_name, const char *in_file_name) +{ + unsigned char buffer[EB_SIZE_PAGE]; + size_t copied_length; + struct stat in_status; + int in_file = -1, out_file = -1; + ssize_t read_result; + struct utimbuf utim; + + /* + * Check for the input file. + */ + if (stat(in_file_name, &in_status) != 0 || !S_ISREG(in_status.st_mode)) { + fprintf(stderr, _("%s: no such file: %s\n"), invoked_name, + in_file_name); + goto failed; + } + + /* + * Open files. + */ + in_file = open(in_file_name, O_RDONLY | O_BINARY); + if (in_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), in_file_name); + goto failed; + } + +#ifdef O_CREAT + out_file = open(out_file_name, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, + 0666 ^ get_umask()); +#else + out_file = creat(out_file_name, 0666 ^ get_umask()); +#endif + trap_file = out_file; + if (out_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + + /* + * Read data from the input file, compress the data, and then + * write them to the output file. + */ + copied_length = 0; + for (;;) { + /* + * Read data from `in_file', and write them to `out_file'. + */ + read_result = read(in_file, buffer, EB_SIZE_PAGE); + if (read_result == 0) { + break; + } else if (read_result < 0) { + fprintf(stderr, _("%s: failed to read from the file, %s: %s\n"), + invoked_name, strerror(errno), in_file_name); + goto failed; + } + + /* + * Write decoded data to `out_file'. + */ + if (write(out_file, buffer, read_result) != read_result) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + copied_length += read_result; + } + + /* + * Close files. + */ + close(in_file); + close(out_file); + trap_file = -1; + + /* + * Set owner, group, permission, atime and mtime of `out_file'. + * We ignore return values of `chown', `chmod' and `utime'. + */ + utim.actime = in_status.st_atime; + utim.modtime = in_status.st_mtime; + utime(out_file_name, &utim); + + return 0; + + /* + * An error occurs... + */ + failed: + if (0 <= in_file) + close(in_file); + if (0 <= out_file) + close(out_file); + + return -1; +} + + +/* + * Signal handler. + */ +static void +trap(int signal_number) +{ + if (0 <= trap_file) + close(trap_file); + if (trap_file_name != NULL) + unlink(trap_file_name); + + exit(1); +} + + +/* + * Search `subbook_name_list[]' for `pattern'. + * `subbook_name_count' is length of `subbook_name_list[]'. + * + * If found, the function returns index of the element. Otherwise it + * returns -1. + */ +static int +find_subbook_name(char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count, const char *pattern) +{ + char canonicalized_pattern[EB_MAX_FILE_NAME_LENGTH + 1]; + char *space; + int i; + + strcpy(canonicalized_pattern, pattern); + space = strchr(canonicalized_pattern, ' '); + if (space != NULL) + *space = '\0'; + + for (i = 0; i < subbook_name_count; i++) { + if (strcasecmp(subbook_name_list[i], canonicalized_pattern) == 0) + return i; + } + + return -1; +} diff --git a/lib/ebu/ebrefile/eburefile b/lib/ebu/ebrefile/eburefile new file mode 100644 index 0000000..91c94b6 --- /dev/null +++ b/lib/ebu/ebrefile/eburefile @@ -0,0 +1,210 @@ +#! /bin/bash + +# eburefile - temporary wrapper script for .libs/eburefile +# Generated by libtool (GNU libtool) 2.4.6 +# +# The eburefile program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../ebu/libebu.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "eburefile:eburefile:$LINENO: libtool wrapper (GNU libtool) 2.4.6" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "eburefile:eburefile:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "eburefile:eburefile:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='eburefile' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/mnt/d/files/projects/ebclient/lib/ebu/ebu/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/lib/ebu/ebstopcode/.deps/ebstopcode.Po b/lib/ebu/ebstopcode/.deps/ebstopcode.Po new file mode 100644 index 0000000..b7da2fb --- /dev/null +++ b/lib/ebu/ebstopcode/.deps/ebstopcode.Po @@ -0,0 +1,235 @@ +ebstopcode.o: ebstopcode.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/libintl.h ../ebu/eb.h ../ebu/defs.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h ../ebu/sysdefs.h \ + ../ebu/zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/text.h ../ebu/appendix.h ../libebutils/getopt.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/libintl.h: + +../ebu/eb.h: + +../ebu/defs.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/text.h: + +../ebu/appendix.h: + +../libebutils/getopt.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebstopcode/.libs/ebustopcode b/lib/ebu/ebstopcode/.libs/ebustopcode new file mode 100644 index 0000000..f7acd37 Binary files /dev/null and b/lib/ebu/ebstopcode/.libs/ebustopcode differ diff --git a/lib/ebu/ebstopcode/Makefile b/lib/ebu/ebstopcode/Makefile new file mode 100644 index 0000000..2f204d8 --- /dev/null +++ b/lib/ebu/ebstopcode/Makefile @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebstopcode/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = ebustopcode$(EXEEXT) +subdir = ebstopcode +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebustopcode_OBJECTS = ebstopcode.$(OBJEXT) +ebustopcode_OBJECTS = $(am_ebustopcode_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebustopcode_SOURCES) +DIST_SOURCES = $(ebustopcode_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebstopcode +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebstopcode +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebustopcode_SOURCES = ebstopcode.c +ebustopcode_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebustopcode_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebstopcode/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebstopcode/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebustopcode$(EXEEXT): $(ebustopcode_OBJECTS) $(ebustopcode_DEPENDENCIES) + @rm -f ebustopcode$(EXEEXT) + $(LINK) $(ebustopcode_OBJECTS) $(ebustopcode_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/ebstopcode.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebstopcode/Makefile.am b/lib/ebu/ebstopcode/Makefile.am new file mode 100644 index 0000000..ba189ed --- /dev/null +++ b/lib/ebu/ebstopcode/Makefile.am @@ -0,0 +1,14 @@ +localedir = $(datadir)/locale + +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a + +bin_PROGRAMS = ebustopcode + +ebustopcode_SOURCES = ebstopcode.c +ebustopcode_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebustopcode_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) diff --git a/lib/ebu/ebstopcode/Makefile.in b/lib/ebu/ebstopcode/Makefile.in new file mode 100644 index 0000000..3d0aabc --- /dev/null +++ b/lib/ebu/ebstopcode/Makefile.in @@ -0,0 +1,522 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ebustopcode$(EXEEXT) +subdir = ebstopcode +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebustopcode_OBJECTS = ebstopcode.$(OBJEXT) +ebustopcode_OBJECTS = $(am_ebustopcode_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebustopcode_SOURCES) +DIST_SOURCES = $(ebustopcode_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +ebustopcode_SOURCES = ebstopcode.c +ebustopcode_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebustopcode_DEPENDENCIES = $(LIBEBUTILS) $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + $(INTLINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebstopcode/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebstopcode/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebustopcode$(EXEEXT): $(ebustopcode_OBJECTS) $(ebustopcode_DEPENDENCIES) + @rm -f ebustopcode$(EXEEXT) + $(LINK) $(ebustopcode_OBJECTS) $(ebustopcode_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebstopcode.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebstopcode/ebstopcode.c b/lib/ebu/ebstopcode/ebstopcode.c new file mode 100644 index 0000000..53da642 --- /dev/null +++ b/lib/ebu/ebstopcode/ebstopcode.c @@ -0,0 +1,634 @@ +/* -*- C -*- + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebu/text.h" +#include "ebu/appendix.h" + +#ifdef HAVE_GETOPT_LOG +#include +#else +#include "getopt.h" +#endif +#include "ebutils.h" + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Character type tests and conversions. + */ +#define ASCII_ISDIGIT(c) ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c) || ASCII_ISDIGIT(c)) +#define ASCII_ISXDIGIT(c) \ + (ASCII_ISDIGIT(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f')) +#define ASCII_TOUPPER(c) (('a' <= (c) && (c) <= 'z') ? (c) - 0x20 : (c)) +#define ASCII_TOLOWER(c) (('A' <= (c) && (c) <= 'Z') ? (c) + 0x20 : (c)) + +/* + * Default maximum length of text. + */ +#define DEFAULT_MAX_TEXT_LENGTH EB_SIZE_PAGE + +/* + * Default book directory. + */ +#define DEFAULT_BOOK_DIRECTORY "." + +/* + * Dummy stop code. + * + * Application cannot order EB Library not to use stop code. + * EB Library guesses stop code automatically when appendix is not + * given by application. + * + * Instead, we use dummy stop code. The code is never used in text + * of CD-ROM book. + */ +#define DUMMY_STOP_CODE0 0x1f00 +#define DUMMY_STOP_CODE1 0x0000 + +/* + * Command line options. + */ +static const char *short_options = "c:hl:np:v"; +static struct option long_options[] = { + {"code", required_argument, NULL, 'c'}, + {"help", no_argument, NULL, 'h'}, + {"text-length", required_argument, NULL, 'l'}, + {"no-candidates", no_argument, NULL, 'n'}, + {"text-position", required_argument, NULL, 'p'}, + {"version", no_argument, NULL, 'v'}, + {NULL, 0, NULL, 0} +}; + +/* + * Program name and version. + */ +static const char *program_name = "ebstopcode"; +static const char *program_version = VERSION; +static const char *invoked_name; + +/* + * Unexported functions. + */ +static int parse_stop_code_argument(const char *argument, + unsigned int *stop_code0, unsigned int *stop_code1); +static int parse_text_length_argument(const char *argument, + ssize_t *text_length); +static int parse_text_position_argument(const char *argument, + EB_Position *text_position); +static void output_help(void); +static int scan_subbook_text(const char *book_directory, + const char *subbook_name, EB_Position *text_position, + ssize_t max_text_length, int show_stop_code_flag, unsigned int stop_code0, + unsigned int stop_code1); +static EB_Error_Code hook_stop_code(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code code, int argc, const unsigned int *argv); + + +int +main(int argc, char *argv[]) +{ + const char *book_directory; + ssize_t max_text_length; + const char *subbook_name; + int show_stop_code_flag; + EB_Position text_position; + unsigned int stop_code0, stop_code1; + int ch; + + invoked_name = argv[0]; + max_text_length = DEFAULT_MAX_TEXT_LENGTH; + show_stop_code_flag = 1; + stop_code0 = DUMMY_STOP_CODE0; + stop_code1 = DUMMY_STOP_CODE1; + text_position.page = 0; + text_position.offset = 0; + + /* + * Initialize locale data. + */ +#ifdef ENABLE_NLS +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain(TEXT_DOMAIN_NAME, LOCALEDIR); + textdomain(TEXT_DOMAIN_NAME); +#endif + + /* + * Parse command line options. + */ + for (;;) { + ch = getopt_long(argc, argv, short_options, long_options, NULL); + if (ch == -1) + break; + + switch (ch) { + case 'c': + /* + * Option `-c'. Specify stop code manually. + */ + if (parse_stop_code_argument(optarg, &stop_code0, &stop_code1) < 0) + goto die; + max_text_length = 0; + break; + + case 'h': + /* + * Option `-h'. Display help message, then exit. + */ + output_help(); + exit(0); + + case 'l': + /* + * Option `-l'. Specify maximum length of text. + */ + if (parse_text_length_argument(optarg, &max_text_length) < 0) + goto die; + stop_code0 = DUMMY_STOP_CODE0; + stop_code1 = DUMMY_STOP_CODE1; + break; + + case 'n': + /* + * Option `-n'. Do not output stop code candidates. + */ + show_stop_code_flag = 0; + break; + + case 'p': + /* + * Option `-p'. Specify text position. + */ + if (parse_text_position_argument(optarg, &text_position) < 0) + goto die; + break; + + case 'v': + /* + * Option `-v'. Display version number, then exit. + */ + output_version(program_name, program_version); + exit(0); + + default: + output_try_help(invoked_name); + goto die; + } + } + + /* + * Check the number of rest arguments. + */ + if (argc - optind < 2) { + fprintf(stderr, _("%s: too few argument\n"), invoked_name); + output_try_help(invoked_name); + goto die; + } + if (2 < argc - optind) { + fprintf(stderr, _("%s: too many arguments\n"), invoked_name); + output_try_help(invoked_name); + goto die; + } + if (argc - optind == 2) { + book_directory = argv[optind]; + subbook_name = argv[optind + 1]; + } else { + book_directory = DEFAULT_BOOK_DIRECTORY; + subbook_name = argv[optind]; + } + + /* + * Scan stop code in text. + */ + if (scan_subbook_text(book_directory, subbook_name, &text_position, + max_text_length, show_stop_code_flag, stop_code0, stop_code1) < 0) + goto die; + + return 0; + + die: + fflush(stdout); + exit(1); +} + + +/* + * Parse stop code given as argument of the `-c' option. + */ +static int +parse_stop_code_argument(const char *argument, unsigned int *stop_code0, + unsigned int *stop_code1) +{ + const char *p = argument; + const char *foundp; + + /* + * Parse stop_code0. + */ + while (*p == ' ' || *p == '\t') + p++; + if (*p == '0' && (*(p + 1) == 'x' || *(p + 1) == 'X')) + p += 2; + + foundp = p; + while (ASCII_ISXDIGIT(*p)) + p++; + + if (p == foundp || (*p != ' ' && *p != '\t')) + goto failed; + *stop_code0 = strtol(foundp, NULL, 16); + if (*stop_code0 != 0x1f09 && *stop_code0 != 0x1f41) + goto failed; + + /* + * Parse stop_code1. + */ + while (*p == ' ' || *p == '\t') + p++; + if (*p == '0' && (*(p + 1) == 'x' || *(p + 1) == 'X')) + p += 2; + + foundp = p; + while (ASCII_ISXDIGIT(*p)) + p++; + + if (p == foundp || (*p != ' ' && *p != '\t' && *p != '\0')) + goto failed; + *stop_code1 = strtol(foundp, NULL, 16); + if (0xffff < *stop_code1) + goto failed; + + while (*p == ' ' || *p == '\t') + p++; + if (*p != '\0') + goto failed; + + return 0; + + /* + * An error occurs... + */ + failed: + fprintf(stderr, _("%s: invalid stop code `%s'\n"), invoked_name, + argument); + return -1; +} + + +/* + * Parse stop code given as argument of the `-t' option. + */ +static int +parse_text_length_argument(const char *argument, ssize_t *text_length) +{ + const char *p = argument; + const char *foundp; + + while (*p == ' ' || *p == '\t') + p++; + + foundp = p; + while (ASCII_ISDIGIT(*p)) + p++; + if (p == foundp) + goto failed; + while (*p == ' ' || *p == '\t') + p++; + if (*p != '\0') + goto failed; + + *text_length = strtol(foundp, NULL, 10); + return 0; + + /* + * An error occurs... + */ + failed: + fprintf(stderr, _("%s: invalid text length `%s'\n"), invoked_name, + argument); + return -1; +} + + +/* + * Parse text position given as argument of the `-p' option. + */ +static int +parse_text_position_argument(const char *argument, EB_Position *text_position) +{ + const char *p = argument; + const char *end_p; + int page; + int offset; + + /* + * Parse page. + */ + while (*p == ' ' || *p == '\t') + p++; + + if (*p == '0' && (*(p + 1) == 'x' || *(p + 1) == 'X')) + p += 2; + page = strtol(p, (char **)&end_p, 16); + if (end_p == p || *end_p != ':') + goto failed; + if (page <= 0) + goto failed; + + /* + * Parse offset. + */ + p = end_p + 1; + + if (*p == '0' && (*(p + 1) == 'x' || *(p + 1) == 'X')) + p += 2; + offset = strtol(p, (char **)&end_p, 16); + if (end_p == p) + goto failed; + while (*end_p == ' ' || *end_p == '\t') + end_p++; + if (*end_p != '\0') + goto failed; + if (offset < 0 || EB_SIZE_PAGE <= offset) + goto failed; + + text_position->page = page; + text_position->offset = offset; + + return 0; + + /* + * An error occurs... + */ + failed: + fprintf(stderr, _("%s: invalid text position `%s'\n"), invoked_name, + argument); + return -1; +} + + +/* + * Output help message to standard out, then exit. + */ +static void +output_help(void) +{ + printf(_("Usage: %s [option...] [book-directory] subbook\n"), + program_name); + printf(_("Options:\n")); + printf(_(" -c CODE, --code CODE\n")); + printf(_(" set stop code manually\n")); + printf(_(" -h --help display this help, then exit\n")); + printf(_(" -l LENGTH, --text-length LENGTH\n")); + printf(_(" maximum length of output text\n")); + printf(_(" (default: %d)\n"), + DEFAULT_MAX_TEXT_LENGTH); + printf(_(" -n --no-candidates suppress stop code candidates\n")); + printf(_(" -p PAGE:OFFSET, --text-position PAGE:OFFSET\n")); + printf(_(" start position of text\n")); + printf(_(" -v --version display version number, then exit\n")); + printf(_("\nArgument:\n")); + printf(_(" book-directory top directory of a CD-ROM book\n")); + printf(_(" (default: %s)\n"), + DEFAULT_BOOK_DIRECTORY); + printf(_("\nReport bugs to %s.\n"), MAILING_ADDRESS); + fflush(stdout); +} + + +/* + * Scan stop code in text. + */ +static int +scan_subbook_text(const char *book_directory, const char *subbook_name, + EB_Position *text_position, ssize_t max_text_length, + int show_stop_code_flag, unsigned int stop_code0, unsigned int stop_code1) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Hookset hookset; + EB_Hook hook; + EB_Appendix appendix; + EB_Appendix_Subbook appendix_subbook; + EB_Subbook_Code subbook_code; + char text[EB_SIZE_PAGE]; + ssize_t text_length; + + /* + * Initialize EB Library, `book', `appendix' and `hookset'. + */ + eb_initialize_library(); + eb_initialize_book(&book); + eb_initialize_appendix(&appendix); + eb_initialize_hookset(&hookset); + + /* + * Bind `book'. + */ + error_code = eb_bind(&book, book_directory); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: failed to bind the book, %s: %s\n"), + program_name, eb_error_message(error_code), book_directory); + goto die; + } + + /* + * Get a subbook code from the subbook name. + */ + error_code = find_subbook(&book, subbook_name, &subbook_code); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s: %s\n", + program_name, eb_error_message(error_code), subbook_name); + goto die; + } + + /* + * Set current subbook. + */ + if (eb_set_subbook(&book, subbook_code) < 0) { + fprintf(stderr, _("%s: failed to set the current subbook, %s\n"), + program_name, eb_error_message(error_code)); + goto die; + } + + /* + * Set stop-code manually. + * (we hack `appendix' directly.) + */ + appendix.code = subbook_code; + appendix.subbook_current = &appendix_subbook; + appendix_subbook.code = subbook_code; + appendix_subbook.stop_code0 = stop_code0; + appendix_subbook.stop_code1 = stop_code1; + + /* + * Set text hooks (for 0x1f41 and 0x1f09). + */ + if (show_stop_code_flag) { + hook.code = EB_HOOK_BEGIN_KEYWORD; + hook.function = hook_stop_code; + eb_set_hook(&hookset, &hook); + + hook.code = EB_HOOK_SET_INDENT; + hook.function = hook_stop_code; + eb_set_hook(&hookset, &hook); + } + + /* + * Get a position where the text data starts, if text_position + * is {page=0, offset=0}. + */ + if (text_position->page == 0 && text_position->offset == 0) { + error_code = eb_text(&book, text_position); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: failed to get text information, %s\n"), + program_name, eb_error_message(error_code)); + goto die; + } + } + + /* + * Read text. + */ + error_code = eb_seek_text(&book, text_position); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", + program_name, eb_error_message(error_code)); + goto die; + } + + text_length = 0; + while (max_text_length == 0 || text_length < max_text_length) { + ssize_t result_length; + size_t read_length; + + if (max_text_length == 0 + || sizeof(text) - 1 <= max_text_length - text_length) { + read_length = sizeof(text) - 1; + } else { + read_length = max_text_length - text_length; + } + error_code = eb_read_text(&book, &appendix, &hookset, NULL, + read_length, text, &result_length); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: failed to read text, %s\n"), + program_name, eb_error_message(error_code)); + goto die; + } + if (result_length <= 0) + break; + fputs_eucjp_to_locale(text, stdout); + text_length += result_length; + } + + /* + * Finalize `hookset', `appendix', `book' and EB Library. + */ + eb_finalize_hookset(&hookset); + eb_finalize_appendix(&appendix); + eb_finalize_book(&book); + eb_finalize_library(); + return 0; + + /* + * An error occurs... + */ + die: + eb_finalize_hookset(&hookset); + eb_finalize_appendix(&appendix); + eb_finalize_book(&book); + eb_finalize_library(); + return -1; +} + + +/* + * Hook function for EB_HOOK_BEGIN_KEYWORD and EB_HOK_SET_INDENT. + */ +static EB_Error_Code +hook_stop_code(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code code, int argc, const unsigned int *argv) +{ + char string[EB_SIZE_PAGE]; + + if (0 < book->text_context.printable_count) { + sprintf(string, "\n=== stop-code?: 0x%04x 0x%04x ===\n", + argv[0], argv[1]); + eb_write_text_string(book, string); + } + + return EB_SUCCESS; +} diff --git a/lib/ebu/ebstopcode/ebustopcode b/lib/ebu/ebstopcode/ebustopcode new file mode 100644 index 0000000..cab87d2 --- /dev/null +++ b/lib/ebu/ebstopcode/ebustopcode @@ -0,0 +1,210 @@ +#! /bin/bash + +# ebustopcode - temporary wrapper script for .libs/ebustopcode +# Generated by libtool (GNU libtool) 2.4.6 +# +# The ebustopcode program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../ebu/libebu.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "ebustopcode:ebustopcode:$LINENO: libtool wrapper (GNU libtool) 2.4.6" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "ebustopcode:ebustopcode:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "ebustopcode:ebustopcode:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='ebustopcode' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/mnt/d/files/projects/ebclient/lib/ebu/ebu/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/lib/ebu/ebu.conf b/lib/ebu/ebu.conf new file mode 100644 index 0000000..641c90b --- /dev/null +++ b/lib/ebu/ebu.conf @@ -0,0 +1,53 @@ +# +# Installation status of EB Library. +# + +# Version. +EBCONF_VERSION="4.5-20200413" + +# EB Libarry include files are in DIR. +# (--with-eb-includes) +EBCONF_EBINCS="-I/usr/local/include" + +# EB Libarry files are in DIR. +# (--with-eb-libraries) +EBCONF_EBLIBS="-L/usr/local/lib -lebu" + +# zlib include files are in DIR. +# (--with-zlib-includes) +EBCONF_ZLIBINCS="" + +# zlib libarry files are in DIR. +# (--with-zlib-libraries) +EBCONF_ZLIBLIBS="-lz" + +# pthread is supported or not. +# (--enable-pthread) +EBCONF_ENABLE_PTHREAD="no" + +# additional CPPFLAGS for pthread support +# (--with-pthread-cppflags) +EBCONF_PTHREAD_CPPFLAGS="" + +# additional CFLAGS for pthread support +# (--with-pthread-cflags) +EBCONF_PTHREAD_CFLAGS="" + +# additional LDFLAGS for pthread support +# (--with-pthread-ldflags) +EBCONF_PTHREAD_LDFLAGS="" + +# native language is supported or not. +# (--enable-nls) +EBCONF_ENABLE_NLS="yes" + +# gettext include files are in DIR. +# (--with-gettext-includes) +EBCONF_INTLINCS="" + +# gettext library files are in DIR. +# (--with-gettext-libraries) +EBCONF_INTLLIBS="" + +# remote access is supported or not. +EBCONF_ENABLE_EBNET="yes" diff --git a/lib/ebu/ebu.conf.in b/lib/ebu/ebu.conf.in new file mode 100644 index 0000000..e968677 --- /dev/null +++ b/lib/ebu/ebu.conf.in @@ -0,0 +1,53 @@ +# +# Installation status of EB Library. +# + +# Version. +EBCONF_VERSION="@VERSION@" + +# EB Libarry include files are in DIR. +# (--with-eb-includes) +EBCONF_EBINCS="@EBCONF_EBINCS@" + +# EB Libarry files are in DIR. +# (--with-eb-libraries) +EBCONF_EBLIBS="@EBCONF_EBLIBS@" + +# zlib include files are in DIR. +# (--with-zlib-includes) +EBCONF_ZLIBINCS="@EBCONF_ZLIBINCS@" + +# zlib libarry files are in DIR. +# (--with-zlib-libraries) +EBCONF_ZLIBLIBS="@EBCONF_ZLIBLIBS@" + +# pthread is supported or not. +# (--enable-pthread) +EBCONF_ENABLE_PTHREAD="@ENABLE_PTHREAD@" + +# additional CPPFLAGS for pthread support +# (--with-pthread-cppflags) +EBCONF_PTHREAD_CPPFLAGS="@PTHREAD_CPPFLAGS@" + +# additional CFLAGS for pthread support +# (--with-pthread-cflags) +EBCONF_PTHREAD_CFLAGS="@PTHREAD_CFLAGS@" + +# additional LDFLAGS for pthread support +# (--with-pthread-ldflags) +EBCONF_PTHREAD_LDFLAGS="@PTHREAD_LDFLAGS@" + +# native language is supported or not. +# (--enable-nls) +EBCONF_ENABLE_NLS="@ENABLE_NLS@" + +# gettext include files are in DIR. +# (--with-gettext-includes) +EBCONF_INTLINCS="@EBCONF_INTLINCS@" + +# gettext library files are in DIR. +# (--with-gettext-libraries) +EBCONF_INTLLIBS="@EBCONF_INTLLIBS@" + +# remote access is supported or not. +EBCONF_ENABLE_EBNET="@ENABLE_EBNET@" diff --git a/lib/ebu/ebu/.deps/appendix.Plo b/lib/ebu/ebu/.deps/appendix.Plo new file mode 100644 index 0000000..876cec4 --- /dev/null +++ b/lib/ebu/ebu/.deps/appendix.Plo @@ -0,0 +1,310 @@ +appendix.lo: appendix.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h ebnet.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +ebnet.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/appsub.Plo b/lib/ebu/ebu/.deps/appsub.Plo new file mode 100644 index 0000000..aa9a88c --- /dev/null +++ b/lib/ebu/ebu/.deps/appsub.Plo @@ -0,0 +1,308 @@ +appsub.lo: appsub.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/bcd.Plo b/lib/ebu/ebu/.deps/bcd.Plo new file mode 100644 index 0000000..0f2ab7b --- /dev/null +++ b/lib/ebu/ebu/.deps/bcd.Plo @@ -0,0 +1,306 @@ +bcd.lo: bcd.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/binary.Plo b/lib/ebu/ebu/.deps/binary.Plo new file mode 100644 index 0000000..efa1f54 --- /dev/null +++ b/lib/ebu/ebu/.deps/binary.Plo @@ -0,0 +1,308 @@ +binary.lo: binary.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + binary.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +binary.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/bitmap.Plo b/lib/ebu/ebu/.deps/bitmap.Plo new file mode 100644 index 0000000..e0f1ec2 --- /dev/null +++ b/lib/ebu/ebu/.deps/bitmap.Plo @@ -0,0 +1,312 @@ +bitmap.lo: bitmap.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + font.h build-post.h /usr/include/zlib.h /usr/include/zconf.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +font.h: + +build-post.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: diff --git a/lib/ebu/ebu/.deps/book.Plo b/lib/ebu/ebu/.deps/book.Plo new file mode 100644 index 0000000..3fc78fe --- /dev/null +++ b/lib/ebu/ebu/.deps/book.Plo @@ -0,0 +1,310 @@ +book.lo: book.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + font.h ebnet.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +font.h: + +ebnet.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/booklist.Plo b/lib/ebu/ebu/.deps/booklist.Plo new file mode 100644 index 0000000..21b5519 --- /dev/null +++ b/lib/ebu/ebu/.deps/booklist.Plo @@ -0,0 +1,308 @@ +booklist.lo: booklist.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + ebnet.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +ebnet.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/color.Plo b/lib/ebu/ebu/.deps/color.Plo new file mode 100644 index 0000000..3862cae --- /dev/null +++ b/lib/ebu/ebu/.deps/color.Plo @@ -0,0 +1,306 @@ +color.lo: color.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/copyright.Plo b/lib/ebu/ebu/.deps/copyright.Plo new file mode 100644 index 0000000..4c7a36b --- /dev/null +++ b/lib/ebu/ebu/.deps/copyright.Plo @@ -0,0 +1,306 @@ +copyright.lo: copyright.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/cross.Plo b/lib/ebu/ebu/.deps/cross.Plo new file mode 100644 index 0000000..12bf951 --- /dev/null +++ b/lib/ebu/ebu/.deps/cross.Plo @@ -0,0 +1,306 @@ +cross.lo: cross.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/dummyin6.Plo b/lib/ebu/ebu/.deps/dummyin6.Plo new file mode 100644 index 0000000..81d531d --- /dev/null +++ b/lib/ebu/ebu/.deps/dummyin6.Plo @@ -0,0 +1,175 @@ +dummyin6.lo: dummyin6.c /usr/include/stdc-predef.h dummyin6.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/socket.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h \ + /usr/include/x86_64-linux-gnu/bits/socket.h \ + /usr/include/x86_64-linux-gnu/bits/socket_type.h \ + /usr/include/x86_64-linux-gnu/bits/sockaddr.h \ + /usr/include/x86_64-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/x86_64-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h \ + /usr/include/x86_64-linux-gnu/bits/socket2.h /usr/include/netinet/in.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/x86_64-linux-gnu/bits/in.h /usr/include/netdb.h \ + /usr/include/rpc/netdb.h /usr/include/x86_64-linux-gnu/bits/netdb.h + +/usr/include/stdc-predef.h: + +dummyin6.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/socket.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h: + +/usr/include/x86_64-linux-gnu/bits/socket.h: + +/usr/include/x86_64-linux-gnu/bits/socket_type.h: + +/usr/include/x86_64-linux-gnu/bits/sockaddr.h: + +/usr/include/x86_64-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types_64.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/bitsperlong.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/x86_64-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h: + +/usr/include/x86_64-linux-gnu/bits/socket2.h: + +/usr/include/netinet/in.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h: + +/usr/include/x86_64-linux-gnu/bits/in.h: + +/usr/include/netdb.h: + +/usr/include/rpc/netdb.h: + +/usr/include/x86_64-linux-gnu/bits/netdb.h: diff --git a/lib/ebu/ebu/.deps/eb.Plo b/lib/ebu/ebu/.deps/eb.Plo new file mode 100644 index 0000000..cbce709 --- /dev/null +++ b/lib/ebu/ebu/.deps/eb.Plo @@ -0,0 +1,308 @@ +eb.lo: eb.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + ebnet.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +ebnet.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/ebnet.Plo b/lib/ebu/ebu/.deps/ebnet.Plo new file mode 100644 index 0000000..2d6a610 --- /dev/null +++ b/lib/ebu/ebu/.deps/ebnet.Plo @@ -0,0 +1,382 @@ +ebnet.lo: ebnet.c /usr/include/stdc-predef.h ../config.h build-pre.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/x86_64-linux-gnu/sys/socket.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h \ + /usr/include/x86_64-linux-gnu/bits/socket.h \ + /usr/include/x86_64-linux-gnu/bits/socket_type.h \ + /usr/include/x86_64-linux-gnu/bits/sockaddr.h \ + /usr/include/x86_64-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/x86_64-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h \ + /usr/include/x86_64-linux-gnu/bits/socket2.h eb.h defs.h sysdefs.h zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h dummyin6.h /usr/include/netinet/in.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/x86_64-linux-gnu/bits/in.h /usr/include/netdb.h \ + /usr/include/rpc/netdb.h /usr/include/x86_64-linux-gnu/bits/netdb.h \ + ebnet.h linebuf.h urlparts.h + +/usr/include/stdc-predef.h: + +../config.h: + +build-pre.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/x86_64-linux-gnu/sys/socket.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h: + +/usr/include/x86_64-linux-gnu/bits/socket.h: + +/usr/include/x86_64-linux-gnu/bits/socket_type.h: + +/usr/include/x86_64-linux-gnu/bits/sockaddr.h: + +/usr/include/x86_64-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types_64.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/bitsperlong.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/x86_64-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h: + +/usr/include/x86_64-linux-gnu/bits/socket2.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: + +dummyin6.h: + +/usr/include/netinet/in.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h: + +/usr/include/x86_64-linux-gnu/bits/in.h: + +/usr/include/netdb.h: + +/usr/include/rpc/netdb.h: + +/usr/include/x86_64-linux-gnu/bits/netdb.h: + +ebnet.h: + +linebuf.h: + +urlparts.h: diff --git a/lib/ebu/ebu/.deps/endword.Plo b/lib/ebu/ebu/.deps/endword.Plo new file mode 100644 index 0000000..7719e62 --- /dev/null +++ b/lib/ebu/ebu/.deps/endword.Plo @@ -0,0 +1,306 @@ +endword.lo: endword.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/error.Plo b/lib/ebu/ebu/.deps/error.Plo new file mode 100644 index 0000000..1f1e4a1 --- /dev/null +++ b/lib/ebu/ebu/.deps/error.Plo @@ -0,0 +1,306 @@ +error.lo: error.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/exactword.Plo b/lib/ebu/ebu/.deps/exactword.Plo new file mode 100644 index 0000000..2ddfa7c --- /dev/null +++ b/lib/ebu/ebu/.deps/exactword.Plo @@ -0,0 +1,306 @@ +exactword.lo: exactword.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/filename.Plo b/lib/ebu/ebu/.deps/filename.Plo new file mode 100644 index 0000000..b25113d --- /dev/null +++ b/lib/ebu/ebu/.deps/filename.Plo @@ -0,0 +1,308 @@ +filename.lo: filename.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + ebnet.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +ebnet.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/font.Plo b/lib/ebu/ebu/.deps/font.Plo new file mode 100644 index 0000000..44de987 --- /dev/null +++ b/lib/ebu/ebu/.deps/font.Plo @@ -0,0 +1,308 @@ +font.lo: font.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + font.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +font.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/getaddrinfo.Plo b/lib/ebu/ebu/.deps/getaddrinfo.Plo new file mode 100644 index 0000000..e45c5d6 --- /dev/null +++ b/lib/ebu/ebu/.deps/getaddrinfo.Plo @@ -0,0 +1,354 @@ +getaddrinfo.lo: getaddrinfo.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/socket.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h \ + /usr/include/x86_64-linux-gnu/bits/socket.h \ + /usr/include/x86_64-linux-gnu/bits/socket_type.h \ + /usr/include/x86_64-linux-gnu/bits/sockaddr.h \ + /usr/include/x86_64-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/x86_64-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h \ + /usr/include/x86_64-linux-gnu/bits/socket2.h /usr/include/netinet/in.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/x86_64-linux-gnu/bits/in.h /usr/include/arpa/inet.h \ + /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + getaddrinfo.h build-pre.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/socket.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h: + +/usr/include/x86_64-linux-gnu/bits/socket.h: + +/usr/include/x86_64-linux-gnu/bits/socket_type.h: + +/usr/include/x86_64-linux-gnu/bits/sockaddr.h: + +/usr/include/x86_64-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types_64.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/bitsperlong.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/x86_64-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h: + +/usr/include/x86_64-linux-gnu/bits/socket2.h: + +/usr/include/netinet/in.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h: + +/usr/include/x86_64-linux-gnu/bits/in.h: + +/usr/include/arpa/inet.h: + +/usr/include/netdb.h: + +/usr/include/rpc/netdb.h: + +/usr/include/x86_64-linux-gnu/bits/netdb.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +getaddrinfo.h: + +build-pre.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: diff --git a/lib/ebu/ebu/.deps/hook.Plo b/lib/ebu/ebu/.deps/hook.Plo new file mode 100644 index 0000000..c4cd2fa --- /dev/null +++ b/lib/ebu/ebu/.deps/hook.Plo @@ -0,0 +1,310 @@ +hook.lo: hook.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h text.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +text.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/jacode.Plo b/lib/ebu/ebu/.deps/jacode.Plo new file mode 100644 index 0000000..b3fd817 --- /dev/null +++ b/lib/ebu/ebu/.deps/jacode.Plo @@ -0,0 +1,281 @@ +jacode.lo: jacode.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: diff --git a/lib/ebu/ebu/.deps/keyword.Plo b/lib/ebu/ebu/.deps/keyword.Plo new file mode 100644 index 0000000..2f0ae98 --- /dev/null +++ b/lib/ebu/ebu/.deps/keyword.Plo @@ -0,0 +1,306 @@ +keyword.lo: keyword.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/linebuf.Plo b/lib/ebu/ebu/.deps/linebuf.Plo new file mode 100644 index 0000000..f53608f --- /dev/null +++ b/lib/ebu/ebu/.deps/linebuf.Plo @@ -0,0 +1,282 @@ +linebuf.lo: linebuf.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/socket.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h \ + /usr/include/x86_64-linux-gnu/bits/socket.h \ + /usr/include/x86_64-linux-gnu/bits/socket_type.h \ + /usr/include/x86_64-linux-gnu/bits/sockaddr.h \ + /usr/include/x86_64-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/x86_64-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h \ + /usr/include/x86_64-linux-gnu/bits/socket2.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h \ + /usr/include/x86_64-linux-gnu/sys/time.h linebuf.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/socket.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h: + +/usr/include/x86_64-linux-gnu/bits/socket.h: + +/usr/include/x86_64-linux-gnu/bits/socket_type.h: + +/usr/include/x86_64-linux-gnu/bits/sockaddr.h: + +/usr/include/x86_64-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types_64.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/bitsperlong.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/x86_64-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h: + +/usr/include/x86_64-linux-gnu/bits/socket2.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +linebuf.h: diff --git a/lib/ebu/ebu/.deps/lock.Plo b/lib/ebu/ebu/.deps/lock.Plo new file mode 100644 index 0000000..7c0cd8d --- /dev/null +++ b/lib/ebu/ebu/.deps/lock.Plo @@ -0,0 +1,302 @@ +lock.lo: lock.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h defs.h \ + sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/log.Plo b/lib/ebu/ebu/.deps/log.Plo new file mode 100644 index 0000000..3f067d5 --- /dev/null +++ b/lib/ebu/ebu/.deps/log.Plo @@ -0,0 +1,304 @@ +log.lo: log.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/match.Plo b/lib/ebu/ebu/.deps/match.Plo new file mode 100644 index 0000000..eb9547c --- /dev/null +++ b/lib/ebu/ebu/.deps/match.Plo @@ -0,0 +1,304 @@ +match.lo: match.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/menu.Plo b/lib/ebu/ebu/.deps/menu.Plo new file mode 100644 index 0000000..b19059f --- /dev/null +++ b/lib/ebu/ebu/.deps/menu.Plo @@ -0,0 +1,306 @@ +menu.lo: menu.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/multi.Plo b/lib/ebu/ebu/.deps/multi.Plo new file mode 100644 index 0000000..5be0d95 --- /dev/null +++ b/lib/ebu/ebu/.deps/multi.Plo @@ -0,0 +1,306 @@ +multi.lo: multi.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/multiplex.Plo b/lib/ebu/ebu/.deps/multiplex.Plo new file mode 100644 index 0000000..43d76f5 --- /dev/null +++ b/lib/ebu/ebu/.deps/multiplex.Plo @@ -0,0 +1,379 @@ +multiplex.lo: multiplex.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/netdb.h \ + /usr/include/netinet/in.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/x86_64-linux-gnu/sys/socket.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h \ + /usr/include/x86_64-linux-gnu/bits/socket.h \ + /usr/include/x86_64-linux-gnu/bits/socket_type.h \ + /usr/include/x86_64-linux-gnu/bits/sockaddr.h \ + /usr/include/x86_64-linux-gnu/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/x86_64-linux-gnu/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h \ + /usr/include/x86_64-linux-gnu/bits/socket2.h \ + /usr/include/x86_64-linux-gnu/bits/in.h /usr/include/rpc/netdb.h \ + /usr/include/x86_64-linux-gnu/bits/netdb.h /usr/include/arpa/inet.h \ + build-pre.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + build-post.h dummyin6.h ebnet.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/netdb.h: + +/usr/include/netinet/in.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h: + +/usr/include/x86_64-linux-gnu/sys/socket.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h: + +/usr/include/x86_64-linux-gnu/bits/socket.h: + +/usr/include/x86_64-linux-gnu/bits/socket_type.h: + +/usr/include/x86_64-linux-gnu/bits/sockaddr.h: + +/usr/include/x86_64-linux-gnu/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/posix_types_64.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/x86_64-linux-gnu/asm/bitsperlong.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/x86_64-linux-gnu/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h: + +/usr/include/x86_64-linux-gnu/bits/socket2.h: + +/usr/include/x86_64-linux-gnu/bits/in.h: + +/usr/include/rpc/netdb.h: + +/usr/include/x86_64-linux-gnu/bits/netdb.h: + +/usr/include/arpa/inet.h: + +build-pre.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +build-post.h: + +dummyin6.h: + +ebnet.h: diff --git a/lib/ebu/ebu/.deps/narwalt.Plo b/lib/ebu/ebu/.deps/narwalt.Plo new file mode 100644 index 0000000..64d24de --- /dev/null +++ b/lib/ebu/ebu/.deps/narwalt.Plo @@ -0,0 +1,308 @@ +narwalt.lo: narwalt.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/narwfont.Plo b/lib/ebu/ebu/.deps/narwfont.Plo new file mode 100644 index 0000000..026051a --- /dev/null +++ b/lib/ebu/ebu/.deps/narwfont.Plo @@ -0,0 +1,308 @@ +narwfont.lo: narwfont.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + font.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +font.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/readtext.Plo b/lib/ebu/ebu/.deps/readtext.Plo new file mode 100644 index 0000000..de24c31 --- /dev/null +++ b/lib/ebu/ebu/.deps/readtext.Plo @@ -0,0 +1,308 @@ +readtext.lo: readtext.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + text.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +text.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/search.Plo b/lib/ebu/ebu/.deps/search.Plo new file mode 100644 index 0000000..1c08567 --- /dev/null +++ b/lib/ebu/ebu/.deps/search.Plo @@ -0,0 +1,308 @@ +search.lo: search.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + text.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +text.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/setword.Plo b/lib/ebu/ebu/.deps/setword.Plo new file mode 100644 index 0000000..deab71b --- /dev/null +++ b/lib/ebu/ebu/.deps/setword.Plo @@ -0,0 +1,306 @@ +setword.lo: setword.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/stopcode.Plo b/lib/ebu/ebu/.deps/stopcode.Plo new file mode 100644 index 0000000..8b1d1d0 --- /dev/null +++ b/lib/ebu/ebu/.deps/stopcode.Plo @@ -0,0 +1,310 @@ +stopcode.lo: stopcode.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h text.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +text.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/strcasecmp.Plo b/lib/ebu/ebu/.deps/strcasecmp.Plo new file mode 100644 index 0000000..d9e87ca --- /dev/null +++ b/lib/ebu/ebu/.deps/strcasecmp.Plo @@ -0,0 +1,105 @@ +strcasecmp.lo: strcasecmp.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: diff --git a/lib/ebu/ebu/.deps/subbook.Plo b/lib/ebu/ebu/.deps/subbook.Plo new file mode 100644 index 0000000..9927db4 --- /dev/null +++ b/lib/ebu/ebu/.deps/subbook.Plo @@ -0,0 +1,310 @@ +subbook.lo: subbook.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + binary.h font.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +binary.h: + +font.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/text.Plo b/lib/ebu/ebu/.deps/text.Plo new file mode 100644 index 0000000..73c7697 --- /dev/null +++ b/lib/ebu/ebu/.deps/text.Plo @@ -0,0 +1,306 @@ +text.lo: text.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/urlparts.Plo b/lib/ebu/ebu/.deps/urlparts.Plo new file mode 100644 index 0000000..786b3c0 --- /dev/null +++ b/lib/ebu/ebu/.deps/urlparts.Plo @@ -0,0 +1,187 @@ +urlparts.lo: urlparts.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h urlparts.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +urlparts.h: diff --git a/lib/ebu/ebu/.deps/utf8.Plo b/lib/ebu/ebu/.deps/utf8.Plo new file mode 100644 index 0000000..f2cc6a5 --- /dev/null +++ b/lib/ebu/ebu/.deps/utf8.Plo @@ -0,0 +1,310 @@ +utf8.lo: utf8.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + binary.h font.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +binary.h: + +font.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/widealt.Plo b/lib/ebu/ebu/.deps/widealt.Plo new file mode 100644 index 0000000..19084a9 --- /dev/null +++ b/lib/ebu/ebu/.deps/widealt.Plo @@ -0,0 +1,308 @@ +widealt.lo: widealt.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + appendix.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +appendix.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/widefont.Plo b/lib/ebu/ebu/.deps/widefont.Plo new file mode 100644 index 0000000..1db2a32 --- /dev/null +++ b/lib/ebu/ebu/.deps/widefont.Plo @@ -0,0 +1,308 @@ +widefont.lo: widefont.c /usr/include/stdc-predef.h build-pre.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + font.h build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +font.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/word.Plo b/lib/ebu/ebu/.deps/word.Plo new file mode 100644 index 0000000..6c5c62b --- /dev/null +++ b/lib/ebu/ebu/.deps/word.Plo @@ -0,0 +1,306 @@ +word.lo: word.c /usr/include/stdc-predef.h build-pre.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h eb.h \ + defs.h sysdefs.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h error.h \ + build-post.h + +/usr/include/stdc-predef.h: + +build-pre.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/x86_64-linux-gnu/sys/time.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +eb.h: + +defs.h: + +sysdefs.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +error.h: + +build-post.h: diff --git a/lib/ebu/ebu/.deps/zio.Plo b/lib/ebu/ebu/.deps/zio.Plo new file mode 100644 index 0000000..cdf307a --- /dev/null +++ b/lib/ebu/ebu/.deps/zio.Plo @@ -0,0 +1,285 @@ +zio.lo: zio.c /usr/include/stdc-predef.h ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/zlib.h \ + /usr/include/zconf.h zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h ebnet.h \ + eb.h defs.h sysdefs.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +ebnet.h: + +eb.h: + +defs.h: + +sysdefs.h: diff --git a/lib/ebu/ebu/.libs/libebu.a b/lib/ebu/ebu/.libs/libebu.a new file mode 100644 index 0000000..c3fc8dd Binary files /dev/null and b/lib/ebu/ebu/.libs/libebu.a differ diff --git a/lib/ebu/ebu/.libs/libebu.la b/lib/ebu/ebu/.libs/libebu.la new file mode 100644 index 0000000..cae7c5d --- /dev/null +++ b/lib/ebu/ebu/.libs/libebu.la @@ -0,0 +1,41 @@ +# libebu.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libebu.so.17' + +# Names of this library. +library_names='libebu.so.17.0.0 libebu.so.17 libebu.so' + +# The name of the static archive. +old_library='libebu.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags=' -fopenmp' + +# Libraries that this one depends upon. +dependency_libs=' -lz -lnsl' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libebu. +current=17 +age=0 +revision=0 + +# Is this an already installed library? +installed=no + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib' diff --git a/lib/ebu/ebu/.libs/libebu.lai b/lib/ebu/ebu/.libs/libebu.lai new file mode 100644 index 0000000..ada0473 --- /dev/null +++ b/lib/ebu/ebu/.libs/libebu.lai @@ -0,0 +1,41 @@ +# libebu.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libebu.so.17' + +# Names of this library. +library_names='libebu.so.17.0.0 libebu.so.17 libebu.so' + +# The name of the static archive. +old_library='libebu.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags=' -fopenmp' + +# Libraries that this one depends upon. +dependency_libs=' -lz -lnsl' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libebu. +current=17 +age=0 +revision=0 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib' diff --git a/lib/ebu/ebu/.libs/libebu.so b/lib/ebu/ebu/.libs/libebu.so new file mode 100644 index 0000000..43e9760 Binary files /dev/null and b/lib/ebu/ebu/.libs/libebu.so differ diff --git a/lib/ebu/ebu/.libs/libebu.so.17 b/lib/ebu/ebu/.libs/libebu.so.17 new file mode 100644 index 0000000..43e9760 Binary files /dev/null and b/lib/ebu/ebu/.libs/libebu.so.17 differ diff --git a/lib/ebu/ebu/.libs/libebu.so.17.0.0 b/lib/ebu/ebu/.libs/libebu.so.17.0.0 new file mode 100644 index 0000000..43e9760 Binary files /dev/null and b/lib/ebu/ebu/.libs/libebu.so.17.0.0 differ diff --git a/lib/ebu/ebu/Makefile b/lib/ebu/ebu/Makefile new file mode 100644 index 0000000..209f79b --- /dev/null +++ b/lib/ebu/ebu/Makefile @@ -0,0 +1,704 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebu/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = ebu +DIST_COMMON = $(dist_noinst_HEADERS) $(dist_pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" \ + "$(DESTDIR)$(pkgincludedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libebu_la_LIBADD = +am__libebu_la_SOURCES_DIST = appendix.c appsub.c bcd.c binary.c \ + bitmap.c book.c booklist.c color.c copyright.c cross.c eb.c \ + endword.c error.c exactword.c filename.c font.c hook.c \ + jacode.c keyword.c lock.c log.c match.c menu.c multi.c \ + narwalt.c narwfont.c readtext.c search.c setword.c stopcode.c \ + strcasecmp.c subbook.c text.c widealt.c widefont.c word.c \ + zio.c utf8.c ebnet.c multiplex.c linebuf.c urlparts.c \ + getaddrinfo.c dummyin6.c +am__objects_1 = ebnet.lo multiplex.lo linebuf.lo \ + urlparts.lo getaddrinfo.lo dummyin6.lo +am_libebu_la_OBJECTS = appendix.lo appsub.lo bcd.lo binary.lo \ + bitmap.lo book.lo booklist.lo color.lo copyright.lo cross.lo \ + eb.lo endword.lo error.lo exactword.lo filename.lo font.lo \ + hook.lo jacode.lo keyword.lo lock.lo log.lo match.lo menu.lo \ + multi.lo narwalt.lo narwfont.lo readtext.lo search.lo \ + setword.lo stopcode.lo strcasecmp.lo subbook.lo text.lo \ + widealt.lo widefont.lo word.lo zio.lo utf8.lo $(am__objects_1) +libebu_la_OBJECTS = $(am_libebu_la_OBJECTS) +libebu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libebu_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libebu_la_SOURCES) +DIST_SOURCES = $(am__libebu_la_SOURCES_DIST) +dist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +nodist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(dist_noinst_HEADERS) $(dist_pkginclude_HEADERS) \ + $(nodist_noinst_HEADERS) $(nodist_pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebu +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebu +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +lib_LTLIBRARIES = libebu.la +#libebu_ebnet_sources = +libebu_ebnet_sources = ebnet.c multiplex.c linebuf.c urlparts.c getaddrinfo.c \ + dummyin6.c + +libebu_la_SOURCES = appendix.c appsub.c bcd.c binary.c bitmap.c \ + book.c booklist.c color.c copyright.c cross.c eb.c endword.c \ + error.c exactword.c filename.c font.c hook.c jacode.c \ + keyword.c lock.c log.c match.c menu.c multi.c narwalt.c \ + narwfont.c readtext.c search.c setword.c stopcode.c \ + strcasecmp.c subbook.c text.c widealt.c widefont.c word.c \ + zio.c utf8.c $(libebu_ebnet_sources) + +libebu_la_LDFLAGS = -no-undefined -version-info 17:0:0 \ + $(ZLIBLIBS) $(INTLLIBS) + +dist_pkginclude_HEADERS = appendix.h binary.h booklist.h defs.h eb.h error.h \ + font.h text.h zio.h + +nodist_pkginclude_HEADERS = sysdefs.h +dist_noinst_HEADERS = build-pre.h dummyin6.h ebnet.h getaddrinfo.h linebuf.h \ + urlparts.h + +nodist_noinst_HEADERS = build-post.h +INCLUDES = -DEB_BUILD_LIBRARY $(INTLINCS) $(ZLIBINCS) +EXTRA_DIST = stamp-widealt-h stamp-widefont-h build-post.h.in +CLEANFILES = stamp-build-post-h stamp-sysdefs-h build-post.h sysdefs.h +MAINTAINERCLEANFILES = stamp-widealt-h stamp-widefont-h widealt.c widefont.c +BUILT_SOURCES = build-post.h sysdefs.h widealt.c widefont.c +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebu/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libebu.la: $(libebu_la_OBJECTS) $(libebu_la_DEPENDENCIES) + $(libebu_la_LINK) -rpath $(libdir) $(libebu_la_OBJECTS) $(libebu_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/appendix.Plo +include ./$(DEPDIR)/appsub.Plo +include ./$(DEPDIR)/bcd.Plo +include ./$(DEPDIR)/binary.Plo +include ./$(DEPDIR)/bitmap.Plo +include ./$(DEPDIR)/book.Plo +include ./$(DEPDIR)/booklist.Plo +include ./$(DEPDIR)/color.Plo +include ./$(DEPDIR)/copyright.Plo +include ./$(DEPDIR)/cross.Plo +include ./$(DEPDIR)/dummyin6.Plo +include ./$(DEPDIR)/eb.Plo +include ./$(DEPDIR)/ebnet.Plo +include ./$(DEPDIR)/endword.Plo +include ./$(DEPDIR)/error.Plo +include ./$(DEPDIR)/exactword.Plo +include ./$(DEPDIR)/filename.Plo +include ./$(DEPDIR)/font.Plo +include ./$(DEPDIR)/getaddrinfo.Plo +include ./$(DEPDIR)/hook.Plo +include ./$(DEPDIR)/jacode.Plo +include ./$(DEPDIR)/keyword.Plo +include ./$(DEPDIR)/linebuf.Plo +include ./$(DEPDIR)/lock.Plo +include ./$(DEPDIR)/log.Plo +include ./$(DEPDIR)/match.Plo +include ./$(DEPDIR)/menu.Plo +include ./$(DEPDIR)/multi.Plo +include ./$(DEPDIR)/multiplex.Plo +include ./$(DEPDIR)/narwalt.Plo +include ./$(DEPDIR)/narwfont.Plo +include ./$(DEPDIR)/readtext.Plo +include ./$(DEPDIR)/search.Plo +include ./$(DEPDIR)/setword.Plo +include ./$(DEPDIR)/stopcode.Plo +include ./$(DEPDIR)/strcasecmp.Plo +include ./$(DEPDIR)/subbook.Plo +include ./$(DEPDIR)/text.Plo +include ./$(DEPDIR)/urlparts.Plo +include ./$(DEPDIR)/utf8.Plo +include ./$(DEPDIR)/widealt.Plo +include ./$(DEPDIR)/widefont.Plo +include ./$(DEPDIR)/word.Plo +include ./$(DEPDIR)/zio.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_pkgincludeHEADERS: $(dist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(dist_pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(dist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-dist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done +install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(nodist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(nodist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-nodist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_pkgincludeHEADERS \ + install-nodist_pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_pkgincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_pkgincludeHEADERS install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-nodist_pkgincludeHEADERS install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-dist_pkgincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS + + +sysdefs.h: stamp-sysdefs-h +stamp-sysdefs-h: Makefile + rm -f sysdefs.h.tmp + echo '/* automatically generated by Makefile. */' > sysdefs.h.tmp + echo '#define EB_VERSION_STRING "$(VERSION)"' >> sysdefs.h.tmp + echo '#define EB_VERSION_MAJOR $(EB_VERSION_MAJOR)' >> sysdefs.h.tmp + echo '#define EB_VERSION_MINOR $(EB_VERSION_MINOR)' >> sysdefs.h.tmp + if test X$(ENABLE_EBNET) = Xyes; then \ + echo '#define EB_ENABLE_EBNET 1' >> sysdefs.h.tmp; \ + fi + if test X$(ENABLE_PTHREAD) = Xyes; then \ + echo '#define EB_ENABLE_PTHREAD 1' >> sysdefs.h.tmp; \ + fi + $(top_srcdir)/move-if-change sysdefs.h.tmp sysdefs.h + @echo timestamp > stamp-sysdefs-h + +build-post.h: stamp-build-post-h +stamp-build-post-h: build-post.h.in Makefile + rm -f build-post.h.tmp + echo '/* automatically generated from build-post.h.in. */' \ + > build-post.h + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/build-post.h.in >> build-post.h.tmp + $(top_srcdir)/move-if-change build-post.h.tmp build-post.h + @echo timestamp > stamp-build-post-h + +widealt.c: stamp-widealt-h +stamp-widealt-h: narwalt.c Makefile + rm -f widealt.c.tmp + echo '/* automatically generated from narwalt.c. */' \ + > widealt.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwalt.c >> widealt.c.tmp + $(top_srcdir)/move-if-change widealt.c.tmp widealt.c + @echo timestamp > stamp-widealt-h + +widefont.c: stamp-widefont-h +stamp-widefont-h: narwfont.c Makefile + rm -f widefont.c.tmp + echo '/* automatically generated from narwfont.c. */' \ + > widefont.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwfont.c >> widefont.c.tmp + $(top_srcdir)/move-if-change widefont.c.tmp widefont.c + @echo timestamp > stamp-widefont-h +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebu/Makefile.am b/lib/ebu/ebu/Makefile.am new file mode 100644 index 0000000..f1c3197 --- /dev/null +++ b/lib/ebu/ebu/Makefile.am @@ -0,0 +1,78 @@ +lib_LTLIBRARIES = libebu.la + +if ENABLE_EBNET +libebu_ebnet_sources = ebnet.c multiplex.c linebuf.c urlparts.c getaddrinfo.c \ + dummyin6.c +else +libebu_ebnet_sources = +endif + +libebu_la_SOURCES = appendix.c appsub.c bcd.c binary.c bitmap.c \ + book.c booklist.c color.c copyright.c cross.c eb.c endword.c \ + error.c exactword.c filename.c font.c hook.c jacode.c \ + keyword.c lock.c log.c match.c menu.c multi.c narwalt.c \ + narwfont.c readtext.c search.c setword.c stopcode.c \ + strcasecmp.c subbook.c text.c widealt.c widefont.c word.c \ + zio.c utf8.c $(libebu_ebnet_sources) +libebu_la_LDFLAGS = -no-undefined -version-info @LIBEB_VERSION_INFO@ \ + $(ZLIBLIBS) $(INTLLIBS) + +dist_pkginclude_HEADERS = appendix.h binary.h booklist.h defs.h eb.h error.h \ + font.h text.h zio.h +nodist_pkginclude_HEADERS = sysdefs.h +dist_noinst_HEADERS = build-pre.h dummyin6.h ebnet.h getaddrinfo.h linebuf.h \ + urlparts.h +nodist_noinst_HEADERS = build-post.h + +INCLUDES = -DEB_BUILD_LIBRARY $(INTLINCS) $(ZLIBINCS) + +EXTRA_DIST = stamp-widealt-h stamp-widefont-h build-post.h.in +CLEANFILES = stamp-build-post-h stamp-sysdefs-h build-post.h sysdefs.h +MAINTAINERCLEANFILES = stamp-widealt-h stamp-widefont-h widealt.c widefont.c +BUILT_SOURCES = build-post.h sysdefs.h widealt.c widefont.c + +sysdefs.h: stamp-sysdefs-h +stamp-sysdefs-h: Makefile + rm -f sysdefs.h.tmp + echo '/* automatically generated by Makefile. */' > sysdefs.h.tmp + echo '#define EB_VERSION_STRING "$(VERSION)"' >> sysdefs.h.tmp + echo '#define EB_VERSION_MAJOR $(EB_VERSION_MAJOR)' >> sysdefs.h.tmp + echo '#define EB_VERSION_MINOR $(EB_VERSION_MINOR)' >> sysdefs.h.tmp + if test X$(ENABLE_EBNET) = Xyes; then \ + echo '#define EB_ENABLE_EBNET 1' >> sysdefs.h.tmp; \ + fi + if test X$(ENABLE_PTHREAD) = Xyes; then \ + echo '#define EB_ENABLE_PTHREAD 1' >> sysdefs.h.tmp; \ + fi + $(top_srcdir)/move-if-change sysdefs.h.tmp sysdefs.h + @echo timestamp > stamp-sysdefs-h + +build-post.h: stamp-build-post-h +stamp-build-post-h: build-post.h.in Makefile + rm -f build-post.h.tmp + echo '/* automatically generated from build-post.h.in. */' \ + > build-post.h + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/build-post.h.in >> build-post.h.tmp + $(top_srcdir)/move-if-change build-post.h.tmp build-post.h + @echo timestamp > stamp-build-post-h + +widealt.c: stamp-widealt-h +stamp-widealt-h: narwalt.c Makefile + rm -f widealt.c.tmp + echo '/* automatically generated from narwalt.c. */' \ + > widealt.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwalt.c >> widealt.c.tmp + $(top_srcdir)/move-if-change widealt.c.tmp widealt.c + @echo timestamp > stamp-widealt-h + +widefont.c: stamp-widefont-h +stamp-widefont-h: narwfont.c Makefile + rm -f widefont.c.tmp + echo '/* automatically generated from narwfont.c. */' \ + > widefont.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwfont.c >> widefont.c.tmp + $(top_srcdir)/move-if-change widefont.c.tmp widefont.c + @echo timestamp > stamp-widefont-h diff --git a/lib/ebu/ebu/Makefile.in b/lib/ebu/ebu/Makefile.in new file mode 100644 index 0000000..fd7e2ca --- /dev/null +++ b/lib/ebu/ebu/Makefile.in @@ -0,0 +1,704 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ebu +DIST_COMMON = $(dist_noinst_HEADERS) $(dist_pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" \ + "$(DESTDIR)$(pkgincludedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libebu_la_LIBADD = +am__libebu_la_SOURCES_DIST = appendix.c appsub.c bcd.c binary.c \ + bitmap.c book.c booklist.c color.c copyright.c cross.c eb.c \ + endword.c error.c exactword.c filename.c font.c hook.c \ + jacode.c keyword.c lock.c log.c match.c menu.c multi.c \ + narwalt.c narwfont.c readtext.c search.c setword.c stopcode.c \ + strcasecmp.c subbook.c text.c widealt.c widefont.c word.c \ + zio.c utf8.c ebnet.c multiplex.c linebuf.c urlparts.c \ + getaddrinfo.c dummyin6.c +@ENABLE_EBNET_TRUE@am__objects_1 = ebnet.lo multiplex.lo linebuf.lo \ +@ENABLE_EBNET_TRUE@ urlparts.lo getaddrinfo.lo dummyin6.lo +am_libebu_la_OBJECTS = appendix.lo appsub.lo bcd.lo binary.lo \ + bitmap.lo book.lo booklist.lo color.lo copyright.lo cross.lo \ + eb.lo endword.lo error.lo exactword.lo filename.lo font.lo \ + hook.lo jacode.lo keyword.lo lock.lo log.lo match.lo menu.lo \ + multi.lo narwalt.lo narwfont.lo readtext.lo search.lo \ + setword.lo stopcode.lo strcasecmp.lo subbook.lo text.lo \ + widealt.lo widefont.lo word.lo zio.lo utf8.lo $(am__objects_1) +libebu_la_OBJECTS = $(am_libebu_la_OBJECTS) +libebu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libebu_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libebu_la_SOURCES) +DIST_SOURCES = $(am__libebu_la_SOURCES_DIST) +dist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +nodist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(dist_noinst_HEADERS) $(dist_pkginclude_HEADERS) \ + $(nodist_noinst_HEADERS) $(nodist_pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libebu.la +@ENABLE_EBNET_FALSE@libebu_ebnet_sources = +@ENABLE_EBNET_TRUE@libebu_ebnet_sources = ebnet.c multiplex.c linebuf.c urlparts.c getaddrinfo.c \ +@ENABLE_EBNET_TRUE@ dummyin6.c + +libebu_la_SOURCES = appendix.c appsub.c bcd.c binary.c bitmap.c \ + book.c booklist.c color.c copyright.c cross.c eb.c endword.c \ + error.c exactword.c filename.c font.c hook.c jacode.c \ + keyword.c lock.c log.c match.c menu.c multi.c narwalt.c \ + narwfont.c readtext.c search.c setword.c stopcode.c \ + strcasecmp.c subbook.c text.c widealt.c widefont.c word.c \ + zio.c utf8.c $(libebu_ebnet_sources) + +libebu_la_LDFLAGS = -no-undefined -version-info @LIBEB_VERSION_INFO@ \ + $(ZLIBLIBS) $(INTLLIBS) + +dist_pkginclude_HEADERS = appendix.h binary.h booklist.h defs.h eb.h error.h \ + font.h text.h zio.h + +nodist_pkginclude_HEADERS = sysdefs.h +dist_noinst_HEADERS = build-pre.h dummyin6.h ebnet.h getaddrinfo.h linebuf.h \ + urlparts.h + +nodist_noinst_HEADERS = build-post.h +INCLUDES = -DEB_BUILD_LIBRARY $(INTLINCS) $(ZLIBINCS) +EXTRA_DIST = stamp-widealt-h stamp-widefont-h build-post.h.in +CLEANFILES = stamp-build-post-h stamp-sysdefs-h build-post.h sysdefs.h +MAINTAINERCLEANFILES = stamp-widealt-h stamp-widefont-h widealt.c widefont.c +BUILT_SOURCES = build-post.h sysdefs.h widealt.c widefont.c +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebu/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libebu.la: $(libebu_la_OBJECTS) $(libebu_la_DEPENDENCIES) + $(libebu_la_LINK) -rpath $(libdir) $(libebu_la_OBJECTS) $(libebu_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appendix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appsub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/book.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/booklist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copyright.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cross.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummyin6.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebnet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endword.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exactword.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filename.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hook.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jacode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyword.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiplex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/narwalt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/narwfont.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setword.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stopcode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subbook.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlparts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widealt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widefont.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/word.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zio.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_pkgincludeHEADERS: $(dist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(dist_pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(dist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-dist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done +install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(nodist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(nodist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-nodist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_pkgincludeHEADERS \ + install-nodist_pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_pkgincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_pkgincludeHEADERS install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-nodist_pkgincludeHEADERS install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-dist_pkgincludeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS + + +sysdefs.h: stamp-sysdefs-h +stamp-sysdefs-h: Makefile + rm -f sysdefs.h.tmp + echo '/* automatically generated by Makefile. */' > sysdefs.h.tmp + echo '#define EB_VERSION_STRING "$(VERSION)"' >> sysdefs.h.tmp + echo '#define EB_VERSION_MAJOR $(EB_VERSION_MAJOR)' >> sysdefs.h.tmp + echo '#define EB_VERSION_MINOR $(EB_VERSION_MINOR)' >> sysdefs.h.tmp + if test X$(ENABLE_EBNET) = Xyes; then \ + echo '#define EB_ENABLE_EBNET 1' >> sysdefs.h.tmp; \ + fi + if test X$(ENABLE_PTHREAD) = Xyes; then \ + echo '#define EB_ENABLE_PTHREAD 1' >> sysdefs.h.tmp; \ + fi + $(top_srcdir)/move-if-change sysdefs.h.tmp sysdefs.h + @echo timestamp > stamp-sysdefs-h + +build-post.h: stamp-build-post-h +stamp-build-post-h: build-post.h.in Makefile + rm -f build-post.h.tmp + echo '/* automatically generated from build-post.h.in. */' \ + > build-post.h + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/build-post.h.in >> build-post.h.tmp + $(top_srcdir)/move-if-change build-post.h.tmp build-post.h + @echo timestamp > stamp-build-post-h + +widealt.c: stamp-widealt-h +stamp-widealt-h: narwalt.c Makefile + rm -f widealt.c.tmp + echo '/* automatically generated from narwalt.c. */' \ + > widealt.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwalt.c >> widealt.c.tmp + $(top_srcdir)/move-if-change widealt.c.tmp widealt.c + @echo timestamp > stamp-widealt-h + +widefont.c: stamp-widefont-h +stamp-widefont-h: narwfont.c Makefile + rm -f widefont.c.tmp + echo '/* automatically generated from narwfont.c. */' \ + > widefont.c.tmp + sed -e s/narrow/wide/g -e s/Narrow/Wide/g -e s/NARROW/WIDE/g \ + $(srcdir)/narwfont.c >> widefont.c.tmp + $(top_srcdir)/move-if-change widefont.c.tmp widefont.c + @echo timestamp > stamp-widefont-h +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebu/appendix.c b/lib/ebu/ebu/appendix.c new file mode 100644 index 0000000..edcc8af --- /dev/null +++ b/lib/ebu/ebu/appendix.c @@ -0,0 +1,447 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif +#include "build-post.h" + +/* + * Appendix ID counter. + */ +static EB_Book_Code appendix_counter = 0; + +/* + * Mutex for `appendix_counter'. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t appendix_counter_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Unexported functions. + */ +static EB_Error_Code eb_load_appendix_catalog(EB_Appendix *appendix); + + +/* + * Initialize alternation text cache in `appendix'. + */ +void +eb_initialize_alt_caches(EB_Appendix *appendix) +{ + EB_Alternation_Cache *p; + int i; + + LOG(("in: eb_initialize_alt_caches(appendix=%d)", (int)appendix->code)); + + for (i = 0, p = appendix->narrow_cache; + i < EB_MAX_ALTERNATION_CACHE; i++, p++) + p->character_number = -1; + for (i = 0, p = appendix->wide_cache; + i < EB_MAX_ALTERNATION_CACHE; i++, p++) + p->character_number = -1; + + LOG(("out: eb_initialize_alt_caches()")); +} + + +/* + * Finalize alternation text cache in `appendix'. + */ +void +eb_finalize_alt_caches(EB_Appendix *appendix) +{ + LOG(("in+out: eb_finalize_alt_caches(appendix=%d)", (int)appendix->code)); + + /* nothing to be done */ +} + + +/* + * Initialize `appendix'. + */ +void +eb_initialize_appendix(EB_Appendix *appendix) +{ + LOG(("in: eb_initialize_appendix()")); + + appendix->code = EB_BOOK_NONE; + appendix->path = NULL; + appendix->path_length = 0; + appendix->disc_code = EB_DISC_INVALID; + appendix->subbook_count = 0; + appendix->subbooks = NULL; + appendix->subbook_current = NULL; +#ifdef ENABLE_EBNET + appendix->ebnet_file = -1; +#endif + eb_initialize_lock(&appendix->lock); + eb_initialize_alt_caches(appendix); + + LOG(("out: eb_initialize_appendix()")); +} + + +/* + * Finalize `appendix'. + */ +void +eb_finalize_appendix(EB_Appendix *appendix) +{ + LOG(("in: eb_finalize_appendix(appendix=%d)", (int)appendix->code)); + + appendix->code = EB_BOOK_NONE; + + if (appendix->path != NULL) { + free(appendix->path); + appendix->path = NULL; + } + appendix->path_length = 0; + + appendix->disc_code = EB_DISC_INVALID; + + if (appendix->subbooks != NULL) { + eb_finalize_appendix_subbooks(appendix); + free(appendix->subbooks); + appendix->subbooks = NULL; + appendix->subbook_count = 0; + } + appendix->subbook_current = NULL; + eb_finalize_lock(&appendix->lock); + eb_finalize_alt_caches(appendix); + +#ifdef ENABLE_EBNET + ebnet_finalize_appendix(appendix); +#endif + + LOG(("out: eb_finalize_appendix()")); +} + + +/* + * Bind `appendix' to `path'. + */ +EB_Error_Code +eb_bind_appendix(EB_Appendix *appendix, const char *path) +{ + EB_Error_Code error_code; + char temporary_path[EB_MAX_PATH_LENGTH + 1]; + int is_ebnet; + + eb_lock(&appendix->lock); + LOG(("in: eb_bind_appendix(path=%s)", path)); + + /* + * Reset structure members in the appendix. + */ + if (appendix->path != NULL) { + eb_finalize_appendix(appendix); + eb_initialize_appendix(appendix); + } + + /* + * Assign a book code. + */ + pthread_mutex_lock(&appendix_counter_mutex); + appendix->code = appendix_counter++; + pthread_mutex_unlock(&appendix_counter_mutex); + + /* + * Check whether `path' is URL. + */ + is_ebnet = is_ebnet_url(path); +#ifndef ENABLE_EBNET + if (is_ebnet) { + error_code = EB_ERR_EBNET_UNSUPPORTED; + goto failed; + } +#endif + + /* + * Set path of the appendix. + * The length of the file name "path/subdir/subsubdir/file.;1" must + * be EB_MAX_PATH_LENGTH maximum. + */ + if (EB_MAX_PATH_LENGTH < strlen(path)) { + error_code = EB_ERR_TOO_LONG_FILE_NAME; + goto failed; + } + strcpy(temporary_path, path); +#ifdef ENABLE_EBNET + if (is_ebnet) + error_code = ebnet_canonicalize_url(temporary_path); + else + error_code = eb_canonicalize_path_name(temporary_path); +#else + error_code = eb_canonicalize_path_name(temporary_path); +#endif + if (error_code != EB_SUCCESS) + goto failed; + appendix->path_length = strlen(temporary_path); + + if (EB_MAX_PATH_LENGTH + < appendix->path_length + 1 + EB_MAX_RELATIVE_PATH_LENGTH) { + error_code = EB_ERR_TOO_LONG_FILE_NAME; + goto failed; + } + + appendix->path = (char *)malloc(appendix->path_length + 1); + if (appendix->path == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + strcpy(appendix->path, temporary_path); + + /* + * Establish a connection with a ebnet server. + */ +#ifdef ENABLE_EBNET + if (is_ebnet) { + error_code = ebnet_bind_appendix(appendix, appendix->path); + if (error_code != EB_SUCCESS) + goto failed; + } +#endif + + /* + * Read information from the catalog file. + */ + error_code = eb_load_appendix_catalog(appendix); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_bind_appendix(appendix=%d) = %s", (int)appendix->code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_finalize_appendix(appendix); + LOG(("out: eb_bind_appendix() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Read information from the `CATALOG(S)' file in `appendix'. + * Return EB_SUCCESS, if it succeeds, error-code ohtherwise. + */ +static EB_Error_Code +eb_load_appendix_catalog(EB_Appendix *appendix) +{ + EB_Error_Code error_code; + char buffer[EB_SIZE_PAGE]; + char catalog_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char catalog_path_name[EB_MAX_PATH_LENGTH + 1]; + char *space; + EB_Appendix_Subbook *subbook; + size_t catalog_size; + size_t title_size; + Zio zio; + Zio_Code zio_code; + int i; + + LOG(("in: eb_load_appendix_catalog(appendix=%d)", (int)appendix->code)); + + zio_initialize(&zio); + + /* + * Find a catalog file. + */ + if (eb_find_file_name(appendix->path, "catalog", catalog_file_name) + == EB_SUCCESS) { + appendix->disc_code = EB_DISC_EB; + catalog_size = EB_SIZE_EB_CATALOG; + title_size = EB_MAX_EB_TITLE_LENGTH; + } else if (eb_find_file_name(appendix->path, "catalogs", catalog_file_name) + == EB_SUCCESS) { + appendix->disc_code = EB_DISC_EPWING; + catalog_size = EB_SIZE_EPWING_CATALOG; + title_size = EB_MAX_EPWING_TITLE_LENGTH; + } else { + error_code = EB_ERR_FAIL_OPEN_CATAPP; + goto failed; + } + + eb_compose_path_name(appendix->path, catalog_file_name, catalog_path_name); + eb_path_name_zio_code(catalog_path_name, ZIO_PLAIN, &zio_code); + + /* + * Open the catalog file. + */ + if (zio_open(&zio, catalog_path_name, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_CATAPP; + goto failed; + } + + /* + * Get the number of subbooks in the appendix. + */ + if (zio_read(&zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_CATAPP; + goto failed; + } + appendix->subbook_count = eb_uint2(buffer); + if (EB_MAX_SUBBOOKS < appendix->subbook_count) + appendix->subbook_count = EB_MAX_SUBBOOKS; + if (appendix->subbook_count == 0) { + error_code = EB_ERR_UNEXP_CATAPP; + goto failed; + } + + /* + * Allocate memories for subbook entries. + */ + appendix->subbooks = (EB_Appendix_Subbook *) + malloc(sizeof(EB_Appendix_Subbook) * appendix->subbook_count); + if (appendix->subbooks == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + eb_initialize_appendix_subbooks(appendix); + + /* + * Read subbook information. + */ + for (i = 0, subbook = appendix->subbooks; i < appendix->subbook_count; + i++, subbook++) { + /* + * Read data from the catalog file. + */ + if (zio_read(&zio, buffer, catalog_size) != catalog_size) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } + + /* + * Set a directory name of the subbook. + */ + strncpy(subbook->directory_name, buffer + 2 + title_size, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->directory_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->directory_name, ' '); + if (space != NULL) + *space = '\0'; + eb_fix_directory_name(appendix->path, subbook->directory_name); + } + + /* + * Close the catalog file. + */ + zio_close(&zio); + zio_finalize(&zio); + LOG(("out: eb_load_appendix_catalog() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + zio_close(&zio); + zio_finalize(&zio); + if (appendix->subbooks != NULL) { + free(appendix->subbooks); + appendix->subbooks = NULL; + } + LOG(("out: eb_load_appendix_catalog() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Examine whether `appendix' is bound or not. + */ +int +eb_is_appendix_bound(EB_Appendix *appendix) +{ + int is_bound; + + eb_lock(&appendix->lock); + LOG(("in: eb_is_appendix_bound(appendix=%d)", (int)appendix->code)); + + is_bound = (appendix->path != NULL); + + LOG(("out: eb_is_appendix_bound() = %d", is_bound)); + eb_unlock(&appendix->lock); + + return is_bound; +} + + +/* + * Get the bound path of `appendix'. + */ +EB_Error_Code +eb_appendix_path(EB_Appendix *appendix, char *path) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_appendix_path(appendix=%d)", (int)appendix->code)); + + /* + * Check for the current status. + */ + if (appendix->path == NULL) { + error_code = EB_ERR_UNBOUND_APP; + goto failed; + } + + /* + * Copy the path to `path'. + */ + strcpy(path, appendix->path); + + LOG(("out: eb_appendix_path(path=%s) = %s", + path, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *path = '\0'; + LOG(("out: eb_appendix_path() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/appendix.h b/lib/ebu/ebu/appendix.h new file mode 100644 index 0000000..52f7e66 --- /dev/null +++ b/lib/ebu/ebu/appendix.h @@ -0,0 +1,100 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_APPENDIX_H +#define EB_APPENDIX_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef EB_BUILD_LIBRARY +#include "eb.h" +#else +#include +#endif + +/* + * Function declarations. + */ +/* appendix.c */ +void eb_initialize_appendix(EB_Appendix *appendix); +void eb_finalize_appendix(EB_Appendix *appendix); +EB_Error_Code eb_bind_appendix(EB_Appendix *appendix, const char *path); +int eb_is_appendix_bound(EB_Appendix *appendix); +EB_Error_Code eb_appendix_path(EB_Appendix *appendix, char *path); + +/* appsub.c */ +EB_Error_Code eb_load_all_appendix_subbooks(EB_Appendix *appendix); +EB_Error_Code eb_appendix_subbook_list(EB_Appendix *appendix, + EB_Subbook_Code *subbook_list, int *subbook_count); +EB_Error_Code eb_appendix_subbook(EB_Appendix *appendix, + EB_Subbook_Code *subbook_code); +EB_Error_Code eb_appendix_subbook_directory(EB_Appendix *appendix, + char *directory); +EB_Error_Code eb_appendix_subbook_directory2(EB_Appendix *appendix, + EB_Subbook_Code subbook_code, char *directory); +EB_Error_Code eb_set_appendix_subbook(EB_Appendix *appendix, + EB_Subbook_Code subbook_code); +void eb_unset_appendix_subbook(EB_Appendix *appendix); + +/* narwalt.c */ +int eb_have_narrow_alt(EB_Appendix *appendix); +EB_Error_Code eb_narrow_alt_start(EB_Appendix *appendix, int *start); +EB_Error_Code eb_narrow_alt_end(EB_Appendix *appendix, int *end); +EB_Error_Code eb_narrow_alt_character_text(EB_Appendix *appendix, + int character_number, char *text); +EB_Error_Code eb_forward_narrow_alt_character(EB_Appendix *appendix, + int n, int *character_number); +EB_Error_Code eb_backward_narrow_alt_character(EB_Appendix *appendix, + int n, int *character_number); + +/* stopcode.c */ +int eb_have_stop_code(EB_Appendix *appendix); +EB_Error_Code eb_stop_code(EB_Appendix *appendix, int *); + +/* widealt.c */ +int eb_have_wide_alt(EB_Appendix *appendix); +EB_Error_Code eb_wide_alt_start(EB_Appendix *appendix, int *start); +EB_Error_Code eb_wide_alt_end(EB_Appendix *appendix, int *end); +EB_Error_Code eb_wide_alt_character_text(EB_Appendix *appendix, + int character_number, char *text); +EB_Error_Code eb_forward_wide_alt_character(EB_Appendix *appendix, int n, + int *character_number); +EB_Error_Code eb_backward_wide_alt_character(EB_Appendix *appendix, int n, + int *character_number); + +/* for backward compatibility */ +#define eb_suspend_appendix eb_unset_appendix_subbook +#define eb_initialize_all_appendix_subbooks eb_load_all_appendix_subbooks + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_APPENDIX_H */ diff --git a/lib/ebu/ebu/appendix.lo b/lib/ebu/ebu/appendix.lo new file mode 100644 index 0000000..42e5219 --- /dev/null +++ b/lib/ebu/ebu/appendix.lo @@ -0,0 +1,12 @@ +# appendix.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/appendix.o' + +# Name of the non-PIC object +non_pic_object='appendix.o' + diff --git a/lib/ebu/ebu/appsub.c b/lib/ebu/ebu/appsub.c new file mode 100644 index 0000000..769c9eb --- /dev/null +++ b/lib/ebu/ebu/appsub.c @@ -0,0 +1,750 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_load_appendix_subbook(EB_Appendix *appendix); +static EB_Error_Code eb_set_appendix_subbook_eb(EB_Appendix *appendix, + EB_Subbook_Code subbook_code); +static EB_Error_Code eb_set_appendix_subbook_epwing(EB_Appendix *appendix, + EB_Subbook_Code subbook_code); + +/* + * Initialize all subbooks in `appendix'. + */ +void +eb_initialize_appendix_subbooks(EB_Appendix *appendix) +{ + EB_Appendix_Subbook *subbook; + int i; + + LOG(("in: eb_initialize_appendix_subbooks(appendix=%d)", + (int)appendix->code)); + + for (i = 0, subbook = appendix->subbooks; i < appendix->subbook_count; + i++, subbook++) { + subbook->initialized = 0; + subbook->code = i; + subbook->directory_name[0] = '\0'; + subbook->data_directory_name[0] = '\0'; + subbook->file_name[0] = '\0'; + subbook->character_code = EB_CHARCODE_INVALID; + subbook->narrow_start = -1; + subbook->wide_start = -1; + subbook->narrow_end = -1; + subbook->wide_end = -1; + subbook->narrow_page = 0; + subbook->wide_page = 0; + subbook->stop_code0 = 0; + subbook->stop_code1 = 0; + zio_initialize(&subbook->zio); + } + + LOG(("out: eb_initialize_appendix_subbooks()")); +} + + +/* + * Initialize subbooks in `appendix'. + */ +void +eb_finalize_appendix_subbooks(EB_Appendix *appendix) +{ + EB_Appendix_Subbook *subbook; + int i; + + LOG(("in: eb_finalize_appendix_subbooks(appendix=%d)", + (int)appendix->code)); + + for (i = 0, subbook = appendix->subbooks; i < appendix->subbook_count; + i++, subbook++) { + zio_finalize(&appendix->subbooks[i].zio); + } + + LOG(("out: eb_finalize_appendix_subbooks()")); +} + + +/* + * Load all subbooks in `appendix'. + */ +static EB_Error_Code +eb_load_appendix_subbook(EB_Appendix *appendix) +{ + EB_Error_Code error_code; + EB_Appendix_Subbook *subbook; + char buffer[16]; + int stop_code_page; + int character_count; + + LOG(("in: eb_load_appendix_subbook(appendix=%d)", (int)appendix->code)); + + subbook = appendix->subbook_current; + + /* + * Check for the current status. + */ + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * If the subbook has already initialized, return immediately. + */ + if (subbook->initialized != 0) + goto succeeded; + + /* + * Rewind the APPENDIX file. + */ + if (zio_lseek(&subbook->zio, 0, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + + /* + * Set character code used in the appendix. + */ + if (zio_read(&subbook->zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + subbook->character_code = eb_uint2(buffer + 2); + + /* + * Set information about alternation text of wide font. + */ + if (zio_read(&subbook->zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + character_count = eb_uint2(buffer + 12); + + if (0 < character_count) { + subbook->narrow_page = eb_uint4(buffer); + subbook->narrow_start = eb_uint2(buffer + 10); + + if (subbook->character_code == EB_CHARCODE_ISO8859_1) { + subbook->narrow_end = subbook->narrow_start + + ((character_count / 0xfe) << 8) + (character_count % 0xfe) + - 1; + if (0xfe < (subbook->narrow_end & 0xff)) + subbook->narrow_end += 3; + + if ((subbook->narrow_start & 0xff) < 0x01 + || 0xfe < (subbook->narrow_start & 0xff) + || subbook->narrow_start < 0x0001 + || 0x1efe < subbook->narrow_end) { + error_code = EB_ERR_UNEXP_APP; + goto failed; + } + } else { + subbook->narrow_end = subbook->narrow_start + + ((character_count / 0x5e) << 8) + (character_count % 0x5e) + - 1; + if (0x7e < (subbook->narrow_end & 0xff)) + subbook->narrow_end += 0xa3; + + if ((subbook->narrow_start & 0xff) < 0x21 + || 0x7e < (subbook->narrow_start & 0xff) + || subbook->narrow_start < 0xa121 + || 0xfe7e < subbook->narrow_end) { + error_code = EB_ERR_UNEXP_APP; + goto failed; + } + } + } + + /* + * Set information about alternation text of wide font. + */ + if (zio_read(&subbook->zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + character_count = eb_uint2(buffer + 12); + + if (0 < character_count) { + subbook->wide_page = eb_uint4(buffer); + subbook->wide_start = eb_uint2(buffer + 10); + + if (subbook->character_code == EB_CHARCODE_ISO8859_1) { + subbook->wide_end = subbook->wide_start + + ((character_count / 0xfe) << 8) + (character_count % 0xfe) + - 1; + if (0xfe < (subbook->wide_end & 0xff)) + subbook->wide_end += 3; + + if ((subbook->wide_start & 0xff) < 0x01 + || 0xfe < (subbook->wide_start & 0xff) + || subbook->wide_start < 0x0001 + || 0x1efe < subbook->wide_end) { + error_code = EB_ERR_UNEXP_APP; + goto failed; + } + } else { + subbook->wide_end = subbook->wide_start + + ((character_count / 0x5e) << 8) + (character_count % 0x5e) + - 1; + if (0x7e < (subbook->wide_end & 0xff)) + subbook->wide_end += 0xa3; + + if ((subbook->wide_start & 0xff) < 0x21 + || 0x7e < (subbook->wide_start & 0xff) + || subbook->wide_start < 0xa121 + || 0xfe7e < subbook->wide_end) { + error_code = EB_ERR_UNEXP_APP; + goto failed; + } + } + } + + /* + * Set stop-code. + */ + if (zio_read(&subbook->zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + stop_code_page = eb_uint4(buffer); + if (0 < stop_code_page) { + if (zio_lseek(&subbook->zio, ((off_t) stop_code_page - 1) * EB_SIZE_PAGE, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + if (zio_read(&subbook->zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + if (eb_uint2(buffer) != 0) { + subbook->stop_code0 = eb_uint2(buffer + 2); + subbook->stop_code1 = eb_uint2(buffer + 4); + } + } + + /* + * Rewind the file descriptor, again. + */ + if (zio_lseek(&subbook->zio, 0, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + + /* + * Initialize the alternation text cache. + */ + eb_initialize_alt_caches(appendix); + + succeeded: + LOG(("out: eb_load_appendix_subbook() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_appendix_subbook() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Load all subbooks in the book. + */ +EB_Error_Code +eb_load_all_appendix_subbooks(EB_Appendix *appendix) +{ + EB_Error_Code error_code; + EB_Subbook_Code current_subbook_code; + EB_Appendix_Subbook *subbook; + int i; + + eb_lock(&appendix->lock); + LOG(("in: eb_load_all_appendix_subbooks(appendix=%d)", + (int)appendix->code)); + + /* + * The appendix must have been bound. + */ + if (appendix->path == NULL) { + error_code = EB_ERR_UNBOUND_APP; + goto failed; + } + + /* + * Get the current subbook. + */ + if (appendix->subbook_current != NULL) + current_subbook_code = appendix->subbook_current->code; + else + current_subbook_code = -1; + + /* + * Initialize each subbook. + */ + for (i = 0, subbook = appendix->subbooks; + i < appendix->subbook_count; i++, subbook++) { + error_code = eb_set_appendix_subbook(appendix, subbook->code); + if (error_code != EB_SUCCESS) + goto failed; + } + + /* + * Restore the current subbook. + */ + if (current_subbook_code < 0) + eb_unset_appendix_subbook(appendix); + else { + error_code = eb_set_appendix_subbook(appendix, current_subbook_code); + if (error_code != EB_SUCCESS) + goto failed; + } + + LOG(("out: eb_load_all_appendix_subbooks() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_all_appendix_subbooks() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get a subbook list in `appendix'. + */ +EB_Error_Code +eb_appendix_subbook_list(EB_Appendix *appendix, EB_Subbook_Code *subbook_list, + int *subbook_count) +{ + EB_Error_Code error_code; + EB_Subbook_Code *list_p; + int i; + + eb_lock(&appendix->lock); + LOG(("in: eb_appendix_subbook_list(appendix=%d)", (int)appendix->code)); + + /* + * Check for the current status. + */ + if (appendix->path == NULL) { + error_code = EB_ERR_UNBOUND_APP; + goto failed; + } + + /* + * Make a subbook list. + */ + for (i = 0, list_p = subbook_list; i < appendix->subbook_count; + i++, list_p++) + *list_p = i; + *subbook_count = appendix->subbook_count; + + LOG(("out: eb_appendix_subbook_list(subbook_count=%d) = %s", + *subbook_count, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *subbook_count = 0; + LOG(("out: eb_appendix_subbook_list() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the subbook-code of the current subbook in `appendix'. + */ +EB_Error_Code +eb_appendix_subbook(EB_Appendix *appendix, EB_Subbook_Code *subbook_code) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_appendix_subbook(appendix=%d)", (int)appendix->code)); + + /* + * Check for the current status. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * Copy the current subbook code to `subbook_code'. + */ + *subbook_code = appendix->subbook_current->code; + + LOG(("out: eb_appendix_subbook(subbook=%d) = %s", (int)*subbook_code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *subbook_code = EB_SUBBOOK_INVALID; + LOG(("out: eb_appendix_subbook() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the directory name of the current subbook in `appendix'. + */ +EB_Error_Code +eb_appendix_subbook_directory(EB_Appendix *appendix, char *directory) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_appendix_subbook_directory(appendix=%d)", + (int)appendix->code)); + + /* + * Check for the current status. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * Copy the directory name to `directory'. + */ + strcpy(directory, appendix->subbook_current->directory_name); + + LOG(("out: eb_appendix_subbook_directory(directory=%s) = %s", + directory, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *directory = '\0'; + LOG(("out: eb_appendix_subbook_directory() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the directory name of the subbook `subbook_code' in `appendix'. + */ +EB_Error_Code +eb_appendix_subbook_directory2(EB_Appendix *appendix, + EB_Subbook_Code subbook_code, char *directory) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_appendix_subbook_directory2(appendix=%d, subbook=%d)", + (int)appendix->code, (int)subbook_code)); + + /* + * Check for the current status. + */ + if (appendix->path == NULL) { + error_code = EB_ERR_UNBOUND_APP; + goto failed; + } + + /* + * Check for `subbook_code'. + */ + if (subbook_code < 0 || appendix->subbook_count <= subbook_code) { + error_code = EB_ERR_NO_SUCH_APPSUB; + goto failed; + } + + /* + * Copy the directory name to `directory'. + */ + strcpy(directory, (appendix->subbooks + subbook_code)->directory_name); + + LOG(("out: eb_appendix_subbook_directory2(directory=%s) = %s", + directory, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *directory = '\0'; + LOG(("out: eb_appendix_subbook_directory2() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Set the subbook `subbook_code' as the current subbook. + */ +EB_Error_Code +eb_set_appendix_subbook(EB_Appendix *appendix, EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_set_appendix_subbook(appendix=%d, subbook=%d)", + (int)appendix->code, (int)subbook_code)); + + /* + * Check for the current status. + */ + if (appendix->path == NULL) { + error_code = EB_ERR_UNBOUND_APP; + goto failed; + } + + /* + * Check for `subbook_code'. + */ + if (subbook_code < 0 || appendix->subbook_count <= subbook_code) { + error_code = EB_ERR_NO_SUCH_APPSUB; + goto failed; + } + + /* + * If the current subbook is `subbook_code', return immediately. + * Otherwise close the current subbook and continue. + */ + if (appendix->subbook_current != NULL) { + if (appendix->subbook_current->code == subbook_code) + goto succeeded; + eb_unset_appendix_subbook(appendix); + } + + /* + * Disc type specific section. + */ + if (appendix->disc_code == EB_DISC_EB) + error_code = eb_set_appendix_subbook_eb(appendix, subbook_code); + else + error_code = eb_set_appendix_subbook_epwing(appendix, subbook_code); + + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Load the subbook. + */ + error_code = eb_load_appendix_subbook(appendix); + if (error_code != EB_SUCCESS) + goto failed; + + succeeded: + LOG(("out: eb_set_appendix_subbook() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (appendix->subbook_current != NULL) + zio_close(&appendix->subbook_current->zio); + appendix->subbook_current = NULL; + LOG(("out: eb_set_appendix_subbook() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * EB* specific section of eb_set_appendix_subbook(). + */ +static EB_Error_Code +eb_set_appendix_subbook_eb(EB_Appendix *appendix, EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code; + EB_Appendix_Subbook *subbook; + char appendix_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code zio_code; + + LOG(("in: eb_set_appendix_subbook_eb(appendix=%d, subbook=%d)", + (int)appendix->code, (int)subbook_code)); + + /* + * Set the current subbook. + */ + appendix->subbook_current = appendix->subbooks + subbook_code; + subbook = appendix->subbook_current; + + /* + * Open an appendix file. + */ + if (eb_find_file_name2(appendix->path, subbook->directory_name, + EB_FILE_NAME_APPENDIX, subbook->file_name) != EB_SUCCESS) { + error_code = EB_ERR_FAIL_OPEN_APP; + goto failed; + } + + eb_compose_path_name2(appendix->path, subbook->directory_name, + subbook->file_name, appendix_path_name); + eb_path_name_zio_code(appendix_path_name, ZIO_PLAIN, &zio_code); + + if (zio_open(&subbook->zio, appendix_path_name, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_APP; + goto failed; + } + + LOG(("out: eb_set_appendix_subbook_eb() = %s", + eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_appendix_subbook_eb() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * EPWING specific section of eb_set_appendix_subbook(). + */ +static EB_Error_Code +eb_set_appendix_subbook_epwing(EB_Appendix *appendix, + EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code; + EB_Appendix_Subbook *subbook; + char appendix_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code zio_code; + + LOG(("in: eb_set_appendix_subbook_epwing(appendix=%d, subbook=%d)", + (int)appendix->code, (int)subbook_code)); + + /* + * Set the current subbook. + */ + appendix->subbook_current = appendix->subbooks + subbook_code; + subbook = appendix->subbook_current; + + zio_initialize(&subbook->zio); + + /* + * Adjust a directory name. + */ + strcpy(subbook->data_directory_name, EB_DIRECTORY_NAME_DATA); + eb_fix_directory_name2(appendix->path, subbook->directory_name, + subbook->data_directory_name); + + /* + * Open an appendix file. + */ + if (eb_find_file_name3(appendix->path, subbook->directory_name, + subbook->data_directory_name, EB_FILE_NAME_FUROKU, subbook->file_name) + != EB_SUCCESS) { + error_code = EB_ERR_FAIL_OPEN_APP; + goto failed; + } + + eb_compose_path_name3(appendix->path, subbook->directory_name, + subbook->data_directory_name, subbook->file_name, + appendix_path_name); + eb_path_name_zio_code(appendix_path_name, ZIO_PLAIN, &zio_code); + + if (zio_open(&subbook->zio, appendix_path_name, zio_code) < 0) { + subbook = NULL; + error_code = EB_ERR_FAIL_OPEN_APP; + goto failed; + } + + LOG(("out: eb_set_appendix_subbook_epwing() = %s", + eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_appendix_subbook_epwing() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Unset the current subbook. + */ +void +eb_unset_appendix_subbook(EB_Appendix *appendix) +{ + eb_lock(&appendix->lock); + LOG(("in: eb_unset_appendix_subbook(appendix=%d)", (int)appendix->code)); + + /* + * Close a file for the current subbook. + */ + if (appendix->subbook_current != NULL) { + zio_close(&appendix->subbook_current->zio); + appendix->subbook_current = NULL; + } + + LOG(("out: eb_unset_appendix_subbook()")); + eb_unlock(&appendix->lock); +} + + diff --git a/lib/ebu/ebu/appsub.lo b/lib/ebu/ebu/appsub.lo new file mode 100644 index 0000000..46752aa --- /dev/null +++ b/lib/ebu/ebu/appsub.lo @@ -0,0 +1,12 @@ +# appsub.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/appsub.o' + +# Name of the non-PIC object +non_pic_object='appsub.o' + diff --git a/lib/ebu/ebu/bcd.c b/lib/ebu/ebu/bcd.c new file mode 100644 index 0000000..0eed583 --- /dev/null +++ b/lib/ebu/ebu/bcd.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Get a BCD (binary coded decimal) packed integer with 2 bytes + * from an octet stream. + */ +unsigned +eb_bcd2(const char *stream) +{ + unsigned value; + const unsigned char *s = (const unsigned char *)stream; + + value = ((*(s ) >> 4) & 0x0f) * 1000; + value += ((*(s ) ) & 0x0f) * 100; + value += ((*(s + 1) >> 4) & 0x0f) * 10; + value += ((*(s + 1) ) & 0x0f); + + return value; +} + + +/* + * Get a BCD (binary coded decimal) packed integer with 4 bytes + * from an octet stream. + */ +unsigned +eb_bcd4(const char *stream) +{ + unsigned value; + const unsigned char *s = (const unsigned char *)stream; + + value = ((*(s ) >> 4) & 0x0f) * 10000000; + value += ((*(s ) ) & 0x0f) * 1000000; + value += ((*(s + 1) >> 4) & 0x0f) * 100000; + value += ((*(s + 1) ) & 0x0f) * 10000; + value += ((*(s + 2) >> 4) & 0x0f) * 1000; + value += ((*(s + 2) ) & 0x0f) * 100; + value += ((*(s + 3) >> 4) & 0x0f) * 10; + value += ((*(s + 3) ) & 0x0f); + + return value; +} + + +/* + * Get a BCD (binary coded decimal) packed integer with 6 bytes + * from an octet stream. + */ +unsigned +eb_bcd6(const char *stream) +{ + unsigned value; + const unsigned char *s = (const unsigned char *)stream; + + value = ((*(s + 1) ) & 0x0f); + value += ((*(s + 2) >> 4) & 0x0f) * 10; + value += ((*(s + 2) ) & 0x0f) * 100; + value += ((*(s + 3) >> 4) & 0x0f) * 1000; + value += ((*(s + 3) ) & 0x0f) * 10000; + value += ((*(s + 4) >> 4) & 0x0f) * 100000; + value += ((*(s + 4) ) & 0x0f) * 1000000; + value += ((*(s + 5) >> 4) & 0x0f) * 10000000; + value += ((*(s + 5) ) & 0x0f) * 100000000; + + return value; +} + + diff --git a/lib/ebu/ebu/bcd.lo b/lib/ebu/ebu/bcd.lo new file mode 100644 index 0000000..36caac5 --- /dev/null +++ b/lib/ebu/ebu/bcd.lo @@ -0,0 +1,12 @@ +# bcd.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/bcd.o' + +# Name of the non-PIC object +non_pic_object='bcd.o' + diff --git a/lib/ebu/ebu/binary.c b/lib/ebu/ebu/binary.c new file mode 100644 index 0000000..a258e1c --- /dev/null +++ b/lib/ebu/ebu/binary.c @@ -0,0 +1,1404 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "binary.h" +#include "build-post.h" + +/* + * Unexported function. + */ +static EB_Error_Code eb_read_binary_generic(EB_Book *book, + size_t binary_max_length, char *binary, ssize_t *binary_length); +static EB_Error_Code eb_read_binary_wave(EB_Book *book, + size_t binary_max_length, char *binary, ssize_t *binary_length); +static EB_Error_Code eb_read_binary_mono_graphic(EB_Book *book, + size_t binary_max_length, char *binary, ssize_t *binary_length); +static EB_Error_Code eb_read_binary_gray_graphic(EB_Book *book, + size_t binary_max_length, char *binary, ssize_t *binary_length); + + +/* + * Initialize binary context of `book'. + */ +void +eb_initialize_binary_context(EB_Book *book) +{ + LOG(("in: eb_initialize_binary_context(book=%d)", (int)book->code)); + + book->binary_context.code = EB_BINARY_INVALID; + book->binary_context.zio = NULL; + book->binary_context.location = -1; + book->binary_context.size = 0; + book->binary_context.cache_length = 0; + book->binary_context.cache_offset = 0; + book->binary_context.width = 0; + + LOG(("out: eb_initialize_binary_context()")); +} + + +/* + * Finalize binary context of `book'. + */ +void +eb_finalize_binary_context(EB_Book *book) +{ + LOG(("in+out: eb_finalize_binary_context(book=%d)", (int)book->code)); + + /* nothing to be done */ +} + + +/* + * Reset binary context of `book'. + */ +void +eb_reset_binary_context(EB_Book *book) +{ + LOG(("in: eb_reset_binary_context(book=%d)", (int)book->code)); + + eb_initialize_binary_context(book); + + LOG(("out: eb_reset_binary_context()")); +} + + +/* + * Template of BMP preamble for 2 colors monochrome graphic. + */ +#define MONO_BMP_PREAMBLE_LENGTH 62 + +static const unsigned char mono_bmp_preamble[] = { + /* Type. */ + 'B', 'M', + + /* File size. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Reserved. */ + 0x00, 0x00, 0x00, 0x00, + + /* Offset of bitmap bits part. */ + 0x3e, 0x00, 0x00, 0x00, + + /* Size of bitmap info part. */ + 0x28, 0x00, 0x00, 0x00, + + /* Width. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Height. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Planes. */ + 0x01, 0x00, + + /* Bits per pixels. */ + 0x01, 0x00, + + /* Compression mode. */ + 0x00, 0x00, 0x00, 0x00, + + /* Size of bitmap bits part. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* X Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Y Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Colors */ + 0x02, 0x00, 0x00, 0x00, + + /* Important colors */ + 0x02, 0x00, 0x00, 0x00, + + /* RGB quad of color 0 RGB quad of color 1 */ + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +/* + * Set monochrome bitmap picture as the current binary data. + */ +EB_Error_Code +eb_set_binary_mono_graphic(EB_Book *book, const EB_Position *position, + int width, int height) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + EB_Position real_position; + unsigned char *buffer_p; + size_t line_pad_length; + size_t data_size; + size_t file_size; + + eb_lock(&book->lock); + LOG(("in: eb_set_binary_mono_graphic(book=%d, position={%d,%d}, \ +width=%d, height=%d)", + (int)book->code, position->page, position->offset, width, height)); + + eb_reset_binary_context(book); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Current subbook must have a graphic file. + */ + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * If both width and height are 0, + * we get real width, height and position of the graphic data. + */ + if (position->page <= 0 || position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + if (width == 0 && height == 0) { + char buffer[22]; + + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) position->page - 1) * EB_SIZE_PAGE + position->offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + if (zio_read(&book->subbook_current->text_zio, buffer, 22) != 22) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + if (eb_uint2(buffer) != 0x1f45 || eb_uint2(buffer + 4) != 0x1f31) { + error_code = EB_ERR_UNEXP_BINARY; + goto failed; + } + width = eb_bcd2(buffer + 8); + height = eb_bcd2(buffer + 10); + + if (eb_uint2(buffer + 12) == 0x1f51) { + real_position.page = eb_bcd4(buffer + 14); + real_position.offset = eb_bcd2(buffer + 18); + } else if (eb_uint2(buffer + 14) == 0x1f51) { + real_position.page = eb_bcd4(buffer + 16); + real_position.offset = eb_bcd2(buffer + 20); + } else { + error_code = EB_ERR_UNEXP_BINARY; + goto failed; + } + + position = &real_position; + } + + if (width <= 0 || height <= 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * BMP requires that the number of bytes in a line must be multiple + * of 4. If not, 0x00 must be padded to end of each line. + * `line_pad_length' (0...3) is the number of bytes to be padded. + * + * In case of EB_BINARY_MONO_GRAPHIC, a pixel is represented with + * a bit. + */ + if (width % 32 == 0) + line_pad_length = 0; + else if (width % 32 <= 8) + line_pad_length = 3; + else if (width % 32 <= 16) + line_pad_length = 2; + else if (width % 32 <= 24) + line_pad_length = 1; + else + line_pad_length = 0; + + data_size = (width / 8 + line_pad_length) * height; + file_size = data_size + MONO_BMP_PREAMBLE_LENGTH; + + /* + * Set binary context. + */ + context = &book->binary_context; + context->code = EB_BINARY_MONO_GRAPHIC; + context->zio = &book->subbook_current->text_zio; + context->location = ((off_t) position->page - 1) * EB_SIZE_PAGE + + position->offset + (width + 7) / 8 * (height - 1); + context->size = (width + 7) / 8 * height; + context->offset = 0; + context->cache_offset = 0; + context->width = width; + + /* + * Set BMP preamble. + */ + context->cache_length = MONO_BMP_PREAMBLE_LENGTH; + memcpy(context->cache_buffer, mono_bmp_preamble, MONO_BMP_PREAMBLE_LENGTH); + + buffer_p = (unsigned char *)context->cache_buffer + 2; + *buffer_p++ = file_size & 0xff; + *buffer_p++ = (file_size >> 8) & 0xff; + *buffer_p++ = (file_size >> 16) & 0xff; + *buffer_p++ = (file_size >> 24) & 0xff; + + buffer_p = (unsigned char *)context->cache_buffer + 18; + *buffer_p++ = width & 0xff; + *buffer_p++ = (width >> 8) & 0xff; + *buffer_p++ = (width >> 16) & 0xff; + *buffer_p++ = (width >> 24) & 0xff; + + *buffer_p++ = height & 0xff; + *buffer_p++ = (height >> 8) & 0xff; + *buffer_p++ = (height >> 16) & 0xff; + *buffer_p++ = (height >> 24) & 0xff; + + buffer_p = (unsigned char *)context->cache_buffer + 34; + *buffer_p++ = data_size & 0xff; + *buffer_p++ = (data_size >> 8) & 0xff; + *buffer_p++ = (data_size >> 16) & 0xff; + *buffer_p++ = (data_size >> 24) & 0xff; + + /* + * Seek graphic file. + */ + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + LOG(("out: eb_set_binary_mono_graphic() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_binary_context(book); + LOG(("out: eb_set_binary_mono_graphic() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Template of BMP preamble for gray scale graphic. + */ +#define GRAY_BMP_PREAMBLE_LENGTH 118 + +static const unsigned char gray_bmp_preamble[] = { + /* Type. */ + 'B', 'M', + + /* File size. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Reserved. */ + 0x00, 0x00, 0x00, 0x00, + + /* Offset of bitmap bits part. */ + 0x3e, 0x00, 0x00, 0x00, + + /* Size of bitmap info part. */ + 0x28, 0x00, 0x00, 0x00, + + /* Width. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Height. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Planes. */ + 0x01, 0x00, + + /* Bits per pixels. */ + 0x04, 0x00, + + /* Compression mode. */ + 0x00, 0x00, 0x00, 0x00, + + /* Size of bitmap bits part. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* X Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Y Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Colors */ + 0x10, 0x00, 0x00, 0x00, + + /* Important colors */ + 0x10, 0x00, 0x00, 0x00, + + /* RGB quad of color 0x0 RGB quad of color 0x1 */ + 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x00, + + /* RGB quad of color 0x2 RGB quad of color 0x3 */ + 0x22, 0x22, 0x22, 0x00, 0x33, 0x33, 0x33, 0x00, + + /* RGB quad of color 0x4 RGB quad of color 0x5 */ + 0x44, 0x44, 0x44, 0x00, 0x55, 0x55, 0x55, 0x00, + + /* RGB quad of color 0x6 RGB quad of color 0x7 */ + 0x66, 0x66, 0x66, 0x00, 0x77, 0x77, 0x77, 0x00, + + /* RGB quad of color 0x8 RGB quad of color 0x9 */ + 0x88, 0x88, 0x88, 0x00, 0x99, 0x99, 0x99, 0x00, + + /* RGB quad of color 0xa RGB quad of color 0xb */ + 0xaa, 0xaa, 0xaa, 0x00, 0xbb, 0xbb, 0xbb, 0x00, + + /* RGB quad of color 0xc RGB quad of color 0xd */ + 0xcc, 0xcc, 0xcc, 0x00, 0xdd, 0xdd, 0xdd, 0x00, + + /* RGB quad of color 0xe RGB quad of color 0xf */ + 0xee, 0xee, 0xee, 0x00, 0xff, 0xff, 0xff, 0x00, +}; + +/* + * Set monochrome bitmap picture as the current binary data. + */ +EB_Error_Code +eb_set_binary_gray_graphic(EB_Book *book, const EB_Position *position, + int width, int height) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + EB_Position real_position; + unsigned char *buffer_p; + size_t line_pad_length; + size_t data_size; + size_t file_size; + + eb_lock(&book->lock); + LOG(("in: eb_set_binary_gray_graphic(book=%d, position={%d,%d}, \ +width=%d, height=%d)", + (int)book->code, position->page, position->offset, width, height)); + + eb_reset_binary_context(book); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Current subbook must have a graphic file. + */ + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * If both width and height are 0, + * we get real width, height and position of the graphic data. + */ + if (position->page <= 0 || position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + if (width == 0 && height == 0) { + char buffer[22]; + + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) position->page - 1) * EB_SIZE_PAGE + position->offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + if (zio_read(&book->subbook_current->text_zio, buffer, 22) != 22) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + if (eb_uint2(buffer) != 0x1f45 + || eb_uint2(buffer + 4) != 0x1f31 + || eb_uint2(buffer + 12) != 0x1f51 + || eb_uint2(buffer + 20) != 0x1f65) { + error_code = EB_ERR_UNEXP_BINARY; + goto failed; + } + + width = eb_bcd2(buffer + 8); + height = eb_bcd2(buffer + 10); + real_position.page = eb_bcd4(buffer + 14); + real_position.offset = eb_bcd2(buffer + 18); + position = &real_position; + } + + if (width <= 0 || height <= 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * BMP requires that the number of bytes in a line must be multiple + * of 4. If not, 0x00 must be padded to end of each line. + * `line_pad_length' (0...3) is the number of bytes to be padded. + * + * In case of EB_BINARY_GRAY_GRAPHIC, a pixel is represented with + * 4 bits. + */ + if (width % 8 == 0) + line_pad_length = 0; + else if (width % 8 <= 2) + line_pad_length = 3; + else if (width % 8 <= 4) + line_pad_length = 2; + else if (width % 8 <= 6) + line_pad_length = 1; + else + line_pad_length = 0; + + data_size = (width / 2 + line_pad_length) * height; + file_size = data_size + MONO_BMP_PREAMBLE_LENGTH; + + /* + * Set binary context. + */ + context = &book->binary_context; + + context->code = EB_BINARY_GRAY_GRAPHIC; + context->zio = &book->subbook_current->text_zio; + context->location = ((off_t) position->page - 1) * EB_SIZE_PAGE + + position->offset + (width + 1) / 2 * (height - 1); + context->size = (width + 1) / 2 * height; + context->offset = 0; + context->cache_offset = 0; + context->width = width; + + /* + * Set BMP preamble. + */ + context->cache_length = GRAY_BMP_PREAMBLE_LENGTH; + memcpy(context->cache_buffer, gray_bmp_preamble, + GRAY_BMP_PREAMBLE_LENGTH); + + buffer_p = (unsigned char *)context->cache_buffer + 2; + *buffer_p++ = file_size & 0xff; + *buffer_p++ = (file_size >> 8) & 0xff; + *buffer_p++ = (file_size >> 16) & 0xff; + *buffer_p++ = (file_size >> 24) & 0xff; + + buffer_p = (unsigned char *)context->cache_buffer + 18; + *buffer_p++ = width & 0xff; + *buffer_p++ = (width >> 8) & 0xff; + *buffer_p++ = (width >> 16) & 0xff; + *buffer_p++ = (width >> 24) & 0xff; + + *buffer_p++ = height & 0xff; + *buffer_p++ = (height >> 8) & 0xff; + *buffer_p++ = (height >> 16) & 0xff; + *buffer_p++ = (height >> 24) & 0xff; + + buffer_p = (unsigned char *)context->cache_buffer + 34; + *buffer_p++ = data_size & 0xff; + *buffer_p++ = (data_size >> 8) & 0xff; + *buffer_p++ = (data_size >> 16) & 0xff; + *buffer_p++ = (data_size >> 24) & 0xff; + + /* + * Seek graphic file. + */ + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + LOG(("out: eb_set_binary_gray_graphic() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_binary_context(book); + LOG(("out: eb_set_binary_gray_graphic() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Set WAVE sound as the current binary data. + */ +EB_Error_Code +eb_set_binary_wave(EB_Book *book, const EB_Position *start_position, + const EB_Position *end_position) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + off_t start_location; + off_t end_location; + char temporary_buffer[4]; + + eb_lock(&book->lock); + LOG(("in: eb_set_binary_wave(book=%d, start_position={%d,%d}, \ +end_position={%d,%d})", + (int)book->code, start_position->page, start_position->offset, + end_position->page, end_position->offset)); + + eb_reset_binary_context(book); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Current subbook must have a sound file. + */ + if (zio_file(&book->subbook_current->sound_zio) < 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * Set binary context. + */ + if (start_position->page <= 0 || start_position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + if (end_position->page <= 0 || end_position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + start_location = ((off_t) start_position->page - 1) * EB_SIZE_PAGE + + start_position->offset; + end_location = ((off_t) end_position->page - 1) * EB_SIZE_PAGE + + end_position->offset; + + context = &book->binary_context; + + context->code = EB_BINARY_WAVE; + context->zio = &book->subbook_current->sound_zio; + context->location = start_location; + if (start_location < end_location) + context->size = end_location - start_location + 1; + else { + error_code = EB_ERR_UNEXP_BINARY; + goto failed; + } + context->offset = 0; + + /* + * Read 4bytes from the sound file to check whether the sound + * data contains a header part or not. + * + * If the read data is "fmt ", the wave data has a header part. + * Otherwise, we must read a header in another location. + * + * The wave data consists of: + * + * "RIFF" wave-size(4bytes) "WAVE" header-fragment(28bytes) + * data-part-size(4bytes) data + * + * wave-size = "WAVE" + header-fragment + data-part-size + data + * = 4 + 28 + 4 + data + * = 36 + data + * data-part-size = length(data) + */ + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + if (zio_read(context->zio, temporary_buffer, 4) != 4) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + + if (memcmp(temporary_buffer, "fmt ", 4) == 0) { + memcpy(context->cache_buffer + 12, temporary_buffer, 4); + if (zio_read(context->zio, context->cache_buffer + 16, 28) != 28) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + if (context->size >= 32) + context->size -= 32; + else + context->size = 0; + } else { + if (zio_lseek(context->zio, + ((off_t) book->subbook_current->sound.start_page - 1) + * EB_SIZE_PAGE + 32, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + if (zio_read(context->zio, context->cache_buffer + 12, 28) != 28) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + *(unsigned char *)(context->cache_buffer + 40) + = (context->size) & 0xff; + *(unsigned char *)(context->cache_buffer + 41) + = (context->size >> 8) & 0xff; + *(unsigned char *)(context->cache_buffer + 42) + = (context->size >> 16) & 0xff; + *(unsigned char *)(context->cache_buffer + 43) + = (context->size >> 24) & 0xff; + + + /* + * Seek sound file, again. + */ + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + } + context->cache_length = 44; + + /* + * Read and compose a WAVE header. + */ + memcpy(context->cache_buffer, "RIFF", 4); + + *(unsigned char *)(context->cache_buffer + 4) + = (context->size + 36) & 0xff; + *(unsigned char *)(context->cache_buffer + 5) + = ((context->size + 36) >> 8) & 0xff; + *(unsigned char *)(context->cache_buffer + 6) + = ((context->size + 36) >> 16) & 0xff; + *(unsigned char *)(context->cache_buffer + 7) + = ((context->size + 36) >> 24) & 0xff; + + memcpy(context->cache_buffer + 8, "WAVE", 4); + + LOG(("out: eb_set_binary_wave() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_binary_context(book); + LOG(("out: eb_set_binary_wave() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Length of the color graphic header. + */ +#define EB_COLOR_GRAPHIC_HEADER_LENGTH 8 + +/* + * Set color graphic (BMP or JPEG) as the current binary data. + */ +EB_Error_Code +eb_set_binary_color_graphic(EB_Book *book, const EB_Position *position) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + char buffer[EB_COLOR_GRAPHIC_HEADER_LENGTH]; + + eb_lock(&book->lock); + LOG(("in: eb_set_binary_color_graphic(book=%d, position={%d,%d})", + (int)book->code, position->page, position->offset)); + + eb_reset_binary_context(book); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Current subbook must have a graphic file. + */ + if (zio_file(&book->subbook_current->graphic_zio) < 0) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + + /* + * Set binary context. + */ + if (position->page <= 0 || position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + context = &book->binary_context; + context->code = EB_BINARY_COLOR_GRAPHIC; + context->zio = &book->subbook_current->graphic_zio; + context->location = ((off_t) position->page - 1) * EB_SIZE_PAGE + + position->offset; + context->offset = 0; + context->cache_length = 0; + context->cache_offset = 0; + + /* + * Seek graphic file. + */ + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + + /* + * Read header of the graphic data. + * Note that EB* JPEG file lacks the header. + */ + if (zio_read(context->zio, buffer, EB_COLOR_GRAPHIC_HEADER_LENGTH) + != EB_COLOR_GRAPHIC_HEADER_LENGTH) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + + if (memcmp(buffer, "data", 4) == 0) { + context->size = eb_uint4_le(buffer + 4); + context->location += EB_COLOR_GRAPHIC_HEADER_LENGTH; + } else { + context->size = 0; + if (zio_lseek(context->zio, context->location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + } + + LOG(("out: eb_set_binary_color_graphic() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_binary_context(book); + LOG(("out: eb_set_binary_color_graphic() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Set MPEG movie as the current binary data. + */ +EB_Error_Code +eb_set_binary_mpeg(EB_Book *book, const unsigned int *argv) +{ + /* + * `movie_file_name' is base name, and `movie_path_name' is absolute + * path of the movie. + */ + char movie_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char movie_path_name[EB_MAX_PATH_LENGTH + 1]; + EB_Error_Code error_code; + EB_Subbook *subbook; + Zio_Code zio_code; + + eb_lock(&book->lock); + LOG(("in: eb_set_binary_mpeg(book=%d)", (int)book->code)); + + eb_reset_binary_context(book); + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Open the movie file and set binary context. + */ + if (eb_compose_movie_file_name(argv, movie_file_name) != EB_SUCCESS) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + LOG(("aux: eb_set_binary_mpeg(): movie_file_name=%s", movie_file_name)); + + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->movie_directory_name, movie_file_name, movie_file_name) + != EB_SUCCESS) { + error_code = EB_ERR_NO_SUCH_BINARY; + goto failed; + } + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->movie_directory_name, movie_file_name, movie_path_name); + eb_path_name_zio_code(movie_path_name, ZIO_PLAIN, &zio_code); + + if (zio_open(&subbook->movie_zio, movie_path_name, zio_code) < 0) { + subbook = NULL; + error_code = EB_ERR_FAIL_OPEN_BINARY; + goto failed; + } + + book->binary_context.code = EB_BINARY_MPEG; + book->binary_context.zio = &book->subbook_current->movie_zio; + book->binary_context.location = 0; + book->binary_context.size = 0; + book->binary_context.offset = 0; + book->binary_context.cache_length = 0; + book->binary_context.cache_offset = 0; + + LOG(("out: eb_set_binary_mpeg() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_binary_context(book); + LOG(("out: eb_set_binary_mpeg() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Read binary data. + */ +EB_Error_Code +eb_read_binary(book, binary_max_length, binary, binary_length) + EB_Book *book; + size_t binary_max_length; + char *binary; + ssize_t *binary_length; + +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_read_binary(book=%d, binary_max_length=%ld)", + (int)book->code, (long)binary_max_length)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Return immediately if `binary_max_length' is 0. + */ + *binary_length = 0; + + switch (book->binary_context.code) { + case EB_BINARY_COLOR_GRAPHIC: + case EB_BINARY_MPEG: + error_code = eb_read_binary_generic(book, binary_max_length, binary, + binary_length); + break; + case EB_BINARY_WAVE: + error_code = eb_read_binary_wave(book, binary_max_length, + binary, binary_length); + break; + case EB_BINARY_MONO_GRAPHIC: + error_code = eb_read_binary_mono_graphic(book, binary_max_length, + binary, binary_length); + break; + case EB_BINARY_GRAY_GRAPHIC: + error_code = eb_read_binary_gray_graphic(book, binary_max_length, + binary, binary_length); + break; + default: + error_code = EB_ERR_NO_CUR_BINARY; + goto failed; + } + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_read_binary(binary_length=%ld) = %s", (long)*binary_length, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *binary_length = -1; + eb_reset_binary_context(book); + LOG(("out: eb_read_binary() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Read generic binary data. + * This function is used for reading JPEG or BMP picture, and data part + * of WAVE sound. + */ +static EB_Error_Code +eb_read_binary_generic(EB_Book *book, size_t binary_max_length, + char *binary, ssize_t *binary_length) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + char *binary_p = binary; + size_t read_length = 0; + ssize_t read_result; + + LOG(("in: eb_read_binary_generic(book=%d, binary_max_length=%ld)", + (int)book->code, (long)binary_max_length)); + + *binary_length = 0; + context = &book->binary_context; + + /* + * Return immediately if `binary_max_length' is 0. + */ + if (binary_max_length == 0) + goto succeeded; + + /* + * Read binary data if it is remained. + * If context->size is 0, the binary data size is unknown. + */ + if (0 < context->size && context->size <= context->offset) + goto succeeded; + + if (context->size == 0) + read_length = binary_max_length - *binary_length; + else if (binary_max_length - *binary_length + < context->size - context->offset) + read_length = binary_max_length - *binary_length; + else + read_length = context->size - context->offset; + + read_result = zio_read(context->zio, binary_p, read_length); + if ((0 < context->size && read_result != read_length) || read_result < 0) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + + *binary_length += read_result; + context->offset += read_result; + + succeeded: + LOG(("out: eb_read_binary_generic(binary_length=%ld) = %s", + (long)*binary_length, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_read_binary_generic() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read WAVE sound data. + */ +static EB_Error_Code +eb_read_binary_wave(EB_Book *book, size_t binary_max_length, char *binary, + ssize_t *binary_length) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + char *binary_p = binary; + size_t copy_length = 0; + + LOG(("in: eb_read_binary_wave(book=%d, binary_max_length=%ld)", + (int)book->code, (long)binary_max_length)); + + *binary_length = 0; + context = &book->binary_context; + + /* + * Return immediately if `binary_max_length' is 0. + */ + if (binary_max_length == 0) + goto succeeded; + + /* + * Copy cached data (header part) to `binary' if exists. + */ + if (0 < context->cache_length) { + if (binary_max_length < context->cache_length - context->cache_offset) + copy_length = binary_max_length; + else + copy_length = context->cache_length - context->cache_offset; + + memcpy(binary_p, context->cache_buffer + context->cache_offset, + copy_length); + binary_p += copy_length; + context->cache_offset += copy_length; + + if (context->cache_length <= context->cache_offset) + context->cache_length = 0; + + if (binary_max_length <= *binary_length) + goto succeeded; + } + + error_code = eb_read_binary_generic(book, binary_max_length - copy_length, + binary_p, binary_length); + if (error_code !=EB_SUCCESS) + goto failed; + *binary_length += copy_length; + + succeeded: + LOG(("out: eb_read_binary_wave(binary_length=%ld) = %s", + (long)*binary_length, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_read_binary_wave() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read monochrome graphic data. + * The function also convert the graphic data to BMP. + */ +static EB_Error_Code +eb_read_binary_mono_graphic(EB_Book *book, size_t binary_max_length, + char *binary, ssize_t *binary_length) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + unsigned char *binary_p = (unsigned char *)binary; + size_t copy_length = 0; + size_t read_length = 0; + size_t line_length; + size_t line_pad_length; + + LOG(("in: eb_read_binary_mono_graphic(book=%d, binary_max_length=%ld)", + (int)book->code, (long)binary_max_length)); + + *binary_length = 0; + context = &book->binary_context; + + line_length = (context->width + 7) / 8; + + if (context->width % 32 == 0) + line_pad_length = 0; + else if (context->width % 32 <= 8) + line_pad_length = 3; + else if (context->width % 32 <= 16) + line_pad_length = 2; + else if (context->width % 32 <= 24) + line_pad_length = 1; + else + line_pad_length = 0; + + /* + * Return immediately if `binary_max_length' is 0. + */ + if (binary_max_length == 0) + goto succeeded; + + for (;;) { + /* + * Copy cached data to `binary' if exists. + */ + if (0 < context->cache_length) { + if (binary_max_length - *binary_length + < context->cache_length - context->cache_offset) + copy_length = binary_max_length - *binary_length; + else + copy_length = context->cache_length - context->cache_offset; + + memcpy(binary_p, context->cache_buffer + context->cache_offset, + copy_length); + binary_p += copy_length; + *binary_length += copy_length; + context->cache_offset += copy_length; + + if (context->cache_length <= context->cache_offset) + context->cache_length = 0; + + if (binary_max_length <= *binary_length) + goto succeeded; + } + + /* + * Read binary data if it is remained. + * If padding is needed, read each line. + */ + read_length = line_length - context->offset % line_length; + if (context->size - context->offset < read_length) + read_length = context->size - context->offset; + if (binary_max_length - *binary_length < read_length) + read_length = binary_max_length - *binary_length; + if (read_length == 0) + goto succeeded; + + /* + * Read binary data. + */ + if (context->offset != 0 + && context->offset % line_length == 0 + && zio_lseek(context->zio, (off_t) line_length * -2, SEEK_CUR) + < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + if (zio_read(context->zio, (char *)binary_p, read_length) + != read_length) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + + *binary_length += read_length; + context->offset += read_length; + binary_p += read_length; + + /* + * Pad 0x00 to BMP if needed. + */ + if (context->offset % line_length == 0) { + if (0 < line_pad_length) { + if (binary_max_length - *binary_length < line_pad_length) { + memset(context->cache_buffer, 0, line_pad_length); + context->cache_length = line_pad_length; + context->cache_offset = 0; + } else { + memset(binary_p, 0, line_pad_length); + binary_p += line_pad_length; + *binary_length += line_pad_length; + } + } + } + } + + succeeded: + LOG(("out: eb_read_binary_mono_graphic(binary_length=%ld) = %s", + (long)*binary_length, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_read_binary_mono_graphic() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Read gray scale graphic data. + * The function also convert the graphic data to BMP. + */ +static EB_Error_Code +eb_read_binary_gray_graphic(EB_Book *book, size_t binary_max_length, + char *binary, ssize_t *binary_length) +{ + EB_Error_Code error_code; + EB_Binary_Context *context; + unsigned char *binary_p = (unsigned char *)binary; + size_t copy_length = 0; + size_t read_length = 0; + size_t line_length; + size_t line_pad_length; + + LOG(("in: eb_read_binary_gray_graphic(book=%d, binary_max_length=%ld)", + (int)book->code, (long)binary_max_length)); + + *binary_length = 0; + context = &book->binary_context; + + line_length = (context->width + 1) / 2; + + if (context->width % 8 == 0) + line_pad_length = 0; + else if (context->width % 8 <= 2) + line_pad_length = 3; + else if (context->width % 8 <= 4) + line_pad_length = 2; + else if (context->width % 8 <= 6) + line_pad_length = 1; + else + line_pad_length = 0; + + /* + * Return immediately if `binary_max_length' is 0. + */ + if (binary_max_length == 0) + goto succeeded; + + for (;;) { + /* + * Copy cached data to `binary' if exists. + */ + if (0 < context->cache_length) { + if (binary_max_length - *binary_length + < context->cache_length - context->cache_offset) + copy_length = binary_max_length - *binary_length; + else + copy_length = context->cache_length - context->cache_offset; + + memcpy(binary_p, context->cache_buffer + context->cache_offset, + copy_length); + binary_p += copy_length; + *binary_length += copy_length; + context->cache_offset += copy_length; + + if (context->cache_length <= context->cache_offset) + context->cache_length = 0; + + if (binary_max_length <= *binary_length) + goto succeeded; + } + + /* + * Read binary data if it is remained. + * If padding is needed, read each line. + */ + read_length = line_length - context->offset % line_length; + if (context->size - context->offset < read_length) + read_length = context->size - context->offset; + if (binary_max_length - *binary_length < read_length) + read_length = binary_max_length - *binary_length; + if (read_length == 0) + goto succeeded; + + /* + * Read binary data. + */ + if (context->offset != 0 + && context->offset % line_length == 0 + && zio_lseek(context->zio, (off_t) line_length * -2, SEEK_CUR) + < 0) { + error_code = EB_ERR_FAIL_SEEK_BINARY; + goto failed; + } + if (zio_read(context->zio, (char *)binary_p, read_length) + != read_length) { + error_code = EB_ERR_FAIL_READ_BINARY; + goto failed; + } + + *binary_length += read_length; + context->offset += read_length; + binary_p += read_length; + + /* + * Pad 0x00 to BMP if needed. + */ + if (context->offset % line_length == 0) { + if (0 < line_pad_length) { + if (binary_max_length - *binary_length < line_pad_length) { + memset(context->cache_buffer, 0, line_pad_length); + context->cache_length = line_pad_length; + context->cache_offset = 0; + } else { + memset(binary_p, 0, line_pad_length); + binary_p += line_pad_length; + *binary_length += line_pad_length; + } + } + } + } + + succeeded: + LOG(("out: eb_read_binary_gray_graphic(binary_length=%ld) = %s", + (long)*binary_length, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_read_binary_gray_graphic() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Unset current binary. + */ +void +eb_unset_binary(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_unset_binary(book=%d)", (int)book->code)); + + eb_reset_binary_context(book); + + LOG(("out: eb_unset_binary()")); + eb_unlock(&book->lock); +} + + diff --git a/lib/ebu/ebu/binary.h b/lib/ebu/ebu/binary.h new file mode 100644 index 0000000..dfd5447 --- /dev/null +++ b/lib/ebu/ebu/binary.h @@ -0,0 +1,73 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_BINARY_H +#define EB_BINARY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef EB_BUILD_LIBRARY +#include "defs.h" +#else +#include +#endif + +/* + * Function declarations. + */ +/* binary.c */ +EB_Error_Code eb_set_binary_mono_graphic(EB_Book *book, + const EB_Position *position, int width, int height); +EB_Error_Code eb_set_binary_gray_graphic(EB_Book *book, + const EB_Position *position, int width, int height); +EB_Error_Code eb_set_binary_wave(EB_Book *book, + const EB_Position *start_position, const EB_Position *end_position); +EB_Error_Code eb_set_binary_color_graphic(EB_Book *book, + const EB_Position *position); +EB_Error_Code eb_set_binary_mpeg(EB_Book *book, const unsigned int *argv); +EB_Error_Code eb_read_binary(EB_Book *book, size_t binary_max_length, + char *binary, ssize_t *binary_length); +void eb_unset_binary(EB_Book *book); + +/* filename.c */ +EB_Error_Code eb_compose_movie_file_name(const unsigned int *argv, + char *composed_file_name); +EB_Error_Code eb_compose_movie_path_name(EB_Book *book, + const unsigned int *argv, char *composed_path_name); +EB_Error_Code eb_decompose_movie_file_name(unsigned int *argv, + const char *composed_file_name); + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_BINARY_H */ diff --git a/lib/ebu/ebu/binary.lo b/lib/ebu/ebu/binary.lo new file mode 100644 index 0000000..8f2c6e5 --- /dev/null +++ b/lib/ebu/ebu/binary.lo @@ -0,0 +1,12 @@ +# binary.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/binary.o' + +# Name of the non-PIC object +non_pic_object='binary.o' + diff --git a/lib/ebu/ebu/bitmap.c b/lib/ebu/ebu/bitmap.c new file mode 100644 index 0000000..b0f55f9 --- /dev/null +++ b/lib/ebu/ebu/bitmap.c @@ -0,0 +1,1400 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "font.h" +#include "build-post.h" + +#ifdef ENABLE_LIBDEFLATE +#include +#else +#include +#endif + +/* + * Unexported functions. + */ +static unsigned long png_crc(const char *buf, size_t len); +static int png_compress(const char *src, int width, int height, char *dest, + size_t *dest_len); + + +/* + * Return required buffer size for a narrow font character converted + * to XBM image format. + */ +EB_Error_Code +eb_narrow_font_xbm_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_xbm_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16_XBM; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24_XBM; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30_XBM; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48_XBM; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_xbm_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_xbm_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a narrow font character converted + * to XPM image format. + */ +EB_Error_Code +eb_narrow_font_xpm_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_xpm_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16_XPM; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24_XPM; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30_XPM; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48_XPM; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_xpm_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_xpm_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a narrow font character converted + * to GIF image format. + */ +EB_Error_Code +eb_narrow_font_gif_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_gif_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16_GIF; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24_GIF; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30_GIF; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48_GIF; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_gif_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_gif_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a narrow font character converted + * to BMP image format. + */ +EB_Error_Code +eb_narrow_font_bmp_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_bmp_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16_BMP; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24_BMP; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30_BMP; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48_BMP; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_bmp_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_bmp_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a narrow font character converted + * to PNG image format. + */ +EB_Error_Code +eb_narrow_font_png_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_png_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16_PNG; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24_PNG; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30_PNG; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48_PNG; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_png_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_png_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a wide font character converted + * to XBM image format. + */ +EB_Error_Code +eb_wide_font_xbm_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_xbm_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16_XBM; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24_XBM; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30_XBM; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48_XBM; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_xbm_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_xbm_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a wide font character converted + * to XPM image format. + */ +EB_Error_Code +eb_wide_font_xpm_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_xpm_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16_XPM; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24_XPM; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30_XPM; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48_XPM; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_xpm_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_xpm_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a wide font character converted + * to GIF image format. + */ +EB_Error_Code +eb_wide_font_gif_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_gif_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16_GIF; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24_GIF; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30_GIF; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48_GIF; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_gif_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_gif_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a wide font character converted + * to BMP image format. + */ +EB_Error_Code +eb_wide_font_bmp_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_bmp_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16_BMP; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24_BMP; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30_BMP; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48_BMP; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_bmp_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_bmp_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return required buffer size for a wide font character converted + * to PNG image format. + */ +EB_Error_Code +eb_wide_font_png_size(EB_Font_Code height, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_png_size(height=%d)", (int)height)); + + switch (height) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16_PNG; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24_PNG; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30_PNG; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48_PNG; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_png_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_png_size() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * The maximum number of octets in a line in a XBM file. + */ +#define XBM_MAX_OCTETS_A_LINE 12 + +/* + * The base name of a XBM file. + */ +#define XBM_BASE_NAME "default" + +/* + * Convert a bitmap image to XBM format. + * + * It requires four arguements. `xbm' is buffer to store the XBM + * image data. `bitmap', `width', and `height' are bitmap data, + * width, and height of the bitmap image. + */ +EB_Error_Code +eb_bitmap_to_xbm(const char *bitmap, int width, int height, char *xbm, + size_t *xbm_length) +{ + char *xbm_p = xbm; + const unsigned char *bitmap_p = (const unsigned char *)bitmap; + int bitmap_size = (width + 7) / 8 * height; + int hex; + int i; + + LOG(("in: eb_bitmap_to_xbm(width=%d, height=%d)", width, height)); + + /* + * Output a header. + */ + sprintf(xbm_p, "#define %s_width %4d\n", XBM_BASE_NAME, width); + xbm_p = strchr(xbm_p, '\n') + 1; + sprintf(xbm_p, "#define %s_height %4d\n", XBM_BASE_NAME, height); + xbm_p = strchr(xbm_p, '\n') + 1; + sprintf(xbm_p, "static unsigned char %s_bits[] = {\n", XBM_BASE_NAME); + xbm_p = strchr(xbm_p, '\n') + 1; + + /* + * Output image data. + */ + for (i = 0; i < bitmap_size; i++) { + hex = 0; + hex |= (*bitmap_p & 0x80) ? 0x01 : 0x00; + hex |= (*bitmap_p & 0x40) ? 0x02 : 0x00; + hex |= (*bitmap_p & 0x20) ? 0x04 : 0x00; + hex |= (*bitmap_p & 0x10) ? 0x08 : 0x00; + hex |= (*bitmap_p & 0x08) ? 0x10 : 0x00; + hex |= (*bitmap_p & 0x04) ? 0x20 : 0x00; + hex |= (*bitmap_p & 0x02) ? 0x40 : 0x00; + hex |= (*bitmap_p & 0x01) ? 0x80 : 0x00; + bitmap_p++; + + if (i % XBM_MAX_OCTETS_A_LINE != 0) { + sprintf(xbm_p, ", 0x%02x", hex); + xbm_p += 6; + } else if (i == 0) { + sprintf(xbm_p, " 0x%02x", hex); + xbm_p += 7; + } else { + sprintf(xbm_p, ",\n 0x%02x", hex); + xbm_p += 9; + } + } + + /* + * Output a footer. + */ + memcpy(xbm_p, "};\n", 3); + xbm_p += 3; + + *xbm_length = xbm_p - xbm; + + LOG(("out: eb_bitmap_to_xbm(xbm_length=%ld) = %s", + (long)(xbm_p - xbm), eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; +} + + +/* + * The base name of a XPM file. + */ +#define XPM_BASE_NAME "default" + +/* + * The foreground and background colors of XPM image. + */ +#define XPM_FOREGROUND_COLOR "Black" +#define XPM_BACKGROUND_COLOR "None" + +/* + * Convert a bitmap image to XPM format. + * + * It requires four arguements. `xpm' is buffer to store the XPM + * image data. `bitmap', `width', and `height' are bitmap data, + * width, and height of the bitmap image. + */ +EB_Error_Code +eb_bitmap_to_xpm(const char *bitmap, int width, int height, char *xpm, + size_t *xpm_length) +{ + char *xpm_p = xpm; + const unsigned char *bitmap_p = (const unsigned char *)bitmap; + int i, j; + + LOG(("in: eb_bitmap_to_xpm(width=%d, height=%d)", width, height)); + + /* + * Output a header. + */ + sprintf(xpm_p, "/* XPM */\n"); + xpm_p = strchr(xpm_p, '\n') + 1; + + sprintf(xpm_p, "static char * %s[] = {\n", XPM_BASE_NAME); + xpm_p = strchr(xpm_p, '\n') + 1; + + sprintf(xpm_p, "\"%d %d 2 1\",\n", width, height); + xpm_p = strchr(xpm_p, '\n') + 1; + + sprintf(xpm_p, "\" c %s\",\n", XPM_BACKGROUND_COLOR); + xpm_p = strchr(xpm_p, '\n') + 1; + + sprintf(xpm_p, "\". c %s\",\n", XPM_FOREGROUND_COLOR); + xpm_p = strchr(xpm_p, '\n') + 1; + + /* + * Output image data. + */ + for (i = 0; i < height; i++) { + if (0 < i) { + strcpy(xpm_p, "\",\n\""); + xpm_p += 4; + } else { + *xpm_p++ = '\"'; + } + + for (j = 0; j + 7 < width; j += 8, bitmap_p++) { + *xpm_p++ = (*bitmap_p & 0x80) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x40) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x20) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x10) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x08) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x04) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x02) ? '.' : ' '; + *xpm_p++ = (*bitmap_p & 0x01) ? '.' : ' '; + } + + if (j < width) { + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x80) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x40) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x20) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x10) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x08) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x04) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x02) ? '.' : ' '; + if (j++ < width) + *xpm_p++ = (*bitmap_p & 0x01) ? '.' : ' '; + bitmap_p++; + } + } + + /* + * Output a footer. + */ + memcpy(xpm_p, "\"};\n", 4); + xpm_p += 4; + + if (xpm_length != NULL) + *xpm_length = xpm_p - xpm; + + LOG(("out: eb_bitmap_to_xpm(xpm_length=%ld) = %s", + (long)(xpm_p - xpm), eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; +} + + +/* + * The Foreground and background colors of GIF image. + */ +#define GIF_FOREGROUND_COLOR 0x000000 +#define GIF_BACKGROUND_COLOR 0xffffff + +/* + * The preamble of GIF image. + */ +#define GIF_PREAMBLE_LENGTH 38 + +static const unsigned char gif_preamble[GIF_PREAMBLE_LENGTH] = { + /* + * Header. (6 bytes) + */ + 'G', 'I', 'F', '8', '9', 'a', + + /* + * Logical Screen Descriptor. (7 bytes) + * global color table flag = 1. + * color resolution = 1 - 1 = 0. + * sort flag = 0. + * size of global color table = 1 - 1 = 0. + * background color index = 0. + * the pixel aspect ratio = 0 (unused) + * Logical screen width and height are set at run time. + */ + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + + /* + * Global Color Table. (6 bytes) + * These are set at run time. + */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + /* + * Graphic Control Extension. (8 bytes) + * disposal method = 0. + * user input flag = 0. + * transparency flag = 1. + * delay time = 0. + * transparent color index = 0. + */ + 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, + + /* + * Image Descriptor. (10 bytes) + * image left position = 0. + * image top position = 0. + * local color table flag = 0. + * interlace flag = 0. + * sort flag = 0. + * size of local color table = 0. + * Image width and height are set at run time. + */ + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + /* + * Code size. (1byte) + */ + 0x03 +}; + + +/* + * Convert a bitmap image to GIF format. + * + * It requires four arguements. `gif' is buffer to store the GIF + * image data. `bitmap', `width', and `height' are bitmap data, + * width, and height of the bitmap image. + * + * Note: This GIF image doesn't use LZW because of patent. + */ +EB_Error_Code +eb_bitmap_to_gif(const char *bitmap, int width, int height, char *gif, + size_t *gif_length) +{ + unsigned char *gif_p = (unsigned char *)gif; + const unsigned char *bitmap_p = (const unsigned char *)bitmap; + int i, j; + + LOG(("in: eb_bitmap_to_gif(width=%d, height=%d)", width, height)); + + /* + * Copy the default preamble. + */ + memcpy(gif_p, gif_preamble, GIF_PREAMBLE_LENGTH); + + /* + * Set logical screen width and height. + */ + gif_p[6] = width & 0xff; + gif_p[7] = (width >> 8) & 0xff; + gif_p[8] = height & 0xff; + gif_p[9] = (height >> 8) & 0xff; + + /* + * Set global colors. + */ + gif_p[13] = (GIF_BACKGROUND_COLOR >> 16) & 0xff; + gif_p[14] = (GIF_BACKGROUND_COLOR >> 8) & 0xff; + gif_p[15] = GIF_BACKGROUND_COLOR & 0xff; + gif_p[16] = (GIF_FOREGROUND_COLOR >> 16) & 0xff; + gif_p[17] = (GIF_FOREGROUND_COLOR >> 8) & 0xff; + gif_p[18] = GIF_FOREGROUND_COLOR & 0xff; + + /* + * Set image width and height. + */ + gif_p[32] = width & 0xff; + gif_p[33] = (width >> 8) & 0xff; + gif_p[34] = height & 0xff; + gif_p[35] = (height >> 8) & 0xff; + + gif_p += GIF_PREAMBLE_LENGTH; + + /* + * Output image data. + */ + for (i = 0; i < height; i++) { + *gif_p++ = (unsigned char)width; + for (j = 0; j + 7 < width; j += 8, bitmap_p++) { + *gif_p++ = (*bitmap_p & 0x80) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x40) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x20) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x10) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x08) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x04) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x02) ? 0x81 : 0x80; + *gif_p++ = (*bitmap_p & 0x01) ? 0x81 : 0x80; + } + + if (j < width) { + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x80) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x40) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x20) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x10) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x08) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x04) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x02) ? 0x81 : 0x80; + if (j++ < width) + *gif_p++ = (*bitmap_p & 0x01) ? 0x81 : 0x80; + bitmap_p++; + } + } + + /* + * Output a trailer. + */ + memcpy(gif_p, "\001\011\000\073", 4); + gif_p += 4; + + if (gif_length != NULL) + *gif_length = ((char *)gif_p - gif); + + LOG(("out: eb_bitmap_to_gif(gif_length=%ld) = %s", + (long)((char *)gif_p - gif), eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; +} + + +/* + * The preamble of BMP image. + */ +#define BMP_PREAMBLE_LENGTH 62 + +static const unsigned char bmp_preamble[] = { + /* Type. */ + 'B', 'M', + + /* File size. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Reserved. */ + 0x00, 0x00, 0x00, 0x00, + + /* Offset of bitmap bits part. */ + 0x3e, 0x00, 0x00, 0x00, + + /* Size of bitmap info part. */ + 0x28, 0x00, 0x00, 0x00, + + /* Width. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Height. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* Planes. */ + 0x01, 0x00, + + /* Bits per pixels. */ + 0x01, 0x00, + + /* Compression mode. */ + 0x00, 0x00, 0x00, 0x00, + + /* Size of bitmap bits part. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* X Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Y Pixels per meter. */ + 0x6d, 0x0b, 0x00, 0x00, + + /* Colors */ + 0x02, 0x00, 0x00, 0x00, + + /* Important colors */ + 0x02, 0x00, 0x00, 0x00, + + /* RGB quad of color 0 RGB quad of color 1 */ + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +/* + * Convert a bitmap image to BMP format. + * + * It requires four arguements. `bmp' is buffer to store the BMP + * image data. `bitmap', `width', and `height' are bitmap data, + * width, and height of the bitmap image. + */ +EB_Error_Code +eb_bitmap_to_bmp(const char *bitmap, int width, int height, char *bmp, + size_t *bmp_length) +{ + unsigned char *bmp_p = (unsigned char *)bmp; + size_t data_size; + size_t file_size; + size_t line_pad_length; + size_t bitmap_line_length; + int i, j; + + LOG(("in: eb_bitmap_to_bmp(width=%d, height=%d)", width, height)); + + if (width % 32 == 0) + line_pad_length = 0; + else if (width % 32 <= 8) + line_pad_length = 3; + else if (width % 32 <= 16) + line_pad_length = 2; + else if (width % 32 <= 24) + line_pad_length = 1; + else + line_pad_length = 0; + + data_size = (width / 2 + line_pad_length) * height; + file_size = data_size + BMP_PREAMBLE_LENGTH; + + /* + * Set BMP preamble. + */ + memcpy(bmp_p, bmp_preamble, BMP_PREAMBLE_LENGTH); + + bmp_p[2] = file_size & 0xff; + bmp_p[3] = (file_size >> 8) & 0xff; + bmp_p[4] = (file_size >> 16) & 0xff; + bmp_p[5] = (file_size >> 24) & 0xff; + + bmp_p[18] = width & 0xff; + bmp_p[19] = (width >> 8) & 0xff; + bmp_p[20] = (width >> 16) & 0xff; + bmp_p[21] = (width >> 24) & 0xff; + + bmp_p[22] = height & 0xff; + bmp_p[23] = (height >> 8) & 0xff; + bmp_p[24] = (height >> 16) & 0xff; + bmp_p[25] = (height >> 24) & 0xff; + + bmp_p[34] = data_size & 0xff; + bmp_p[35] = (data_size >> 8) & 0xff; + bmp_p[36] = (data_size >> 16) & 0xff; + bmp_p[37] = (data_size >> 24) & 0xff; + + bmp_p += BMP_PREAMBLE_LENGTH; + bitmap_line_length = (width + 7) / 8; + + for (i = height - 1; 0 <= i; i--) { + memcpy(bmp_p, bitmap + bitmap_line_length * i, bitmap_line_length); + bmp_p += bitmap_line_length; + for (j = 0; j < line_pad_length; j++, bmp_p++) + *bmp_p = 0x00; + } + + if (bmp_length != NULL) + *bmp_length = ((char *)bmp_p - bmp); + + LOG(("out: eb_bitmap_to_bmp(bmp_length=%ld) = %s", + (long)((char *)bmp_p - bmp), eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; +} + + +/* + * The Foreground and background colors of PNG image. + */ +#define PNG_FOREGROUND_COLOR 0x000000 +#define PNG_BACKGROUND_COLOR 0xffffff + +/* + * The preamble of PNG image. + */ +static const unsigned char png_preamble[] = { + /* + * PNG file signature (8 bytes) + */ + 0x89, 'P', 'N', 'G', '\r', '\n', 0x1a, '\n', + /* + * IHDR(Image Header) Chunk (25 bytes) + */ + /* Size of IHDR. */ + 0x00, 0x00, 0x00, 0x0d, + 'I', 'H', 'D', 'R', + /* Width. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + /* Height. (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + /* misc. */ + 0x01, 0x03, 0x00, 0x00, 0x00, + /* CRC (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* + * PLTE(Palette) Chunk (18 bytes) + */ + /* Size of PLTE */ + 0x00, 0x00, 0x00, 0x06, + 'P', 'L', 'T', 'E', + /* RGB for palette index 0 */ + 0xff, 0xff, 0xff, + /* RGB for palette index 1 */ + 0x00, 0x00, 0x00, + /* CRC (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + + /* + * tRNS(Transparency) Chunk (13 bytes) + */ + /* Size of tRNS */ + 0x00, 0x00, 0x00, 0x01, + 't', 'R', 'N', 'S', + /* Alpha for palette index 0 */ + 0x00, + /* CRC */ + 0x40, 0xe6, 0xd8, 0x66, + + /* + * IDAT(Image Data) Chunk (12+ bytes) + */ + /* Size of IDAT (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + 'I', 'D', 'A', 'T', +}; + +static const unsigned char png_trailer[] = { + /* CRC (set at run time) */ + 0x00, 0x00, 0x00, 0x00, + /* + * IEND(Image End) Chunk (12 bytes) + */ + /* Size of IEND */ + 0x00, 0x00, 0x00, 0x00, + 'I', 'E', 'N', 'D', + /* CRC */ + 0xae, 0x42, 0x60, 0x82, +}; + +/* + * Table of CRCs of all 8-bit messages. + */ +static const unsigned long png_crc_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, /* 0x00 - 0x03 */ + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, /* 0x04 - 0x07 */ + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, /* 0x08 - 0x0b */ + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, /* 0x0c - 0x0f */ + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, /* 0x10 - 0x13 */ + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, /* 0x14 - 0x17 */ + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, /* 0x18 - 0x1b */ + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, /* 0x1c - 0x1f */ + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, /* 0x20 - 0x23 */ + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, /* 0x24 - 0x27 */ + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, /* 0x28 - 0x2b */ + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, /* 0x2c - 0x2f */ + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, /* 0x30 - 0x33 */ + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, /* 0x34 - 0x37 */ + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, /* 0x38 - 0x3b */ + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, /* 0x3c - 0x3f */ + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, /* 0x40 - 0x43 */ + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, /* 0x44 - 0x47 */ + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, /* 0x48 - 0x4b */ + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, /* 0x4c - 0x4f */ + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, /* 0x50 - 0x53 */ + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, /* 0x54 - 0x57 */ + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, /* 0x58 - 0x5b */ + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, /* 0x5c - 0x5f */ + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, /* 0x60 - 0x63 */ + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, /* 0x64 - 0x67 */ + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, /* 0x68 - 0x6b */ + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, /* 0x6c - 0x6f */ + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, /* 0x70 - 0x73 */ + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, /* 0x74 - 0x77 */ + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, /* 0x78 - 0x7b */ + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, /* 0x7c - 0x7f */ + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, /* 0x80 - 0x83 */ + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, /* 0x84 - 0x87 */ + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, /* 0x88 - 0x8b */ + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, /* 0x8c - 0x8f */ + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, /* 0x90 - 0x93 */ + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, /* 0x94 - 0x97 */ + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, /* 0x98 - 0x9b */ + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, /* 0x9c - 0x9f */ + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, /* 0xa0 - 0xa3 */ + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, /* 0xa4 - 0xa7 */ + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, /* 0xa8 - 0xab */ + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, /* 0xac - 0xaf */ + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, /* 0xb0 - 0xb3 */ + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, /* 0xb4 - 0xb7 */ + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, /* 0xb8 - 0xbb */ + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, /* 0xbc - 0xbf */ + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, /* 0xc0 - 0xc3 */ + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, /* 0xc4 - 0xc7 */ + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, /* 0xc8 - 0xcb */ + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, /* 0xcc - 0xcf */ + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, /* 0xd0 - 0xd3 */ + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, /* 0xd4 - 0xd7 */ + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, /* 0xd8 - 0xdb */ + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, /* 0xdc - 0xdf */ + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, /* 0xe0 - 0xe3 */ + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, /* 0xe4 - 0xe7 */ + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, /* 0xe8 - 0xeb */ + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, /* 0xec - 0xef */ + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, /* 0xf0 - 0xf3 */ + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, /* 0xf4 - 0xf7 */ + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, /* 0xf8 - 0xfb */ + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d /* 0xfc - 0xff */ +}; + +static unsigned long +png_crc(const char *buf, size_t len) +{ + unsigned long c = 0xffffffffL; + int n; + + for (n = 0; n < len; n++) + c = png_crc_table[(c ^ *((unsigned char *)buf + n)) & 0xff] ^ (c >> 8); + return c ^ 0xffffffffL; +} + + +static int +png_compress(const char *src, int width, int height, char *dest, + size_t *dest_len) +{ +#ifdef ENABLE_LIBDEFLATE + int line_size = (width + 7) / 8; + char *in_buffer; + struct libdeflate_compressor *compressor; + int i; + size_t in_buffer_size = (line_size + 1) * height; + size_t result; + + in_buffer = malloc (in_buffer_size); + if (in_buffer == NULL) goto failed; + compressor = libdeflate_alloc_compressor(1); + if (compressor == NULL) goto failed; + + for (i = 0; i < height; i++) { + *(in_buffer + (line_size + 1) * i) = 0; + memcpy(in_buffer + (line_size + 1) * i + 1, src + line_size * i, line_size); + } + + result = libdeflate_zlib_compress(compressor, in_buffer, in_buffer_size, + dest, (line_size + 1) * height + 12 + 256); + if (result == 0) goto failed; + + *dest_len = result; + + free(in_buffer); + libdeflate_free_compressor(compressor); + return 0; + + failed: + if (in_buffer) free(in_buffer); + if (compressor) libdeflate_free_compressor(compressor); + return -1; +#else + int line_size = (width + 7) / 8; + z_stream z; + int z_result; + unsigned char byte_zero = 0x00; + int i; + + z.zalloc = Z_NULL; + z.zfree = Z_NULL; + z.opaque = Z_NULL; + z_result = deflateInit(&z, Z_NO_COMPRESSION); + if (z_result != Z_OK) + return -1; + + /* + * Exactly to say, `z.avail_out' must be: + * avail_out > (sizeof(src) + 12) * 1.001 + * but we use an approximation here. + */ + z.next_out = (unsigned char *)dest; + z.avail_out = (line_size + 1) * height + 12 + 256; + for (i = 0; i < height - 1; i++) { + z.next_in = &byte_zero; + z.avail_in = 1; + z_result = deflate(&z, Z_NO_FLUSH); + if (z_result != Z_OK || z.avail_in != 0) + goto failed; + + z.next_in = (unsigned char *)src + (line_size * i); + z.avail_in = line_size; + z_result = deflate(&z, Z_NO_FLUSH); + if (z_result != Z_OK || z.avail_in != 0) + goto failed; + } + + z.next_in = &byte_zero; + z.avail_in = 1; + z_result = deflate(&z, Z_NO_FLUSH); + if (z_result != Z_OK || z.avail_in != 0) + goto failed; + + z.next_in = (unsigned char *)src + (line_size * i); + z.avail_in = line_size; + if (deflate(&z, Z_FINISH) != Z_STREAM_END) + goto failed; + + z_result = deflateEnd(&z); + if (z_result != Z_OK) + return -1; + + *dest_len = (z.next_out - (unsigned char *)dest); + return 0; + + /* + * An error occurs... + */ + failed: + deflateEnd(&z); + return -1; +#endif +} + + +#define INT2CHARS(p, i) do { \ + *(unsigned char *)(p) = ((i) >> 24) & 0xff; \ + *((unsigned char *)(p) + 1) = ((i) >> 16) & 0xff; \ + *((unsigned char *)(p) + 2) = ((i) >> 8) & 0xff; \ + *((unsigned char *)(p) + 3) = (i) & 0xff; \ +} while (0); + +#define RGB2CHARS(p, i) do { \ + *(unsigned char *)(p) = ((i) >> 16) & 0xff; \ + *((unsigned char *)(p) + 1) = ((i) >> 8) & 0xff; \ + *((unsigned char *)(p) + 2) = (i) & 0xff; \ +} while (0); + +/* + * Convert a bitmap image to PNG format. + * + * It requires four arguements. `png' is buffer to store the PNG + * image data. `bitmap', `width', and `height' are bitmap data, + * width, and height of the bitmap image. + */ +EB_Error_Code +eb_bitmap_to_png(const char *bitmap, int width, int height, char *png, + size_t *png_length) +{ + EB_Error_Code error_code; + char *png_p = png; + char *idat_start; + size_t idat_len; + unsigned long crc; + int z_result; + + LOG(("in: eb_bitmap_to_png(width=%d, height=%d)", width, height)); + + /* + * Copy the default preamble. + */ + memcpy(png_p, png_preamble, sizeof(png_preamble)); + + /* + * Set image width and height. + */ + INT2CHARS(png_p + 16, width); + INT2CHARS(png_p + 20, height); + + crc = png_crc(png_p + 12, 17); + INT2CHARS(png_p + 29, crc); + + /* + * Set global colors. + */ + RGB2CHARS(png_p + 41, PNG_BACKGROUND_COLOR); + RGB2CHARS(png_p + 44, PNG_FOREGROUND_COLOR); + crc = png_crc(png_p + 37, 10); + INT2CHARS(png_p + 47, crc); + + /* + * Output `bitmap'. + * We assume memory allocation error occurs if png_compress() doesn't + * return Z_STREAM_END. + */ + idat_start = png_p + sizeof(png_preamble); + z_result = png_compress(bitmap, width, height, idat_start, &idat_len); + if (z_result != 0) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + INT2CHARS(png_p + 64, idat_len); + crc = png_crc(idat_start - 4, idat_len + 4); + png_p = idat_start + idat_len; + + /* + * Output a trailer. + */ + memcpy(png_p, png_trailer, sizeof(png_trailer)); + INT2CHARS(png_p, crc); + png_p += sizeof(png_trailer); + if (png_length != NULL) + *png_length = ((char *)png_p - png); + + LOG(("out: eb_bitmap_to_png(png_length=%ld) = %s", + (long)((char *)png_p - png), eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_bitmap_to_png(png_length=%ld) = %s", + (long)((char *)png_p - png), eb_error_string(error_code))); + return error_code; +} + +#undef INT2CHARS +#undef RGB2CHARS + + +#ifdef TEST + +#include +#include +#include + +#define test_width 32 +#define test_height 16 +static unsigned char test_bitmap[] = { + 0xff, 0xff, 0xff, 0xff, 0x80, 0x81, 0x83, 0x01, 0x80, 0x81, 0x01, 0x01, + 0x80, 0x81, 0x01, 0x01, 0xe3, 0x8f, 0x11, 0xc7, 0xe3, 0x8f, 0x0f, 0xc7, + 0xe3, 0x81, 0x87, 0xc7, 0xe3, 0x81, 0xc3, 0xc7, 0xe3, 0x81, 0xe1, 0xc7, + 0xe3, 0x8f, 0x11, 0xc7, 0xe3, 0x8f, 0x11, 0xc7, 0xe3, 0x81, 0x01, 0xc7, + 0xe3, 0x81, 0x01, 0xc7, 0xe3, 0x81, 0x83, 0xc7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; + +int +main(int argc, char *argv[]) +{ + char image[EB_SIZE_FONT_IMAGE]; + size_t image_size; + int file; + + eb_bitmap_to_xbm(test_bitmap, test_width, test_height, image, &image_size); + file = creat("test.xbm", 0644); + if (file < 0) + exit(1); + if (write(file, image, image_size) != image_size) { + close(file); + exit(1); + } + + eb_bitmap_to_xpm(test_bitmap, test_width, test_height, image, &image_size); + file = creat("test.xpm", 0644); + if (file < 0) + exit(1); + if (write(file, image, image_size) != image_size) { + close(file); + exit(1); + } + + eb_bitmap_to_gif(test_bitmap, test_width, test_height, image, &image_size); + file = creat("test.gif", 0644); + if (file < 0) + exit(1); + if (write(file, image, image_size) != image_size) { + close(file); + exit(1); + } + + eb_bitmap_to_bmp(test_bitmap, test_width, test_height, image, &image_size); + file = creat("test.bmp", 0644); + if (file < 0) + exit(1); + if (write(file, image, image_size) != image_size) { + close(file); + exit(1); + } + + eb_bitmap_to_png(test_bitmap, test_width, test_height, image, &image_size); + file = creat("test.png", 0644); + if (file < 0) + exit(1); + if (write(file, image, image_size) != image_size) { + close(file); + exit(1); + } + + return 0; +} + +#endif /* TEST */ diff --git a/lib/ebu/ebu/bitmap.lo b/lib/ebu/ebu/bitmap.lo new file mode 100644 index 0000000..58aaf3e --- /dev/null +++ b/lib/ebu/ebu/bitmap.lo @@ -0,0 +1,12 @@ +# bitmap.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/bitmap.o' + +# Name of the non-PIC object +non_pic_object='bitmap.o' + diff --git a/lib/ebu/ebu/book.c b/lib/ebu/ebu/book.c new file mode 100644 index 0000000..14e6374 --- /dev/null +++ b/lib/ebu/ebu/book.c @@ -0,0 +1,1006 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "font.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif +#include "build-post.h" + +/* + * Book ID counter. + */ +static EB_Book_Code book_counter = 0; + +/* + * Mutex for `book_counter'. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t book_counter_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Unexported functions. + */ +static void eb_fix_misleaded_book(EB_Book *book); +static EB_Error_Code eb_load_catalog(EB_Book *book); +static EB_Error_Code eb_load_catalog_eb(EB_Book *book, + const char *catalog_path); +static EB_Error_Code eb_load_catalog_epwing(EB_Book *book, + const char *catalog_path); +static Zio_Code eb_get_hint_zio_code(int catalog_hint_value); +static void eb_load_language(EB_Book *book); + + +/* + * Initialize `book'. + */ +void +eb_initialize_book(EB_Book *book) +{ + LOG(("in: eb_initialize_book()")); + + book->code = EB_BOOK_NONE; + book->disc_code = EB_DISC_INVALID; + book->character_code = EB_CHARCODE_INVALID; + book->path = NULL; + book->path_length = 0; + book->subbooks = NULL; + book->subbook_current = NULL; +#ifdef ENABLE_EBNET + book->ebnet_file = -1; +#endif + eb_initialize_text_context(book); + eb_initialize_binary_context(book); + eb_initialize_search_contexts(book); + eb_initialize_binary_context(book); + eb_initialize_lock(&book->lock); + + LOG(("out: eb_initialize_book()")); +} + + +/* + * Bind `book' to `path'. + */ +EB_Error_Code +eb_bind(EB_Book *book, const char *path) +{ + EB_Error_Code error_code; + char temporary_path[EB_MAX_PATH_LENGTH + 1]; + int is_ebnet; + + eb_lock(&book->lock); + LOG(("in: eb_bind(path=%s)", path)); + + /* + * Clear the book if the book has already been bound. + */ + if (book->path != NULL) { + eb_finalize_book(book); + eb_initialize_book(book); + } + + /* + * Assign a book code. + */ + pthread_mutex_lock(&book_counter_mutex); + book->code = book_counter++; + pthread_mutex_unlock(&book_counter_mutex); + + /* + * Check whether `path' is URL. + */ + is_ebnet = is_ebnet_url(path); +#ifndef ENABLE_EBNET + if (is_ebnet) { + error_code = EB_ERR_EBNET_UNSUPPORTED; + goto failed; + } +#endif + + /* + * Set the path of the book. + * The length of the file name "/subdir/subsubdir/file.ebz;1" must + * be EB_MAX_PATH_LENGTH maximum. + */ + if (EB_MAX_PATH_LENGTH < strlen(path)) { + error_code = EB_ERR_TOO_LONG_FILE_NAME; + goto failed; + } + strcpy(temporary_path, path); +#ifdef ENABLE_EBNET + if (is_ebnet) + error_code = ebnet_canonicalize_url(temporary_path); + else + error_code = eb_canonicalize_path_name(temporary_path); +#else + error_code = eb_canonicalize_path_name(temporary_path); +#endif + if (error_code != EB_SUCCESS) + goto failed; + + book->path_length = strlen(temporary_path); + if (EB_MAX_PATH_LENGTH + < book->path_length + 1 + EB_MAX_RELATIVE_PATH_LENGTH) { + error_code = EB_ERR_TOO_LONG_FILE_NAME; + goto failed; + } + + book->path = (char *)malloc(book->path_length + 1); + if (book->path == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + strcpy(book->path, temporary_path); + + /* + * Establish a connection with a ebnet server. + */ +#ifdef ENABLE_EBNET + if (is_ebnet) { + error_code = ebnet_bind(book, book->path); + if (error_code != EB_SUCCESS) + goto failed; + } +#endif + + /* + * Read information from the `LANGUAGE' file. + * If failed to initialize, JIS X 0208 is assumed. + */ + eb_load_language(book); + + /* + * Read information from the `CATALOG(S)' file. + */ + error_code = eb_load_catalog(book); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_bind(book=%d) = %s", (int)book->code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_finalize_book(book); + LOG(("out: eb_bind() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Finish using `book'. + */ +void +eb_finalize_book(EB_Book *book) +{ + LOG(("in: eb_finalize_book(book=%d)", (int)book->code)); + + eb_unset_subbook(book); + + if (book->subbooks != NULL) { + eb_finalize_subbooks(book); + free(book->subbooks); + book->subbooks = NULL; + } + + book->subbook_current = NULL; + eb_finalize_text_context(book); + eb_finalize_binary_context(book); + eb_finalize_search_contexts(book); + eb_finalize_binary_context(book); + eb_finalize_lock(&book->lock); + +#ifdef ENABLE_EBNET + ebnet_finalize_book(book); +#endif + + if (book->path != NULL) + free(book->path); + + book->code = EB_BOOK_NONE; + book->disc_code = EB_DISC_INVALID; + book->character_code = EB_CHARCODE_INVALID; + book->path = NULL; + book->path_length = 0; + + LOG(("out: eb_finalize_book()")); +} + + +/* + * There are some books that EB Library sets wrong character code of + * the book. They are written in JIS X 0208, but the library sets + * ISO 8859-1. + * + * We fix the character of the books. The following table lists + * titles of the first subbook in those books. + */ +static const char * const misleaded_book_table[] = { + /* SONY DataDiskMan (DD-DR1) accessories. */ + "%;%s%A%e%j!\\%S%8%M%9!\\%/%i%&%s", + + /* Shin Eiwa Waei Chujiten (earliest edition) */ + "8&5fcode)); + + for (misleaded = misleaded_book_table; *misleaded != NULL; misleaded++) { + if (strcmp(book->subbooks[0].title, *misleaded) == 0) { + book->character_code = EB_CHARCODE_JISX0208; + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + eb_jisx0208_to_euc(subbook->title, subbook->title); + } + break; + } + } + + LOG(("out: eb_fix_misleaded_book()")); +} + +/* + * Read information from the `CATALOG(S)' file in 'book'. + * Return EB_SUCCESS if it succeeds, error-code otherwise. + */ +static EB_Error_Code +eb_load_catalog(EB_Book *book) +{ + EB_Error_Code error_code; + char catalog_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char catalog_path_name[EB_MAX_PATH_LENGTH + 1]; + + LOG(("in: eb_load_catalog(book=%d)", (int)book->code)); + + /* + * Find a catalog file. + */ + if (eb_find_file_name(book->path, "catalog", catalog_file_name) + == EB_SUCCESS) { + book->disc_code = EB_DISC_EB; + } else if (eb_find_file_name(book->path, "catalogs", catalog_file_name) + == EB_SUCCESS) { + book->disc_code = EB_DISC_EPWING; + } else { + error_code = EB_ERR_FAIL_OPEN_CAT; + goto failed; + } + + eb_compose_path_name(book->path, catalog_file_name, catalog_path_name); + + /* + * Load the catalog file. + */ + if (book->disc_code == EB_DISC_EB) + error_code = eb_load_catalog_eb(book, catalog_path_name); + else + error_code = eb_load_catalog_epwing(book, catalog_path_name); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Fix chachacter-code of the book. + */ + eb_fix_misleaded_book(book); + LOG(("out: eb_load_catalog() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (book->subbooks != NULL) { + free(book->subbooks); + book->subbooks = NULL; + } + LOG(("out: eb_load_catalog() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read information from the `CATALOG' file in 'book'. (EB) + */ +static EB_Error_Code +eb_load_catalog_eb(EB_Book *book, const char *catalog_path) +{ + EB_Error_Code error_code; + char buffer[EB_SIZE_PAGE]; + char *space; + EB_Subbook *subbook; + Zio zio; + Zio_Code zio_code; + int i; + + LOG(("in: eb_load_catalog_eb(book=%d, catalog=%s)", + (int)book->code, catalog_path)); + + zio_initialize(&zio); + + /* + * Open a catalog file. + */ + eb_path_name_zio_code(catalog_path, ZIO_PLAIN, &zio_code); + if (zio_open(&zio, catalog_path, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_CAT; + goto failed; + } + + /* + * Get the number of subbooks in this book. + */ + if (zio_read(&zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } + + book->subbook_count = eb_uint2(buffer); + LOG(("aux: eb_load_catalog_eb(): subbook_count=%d", + book->subbook_count)); + if (EB_MAX_SUBBOOKS < book->subbook_count) + book->subbook_count = EB_MAX_SUBBOOKS; + if (book->subbook_count == 0) { + error_code = EB_ERR_UNEXP_CAT; + goto failed; + } + + /* + * Allocate memories for subbook entries. + */ + book->subbooks = (EB_Subbook *) malloc(sizeof(EB_Subbook) + * book->subbook_count); + if (book->subbooks == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + eb_initialize_subbooks(book); + + /* + * Read information about subbook. + */ + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + /* + * Read data from the catalog file. + */ + if (zio_read(&zio, buffer, EB_SIZE_EB_CATALOG) + != EB_SIZE_EB_CATALOG) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } + + /* + * Set a directory name. + */ + strncpy(subbook->directory_name, + buffer + 2 + EB_MAX_EB_TITLE_LENGTH, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->directory_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->directory_name, ' '); + if (space != NULL) + *space = '\0'; + eb_fix_directory_name(book->path, subbook->directory_name); + + /* + * Set an index page. + */ + subbook->index_page = 1; + + /* + * Set a title. (Convert from JISX0208 to EUC JP) + */ + strncpy(subbook->title, buffer + 2, EB_MAX_EB_TITLE_LENGTH); + subbook->title[EB_MAX_EB_TITLE_LENGTH] = '\0'; + if (book->character_code != EB_CHARCODE_ISO8859_1) + eb_jisx0208_to_euc(subbook->title, subbook->title); + + subbook->initialized = 0; + subbook->code = i; + } + + /* + * Close the catalog file. + */ + zio_close(&zio); + zio_finalize(&zio); + + /* + * Fix chachacter-code of the book. + */ + eb_fix_misleaded_book(book); + LOG(("out: eb_load_catalog_eb() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + zio_close(&zio); + zio_initialize(&zio); + LOG(("out: eb_load_catalog() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read information from the `CATALOGS' file in 'book'. (EPWING) + */ +static EB_Error_Code +eb_load_catalog_epwing(EB_Book *book, const char *catalog_path) +{ + EB_Error_Code error_code; + char buffer[EB_SIZE_PAGE]; + char *buffer_p; + char *space; + EB_Subbook *subbook; + EB_Font *font; + Zio zio; + Zio_Code zio_code; + int epwing_version; + int data_types; + int i, j; + + LOG(("in: eb_load_catalog_epwing(book=%d, catalog=%s)", + (int)book->code, catalog_path)); + + zio_initialize(&zio); + + /* + * Open a catalog file. + */ + eb_path_name_zio_code(catalog_path, ZIO_PLAIN, &zio_code); + if (zio_open(&zio, catalog_path, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_CAT; + goto failed; + } + + /* + * Get the number of subbooks in this book. + */ + if (zio_read(&zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } + + book->subbook_count = eb_uint2(buffer); + LOG(("aux: eb_load_catalog_epwing(): subbook_count=%d", + book->subbook_count)); + if (EB_MAX_SUBBOOKS < book->subbook_count) + book->subbook_count = EB_MAX_SUBBOOKS; + if (book->subbook_count == 0) { + error_code = EB_ERR_UNEXP_CAT; + goto failed; + } + + epwing_version = eb_uint2(buffer + 2); + LOG(("aux: eb_load_catalog_epwing(): epwing_version=%d", epwing_version)); + + if (epwing_version >= 10) + book->character_code = EB_CHARCODE_UTF8; + + /* + * Allocate memories for subbook entries. + */ + book->subbooks = (EB_Subbook *) malloc(sizeof(EB_Subbook) + * book->subbook_count); + if (book->subbooks == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + eb_initialize_subbooks(book); + + /* + * Read information about subbook. + */ + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + /* + * Read data from the catalog file. + */ + if (zio_read(&zio, buffer, EB_SIZE_EPWING_CATALOG) + != EB_SIZE_EPWING_CATALOG) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } + + /* + * Set a directory name. + */ + strncpy(subbook->directory_name, + buffer + 2 + EB_MAX_EPWING_TITLE_LENGTH, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->directory_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->directory_name, ' '); + if (space != NULL) + *space = '\0'; + eb_fix_directory_name(book->path, subbook->directory_name); + + /* + * Set an index page. + */ + subbook->index_page = eb_uint2(buffer + 2 + EB_MAX_EPWING_TITLE_LENGTH + + EB_MAX_DIRECTORY_NAME_LENGTH + 4); + + /* + * Set a title. (Convert from JISX0208 to EUC JP) + */ + strncpy(subbook->title, buffer + 2, EB_MAX_EPWING_TITLE_LENGTH); + subbook->title[EB_MAX_EPWING_TITLE_LENGTH] = '\0'; + if (book->character_code != EB_CHARCODE_ISO8859_1) + eb_jisx0208_to_euc(subbook->title, subbook->title); + + /* + * Narrow font file names. + */ + buffer_p = buffer + 2 + EB_MAX_EPWING_TITLE_LENGTH + 50; + for (font = subbook->narrow_fonts, j = 0; j < EB_MAX_FONTS; + j++, font++) { + /* + * Skip this entry if the first character of the file name + * is not valid. + */ + if (*buffer_p == '\0' || 0x80 <= *((unsigned char *)buffer_p)) { + buffer_p += EB_MAX_DIRECTORY_NAME_LENGTH; + continue; + } + strncpy(font->file_name, buffer_p, EB_MAX_DIRECTORY_NAME_LENGTH); + font->file_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + font->font_code = j; + font->page = 1; + space = strchr(font->file_name, ' '); + if (space != NULL) + *space = '\0'; + buffer_p += EB_MAX_DIRECTORY_NAME_LENGTH; + } + + /* + * Wide font file names. + */ + buffer_p = buffer + 2 + EB_MAX_EPWING_TITLE_LENGTH + 18; + for (font = subbook->wide_fonts, j = 0; j < EB_MAX_FONTS; + j++, font++) { + /* + * Skip this entry if the first character of the file name + * is not valid. + */ + if (*buffer_p == '\0' || 0x80 <= *((unsigned char *)buffer_p)) { + buffer_p += EB_MAX_DIRECTORY_NAME_LENGTH; + continue; + } + strncpy(font->file_name, buffer_p, EB_MAX_DIRECTORY_NAME_LENGTH); + font->file_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + font->font_code = j; + font->page = 1; + space = strchr(font->file_name, ' '); + if (space != NULL) + *space = '\0'; + buffer_p += EB_MAX_DIRECTORY_NAME_LENGTH; + } + + subbook->initialized = 0; + subbook->code = i; + } + + /* + * Set default file names and compression types. + */ + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + strcpy(subbook->text_file_name, EB_FILE_NAME_HONMON); + strcpy(subbook->graphic_file_name, EB_FILE_NAME_HONMON); + strcpy(subbook->sound_file_name, EB_FILE_NAME_HONMON); + subbook->text_hint_zio_code = ZIO_PLAIN; + subbook->graphic_hint_zio_code = ZIO_PLAIN; + subbook->sound_hint_zio_code = ZIO_PLAIN; + } + + if (epwing_version == 1) + goto succeeded; + + /* + * Read extra information about subbook. + */ + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + /* + * Read data from the catalog file. + * + * We don't complain about unexpected EOF. In that case, we + * return EB_SUCCESS. + */ + ssize_t read_result = zio_read(&zio, buffer, EB_SIZE_EPWING_CATALOG); + if (read_result < 0) { + error_code = EB_ERR_FAIL_READ_CAT; + goto failed; + } else if (read_result != EB_SIZE_EPWING_CATALOG) { + break; + } + if (*(buffer + 4) == '\0') + continue; + + /* + * Set a text file name and its compression hint. + */ + *(subbook->text_file_name) = '\0'; + strncpy(subbook->text_file_name, + buffer + 4, EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->text_file_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->text_file_name, ' '); + if (space != NULL) + *space = '\0'; + subbook->text_hint_zio_code + = eb_get_hint_zio_code(eb_uint1(buffer + 55)); + if (subbook->text_hint_zio_code == ZIO_INVALID) { + error_code = EB_ERR_UNEXP_CAT; + goto failed; + } + + data_types = eb_uint2(buffer + 41); + + /* + * Set a graphic file name and its compression hint. + */ + *(subbook->graphic_file_name) = '\0'; + if ((data_types & 0x03) == 0x02) { + strncpy(subbook->graphic_file_name, buffer + 44, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->graphic_hint_zio_code + = eb_get_hint_zio_code(eb_uint1(buffer + 54)); + } else if (((data_types >> 8) & 0x03) == 0x02) { + strncpy(subbook->graphic_file_name, buffer + 56, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->graphic_hint_zio_code + = eb_get_hint_zio_code(eb_uint1(buffer + 53)); + } + subbook->graphic_file_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->graphic_file_name, ' '); + if (space != NULL) + *space = '\0'; + if (*(subbook->graphic_file_name) == '\0') { + strcpy(subbook->graphic_file_name, subbook->text_file_name); + subbook->graphic_hint_zio_code = subbook->text_hint_zio_code; + } + + if (subbook->graphic_hint_zio_code == ZIO_INVALID) { + error_code = EB_ERR_UNEXP_CAT; + goto failed; + } + + /* + * Set a sound file name and its compression hint. + */ + *(subbook->sound_file_name) = '\0'; + if ((data_types & 0x03) == 0x01) { + strncpy(subbook->sound_file_name, buffer + 44, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->sound_hint_zio_code + = eb_get_hint_zio_code(eb_uint1(buffer + 54)); + } else if (((data_types >> 8) & 0x03) == 0x01) { + strncpy(subbook->sound_file_name, buffer + 56, + EB_MAX_DIRECTORY_NAME_LENGTH); + subbook->sound_hint_zio_code + = eb_get_hint_zio_code(eb_uint1(buffer + 53)); + } + subbook->sound_file_name[EB_MAX_DIRECTORY_NAME_LENGTH] = '\0'; + space = strchr(subbook->sound_file_name, ' '); + if (space != NULL) + *space = '\0'; + if (*(subbook->sound_file_name) == '\0') { + strcpy(subbook->sound_file_name, subbook->text_file_name); + subbook->sound_hint_zio_code = subbook->text_hint_zio_code; + } + + if (subbook->sound_hint_zio_code == ZIO_INVALID) { + error_code = EB_ERR_UNEXP_CAT; + goto failed; + } + } + + /* + * Close the catalog file. + */ + succeeded: + zio_close(&zio); + zio_finalize(&zio); + + /* + * Fix chachacter-code of the book. + */ + eb_fix_misleaded_book(book); + LOG(("out: eb_load_catalog_epwing() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + zio_close(&zio); + zio_initialize(&zio); + LOG(("out: eb_load_catalog_epwing() = %s", eb_error_string(error_code))); + return error_code; +} + + +static Zio_Code +eb_get_hint_zio_code(int catalog_hint_value) +{ + switch (catalog_hint_value) { + case 0x00: + return ZIO_PLAIN; + break; + case 0x11: + return ZIO_EPWING; + break; + case 0x12: + return ZIO_EPWING6; + break; + } + + return ZIO_INVALID; +} + + +/* + * Read information from the `LANGUAGE' file in `book'. + */ +static void +eb_load_language(EB_Book *book) +{ + Zio zio; + Zio_Code zio_code; + char language_path_name[EB_MAX_PATH_LENGTH + 1]; + char language_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char buffer[16]; + + LOG(("in: eb_load_language(book=%d)", (int)book->code)); + + zio_initialize(&zio); + book->character_code = EB_CHARCODE_JISX0208; + + /* + * Open the language file. + */ + if (eb_find_file_name(book->path, "language", language_file_name) + != EB_SUCCESS) + goto failed; + + eb_compose_path_name(book->path, language_file_name, language_path_name); + eb_path_name_zio_code(language_path_name, ZIO_PLAIN, &zio_code); + + if (zio_open(&zio, language_path_name, zio_code) < 0) + goto failed; + + /* + * Get a character code of the book, and get the number of langueages + * in the file. + */ + if (zio_read(&zio, buffer, 16) != 16) + goto failed; + + book->character_code = eb_uint2(buffer); + if (book->character_code != EB_CHARCODE_ISO8859_1 + && book->character_code != EB_CHARCODE_JISX0208 + && book->character_code != EB_CHARCODE_JISX0208_GB2312) { + goto failed; + } + + zio_close(&zio); + LOG(("out: eb_load_language()")); + + return; + + /* + * An error occurs... + */ + failed: + zio_close(&zio); + LOG(("out: eb_load_language()")); +} + + +/* + * Test whether `book' is bound. + */ +int +eb_is_bound(EB_Book *book) +{ + int is_bound; + + eb_lock(&book->lock); + LOG(("in: eb_is_bound(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + is_bound = (book->path != NULL); + + LOG(("out: eb_is_bound() = %d", is_bound)); + eb_unlock(&book->lock); + + return is_bound; +} + + +/* + * Return the bound path of `book'. + */ +EB_Error_Code +eb_path(EB_Book *book, char *path) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_path(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Copy the path to `path'. + */ + strcpy(path, book->path); + + LOG(("out: eb_path(path=%s) = %s", path, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *path = '\0'; + LOG(("out: eb_path() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Inspect a disc type. + */ +EB_Error_Code +eb_disc_type(EB_Book *book, EB_Disc_Code *disc_code) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_disc_type(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Copy the disc code to `disc_code'. + */ + *disc_code = book->disc_code; + + LOG(("out: eb_disc_type(disc_code=%d) = %s", (int)*disc_code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *disc_code = EB_DISC_INVALID; + LOG(("out: eb_disc_type() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Inspect a character code used in the book. + */ +EB_Error_Code +eb_character_code(EB_Book *book, EB_Character_Code *character_code) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_character_code(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Copy the character code to `character_code'. + */ + *character_code = book->character_code; + + LOG(("out: eb_character_code(character_code=%d) = %s", + (int)*character_code, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_code = EB_CHARCODE_INVALID; + LOG(("out: eb_character_code() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/book.lo b/lib/ebu/ebu/book.lo new file mode 100644 index 0000000..0224574 --- /dev/null +++ b/lib/ebu/ebu/book.lo @@ -0,0 +1,12 @@ +# book.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/book.o' + +# Name of the non-PIC object +non_pic_object='book.o' + diff --git a/lib/ebu/ebu/booklist.c b/lib/ebu/ebu/booklist.c new file mode 100644 index 0000000..9e8fac9 --- /dev/null +++ b/lib/ebu/ebu/booklist.c @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif +#include "build-post.h" + +/* + * Initial value of `max_entry_count' in `EB_BookList'. + */ +#define EB_INITIAL_BOOKLIST_MAX_ENTRY_COUNT 16 + +/* + * BookList ID counter. + */ +static EB_Book_Code booklist_counter = 0; + +/* + * Mutex for `booklist_counter'. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t booklist_counter_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + + +/* + * Initialize a book list. + */ +void +eb_initialize_booklist(EB_BookList *booklist) +{ + LOG(("in: eb_initialize_booklist()")); + + booklist->entry_count = 0; + booklist->max_entry_count = 0; + booklist->entries = NULL; + eb_initialize_lock(&booklist->lock); + + LOG(("out: eb_initialize_booklist()")); +} + + +/* + * Finalize a book list. + */ +void +eb_finalize_booklist(EB_BookList *booklist) +{ + int i; + + LOG(("in: eb_finalize_booklist()")); + + if (booklist->entries != NULL) { + for (i = 0; i < booklist->entry_count; i++) { + free(booklist->entries[i].name); + free(booklist->entries[i].title); + } + free(booklist->entries); + booklist->entries = NULL; + } + booklist->entry_count = 0; + booklist->max_entry_count = 0; + + LOG(("out: eb_finalize_booklist()")); +} + + +/* + * Get a list of books from an EBNET server. + */ +EB_Error_Code +eb_bind_booklist(EB_BookList *booklist, const char *path) +{ + EB_Error_Code error_code; + int i; + + eb_lock(&booklist->lock); + LOG(("in: eb_bind_booklist(path=%s)", path)); + + pthread_mutex_lock(&booklist_counter_mutex); + booklist->code = booklist_counter++; + pthread_mutex_unlock(&booklist_counter_mutex); + +#ifndef ENABLE_EBNET + error_code = EB_ERR_EBNET_UNSUPPORTED; + goto failed; +#endif + if (!is_ebnet_url(path)) { + error_code = EB_ERR_BAD_FILE_NAME; + goto failed; + } + for (i = 0; i < booklist->entry_count; i++) { + free(booklist->entries[i].name); + free(booklist->entries[i].title); + } + + error_code = ebnet_bind_booklist(booklist, path); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_bind_booklist(book=%d) = %s", (int)booklist->code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&booklist->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_finalize_booklist(booklist); + LOG(("out: eb_bind_booklist() = %s", eb_error_string(error_code))); + eb_unlock(&booklist->lock); + return error_code; +} + + +/* + * Add a book entry to `booklist'. + */ +EB_Error_Code +eb_booklist_add_book(EB_BookList *booklist, const char *name, + const char *title) +{ + int new_max_entry_count; + EB_BookList_Entry *new_entries; + char *new_name = NULL; + char *new_title = NULL; + EB_Error_Code error_code; + + LOG(("in: eb_booklist_add_book(name=%s, title=%s)", name, title)); + + if (booklist->entry_count == booklist->max_entry_count) { + if (booklist->max_entry_count == 0) { + new_max_entry_count = EB_INITIAL_BOOKLIST_MAX_ENTRY_COUNT; + new_entries = (EB_BookList_Entry *) + malloc(sizeof(EB_BookList_Entry) * new_max_entry_count); + } else { + new_max_entry_count = booklist->max_entry_count * 2; + new_entries = (EB_BookList_Entry *)realloc(booklist->entries, + sizeof(EB_BookList_Entry) * new_max_entry_count); + } + if (new_entries == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + booklist->max_entry_count = new_max_entry_count; + booklist->entries = new_entries; + } + + new_name = (char *)malloc(strlen(name) + 1); + if (new_name == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + strcpy(new_name, name); + + new_title = (char *)malloc(strlen(title) + 1); + if (new_title == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + strcpy(new_title, title); + + booklist->entries[booklist->entry_count].name = new_name; + booklist->entries[booklist->entry_count].title = new_title; + booklist->entry_count++; + + LOG(("out: eb_booklist_add_book() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (new_name != NULL) + free(new_name); + if (new_title != NULL) + free(new_title); + + LOG(("out: eb_booklist_book_add() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Return the number of books in `booklist'. + */ +EB_Error_Code +eb_booklist_book_count(EB_BookList *booklist, int *book_count) +{ + EB_Error_Code error_code; + + eb_lock(&booklist->lock); + LOG(("in: eb_booklist_book_count(booklist=%d)", (int)booklist->code)); + + if (booklist->entries == NULL) { + error_code = EB_ERR_UNBOUND_BOOKLIST; + goto failed; + } + *book_count = booklist->entry_count; + + LOG(("out: eb_booklist_book_count(count=%d) = %s", *book_count, + eb_error_string(EB_SUCCESS))); + eb_unlock(&booklist->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_booklist_book_count() = %s", eb_error_string(error_code))); + eb_unlock(&booklist->lock); + return error_code; +} + + +/* + * Return title of a book entry in `booklist'. + */ +EB_Error_Code +eb_booklist_book_name(EB_BookList *booklist, int book_index, char **book_name) +{ + EB_Error_Code error_code; + + eb_lock(&booklist->lock); + LOG(("in: eb_booklist_book_name(booklist=%d,index=%d)", + (int)booklist->code, book_index)); + + if (booklist->entries == NULL) { + error_code = EB_ERR_UNBOUND_BOOKLIST; + goto failed; + } + if (book_index < 0 || booklist->entry_count <= book_index) { + error_code = EB_ERR_NO_SUCH_BOOK; + goto failed; + } + + *book_name = booklist->entries[book_index].name; + + LOG(("out: eb_booklist_book_name(*book_name=%s) = %s", + (*book_name == NULL) ? "NULL" : *book_name, + eb_error_string(EB_SUCCESS))); + + eb_unlock(&booklist->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_booklist_book_name() = %s", eb_error_string(error_code))); + eb_unlock(&booklist->lock); + return error_code; +} + + +/* + * Return name of a book entry in `booklist'. + */ +EB_Error_Code +eb_booklist_book_title(EB_BookList *booklist, int book_index, + char **book_title) +{ + EB_Error_Code error_code; + + eb_lock(&booklist->lock); + LOG(("in: eb_booklist_book_title(booklist=%d,index=%d)", + (int)booklist->code, book_index)); + + if (booklist->entries == NULL) { + error_code = EB_ERR_UNBOUND_BOOKLIST; + goto failed; + } + if (book_index < 0 || booklist->entry_count <= book_index) { + error_code = EB_ERR_NO_SUCH_BOOK; + goto failed; + } + *book_title = booklist->entries[book_index].title; + + LOG(("out: eb_booklist_book_title(*book_title=%s) = %s", + (*book_title == NULL) ? "NULL" : *book_title, + eb_error_string(EB_SUCCESS))); + + eb_unlock(&booklist->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_booklist_book_title() = %s", eb_error_string(error_code))); + eb_unlock(&booklist->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/booklist.h b/lib/ebu/ebu/booklist.h new file mode 100644 index 0000000..59fcb62 --- /dev/null +++ b/lib/ebu/ebu/booklist.h @@ -0,0 +1,60 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_BOOKLIST_H +#define EB_BOOKLIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef EB_BUILD_LIBRARY +#include "eb.h" +#else +#include +#endif + +/* + * Function declarations. + */ +/* booklist.c */ +void eb_initialize_booklist(EB_BookList *booklist); +void eb_finalize_booklist(EB_BookList *booklist); +EB_Error_Code eb_bind_booklist(EB_BookList *booklist, const char *path); +EB_Error_Code eb_booklist_book_count(EB_BookList *booklist, int *book_count); +EB_Error_Code eb_booklist_book_name(EB_BookList *booklist, int book_index, + char **book_name); +EB_Error_Code eb_booklist_book_title(EB_BookList *booklist, int book_index, + char **book_title); + + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_BOOKLIST_H */ diff --git a/lib/ebu/ebu/booklist.lo b/lib/ebu/ebu/booklist.lo new file mode 100644 index 0000000..e3fac85 --- /dev/null +++ b/lib/ebu/ebu/booklist.lo @@ -0,0 +1,12 @@ +# booklist.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/booklist.o' + +# Name of the non-PIC object +non_pic_object='booklist.o' + diff --git a/lib/ebu/ebu/build-post.h b/lib/ebu/ebu/build-post.h new file mode 100644 index 0000000..c01ebcd --- /dev/null +++ b/lib/ebu/ebu/build-post.h @@ -0,0 +1,367 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_BUILD_POST_H +#define EB_BUILD_POST_H + +#include "defs.h" + +/* + * Text domain name. + */ +#define EB_TEXT_DOMAIN_NAME "ebu" + +/* + * Locale directory. + */ +#ifndef WIN32 +#define EB_LOCALEDIR "/usr/local/share/locale" +#else +#define EB_LOCALEDIR localedir() +#endif + +/* + * Data size of a book entry in a catalog file. + */ +#define EB_SIZE_EB_CATALOG 40 +#define EB_SIZE_EPWING_CATALOG 164 + +/* + * Maximum number of search titles. + */ +#define EB_MAX_SEARCH_TITLES 14 + +/* + * File names. + */ +#define EB_FILE_NAME_START "start" +#define EB_FILE_NAME_HONMON "honmon" +#define EB_FILE_NAME_FUROKU "furoku" +#define EB_FILE_NAME_APPENDIX "appendix" + +/* + * Directory names. + */ +#define EB_DIRECTORY_NAME_DATA "data" +#define EB_DIRECTORY_NAME_GAIJI "gaiji" +#define EB_DIRECTORY_NAME_STREAM "stream" +#define EB_DIRECTORY_NAME_MOVIE "movie" + +/* + * Search word types. + */ +#define EB_WORD_ALPHABET 0 +#define EB_WORD_KANA 1 +#define EB_WORD_OTHER 2 +#define EB_WORD_INVALID -1 + +/* + * Index Style flags. + */ +#define EB_INDEX_STYLE_CONVERT 0 +#define EB_INDEX_STYLE_ASIS 1 +#define EB_INDEX_STYLE_REVERSED_CONVERT 2 +#define EB_INDEX_STYLE_DELETE 2 + +/* + * Text content currently read. + */ +#define EB_TEXT_MAIN_TEXT 1 +#define EB_TEXT_HEADING 2 +#define EB_TEXT_RAWTEXT 3 +#define EB_TEXT_OPTIONAL_TEXT 4 +#define EB_TEXT_SEEKED 0 +#define EB_TEXT_INVALID -1 + +/* + * Search method currently processed. + */ +#define EB_SEARCH_EXACTWORD 0 +#define EB_SEARCH_WORD 1 +#define EB_SEARCH_ENDWORD 2 +#define EB_SEARCH_KEYWORD 3 +#define EB_SEARCH_MULTI 4 +#define EB_SEARCH_CROSS 5 +#define EB_SEARCH_NONE -1 + +/* + * Arrangement style of entries in a search index page. + */ +#define EB_ARRANGE_FIXED 0 +#define EB_ARRANGE_VARIABLE 1 +#define EB_ARRANGE_INVALID -1 + +/* + * Binary data types. + */ +#define EB_BINARY_MONO_GRAPHIC 0 +#define EB_BINARY_COLOR_GRAPHIC 1 +#define EB_BINARY_WAVE 2 +#define EB_BINARY_MPEG 3 +#define EB_BINARY_GRAY_GRAPHIC 4 +#define EB_BINARY_INVALID -1 + +/* + * Text-stop status. + */ +#define EB_TEXT_STATUS_CONTINUED 0 +#define EB_TEXT_STATUS_SOFT_STOP 1 +#define EB_TEXT_STATUS_HARD_STOP 2 + +/* + * The maximum index depth of search indexes. + */ +#define EB_MAX_INDEX_DEPTH 6 + +/* + * The maximum length of path name relative to top directory of a CD-ROM + * book. An example of the longest relative path is: + * + * "subdir01/subdir02/filename.ebz;1" + */ +#define EB_MAX_RELATIVE_PATH_LENGTH \ + (EB_MAX_DIRECTORY_NAME_LENGTH + 1 \ + + EB_MAX_DIRECTORY_NAME_LENGTH + 1 \ + + EB_MAX_FILE_NAME_LENGTH) + +/* + * The environment variable name to enable/disable debug messages. + */ +#define EB_DEBUG_ENVIRONMENT_VARIABLE "EB_DEBUG" + +/* + * Trace log macro. + */ +#define LOG(x) do {if (eb_log_flag) eb_log x;} while (0) + +/* + * Get an unsigned value from an octet stream buffer. + */ +#define eb_uint1(p) (*(const unsigned char *)(p)) + +#define eb_uint2(p) ((*(const unsigned char *)(p) << 8) \ + + (*(const unsigned char *)((p) + 1))) + +#define eb_uint3(p) ((*(const unsigned char *)(p) << 16) \ + + (*(const unsigned char *)((p) + 1) << 8) \ + + (*(const unsigned char *)((p) + 2))) + +#define eb_uint4(p) ((*(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +#define eb_uint4_le(p) ((*(const unsigned char *)(p)) \ + + (*(const unsigned char *)((p) + 1) << 8) \ + + (*(const unsigned char *)((p) + 2) << 16) \ + + (*(const unsigned char *)((p) + 3) << 24)) + +/* + * Test whether the path is URL with the `ebnet' scheme. + */ +#define is_ebnet_url(p) \ + ( ((p)[0] == 'E' || (p)[0] == 'e') \ + && ((p)[1] == 'B' || (p)[1] == 'b') \ + && ((p)[2] == 'N' || (p)[2] == 'n') \ + && ((p)[3] == 'E' || (p)[3] == 'e') \ + && ((p)[4] == 'T' || (p)[4] == 't') \ + && (p)[5] == ':' && (p)[6] == '/' && (p)[7] == '/') + +/* + * Test whether `off_t' represents a large integer. + */ +#define off_t_is_large \ + ((((off_t) 1 << 41) + ((off_t) 1 << 40) + 1) % 9999991 == 7852006) + +/* + * External variable declarations. + */ +/* log.c */ +extern int eb_log_flag; + +/* hook.c */ +extern EB_Hookset eb_default_hookset; + +/* + * Function declarations. + */ +/* appendix.c */ +void eb_initialize_alt_caches(EB_Appendix *appendix); +void eb_finalize_alt_caches(EB_Appendix *appendix); + +/* appsub.c */ +void eb_initialize_appendix_subbooks(EB_Appendix *appendix); +void eb_finalize_appendix_subbooks(EB_Appendix *appendix); + +/* bcd.c */ +unsigned eb_bcd2(const char *stream); +unsigned eb_bcd4(const char *stream); +unsigned eb_bcd6(const char *stream); + +/* binary.c */ +void eb_initialize_binary_context(EB_Book *book); +void eb_reset_binary_context(EB_Book *book); +void eb_finalize_binary_context(EB_Book *book); + +/* booklist.c */ +EB_Error_Code eb_booklist_add_book(EB_BookList *booklist, const char *name, + const char *title); + +/* filename.c */ +EB_Error_Code eb_canonicalize_path_name(char *path_name); +void eb_canonicalize_file_name(char *file_name); +EB_Error_Code eb_fix_directory_name(const char *path, char *directory_name); +EB_Error_Code eb_fix_directory_name2(const char *path, + const char *directory_name, char *sub_directory_name); +void eb_fix_path_name_suffix(char *path_name, const char *suffix); +EB_Error_Code eb_find_file_name(const char *path_name, + const char *target_file_name, char *found_file_name); +EB_Error_Code eb_find_file_name2(const char *path_name, + const char *sub_directory_name, const char *target_file_name, + char *found_file_name); +EB_Error_Code eb_find_file_name3(const char *path_name, + const char *sub_directory_name, const char *sub2_directory_name, + const char *target_file_name, char *found_file_name); +void eb_compose_path_name(const char *path_name, const char *file_name, + char *composed_path_name); +void eb_compose_path_name2(const char *path_name, + const char *sub_directory_name, const char *file_name, + char *composed_path_name); +void eb_compose_path_name3(const char *path_name, + const char *sub_directory_name, const char *sub2_directory_name, + const char *file_name, char *composed_path_name); +void eb_path_name_zio_code(const char *path_name, Zio_Code default_zio_code, + Zio_Code *zio_code); + +/* font.c */ +void eb_initialize_fonts(EB_Book *book); +void eb_load_font_headers(EB_Book *book); +void eb_finalize_fonts(EB_Book *book); + +/* hook.c */ +void eb_initialize_default_hookset(void); + +/* jacode.c */ +void eb_jisx0208_to_euc(char *out_string, const char *in_string); +void eb_sjis_to_euc(char *out_string, const char *in_string); +void eb_ebcdic037_to_ascii(char *out_string, const char *in_string); + +/* lock.c */ +#ifdef ENABLE_PTHREAD +void eb_initialize_lock(EB_Lock *lock); +void eb_finalize_lock(EB_Lock *lock); +void eb_lock(EB_Lock *lock); +void eb_unlock(EB_Lock *lock); +#else /* not ENABLE_PTHREAD */ +#define eb_lock(x) +#define eb_unlock(x) +#define eb_initialize_lock(x) +#define eb_finalize_lock(x) +#endif /* not ENABLE_PTHREAD */ + +/* log.c */ +void eb_initialize_log(void); +const char *eb_quoted_stream(const char *stream, size_t stream_length); +const char *eb_quoted_string(const char *string); + +/* match.c */ +int eb_match_word(const char *word, const char *pattern, size_t length); +int eb_pre_match_word(const char *word, const char *pattern, size_t length); +int eb_exact_match_word_jis(const char *word, const char *pattern, + size_t length); +int eb_exact_pre_match_word_jis(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_latin(const char *word, const char *pattern, + size_t length); +int eb_exact_pre_match_word_latin(const char *word, const char *pattern, + size_t); +int eb_match_word_kana_single(const char *word, const char *pattern, + size_t length); +int eb_match_word_kana_group(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_kana_single(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_kana_group(const char *word, const char *pattern, + size_t length); + +/* message.c */ +EB_Error_Code eb_initialize_messages(EB_Book *book); + +/* multi.c */ +EB_Error_Code eb_load_multi_searches(EB_Book *book); +EB_Error_Code eb_load_multi_titles(EB_Book *book); + +/* narwfont.c */ +EB_Error_Code eb_open_narrow_font_file(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_narrow_font_header(EB_Book *book, + EB_Font_Code font_code); +EB_Error_Code eb_load_narrow_font_glyphs(EB_Book *book, + EB_Font_Code font_code); + +/* search.c */ +void eb_initialize_search_contexts(EB_Book *book); +void eb_finalize_search_contexts(EB_Book *book); +void eb_reset_search_contexts(EB_Book *book); +void eb_initialize_search(EB_Search *search); +void eb_finalize_search(EB_Search *search); +void eb_initialize_searches(EB_Book *book); +void eb_finalize_searches(EB_Book *book); +EB_Error_Code eb_presearch_word(EB_Book *book, EB_Search_Context *context); + +/* setword.c */ +EB_Error_Code eb_set_word(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_endword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_keyword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_multiword(EB_Book *book, EB_Multi_Search_Code multi_id, + EB_Multi_Entry_Code entry_id, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); + +/* subbook.c */ +void eb_initialize_subbooks(EB_Book *book); +void eb_finalize_subbooks(EB_Book *book); + +/* text.c */ +void eb_initialize_text_context(EB_Book *book); +void eb_finalize_text_context(EB_Book *book); +void eb_reset_text_context(EB_Book *book); +void eb_invalidate_text_context(EB_Book *book); +EB_Error_Code eb_forward_heading(EB_Book *book); + +/* widefont.c */ +EB_Error_Code eb_open_wide_font_file(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_wide_font_header(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_wide_font_glyphs(EB_Book *book, EB_Font_Code font_code); + +/* strcasecmp.c */ +int eb_strcasecmp(const char *string1, const char *string2); +int eb_strncasecmp(const char *string1, const char *string2, size_t n); + +#endif /* not EB_BUILD_POST_H */ diff --git a/lib/ebu/ebu/build-post.h.in b/lib/ebu/ebu/build-post.h.in new file mode 100644 index 0000000..9075cde --- /dev/null +++ b/lib/ebu/ebu/build-post.h.in @@ -0,0 +1,367 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_BUILD_POST_H +#define EB_BUILD_POST_H + +#include "defs.h" + +/* + * Text domain name. + */ +#define EB_TEXT_DOMAIN_NAME "ebu" + +/* + * Locale directory. + */ +#ifndef WIN32 +#define EB_LOCALEDIR "@localedir@" +#else +#define EB_LOCALEDIR localedir() +#endif + +/* + * Data size of a book entry in a catalog file. + */ +#define EB_SIZE_EB_CATALOG 40 +#define EB_SIZE_EPWING_CATALOG 164 + +/* + * Maximum number of search titles. + */ +#define EB_MAX_SEARCH_TITLES 14 + +/* + * File names. + */ +#define EB_FILE_NAME_START "start" +#define EB_FILE_NAME_HONMON "honmon" +#define EB_FILE_NAME_FUROKU "furoku" +#define EB_FILE_NAME_APPENDIX "appendix" + +/* + * Directory names. + */ +#define EB_DIRECTORY_NAME_DATA "data" +#define EB_DIRECTORY_NAME_GAIJI "gaiji" +#define EB_DIRECTORY_NAME_STREAM "stream" +#define EB_DIRECTORY_NAME_MOVIE "movie" + +/* + * Search word types. + */ +#define EB_WORD_ALPHABET 0 +#define EB_WORD_KANA 1 +#define EB_WORD_OTHER 2 +#define EB_WORD_INVALID -1 + +/* + * Index Style flags. + */ +#define EB_INDEX_STYLE_CONVERT 0 +#define EB_INDEX_STYLE_ASIS 1 +#define EB_INDEX_STYLE_REVERSED_CONVERT 2 +#define EB_INDEX_STYLE_DELETE 2 + +/* + * Text content currently read. + */ +#define EB_TEXT_MAIN_TEXT 1 +#define EB_TEXT_HEADING 2 +#define EB_TEXT_RAWTEXT 3 +#define EB_TEXT_OPTIONAL_TEXT 4 +#define EB_TEXT_SEEKED 0 +#define EB_TEXT_INVALID -1 + +/* + * Search method currently processed. + */ +#define EB_SEARCH_EXACTWORD 0 +#define EB_SEARCH_WORD 1 +#define EB_SEARCH_ENDWORD 2 +#define EB_SEARCH_KEYWORD 3 +#define EB_SEARCH_MULTI 4 +#define EB_SEARCH_CROSS 5 +#define EB_SEARCH_NONE -1 + +/* + * Arrangement style of entries in a search index page. + */ +#define EB_ARRANGE_FIXED 0 +#define EB_ARRANGE_VARIABLE 1 +#define EB_ARRANGE_INVALID -1 + +/* + * Binary data types. + */ +#define EB_BINARY_MONO_GRAPHIC 0 +#define EB_BINARY_COLOR_GRAPHIC 1 +#define EB_BINARY_WAVE 2 +#define EB_BINARY_MPEG 3 +#define EB_BINARY_GRAY_GRAPHIC 4 +#define EB_BINARY_INVALID -1 + +/* + * Text-stop status. + */ +#define EB_TEXT_STATUS_CONTINUED 0 +#define EB_TEXT_STATUS_SOFT_STOP 1 +#define EB_TEXT_STATUS_HARD_STOP 2 + +/* + * The maximum index depth of search indexes. + */ +#define EB_MAX_INDEX_DEPTH 6 + +/* + * The maximum length of path name relative to top directory of a CD-ROM + * book. An example of the longest relative path is: + * + * "subdir01/subdir02/filename.ebz;1" + */ +#define EB_MAX_RELATIVE_PATH_LENGTH \ + (EB_MAX_DIRECTORY_NAME_LENGTH + 1 \ + + EB_MAX_DIRECTORY_NAME_LENGTH + 1 \ + + EB_MAX_FILE_NAME_LENGTH) + +/* + * The environment variable name to enable/disable debug messages. + */ +#define EB_DEBUG_ENVIRONMENT_VARIABLE "EB_DEBUG" + +/* + * Trace log macro. + */ +#define LOG(x) do {if (eb_log_flag) eb_log x;} while (0) + +/* + * Get an unsigned value from an octet stream buffer. + */ +#define eb_uint1(p) (*(const unsigned char *)(p)) + +#define eb_uint2(p) ((*(const unsigned char *)(p) << 8) \ + + (*(const unsigned char *)((p) + 1))) + +#define eb_uint3(p) ((*(const unsigned char *)(p) << 16) \ + + (*(const unsigned char *)((p) + 1) << 8) \ + + (*(const unsigned char *)((p) + 2))) + +#define eb_uint4(p) ((*(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +#define eb_uint4_le(p) ((*(const unsigned char *)(p)) \ + + (*(const unsigned char *)((p) + 1) << 8) \ + + (*(const unsigned char *)((p) + 2) << 16) \ + + (*(const unsigned char *)((p) + 3) << 24)) + +/* + * Test whether the path is URL with the `ebnet' scheme. + */ +#define is_ebnet_url(p) \ + ( ((p)[0] == 'E' || (p)[0] == 'e') \ + && ((p)[1] == 'B' || (p)[1] == 'b') \ + && ((p)[2] == 'N' || (p)[2] == 'n') \ + && ((p)[3] == 'E' || (p)[3] == 'e') \ + && ((p)[4] == 'T' || (p)[4] == 't') \ + && (p)[5] == ':' && (p)[6] == '/' && (p)[7] == '/') + +/* + * Test whether `off_t' represents a large integer. + */ +#define off_t_is_large \ + ((((off_t) 1 << 41) + ((off_t) 1 << 40) + 1) % 9999991 == 7852006) + +/* + * External variable declarations. + */ +/* log.c */ +extern int eb_log_flag; + +/* hook.c */ +extern EB_Hookset eb_default_hookset; + +/* + * Function declarations. + */ +/* appendix.c */ +void eb_initialize_alt_caches(EB_Appendix *appendix); +void eb_finalize_alt_caches(EB_Appendix *appendix); + +/* appsub.c */ +void eb_initialize_appendix_subbooks(EB_Appendix *appendix); +void eb_finalize_appendix_subbooks(EB_Appendix *appendix); + +/* bcd.c */ +unsigned eb_bcd2(const char *stream); +unsigned eb_bcd4(const char *stream); +unsigned eb_bcd6(const char *stream); + +/* binary.c */ +void eb_initialize_binary_context(EB_Book *book); +void eb_reset_binary_context(EB_Book *book); +void eb_finalize_binary_context(EB_Book *book); + +/* booklist.c */ +EB_Error_Code eb_booklist_add_book(EB_BookList *booklist, const char *name, + const char *title); + +/* filename.c */ +EB_Error_Code eb_canonicalize_path_name(char *path_name); +void eb_canonicalize_file_name(char *file_name); +EB_Error_Code eb_fix_directory_name(const char *path, char *directory_name); +EB_Error_Code eb_fix_directory_name2(const char *path, + const char *directory_name, char *sub_directory_name); +void eb_fix_path_name_suffix(char *path_name, const char *suffix); +EB_Error_Code eb_find_file_name(const char *path_name, + const char *target_file_name, char *found_file_name); +EB_Error_Code eb_find_file_name2(const char *path_name, + const char *sub_directory_name, const char *target_file_name, + char *found_file_name); +EB_Error_Code eb_find_file_name3(const char *path_name, + const char *sub_directory_name, const char *sub2_directory_name, + const char *target_file_name, char *found_file_name); +void eb_compose_path_name(const char *path_name, const char *file_name, + char *composed_path_name); +void eb_compose_path_name2(const char *path_name, + const char *sub_directory_name, const char *file_name, + char *composed_path_name); +void eb_compose_path_name3(const char *path_name, + const char *sub_directory_name, const char *sub2_directory_name, + const char *file_name, char *composed_path_name); +void eb_path_name_zio_code(const char *path_name, Zio_Code default_zio_code, + Zio_Code *zio_code); + +/* font.c */ +void eb_initialize_fonts(EB_Book *book); +void eb_load_font_headers(EB_Book *book); +void eb_finalize_fonts(EB_Book *book); + +/* hook.c */ +void eb_initialize_default_hookset(void); + +/* jacode.c */ +void eb_jisx0208_to_euc(char *out_string, const char *in_string); +void eb_sjis_to_euc(char *out_string, const char *in_string); +void eb_ebcdic037_to_ascii(char *out_string, const char *in_string); + +/* lock.c */ +#ifdef ENABLE_PTHREAD +void eb_initialize_lock(EB_Lock *lock); +void eb_finalize_lock(EB_Lock *lock); +void eb_lock(EB_Lock *lock); +void eb_unlock(EB_Lock *lock); +#else /* not ENABLE_PTHREAD */ +#define eb_lock(x) +#define eb_unlock(x) +#define eb_initialize_lock(x) +#define eb_finalize_lock(x) +#endif /* not ENABLE_PTHREAD */ + +/* log.c */ +void eb_initialize_log(void); +const char *eb_quoted_stream(const char *stream, size_t stream_length); +const char *eb_quoted_string(const char *string); + +/* match.c */ +int eb_match_word(const char *word, const char *pattern, size_t length); +int eb_pre_match_word(const char *word, const char *pattern, size_t length); +int eb_exact_match_word_jis(const char *word, const char *pattern, + size_t length); +int eb_exact_pre_match_word_jis(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_latin(const char *word, const char *pattern, + size_t length); +int eb_exact_pre_match_word_latin(const char *word, const char *pattern, + size_t); +int eb_match_word_kana_single(const char *word, const char *pattern, + size_t length); +int eb_match_word_kana_group(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_kana_single(const char *word, const char *pattern, + size_t length); +int eb_exact_match_word_kana_group(const char *word, const char *pattern, + size_t length); + +/* message.c */ +EB_Error_Code eb_initialize_messages(EB_Book *book); + +/* multi.c */ +EB_Error_Code eb_load_multi_searches(EB_Book *book); +EB_Error_Code eb_load_multi_titles(EB_Book *book); + +/* narwfont.c */ +EB_Error_Code eb_open_narrow_font_file(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_narrow_font_header(EB_Book *book, + EB_Font_Code font_code); +EB_Error_Code eb_load_narrow_font_glyphs(EB_Book *book, + EB_Font_Code font_code); + +/* search.c */ +void eb_initialize_search_contexts(EB_Book *book); +void eb_finalize_search_contexts(EB_Book *book); +void eb_reset_search_contexts(EB_Book *book); +void eb_initialize_search(EB_Search *search); +void eb_finalize_search(EB_Search *search); +void eb_initialize_searches(EB_Book *book); +void eb_finalize_searches(EB_Book *book); +EB_Error_Code eb_presearch_word(EB_Book *book, EB_Search_Context *context); + +/* setword.c */ +EB_Error_Code eb_set_word(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_endword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_keyword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); +EB_Error_Code eb_set_multiword(EB_Book *book, EB_Multi_Search_Code multi_id, + EB_Multi_Entry_Code entry_id, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code); + +/* subbook.c */ +void eb_initialize_subbooks(EB_Book *book); +void eb_finalize_subbooks(EB_Book *book); + +/* text.c */ +void eb_initialize_text_context(EB_Book *book); +void eb_finalize_text_context(EB_Book *book); +void eb_reset_text_context(EB_Book *book); +void eb_invalidate_text_context(EB_Book *book); +EB_Error_Code eb_forward_heading(EB_Book *book); + +/* widefont.c */ +EB_Error_Code eb_open_wide_font_file(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_wide_font_header(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_load_wide_font_glyphs(EB_Book *book, EB_Font_Code font_code); + +/* strcasecmp.c */ +int eb_strcasecmp(const char *string1, const char *string2); +int eb_strncasecmp(const char *string1, const char *string2, size_t n); + +#endif /* not EB_BUILD_POST_H */ diff --git a/lib/ebu/ebu/build-pre.h b/lib/ebu/ebu/build-pre.h new file mode 100644 index 0000000..0dd96bf --- /dev/null +++ b/lib/ebu/ebu/build-pre.h @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_BUILD_PRE_H +#define EB_BUILD_PRE_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_DIRECT_H +#include +#endif + +#ifdef HAVE__GETDCWD +#define getcwd _getcwd +#define getdcwd _getdcwd +#endif + +#ifdef ENABLE_PTHREAD +#include +#endif + +#ifdef ENABLE_NLS +#include +#endif + +/* + * Mutual exclusion lock of Pthreads. + */ +#ifndef ENABLE_PTHREAD +#define pthread_mutex_lock(m) +#define pthread_mutex_unlock(m) +#endif + +/* + * stat() macros. + */ +#ifndef S_ISREG +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +/* + * Flags for open(). + */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* + * Character type tests and conversions. + */ +#define ASCII_ISDIGIT(c) ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c) || ASCII_ISDIGIT(c)) +#define ASCII_ISXDIGIT(c) \ + (ASCII_ISDIGIT(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f')) +#define ASCII_TOUPPER(c) (('a' <= (c) && (c) <= 'z') ? (c) - 0x20 : (c)) +#define ASCII_TOLOWER(c) (('A' <= (c) && (c) <= 'Z') ? (c) + 0x20 : (c)) + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Fake missing function names. + */ +#ifndef HAVE_STRCASECMP +#define strcasecmp eb_strcasecmp +#define strncasecmp eb_strncasecmp +#endif + +#ifndef HAVE_GETADDRINFO +#define addrinfo ebnet_addrinfo +#define getaddrinfo ebnet_getaddrinfo +#define freeaddrinfo ebnet_freeaddrinfo +#endif + +#ifndef HAVE_GETNAMEINFO +#define getnameinfo ebnet_getnameinfo +#endif + +#ifndef HAVE_GAI_STRERROR +#define gai_strerror ebnet_gai_strerror +#endif + +#ifndef IN6ADDR_ANY_DECLARED +#define in6addr_any ebnet_in6addr_any +#endif + +#ifndef IN6ADDR_LOOPBACK_DECLARED +#define in6addr_loopback ebnet_in6addr_loopback +#endif + +#endif /* EB_BUILD_PRE_H */ diff --git a/lib/ebu/ebu/color.c b/lib/ebu/ebu/color.c new file mode 100644 index 0000000..82895cd --- /dev/null +++ b/lib/ebu/ebu/color.c @@ -0,0 +1,292 @@ +/* + * Copyright (c) 2020 Kazuhiro Ito + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' has color chart or + * not. + */ +int +eb_have_color_chart(EB_Book *book) +{ + int result = 0; + + eb_lock(&book->lock); + LOG(("in: eb_have_color_chart(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of color chart. + */ + if (book->subbook_current->color_chart.start_page == 0) + goto failed; + + result = 1; + + failed: + LOG(("out: eb_have_color_chart() = %d", result)); + eb_unlock(&book->lock); + return result; +} + + +/* return beginning POSITION of color chart. */ +EB_Error_Code +eb_color_chart(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_color_chart(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of color chart. + */ + page = book->subbook_current->color_chart.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + position->page = page; + position->offset = 0; + + LOG(("out: eb_color_chart(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + failed: + LOG(("out: eb_color_chart() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + + +/* + * Write NUMBERth color's Munsell value (in ascii) into buffer VALUE. + * buffer needs EB_MAX_COLOR_VALUE_LENGTH + 1 bytes. + * NUMBER starts from 1. + */ +EB_Error_Code +eb_color_value(EB_Book *book, int number, char *value) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_color_value(book=%d, number=%d)", (int)book->code, number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of color chart. + */ + page = book->subbook_current->color_chart.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + page += (number -1); + if (number < 1 || page > book->subbook_current->color_chart.end_page) { + error_code = EB_ERR_NO_SUCH_COLOR; + goto failed; + } + + if (zio_lseek(&book->subbook_current->text_zio, + (page - 1) * EB_SIZE_PAGE, SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + if (zio_read(&book->subbook_current->text_zio, value, + EB_MAX_COLOR_VALUE_LENGTH) < EB_MAX_COLOR_VALUE_LENGTH) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + value[EB_MAX_COLOR_VALUE_LENGTH] = 0; + eb_ebcdic037_to_ascii(value, value); + + error_code = EB_SUCCESS; + + failed: + LOG(("out: eb_color_value() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + +/* + * Write NUMBERth color name (in EUC-JP) into buffer NAME. + * Buffer needs (EB_MAX_COLOR_NAME_LENGTH + 1) bytes. + * NUMBER starts from 1. + */ +EB_Error_Code +eb_color_name(EB_Book *book, int number, char *name) +{ + EB_Error_Code error_code; + int page; + ssize_t length; + + eb_lock(&book->lock); + LOG(("in: eb_color_name(book=%d, number=%d)", (int)book->code, number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of color chart. + */ + page = book->subbook_current->color_chart.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + page += (number -1); + if (number < 1 || page > book->subbook_current->color_chart.end_page) { + error_code = EB_ERR_NO_SUCH_COLOR; + goto failed; + } + + if (zio_lseek(&book->subbook_current->text_zio, + (page - 1) * EB_SIZE_PAGE + EB_MAX_COLOR_VALUE_LENGTH, + SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + if (zio_read(&book->subbook_current->text_zio, name, + EB_MAX_COLOR_NAME_LENGTH) < EB_MAX_COLOR_NAME_LENGTH) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + name[EB_MAX_COLOR_NAME_LENGTH] = 0; + eb_jisx0208_to_euc(name, name); + + error_code = EB_SUCCESS; + + failed: + LOG(("out: eb_color_name() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + +/* + * Write NUMBERth color page dump into buffer BUFFER. + * Buffer needs EB_SIZE_PAGE bytes. + * NUMBER starts from 1. + */ +EB_Error_Code +eb_color_page(EB_Book *book, int number, char *buffer) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_color_page(book=%d, number=%d)", (int)book->code, number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of color chart. + */ + page = book->subbook_current->color_chart.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + page += (number - 1); + if (number < 1 || page > book->subbook_current->color_chart.end_page) { + error_code = EB_ERR_NO_SUCH_COLOR; + goto failed; + } + + if (zio_lseek(&book->subbook_current->text_zio, + (page - 1) * EB_SIZE_PAGE + EB_MAX_COLOR_VALUE_LENGTH, + SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + if (zio_read(&book->subbook_current->text_zio, buffer, EB_SIZE_PAGE) < + EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + error_code = EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_color_name() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} diff --git a/lib/ebu/ebu/color.lo b/lib/ebu/ebu/color.lo new file mode 100644 index 0000000..79ac378 --- /dev/null +++ b/lib/ebu/ebu/color.lo @@ -0,0 +1,12 @@ +# color.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/color.o' + +# Name of the non-PIC object +non_pic_object='color.o' + diff --git a/lib/ebu/ebu/copyright.c b/lib/ebu/ebu/copyright.c new file mode 100644 index 0000000..d297382 --- /dev/null +++ b/lib/ebu/ebu/copyright.c @@ -0,0 +1,121 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' have a copyright + * notice or not. + */ +int +eb_have_copyright(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_copyright(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of copyright notice. + */ + if (book->subbook_current->copyright.start_page == 0) + goto failed; + + LOG(("out: eb_have_copyright() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_copyright() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Get a position of copyright notice. + */ +EB_Error_Code +eb_copyright(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_copyright(book=%d)", (int)book->code)); + + /* + * Check for the current status. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of COPYRIGHT NOTICE. + */ + page = book->subbook_current->copyright.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Copy the position to `position'. + */ + position->page = page; + position->offset = 0; + + LOG(("out: eb_copyright(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_copyright() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/copyright.lo b/lib/ebu/ebu/copyright.lo new file mode 100644 index 0000000..ebf30dd --- /dev/null +++ b/lib/ebu/ebu/copyright.lo @@ -0,0 +1,12 @@ +# copyright.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/copyright.o' + +# Name of the non-PIC object +non_pic_object='copyright.o' + diff --git a/lib/ebu/ebu/cross.c b/lib/ebu/ebu/cross.c new file mode 100644 index 0000000..b60f279 --- /dev/null +++ b/lib/ebu/ebu/cross.c @@ -0,0 +1,191 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `KEYWORD SEARCH' + * or not. + */ +int +eb_have_cross_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_cross_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + if (book->subbook_current->cross.start_page == 0) + goto failed; + + LOG(("out: eb_have_cross_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_cross_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Keyword search. + */ +EB_Error_Code +eb_search_cross(EB_Book *book, const char * const input_words[]) +{ + EB_Error_Code error_code; + EB_Search_Context *context; + EB_Word_Code word_code; + int word_count; + int i; + + /* + * Lock the book. + */ + eb_lock(&book->lock); + LOG(("in: eb_search_cross(book=%d, input_words=[below])", + (int)book->code)); + + if (eb_log_flag) { + for (i = 0; i < EB_MAX_KEYWORDS && input_words[i] != NULL; i++) { + LOG((" input_words[%d]=%s", i, + eb_quoted_string(input_words[i]))); + } + LOG((" input_words[%d]=NULL", i)); + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check whether the current subbook has cross search. + */ + if (book->subbook_current->cross.start_page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Attach a search context for each word, and pre-search the word. + */ + eb_reset_search_contexts(book); + word_count = 0; + + for (i = 0; i < EB_MAX_KEYWORDS; i++) { + if (input_words[i] == NULL) + break; + + /* + * Initialize search context. + */ + context = book->search_contexts + word_count; + context->code = EB_SEARCH_CROSS; + + /* + * Choose comparison functions. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word; + } else { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word_kana_group; + } + context->page = book->subbook_current->cross.start_page; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_words[i]'. + */ + error_code = eb_set_keyword(book, input_words[i], context->word, + context->canonicalized_word, &word_code); + if (error_code == EB_ERR_EMPTY_WORD) + continue; + else if (error_code != EB_SUCCESS) + goto failed; + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + word_count++; + } + if (word_count == 0) { + error_code = EB_ERR_NO_WORD; + goto failed; + } else if (EB_MAX_KEYWORDS <= i && input_words[i] != NULL) { + error_code = EB_ERR_TOO_MANY_WORDS; + goto failed; + } + + /* + * Set `EB_SEARCH_NONE' to the rest unused search context. + */ + for (i = word_count; i < EB_MAX_KEYWORDS; i++) + (book->search_contexts + i)->code = EB_SEARCH_NONE; + + LOG(("out: eb_search_cross() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_cross() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/cross.lo b/lib/ebu/ebu/cross.lo new file mode 100644 index 0000000..57f387e --- /dev/null +++ b/lib/ebu/ebu/cross.lo @@ -0,0 +1,12 @@ +# cross.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/cross.o' + +# Name of the non-PIC object +non_pic_object='cross.o' + diff --git a/lib/ebu/ebu/defs.h b/lib/ebu/ebu/defs.h new file mode 100644 index 0000000..fa61126 --- /dev/null +++ b/lib/ebu/ebu/defs.h @@ -0,0 +1,1068 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_DEFS_H +#define EB_DEFS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#ifdef EB_BUILD_LIBRARY +#include "sysdefs.h" +#include "zio.h" +#else +#include +#include +#endif + +#ifdef EB_ENABLE_PTHREAD +#include +#endif + +/* + * Disc code + */ +#define EB_DISC_EB 0 +#define EB_DISC_EPWING 1 +#define EB_DISC_INVALID -1 + +/* + * Character codes. + */ +#define EB_CHARCODE_ISO8859_1 1 +#define EB_CHARCODE_JISX0208 2 +#define EB_CHARCODE_JISX0208_GB2312 3 +#define EB_CHARCODE_UTF8 4 +#define EB_CHARCODE_INVALID -1 + +/* + * Special book ID for cache to represent "no cache data for any book". + */ +#define EB_BOOK_NONE -1 + +/* + * Special disc code, subbook code, multi search ID, and multi search + * entry ID, for representing error state. + */ +#define EB_SUBBOOK_INVALID -1 +#define EB_MULTI_INVALID -1 + +/* + * Size of a page (The term `page' means `block' in JIS X 4081). + */ +#define EB_SIZE_PAGE 2048 + +/* + * Maximum length of a word to be searched. + */ +#define EB_MAX_WORD_LENGTH 255 + +/* + * Maximum length of an EB* book title. + */ +#define EB_MAX_EB_TITLE_LENGTH 30 + +/* + * Maximum length of an EPWING book title. + */ +#define EB_MAX_EPWING_TITLE_LENGTH 80 + +/* + * Maximum length of a book title. + */ +#define EB_MAX_TITLE_LENGTH 80 + +/* + * Maximum length of a word to be searched. + */ +#if defined(PATH_MAX) +#define EB_MAX_PATH_LENGTH PATH_MAX +#elif defined(MAXPATHLEN) +#define EB_MAX_PATH_LENGTH MAXPATHLEN +#else +#define EB_MAX_PATH_LENGTH 1024 +#endif + +/* + * Maximum length of a directory name. + */ +#define EB_MAX_DIRECTORY_NAME_LENGTH 8 + +/* + * Maximum length of a file name under a certain directory. + * prefix(8 chars) + '.' + suffix(3 chars) + ';' + digit(1 char) + */ +#define EB_MAX_FILE_NAME_LENGTH 14 + +/* + * Maximum length of a label for multi-search entry. + */ +#define EB_MAX_MULTI_LABEL_LENGTH 30 + +/* + * Maximum length of alternation text string for a private character. + */ +#define EB_MAX_ALTERNATION_TEXT_LENGTH 31 + +/* + * Maximum length of title for multi search. + */ +#define EB_MAX_MULTI_TITLE_LENGTH 32 + +/* + * Maximum number of font heights in a subbok. + */ +#define EB_MAX_FONTS 4 + +/* + * Maximum number of subbooks in a book. + */ +#define EB_MAX_SUBBOOKS 50 + +/* + * Maximum number of multi-search types in a subbook. + */ +#define EB_MAX_MULTI_SEARCHES 10 + +/* + * Maximum number of entries in a multi-search. + */ +#define EB_MAX_MULTI_ENTRIES 5 + +/* + * Maximum number of entries in a keyword search. + */ +#define EB_MAX_KEYWORDS EB_MAX_MULTI_ENTRIES + +/* + * Maximum number of entries in a cross search. + */ +#define EB_MAX_CROSS_ENTRIES EB_MAX_MULTI_ENTRIES + +/* + * Maximum number of characters for alternation cache. + */ +#define EB_MAX_ALTERNATION_CACHE 16 + +/* + * The number of text hooks. + */ +#define EB_NUMBER_OF_HOOKS 57 + +/* + * The number of search contexts required by a book. + */ +#define EB_NUMBER_OF_SEARCH_CONTEXTS EB_MAX_MULTI_ENTRIES + +/* + * Maximum length of an EB* book title. + */ +#define EB_MAX_COLOR_VALUE_LENGTH 20 +#define EB_MAX_COLOR_NAME_LENGTH (EB_SIZE_PAGE - EB_MAX_COLOR_VALUE_LENGTH) + +/* + * Types for various codes. + */ +typedef int EB_Error_Code; +typedef int EB_Book_Code; +typedef int EB_Disc_Code; +typedef int EB_Case_Code; +typedef int EB_Suffix_Code; +typedef int EB_Character_Code; +typedef int EB_Font_Code; +typedef int EB_Word_Code; +typedef int EB_Subbook_Code; +typedef int EB_Index_Style_Code; +typedef int EB_Search_Code; +typedef int EB_Text_Code; +typedef int EB_Text_Status_Code; +typedef int EB_Multi_Search_Code; +typedef int EB_Hook_Code; +typedef int EB_Binary_Code; + +/* + * Typedef for Structures. + */ +#ifdef EB_ENABLE_PTHREAD +typedef struct EB_Lock_Struct EB_Lock; +#endif +typedef struct EB_Position_Struct EB_Position; +typedef struct EB_Alternation_Cache_Struct EB_Alternation_Cache; +typedef struct EB_Appendix_Subbook_Struct EB_Appendix_Subbook; +typedef struct EB_Appendix_Struct EB_Appendix; +typedef struct EB_Font_Struct EB_Font; +typedef struct EB_Search_Struct EB_Search; +typedef struct EB_Multi_Search_Struct EB_Multi_Search; +typedef struct EB_Subbook_Struct EB_Subbook; +typedef struct EB_Text_Context_Struct EB_Text_Context; +typedef struct EB_Binary_Context_Struct EB_Binary_Context; +typedef struct EB_Search_Context_Struct EB_Search_Context; +typedef struct EB_Book_Struct EB_Book; +typedef struct EB_Hit_Struct EB_Hit; +typedef struct EB_Hook_Struct EB_Hook; +typedef struct EB_Hookset_Struct EB_Hookset; +typedef struct EB_BookList_Entry EB_BookList_Entry; +typedef struct EB_BookList EB_BookList; + +/* + * Pthreads lock. + */ +#ifdef EB_ENABLE_PTHREAD +struct EB_Lock_Struct { + /* + * Lock count. (For emulating recursive lock). + */ + int lock_count; + + /* + * Mutex for `lock_count'. + */ + pthread_mutex_t lock_count_mutex; + + /* + * Mutex for struct entity. + */ + pthread_mutex_t entity_mutex; +}; +#endif /* EB_ENABLE_PTHREAD */ + +/* + * A pair of page and offset. + */ +struct EB_Position_Struct { + /* + * Page. (1, 2, 3 ...) + */ + int page; + + /* + * Offset in `page'. (0 ... 2047) + */ + int offset; +}; + +/* + * Chace of aternation text. + */ +struct EB_Alternation_Cache_Struct { + /* + * Character number. + */ + int character_number; + + /* + * Alternation string for `char_no'. + */ + char text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; +}; + +/* + * UTF-8 normalization table. + */ +struct EB_UTF8_Table_Struct{ + int code; + char *string; +}; +typedef struct EB_UTF8_Table_Struct EB_UTF8_Table; + +/* + * An appendix for a subbook. + */ +struct EB_Appendix_Subbook_Struct { + + /* + * Initialization flag. + */ + int initialized; + + /* + * Subbook ID. + */ + EB_Subbook_Code code; + + /* + * Directory name. + */ + char directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + + /* + * Sub-directory name. (EPWING only) + */ + char data_directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + + /* + * File name. + */ + char file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + + /* + * Character code of the book. + */ + EB_Character_Code character_code; + + /* + * Start character number of the narrow/wide font. + */ + int narrow_start; + int wide_start; + + /* + * End character number of the narrow/wide font. + */ + int narrow_end; + int wide_end; + + /* + * Start page number of the narrow/wide font. + */ + int narrow_page; + int wide_page; + + /* + * Stop code (first and second characters). + */ + int stop_code0; + int stop_code1; + + /* + * Compression Information for appendix file. + */ + Zio zio; +}; + +/* + * Additional resources for a book. + */ +struct EB_Appendix_Struct { + /* + * Book ID. + */ + EB_Book_Code code; + + /* + * Path of the book. + */ + char *path; + + /* + * The length of the path. + */ + size_t path_length; + + /* + * Disc type. EB (EB/EBG/EBXA/EBXA-C/S-EBXA) or EPWING. + */ + EB_Disc_Code disc_code; + + /* + * The number of subbooks the book has. + */ + int subbook_count; + + /* + * Subbook list. + */ + EB_Appendix_Subbook *subbooks; + + /* + * Current subbook. + */ + EB_Appendix_Subbook *subbook_current; + + /* + * ebnet socket file. + */ +#ifdef EB_ENABLE_EBNET + int ebnet_file; +#endif + + /* + * Lock. + */ +#ifdef EB_ENABLE_PTHREAD + EB_Lock lock; +#endif + + /* + * Cache table for alternation text. + */ + EB_Alternation_Cache narrow_cache[EB_MAX_ALTERNATION_CACHE]; + EB_Alternation_Cache wide_cache[EB_MAX_ALTERNATION_CACHE]; +}; + +/* + * A font in a subbook. + */ +struct EB_Font_Struct { + /* + * Font Code. + * This font is not available, if the code is EB_FONT_INVALID. + */ + EB_Font_Code font_code; + + /* + * Whether the object has been initialized. + */ + int initialized; + + /* + * Character numbers of the start and end of the font. + */ + int start; + int end; + + /* + * Page number of the start page of the font data. + * Used in EB* only. (In EPWING, it is alyways 1). + */ + int page; + + /* + * File name of the font. (EPWING only) + */ + char file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + + /* + * Font data cache. + */ + char *glyphs; + + /* + * Compression Information. + */ + Zio zio; +}; + +/* + * Search methods in a subbook. + */ +struct EB_Search_Struct { + /* + * Index ID. + */ + int index_id; + + /* + * Page number of the start page of an index. + * This search method is not available, if `start_page' is 0, + */ + int start_page; + int end_page; + + /* + * Page number of the start page of candidates. + * (for multi search entry) + */ + int candidates_page; + + /* + * Index style flags. + */ + EB_Index_Style_Code katakana; + EB_Index_Style_Code lower; + EB_Index_Style_Code mark; + EB_Index_Style_Code long_vowel; + EB_Index_Style_Code double_consonant; + EB_Index_Style_Code contracted_sound; + EB_Index_Style_Code voiced_consonant; + EB_Index_Style_Code small_vowel; + EB_Index_Style_Code p_sound; + EB_Index_Style_Code space; + + /* + * Label. (for an entry in multi search) + */ + char label[EB_MAX_MULTI_LABEL_LENGTH + 1]; +}; + +/* + * A multi-search entry in a subbook. + */ +struct EB_Multi_Search_Struct { + /* + * Search method information. + */ + EB_Search search; + + /* + * Search title. (EPWING only) + */ + char title[EB_MAX_MULTI_TITLE_LENGTH + 1]; + + /* + * The number of entries the multi search has. + */ + int entry_count; + + /* + * List of Word entry information. + */ + EB_Search entries[EB_MAX_MULTI_ENTRIES]; +}; + +/* + * A subbook in a book. + */ +struct EB_Subbook_Struct { + /* + * Whether the object has been initialized. + */ + int initialized; + + /* + * Index page. + */ + int index_page; + + /* + * Subbook ID. + * This subbook is not available, if the code is EB_SUBBOOK_INVALID. + */ + EB_Subbook_Code code; + + /* + * File descriptor and compression information for text file. + */ + Zio text_zio; + + /* + * File descriptor and compression information for graphic file. + */ + Zio graphic_zio; + + /* + * File descriptor and compression information for sound file. + */ + Zio sound_zio; + + /* + * File descriptor and compression information for movie file. + */ + Zio movie_zio; + + /* + * Title of the subbook. + */ + char title[EB_MAX_TITLE_LENGTH + 1]; + + /* + * Subbook directory name. + */ + char directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + + /* + * Sub-directory names. (EPWING only) + */ + char data_directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char gaiji_directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char movie_directory_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + + /* + * File names. + */ + char text_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char graphic_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char sound_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + + /* + * Compression hints of Text, graphic and sound files. + * (temporary need, EPWING only). + */ + Zio_Code text_hint_zio_code; + Zio_Code graphic_hint_zio_code; + Zio_Code sound_hint_zio_code; + + /* + * Page number where search method titles are stored. + * (temporary need, EPWING only). + */ + int search_title_page; + + /* + * The top page of search methods. + */ + EB_Search word_alphabet; + EB_Search word_asis; + EB_Search word_kana; + EB_Search endword_alphabet; + EB_Search endword_asis; + EB_Search endword_kana; + EB_Search keyword; + EB_Search menu; + EB_Search image_menu; + EB_Search cross; + EB_Search copyright; + EB_Search text; + EB_Search sound; + EB_Search color_chart; + + /* + * The number of multi-search methods the subbook has. + */ + int multi_count; + + /* + * The top page of multi search methods. + */ + EB_Multi_Search multis[EB_MAX_MULTI_SEARCHES]; + + /* + * Font list. + */ + EB_Font narrow_fonts[EB_MAX_FONTS]; + EB_Font wide_fonts[EB_MAX_FONTS]; + + /* + * Current narrow and wide fonts. + */ + EB_Font *narrow_current; + EB_Font *wide_current; + + /* + * Normalization table for UTF-8 subbook. + */ + int table_page; + int table_size; + + EB_UTF8_Table *table; + int table_count; + char *table_buffer; + +}; + +/* + * Length of cache buffer in a binary context. + * It must be greater than 38, size of GIF preamble. + * It must be greater than 44, size of WAVE sound header. + * It must be greater than 118, size of BMP header + info + 16 rgbquads. + */ +#define EB_SIZE_BINARY_CACHE_BUFFER 128 + +/* + * Context parameters for binary data. + */ +struct EB_Binary_Context_Struct { + /* + * Binary type ID. + * The context is not active, if this code is EB_BINARY_INVALID. + */ + EB_Binary_Code code; + + /* + * Compress information. + */ + Zio *zio; + + /* + * Location of the the binary data, relative to the start of the file. + */ + off_t location; + + /* + * Data size. + * Size zero means that the binary has no size information. + */ + size_t size; + + /* + * The current offset of binary data. + */ + size_t offset; + + /* + * Cache buffer. + */ + char cache_buffer[EB_SIZE_BINARY_CACHE_BUFFER]; + + /* + * Length of cached data. + */ + size_t cache_length; + + /* + * Current offset of cached data. + */ + size_t cache_offset; + + /* + * Width of Image. (monochrome graphic only) + */ + int width; +}; + +/* + * Context parameters for text reading. + */ +struct EB_Text_Context_Struct { + /* + * Current text content type. + * The context is not active, if this code is EB_TEXT_INVALID. + */ + EB_Text_Code code; + + /* + * Current offset pointer of the START or HONMON file. + */ + off_t location; + + /* + * The current point of a buffer on which text is written. + */ + char *out; + + /* + * Length of `out'. + */ + size_t out_rest_length; + + /* + * Unprocessed string that a hook function writes on text. + */ + char *unprocessed; + + /* + * Size of `unprocessed'. + */ + size_t unprocessed_size; + + /* + * Length of the current output text phrase. + */ + size_t out_step; + + /* + * Narrow character region flag. + */ + int narrow_flag; + + /* + * Whether a printable character has been appeared in the current + * text content. + */ + int printable_count; + + /* + * EOF flag of the current subbook. + */ + int file_end_flag; + + /* + * Status of the current text processing. + */ + EB_Text_Status_Code text_status; + + /* + * Skip until `skipcode' appears. + */ + int skip_code; + + /* + * Stop-code automatically set by EB Library. + */ + int auto_stop_code; + + /* + * The current candidate word for multi search. + */ + char candidate[EB_MAX_WORD_LENGTH + 1]; + + /* + * Whether the current text point is in the candidate word or not. + */ + int is_candidate; + + /* + * Whether the current text point is in EBXA-C gaiji area. + */ + int ebxac_gaiji_flag; +}; + +/* + * Context parameters for word search. + */ +struct EB_Search_Context_Struct { + /* + * Current search method type. + * The context is not active, if this code is EB_SEARCH_NONE. + */ + EB_Search_Code code; + + /* + * Function which compares word to search and pattern in an index page. + */ + int (*compare_pre)(const char *word, const char *pattern, + size_t length); + int (*compare_single)(const char *word, const char *pattern, + size_t length); + int (*compare_group)(const char *word, const char *pattern, + size_t length); + + /* + * Result of comparison by `compare'. + */ + int comparison_result; + + /* + * Word to search. + */ + char word[EB_MAX_WORD_LENGTH + 1]; + + /* + * Canonicalized word to search. + */ + char canonicalized_word[EB_MAX_WORD_LENGTH + 1]; + + /* + * Page which is searched currently. + */ + int page; + + /* + * Offset which is searched currently in the page. + */ + int offset; + + /* + * Page ID of the current page. + */ + int page_id; + + /* + * How many entries in the current page. + */ + int entry_count; + + /* + * Entry index pointer. + */ + int entry_index; + + /* + * Length of the current entry. + */ + int entry_length; + + /* + * Arrangement style of entries in the current page (fixed or variable). + */ + int entry_arrangement; + + /* + * In a group entry or not. + */ + int in_group_entry; + + /* + * Current heading position (for keyword search). + */ + EB_Position keyword_heading; +}; + +/* + * A book. + */ +struct EB_Book_Struct { + /* + * Book ID. + */ + EB_Book_Code code; + + /* + * Disc type. EB* or EPWING. + */ + EB_Disc_Code disc_code; + + /* + * Character code of the book. + */ + EB_Character_Code character_code; + + /* + * Path of the book. + */ + char *path; + + /* + * The length of the path. + */ + size_t path_length; + + /* + * The number of subbooks the book has. + */ + int subbook_count; + + /* + * Subbook list. + */ + EB_Subbook *subbooks; + + /* + * Current subbook. + */ + EB_Subbook *subbook_current; + + /* + * Context parameters for text reading. + */ + EB_Text_Context text_context; + + /* + * Context parameters for binary reading. + */ + EB_Binary_Context binary_context; + + /* + * Context parameters for text reading. + */ + EB_Search_Context search_contexts[EB_NUMBER_OF_SEARCH_CONTEXTS]; + + /* + * ebnet socket file. + */ +#ifdef EB_ENABLE_EBNET + int ebnet_file; +#endif + + /* + * Lock. + */ +#ifdef EB_ENABLE_PTHREAD + EB_Lock lock; +#endif +}; + +/* + * In a word search, heading and text locations of a matched entry + * are stored. + */ +struct EB_Hit_Struct { + /* + * Heading position. + */ + EB_Position heading; + + /* + * Text position. + */ + EB_Position text; +}; + +/* + * A text hook. + */ +struct EB_Hook_Struct { + /* + * Hook code. + */ + EB_Hook_Code code; + + /* + * Hook function for the hook code `code'. + */ + EB_Error_Code (*function)(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +}; + +/* + * A set of text hooks. + */ +struct EB_Hookset_Struct { + /* + * List of hooks. + */ + EB_Hook hooks[EB_NUMBER_OF_HOOKS]; + + /* + * Lock. + */ +#ifdef EB_ENABLE_PTHREAD + EB_Lock lock; +#endif +}; + +/* + * An entry of book list. + */ +struct EB_BookList_Entry { + /* + * name. + */ + char *name; + + /* + * Title. + */ + char *title; +}; + +/* + * Book list. + */ +struct EB_BookList { + /* + * Book List ID. + */ + EB_Book_Code code; + + /* + * The number of book entries this list has. + */ + int entry_count; + + /* + * The maximum number of book entries that `entries' can memory. + */ + int max_entry_count; + + /* + * Book entries. + */ + EB_BookList_Entry *entries; + + /* + * Lock. + */ +#ifdef EB_ENABLE_PTHREAD + EB_Lock lock; +#endif +}; + +/* for backward compatibility */ +#define EB_Multi_Entry_Code int + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_DEFS_H */ diff --git a/lib/ebu/ebu/dummyin6.c b/lib/ebu/ebu/dummyin6.c new file mode 100644 index 0000000..e3ee2fa --- /dev/null +++ b/lib/ebu/ebu/dummyin6.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * This program provides macros, types and external variables related + * to basic IPv6 programming such as PF_INET6. This program is useful + * for application which supports both IPv6 and traditional IPv4 systems. + * + * To use this program, include the header file. + * + * #include "dummyin6.h" + * + * This program is intended to be used in combination with GNU Autoconf. + * (see below). + * + * Restriction: + * `struct sockaddr_storage' has no ss_ or __ss_ member (e.g. ss_family) + * since the structure is merely alias of `sturct sockaddr_in'. + */ + +/* + * This program requires the following Autoconf macros: + * AC_STRUCT_IN6_ADDR + * AC_STRUCT_SOCKADDR_IN6 + * AX_STRUCT_SOCKADDR_STORAGE + * AC_DECL_IN6ADDR_ANY + * AC_DECL_IN6ADDR_LOOPBACK + */ +#include "dummyin6.h" + +const struct in6_addr ebnet_in6addr_any = IN6ADDR_ANY_INIT; +const struct in6_addr ebnet_in6addr_loopback = IN6ADDR_LOOPBACK_INIT; + diff --git a/lib/ebu/ebu/dummyin6.h b/lib/ebu/ebu/dummyin6.h new file mode 100644 index 0000000..7ae202b --- /dev/null +++ b/lib/ebu/ebu/dummyin6.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef DUMMYIN6_H +#define DUMMYIN6_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#include +#endif + +#ifndef AF_INET6 +#define AF_INET6 (AF_INET + 1) +#endif + +#ifndef PF_INET6 +#define PF_INET6 (PF_INET + 1) +#endif + +#ifndef AF_UNSPEC +#define AF_UNSPEC AF_INET +#endif + +#ifndef PF_UNSPEC +#define PF_UNSPEC PF_INET +#endif + +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif + +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif + +#ifndef HAVE_STRUCT_IN6_ADDR +struct in6_addr { + unsigned char s6_addr[16]; +}; +#endif + +#ifndef HAVE_STRUCT_SOCKADDR_IN6 +struct sockaddr_in6 { + sa_family_t sin6_family; + in_port_t sin6_port; + unsigned long sin6_flowinfo; + struct in6_addr sin6_addr; + unsigned long sin6_scope_id; +}; +#endif + +#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(sockaddr_storage) +#define sockaddr_storage sockaddr_in +#endif + +#ifndef IN6ADDR_ANY_DECLARED +extern const struct in6_addr in6addr_any; +#endif + +#ifndef IN6ADDR_LOOPBACK_DECLARED +extern const struct in6_addr in6addr_loopback; +#endif + +#ifndef IN6ADDR_ANY_INIT +#define IN6ADDR_ANY_INIT \ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} +#endif + +#ifndef IN6ADDR_LOOPBACK_INIT +#define IN6ADDR_LOOPBACK_INIT \ + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}} +#endif + +#ifndef IN6_IS_ADDR_UNSPECIFIED +#define IN6_IS_ADDR_UNSPECIFIED(a) \ + ( (a)->s6_addr[ 0] == 0 && (a)->s6_addr[ 1] == 0 \ + && (a)->s6_addr[ 2] == 0 && (a)->s6_addr[ 3] == 0 \ + && (a)->s6_addr[ 4] == 0 && (a)->s6_addr[ 5] == 0 \ + && (a)->s6_addr[ 6] == 0 && (a)->s6_addr[ 7] == 0 \ + && (a)->s6_addr[ 8] == 0 && (a)->s6_addr[ 9] == 0 \ + && (a)->s6_addr[10] == 0 && (a)->s6_addr[11] == 0 \ + && (a)->s6_addr[12] == 0 && (a)->s6_addr[13] == 0 \ + && (a)->s6_addr[14] == 0 && (a)->s6_addr[15] == 0) +#endif + +#ifndef IN6_IS_ADDR_LOOPBACK +#define IN6_IS_ADDR_LOOPBACK(a) \ + ( (a)->s6_addr[ 0] == 0 && (a)->s6_addr[ 1] == 0 \ + && (a)->s6_addr[ 2] == 0 && (a)->s6_addr[ 3] == 0 \ + && (a)->s6_addr[ 4] == 0 && (a)->s6_addr[ 5] == 0 \ + && (a)->s6_addr[ 6] == 0 && (a)->s6_addr[ 7] == 0 \ + && (a)->s6_addr[ 8] == 0 && (a)->s6_addr[ 9] == 0 \ + && (a)->s6_addr[10] == 0 && (a)->s6_addr[11] == 0 \ + && (a)->s6_addr[12] == 0 && (a)->s6_addr[13] == 0 \ + && (a)->s6_addr[14] == 0 && (a)->s6_addr[15] == 1) +#endif + +#ifndef IN6_IS_ADDR_MULTICAST +#define IN6_IS_ADDR_MULTICAST(a) \ + ((a)->s6_addr[0] == 0xff) +#endif + +#ifndef IN6_IS_ADDR_LINKLOCAL +#define IN6_IS_ADDR_LINKLOCAL(a) \ + (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) +#endif + +#ifndef IN6_IS_ADDR_SITELOCAL +#define IN6_IS_ADDR_SITELOCAL(a) \ + (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) +#endif + +#ifndef IN6_IS_ADDR_V4MAPPED +#define IN6_IS_ADDR_V4MAPPED(a) \ + ( (a)->s6_addr[ 0] == 0 && (a)->s6_addr[ 1] == 0 \ + && (a)->s6_addr[ 2] == 0 && (a)->s6_addr[ 3] == 0 \ + && (a)->s6_addr[ 4] == 0 && (a)->s6_addr[ 5] == 0 \ + && (a)->s6_addr[ 6] == 0 && (a)->s6_addr[ 7] == 0 \ + && (a)->s6_addr[ 8] == 0 && (a)->s6_addr[ 9] == 0 \ + && (a)->s6_addr[10] == 0xff && (a)->s6_addr[11] == 0xff) +#endif + +#ifndef IN6_IS_ADDR_V4COMPAT +#define IN6_IS_ADDR_V4COMPAT(a) \ + ( (a)->s6_addr[ 0] == 0 && (a)->s6_addr[ 1] == 0 \ + && (a)->s6_addr[ 2] == 0 && (a)->s6_addr[ 3] == 0 \ + && (a)->s6_addr[ 4] == 0 && (a)->s6_addr[ 5] == 0 \ + && (a)->s6_addr[ 6] == 0 && (a)->s6_addr[ 7] == 0 \ + && (a)->s6_addr[ 8] == 0 && (a)->s6_addr[ 9] == 0 \ + && (a)->s6_addr[10] == 0 && (a)->s6_addr[11] == 0 \ + && ((a)->s6_addr[12] != 0 || (a)->s6_addr[13] != 0 \ + || (a)->s6_addr[14] != 0 \ + || ((a)->s6_addr[15] != 0 && (a)->s6_addr[15] != 1))) +#endif + +#endif /* not DUMMYIN6_H */ diff --git a/lib/ebu/ebu/dummyin6.lo b/lib/ebu/ebu/dummyin6.lo new file mode 100644 index 0000000..d0cd747 --- /dev/null +++ b/lib/ebu/ebu/dummyin6.lo @@ -0,0 +1,12 @@ +# dummyin6.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/dummyin6.o' + +# Name of the non-PIC object +non_pic_object='dummyin6.o' + diff --git a/lib/ebu/ebu/eb.c b/lib/ebu/ebu/eb.c new file mode 100644 index 0000000..bf6375e --- /dev/null +++ b/lib/ebu/ebu/eb.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif +#include "build-post.h" + +/* + * Initialize the library. + */ +EB_Error_Code +eb_initialize_library(void) +{ + EB_Error_Code error_code; + + eb_initialize_log(); + + LOG(("in: eb_initialize_library()")); + LOG(("aux: EB Library version %s", EB_VERSION_STRING)); + + eb_initialize_default_hookset(); +#ifdef ENABLE_NLS + bindtextdomain(EB_TEXT_DOMAIN_NAME, EB_LOCALEDIR); +#endif +#ifdef ENABLE_EBNET + ebnet_initialize(); +#endif + if (zio_initialize_library() < 0) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + + LOG(("out: eb_initialize_library() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_initialize_library() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Finalize the library. + */ +void +eb_finalize_library(void) +{ + LOG(("in: eb_finalize_library()")); + + zio_finalize_library(); +#ifdef ENABLE_EBNET + ebnet_finalize(); +#endif + + LOG(("out: eb_finalize_library()")); +} diff --git a/lib/ebu/ebu/eb.h b/lib/ebu/ebu/eb.h new file mode 100644 index 0000000..e0fb9b3 --- /dev/null +++ b/lib/ebu/ebu/eb.h @@ -0,0 +1,169 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_EB_H +#define EB_EB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef EB_BUILD_LIBRARY +#include "defs.h" +#else +#include +#endif + +#include + +/* + * Function declarations. + */ +/* book.c */ +void eb_initialize_book(EB_Book *book); +EB_Error_Code eb_bind(EB_Book *book, const char *path); +void eb_finalize_book(EB_Book *book); +int eb_is_bound(EB_Book *book); +EB_Error_Code eb_path(EB_Book *book, char *path); +EB_Error_Code eb_disc_type(EB_Book *book, EB_Disc_Code *disc_code); +EB_Error_Code eb_character_code(EB_Book *book, +EB_Character_Code *character_code); + +/* color.c */ +int eb_have_color_chart(EB_Book *book); +EB_Error_Code eb_color_chart(EB_Book *book, EB_Position *position); +EB_Error_Code eb_color_value(EB_Book *book, int number, char *value); +EB_Error_Code eb_color_name(EB_Book *book, int number, char *name); +EB_Error_Code eb_color_page(EB_Book *book, int number, char *buffer); + +/* copyright.h */ +int eb_have_copyright(EB_Book *book); +EB_Error_Code eb_copyright(EB_Book *book, EB_Position *position); +EB_Error_Code eb_search_cross(EB_Book *book, + const char * const input_words[]); + +/* cross.c */ +int eb_have_cross_search(EB_Book *book); + +/* eb.c */ +EB_Error_Code eb_initialize_library(void); +void eb_finalize_library(void); + +/* endword.c */ +int eb_have_endword_search(EB_Book *book); +EB_Error_Code eb_search_endword(EB_Book *book, const char *input_word); + +/* exactword.c */ +int eb_have_exactword_search(EB_Book *book); +EB_Error_Code eb_search_exactword(EB_Book *book, const char *input_word); + +/* graphic.c */ +int eb_have_graphic_search(EB_Book *book); + +/* keyword.c */ +int eb_have_keyword_search(EB_Book *book); +EB_Error_Code eb_search_keyword(EB_Book *book, + const char * const input_words[]); + +/* lock.c */ +int eb_pthread_enabled(void); + +/* log.c */ +void eb_set_log_function(void (*function)(const char *message, va_list ap)); +void eb_enable_log(void); +void eb_disable_log(void); +void eb_log(const char *message, ...); +void eb_log_stderr(const char *message, va_list ap); + +/* menu.c */ +int eb_have_menu(EB_Book *book); +EB_Error_Code eb_menu(EB_Book *book, EB_Position *position); +int eb_have_image_menu(EB_Book *book); +EB_Error_Code eb_image_menu(EB_Book *book, EB_Position *position); + +/* multi.c */ +int eb_have_multi_search(EB_Book *book); +EB_Error_Code eb_multi_title(EB_Book *book, EB_Multi_Search_Code multi_id, + char *title); +EB_Error_Code eb_multi_search_list(EB_Book *book, + EB_Multi_Search_Code *search_list, int *search_count); +EB_Error_Code eb_multi_entry_count(EB_Book *book, + EB_Multi_Search_Code multi_id, int *entry_count); +EB_Error_Code eb_multi_entry_list(EB_Book *book, + EB_Multi_Search_Code multi_id, int *entry_list, int *entry_count); +EB_Error_Code eb_multi_entry_label(EB_Book *book, + EB_Multi_Search_Code multi_id, int entry_index, char *label); +int eb_multi_entry_have_candidates(EB_Book *book, + EB_Multi_Search_Code multi_id, int entry_index); +EB_Error_Code eb_multi_entry_candidates(EB_Book *book, + EB_Multi_Search_Code multi_id, int entry_index, EB_Position *position); +EB_Error_Code eb_search_multi(EB_Book *book, EB_Multi_Search_Code multi_id, + const char * const input_words[]); + +/* text.c */ +int eb_have_text(EB_Book *book); +EB_Error_Code eb_text(EB_Book *book, EB_Position *position); + +/* search.c */ +EB_Error_Code eb_hit_list(EB_Book *book, int max_hit_count, EB_Hit *hit_list, + int *hit_count); + +/* subbook.c */ +EB_Error_Code eb_load_all_subbooks(EB_Book *book); +EB_Error_Code eb_subbook_list(EB_Book *book, EB_Subbook_Code *subbook_list, + int *subbook_count); +EB_Error_Code eb_subbook(EB_Book *book, EB_Subbook_Code *subbook_code); +EB_Error_Code eb_subbook_title(EB_Book *book, char *title); +EB_Error_Code eb_subbook_title2(EB_Book *book, EB_Subbook_Code subbook_code, + char *title); +EB_Error_Code eb_subbook_directory(EB_Book *book, char *directory); +EB_Error_Code eb_subbook_directory2(EB_Book *book, + EB_Subbook_Code subbook_code, char *directory); +EB_Error_Code eb_set_subbook(EB_Book *book, EB_Subbook_Code subbook_code); +void eb_unset_subbook(EB_Book *book); + +/* utf8.c */ +char *eb_normalize_utf8 (EB_Book *book, int code); +EB_Error_Code eb_load_utf8_table (EB_Book *book); +void eb_initialize_utf8_table (EB_Book *book); +void eb_finalize_utf8_table (EB_Book *book); +int eb_read_utf8 (const char *buffer, int *code); + +/* word.c */ +int eb_have_word_search(EB_Book *book); +EB_Error_Code eb_search_word(EB_Book *book, const char *input_word); + +/* for backward compatibility */ +#define eb_suspend eb_unset_subbook +#define eb_initialize_all_subbooks eb_load_all_subbooks + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_EB_H */ diff --git a/lib/ebu/ebu/eb.lo b/lib/ebu/ebu/eb.lo new file mode 100644 index 0000000..399f470 --- /dev/null +++ b/lib/ebu/ebu/eb.lo @@ -0,0 +1,12 @@ +# eb.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/eb.o' + +# Name of the non-PIC object +non_pic_object='eb.o' + diff --git a/lib/ebu/ebu/ebnet.c b/lib/ebu/ebu/ebnet.c new file mode 100644 index 0000000..e8fe4cd --- /dev/null +++ b/lib/ebu/ebu/ebnet.c @@ -0,0 +1,1170 @@ +/* + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "build-pre.h" + +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#endif +#include + +#include "eb.h" +#include "error.h" +#include "build-post.h" +#include "dummyin6.h" + +#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO) +#include "getaddrinfo.h" +#endif + +#include "ebnet.h" +#include "linebuf.h" +#include "urlparts.h" + +#ifndef IF_NAMESIZE +#ifdef IFNAMSIZ +#define IF_NAMESIZE IFNAMSIZ +#else +#define IF_NAMESIZE 16 +#endif +#endif + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif + +#ifndef SHUT_RD +#define SHUT_RD 0 +#endif +#ifndef SHUT_WR +#define SHUT_WR 1 +#endif +#ifndef SHUT_RDWR +#define SHUT_RDWR 2 +#endif + +/* + * Max retry count for establishing a new connection with the server. + */ +#define EBNET_MAX_RETRY_COUNT 1 + +/* + * Unexported functions. + */ +static int ebnet_parse_booklist_entry(const char *line, char *book_name, + char *book_title); +static int ebnet_send_quit(int file); +static int ebnet_parse_url(const char *url, char *host, in_port_t *port, + char *book_name, char *file_path); +static int is_integer(const char *string); +static int write_string_all(int file, int timeout, const char *string); + + +/* + * Initialize ebnet. + */ +void +ebnet_initialize(void) +{ +#ifdef ENABLE_WINSOCK2 + WSADATA wsa_data; + + WSAStartup(MAKEWORD(2, 2), &wsa_data); +#endif + ebnet_initialize_multiplex(); + ebnet_set_bye_hook(ebnet_send_quit); +} + + +/* + * Get a book list from a server. + */ +EB_Error_Code +ebnet_bind_booklist(EB_BookList *booklist, const char *url) +{ + EB_Error_Code error_code; + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char book_title[EBNET_MAX_BOOK_TITLE_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + int ebnet_file = -1; + ssize_t read_result; + int lost_sync; + int retry_count = 0; + + LOG(("in: ebnet_bind_booklist(url=%s)", url)); + + retry: + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name != '\0') { + error_code = EB_ERR_BAD_FILE_NAME; + goto failed; + } + + /* + * Establish a connection. + */ + ebnet_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (ebnet_file < 0) { + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + + /* + * Request BOOKLIST. + */ + bind_file_to_line_buffer(&line_buffer, ebnet_file); + sprintf(line, "BOOKLIST %s\r\n", book_name); + if (write_string_all(ebnet_file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + error_code = EB_ERR_EBNET_FAIL_CONNECT; + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) { + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + + /* + * Get a list. + */ + for (;;) { + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line)) { + lost_sync = 1; + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + if (*line == '\0') + break; + if (ebnet_parse_booklist_entry(line, book_name, book_title) < 0) { + lost_sync = 1; + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + error_code = eb_booklist_add_book(booklist, book_name, book_title); + if (error_code != EB_SUCCESS) + goto failed; + } + + ebnet_disconnect_socket(ebnet_file); + finalize_line_buffer(&line_buffer); + LOG(("out: ebnet_bind_booklist() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= ebnet_file) { + if (lost_sync) { + shutdown(ebnet_file, SHUT_RDWR); + ebnet_set_lost_sync(ebnet_file); + } + ebnet_disconnect_socket(ebnet_file); + ebnet_file = -1; + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + LOG(("out: ebnet_bind_booklist() = %s", eb_error_string(error_code))); + return error_code; +} + + +static int +ebnet_parse_booklist_entry(const char *line, char *book_name, char *book_title) +{ + const char *space; + size_t book_name_length; + size_t book_title_length; + char *p; + + space = strchr(line, ' '); + if (space == NULL) + return -1; + book_name_length = space - line; + book_title_length = strlen(space + 1); + + if (book_name_length == 0 + || EBNET_MAX_BOOK_NAME_LENGTH < book_name_length) + return -1; + if (book_title_length == 0 + || EBNET_MAX_BOOK_TITLE_LENGTH < book_title_length) + return -1; + + memcpy(book_name, line, book_name_length); + *(book_name + book_name_length) = '\0'; + memcpy(book_title, space + 1, book_title_length); + *(book_title + book_title_length) = '\0'; + + for (p = book_name; *p != '\0'; p++) { + if (!ASCII_ISLOWER(*p) && !ASCII_ISDIGIT(*p) + && *p != '_' && *p != '-' && *p != '.') + return -1; + } + + return 0; +} + + +/* + * Extension code for eb_bind() to support ebnet. + */ +EB_Error_Code +ebnet_bind(EB_Book *book, const char *url) +{ + EB_Error_Code error_code; + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + ssize_t read_result; + int lost_sync; + int retry_count = 0; + + LOG(("in: ebnet_bind(url=%s)", url)); + + retry: + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name == '\0') { + error_code = EB_ERR_BAD_FILE_NAME; + goto failed; + } + + /* + * Establish a connection. + */ + book->ebnet_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (book->ebnet_file < 0) { + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + + ebnet_set_book_name(book->ebnet_file, book_name); + + /* + * Request BOOK. + */ + bind_file_to_line_buffer(&line_buffer, book->ebnet_file); + sprintf(line, "BOOK %s\r\n", book_name); + if (write_string_all(book->ebnet_file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + error_code = EB_ERR_FAIL_OPEN_CAT; + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) { + if (strncasecmp(line, "!BUSY;", 6) == 0) + error_code = EB_ERR_EBNET_SERVER_BUSY; + else if (strncasecmp(line, "!PERM;", 6) == 0) + error_code = EB_ERR_EBNET_NO_PERMISSION; + else + error_code = EB_ERR_FAIL_OPEN_CAT; + goto failed; + } + + finalize_line_buffer(&line_buffer); + LOG(("out: ebnet_bind() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= book->ebnet_file) { + if (lost_sync) { + shutdown(book->ebnet_file, SHUT_RDWR); + ebnet_set_lost_sync(book->ebnet_file); + } + ebnet_disconnect_socket(book->ebnet_file); + book->ebnet_file = -1; + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + LOG(("out: ebnet_bind() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Extension code for eb_bind_appendix() to support ebnet. + */ +EB_Error_Code +ebnet_bind_appendix(EB_Appendix *appendix, const char *url) +{ + EB_Error_Code error_code; + char host[NI_MAXHOST]; + in_port_t port; + char appendix_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + ssize_t read_result; + int lost_sync; + int retry_count = 0; + + LOG(("in: ebnet_bind(url=%s)", url)); + + retry: + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, appendix_name, url_path) < 0 + || *appendix_name == '\0') { + error_code = EB_ERR_BAD_FILE_NAME; + goto failed; + } + + /* + * Establish a connection. + */ + appendix->ebnet_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (appendix->ebnet_file < 0) { + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + + ebnet_set_book_name(appendix->ebnet_file, appendix_name); + + /* + * Request BOOK. + */ + bind_file_to_line_buffer(&line_buffer, appendix->ebnet_file); + sprintf(line, "BOOK %s\r\n", appendix_name); + if (write_string_all(appendix->ebnet_file, EBNET_TIMEOUT_SECONDS, line) + <= 0) { + error_code = EB_ERR_FAIL_OPEN_CAT; + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + error_code = EB_ERR_EBNET_FAIL_CONNECT; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) { + if (strncasecmp(line, "!BUSY;", 6) == 0) + error_code = EB_ERR_EBNET_SERVER_BUSY; + else if (strncasecmp(line, "!PERM;", 6) == 0) + error_code = EB_ERR_EBNET_NO_PERMISSION; + else + error_code = EB_ERR_FAIL_OPEN_CAT; + goto failed; + } + + finalize_line_buffer(&line_buffer); + LOG(("out: ebnet_bind() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= appendix->ebnet_file) { + if (lost_sync) { + shutdown(appendix->ebnet_file, SHUT_RDWR); + ebnet_set_lost_sync(appendix->ebnet_file); + } + ebnet_disconnect_socket(appendix->ebnet_file); + appendix->ebnet_file = -1; + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + LOG(("out: ebnet_bind() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Extension code for eb_finalize_book() to support ebnet. + */ +void +ebnet_finalize_book(EB_Book *book) +{ + LOG(("in+out: ebnet_finalize_book(book=%d)", (int)book->code)); + + if (0 <= book->ebnet_file) { + ebnet_disconnect_socket(book->ebnet_file); + book->ebnet_file = -1; + } +} + + +/* + * Extension code for eb_finalize_appendix() to support ebnet. + */ +void +ebnet_finalize_appendix(EB_Appendix *appendix) +{ + LOG(("in+out: ebnet_finalize_appendix(appendix=%d)", (int)appendix->code)); + + if (0 <= appendix->ebnet_file) { + ebnet_disconnect_socket(appendix->ebnet_file); + appendix->ebnet_file = -1; + } +} + + +/* + * Extension code for zio_open_raw() to support ebnet. + */ +int +ebnet_open(const char *url) +{ + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + ssize_t read_result; + off_t file_size; + int new_file; + int lost_sync; + int retry_count = 0; + + LOG(("in: ebnet_open(url=%s)", url)); + + retry: + new_file = -1; + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name == '\0') { + goto failed; + } + + /* + * Connect with a server. + */ + new_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (new_file < 0) + goto failed; + + ebnet_set_book_name(new_file, book_name); + ebnet_set_file_path(new_file, url_path); + + /* + * Request FILESIZE. + */ + bind_file_to_line_buffer(&line_buffer, new_file); + sprintf(line, "FILESIZE %s /%s\r\n", book_name, url_path); + if (write_string_all(new_file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) + goto failed; + + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || !is_integer(line)) { + lost_sync = 1; + goto failed; + } + +#if defined(HAVE_ATOLL) + file_size = atoll(line); +#elif defined(HAVE__ATOI64) + file_size = _atoi64(line); +#else + file_size = atol(line); +#endif + + if (file_size < 0) + goto failed; + ebnet_set_file_size(new_file, file_size); + + finalize_line_buffer(&line_buffer); + LOG(("out: ebnet_open() = %d", new_file)); + return new_file; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= new_file) { + if (lost_sync) { + shutdown(new_file, SHUT_RDWR); + ebnet_set_lost_sync(new_file); + } + ebnet_disconnect_socket(new_file); + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + LOG(("out: ebnet_open() = %d", -1)); + return -1; +} + + +/* + * Extension code for zio_close_raw() to support ebnet. + */ +int +ebnet_close(int file) +{ + LOG(("in+out: ebnet_close(file=%d)", file)); + ebnet_disconnect_socket(file); + return 0; +} + + +/* + * Extension code for zio_lseek_raw() to support ebnet. + */ +off_t +ebnet_lseek(int file, off_t offset, int whence) +{ + off_t file_size; + off_t new_offset = 0; + + LOG(("in: ebnet_lseek(file=%d, location=%ld, whence=%d)", file, + (long)offset, whence)); + + file_size = ebnet_get_file_size(file); + if (file_size < 0) + goto failed; + + switch (whence) { + case SEEK_SET: + new_offset = offset; + break; + case SEEK_CUR: + new_offset = new_offset + offset; + break; + case SEEK_END: + if (offset <= file_size) + new_offset = file_size - offset; + else + new_offset = 0; + break; + default: + goto failed; + } + + ebnet_set_offset(file, new_offset); + LOG(("out: ebnet_lseek() = %ld", (long)new_offset)); + return new_offset; + + /* + * An error occurs... + */ + failed: + LOG(("out: ebnet_lseek() = %ld", (long)-1)); + return -1; +} + + +/* + * Extension code for zio_read_raw() to support ebnet. + */ +ssize_t +ebnet_read(int *file, char *buffer, size_t length) +{ + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + const char *book_name; + const char *url_path; + off_t offset; + size_t received_length; + ssize_t read_result; + ssize_t chunk_length; + int lost_sync; + int retry_count = 0; + + LOG(("in: ebnet_read(*file=%d, length=%ld)", *file, (long)length)); + + if (length == 0) { + LOG(("out: ebnet_read() = %ld", (long)0)); + return 0; + } + + retry: + lost_sync = 0; + initialize_line_buffer(&line_buffer); + + /* + * Request READ. + */ + book_name = ebnet_get_book_name(*file); + url_path = ebnet_get_file_path(*file); + offset = ebnet_get_offset(*file); + if (book_name == NULL || url_path == NULL || offset < 0) + goto failed; + + bind_file_to_line_buffer(&line_buffer, *file); +#if defined(PRINTF_LL_MODIFIER) + sprintf(line, "READ %s /%s %llu %ld\r\n", book_name, url_path, + (unsigned long long) offset, (long) length); +#elif defined(PRINTF_I64_MODIFIER) + sprintf(line, "READ %s /%s %I64u %ld\r\n", book_name, url_path, + (unsigned __int64) offset, (long) length); +#else + sprintf(line, "READ %s /%s %lu %ld\r\n", book_name, url_path, + (unsigned long) offset, (long) length); +#endif + if (write_string_all(*file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) + goto failed; + + received_length = 0; + while (received_length < length) { + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '*') { + lost_sync = 1; + goto failed; + } + + if (!is_integer(line + 1)) { + lost_sync = 1; + goto failed; + } else if (strcmp(line + 1, "-1") == 0) { + ebnet_set_offset(*file, (off_t) offset + received_length); + goto failed; + } else if (strcmp(line + 1, "0") == 0) { + break; + } + chunk_length = atoi(line + 1); + if (chunk_length <= 0 || length < received_length + chunk_length) { + lost_sync = 1; + goto failed; + } + + read_result = binary_read_line_buffer(&line_buffer, + buffer + received_length, chunk_length); + if (read_result != chunk_length) { + lost_sync = 1; + goto failed; + } + received_length += chunk_length; + } + + ebnet_set_offset(*file, (off_t) offset + received_length); + finalize_line_buffer(&line_buffer); + LOG(("out: ebnet_read(*file=%d) = %ld", *file, (long)received_length)); + return received_length; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (lost_sync) { + shutdown(*file, SHUT_RDWR); + ebnet_set_lost_sync(*file); + if (retry_count < EBNET_MAX_RETRY_COUNT) { + int new_file = ebnet_reconnect_socket(*file); + if (0 <= new_file) { + *file = new_file; + retry_count++; + goto retry; + } + } + } + LOG(("out: ebnet_read(*file=%d) = %ld", *file, (long)-1)); + return -1; +} + + +/* + * Extension code for eb_fix_directory_name() to support ebnet. + */ +EB_Error_Code +ebnet_fix_directory_name(const char *url, char *directory_name) +{ + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + ssize_t read_result; + int new_file; + int lost_sync; + int retry_count = 0; + + retry: + new_file = -1; + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name == '\0') { + goto failed; + } + + /* + * Connect with a server. + */ + new_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (new_file < 0) + goto failed; + + /* + * Request DIR. + */ + bind_file_to_line_buffer(&line_buffer, new_file); + sprintf(line, "DIR %s /%s %s\r\n", book_name, url_path, directory_name); + if (write_string_all(new_file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) + goto failed; + + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line)) { + lost_sync = 1; + goto failed; + } + + if (*line == '\0' || EB_MAX_DIRECTORY_NAME_LENGTH < strlen(line)) + goto failed; + strcpy(directory_name, line); + + finalize_line_buffer(&line_buffer); + ebnet_disconnect_socket(new_file); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= new_file) { + if (lost_sync) { + shutdown(new_file, SHUT_RDWR); + ebnet_set_lost_sync(new_file); + } + ebnet_disconnect_socket(new_file); + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + return EB_ERR_BAD_DIR_NAME; +} + + +/* + * Extension code for eb_find_file_name() to support ebnet. + */ +EB_Error_Code +ebnet_find_file_name(const char *url, const char *target_file_name, + char *found_file_name) +{ + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + Line_Buffer line_buffer; + char line[EBNET_MAX_LINE_LENGTH + 1]; + ssize_t read_result; + int new_file; + int lost_sync; + int retry_count = 0; + + retry: + new_file = -1; + lost_sync = 0; + initialize_line_buffer(&line_buffer); + set_line_buffer_timeout(&line_buffer, EBNET_TIMEOUT_SECONDS); + + /* + * Parse URL. + */ + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name == '\0') { + goto failed; + } + + /* + * Connect with a server. + */ + new_file = ebnet_connect_socket(host, port, PF_UNSPEC); + if (new_file < 0) + goto failed; + + /* + * Request FILE. + */ + bind_file_to_line_buffer(&line_buffer, new_file); + sprintf(line, "FILE %s /%s %s\r\n", book_name, url_path, target_file_name); + if (write_string_all(new_file, EBNET_TIMEOUT_SECONDS, line) <= 0) { + lost_sync = 1; + goto failed; + } + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line) || *line != '!') { + lost_sync = 1; + goto failed; + } + if (strncasecmp(line, "!OK;", 4) != 0) + goto failed; + + read_result = read_line_buffer(&line_buffer, line, sizeof(line)); + if (read_result < 0 || read_result == sizeof(line)) { + lost_sync = 1; + goto failed; + } + + if (*line == '\0' || EB_MAX_FILE_NAME_LENGTH < strlen(line)) + goto failed; + strcpy(found_file_name, line); + + finalize_line_buffer(&line_buffer); + ebnet_disconnect_socket(new_file); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + finalize_line_buffer(&line_buffer); + if (0 <= new_file) { + if (lost_sync) { + shutdown(new_file, SHUT_RDWR); + ebnet_set_lost_sync(new_file); + } + ebnet_disconnect_socket(new_file); + if (lost_sync && retry_count < EBNET_MAX_RETRY_COUNT) { + retry_count++; + goto retry; + } + } + return EB_ERR_BAD_FILE_NAME; +} + + +/* + * Bye hook. + * We must send `QUIT' command before close a connection. + */ +static int +ebnet_send_quit(int file) +{ + if (write_string_all(file, EBNET_TIMEOUT_SECONDS, "QUIT\r\n") <= 0) + return -1; + return 0; +} + + +/* + * URL version of eb_canonicalize_path_name(). + */ +EB_Error_Code +ebnet_canonicalize_url(char *url) +{ + char host[NI_MAXHOST]; + in_port_t port; + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + char url_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + + if (ebnet_parse_url(url, host, &port, book_name, url_path) < 0 + || *book_name == '\0') { + return EB_ERR_BAD_FILE_NAME; + } + + /* + * "ebnet://[]:/" must not exceed + * EB_MAX_PATH_LENGTH. + * + * Note: + * "ebnet://[" + "]:" + "/" = 12 characters. + * is 5 characters maximum. + */ + if (EB_MAX_PATH_LENGTH + < strlen(host) + strlen(book_name) + strlen(url_path) + 17) + return EB_ERR_TOO_LONG_FILE_NAME; + + if (strchr(host, ':') != NULL) + sprintf(url, "ebnet://[%s]:%d/%s", host, (int)port, book_name); + else + sprintf(url, "ebnet://%s:%d/%s", host, (int)port, book_name); + + return EB_SUCCESS; +} + + +/* + * Parse URL. + * + * As the result, host, port, book_name and file-path are put into + * the corresponding arguments. + */ +static int +ebnet_parse_url(const char *url, char *host, in_port_t *port, + char *book_name, char *file_path) +{ + URL_Parts parts; + const char *scheme_part; + const char *host_part; + const char *port_part; + const char *port_part_p; + const char *path_part; + const char *slash; + size_t book_name_length; + + *host = '\0'; + *port = 0; + *book_name = '\0'; + *file_path = '\0'; + + url_parts_initialize(&parts); + if (url_parts_parse(&parts, url) < 0) + goto failed; + + /* + * Check scheme. + */ + scheme_part = url_parts_scheme(&parts); + if (scheme_part == NULL || strcmp(scheme_part, EBNET_SERVICE_NAME) != 0) + goto failed; + + /* + * Check host. + */ + host_part = url_parts_host(&parts); + if (host_part == NULL || *host_part == '\0' + || NI_MAXHOST < strlen(host_part) + 1) + goto failed; + strcpy(host, host_part); + + /* + * Check port. + */ + port_part = url_parts_port(&parts); + if (port_part == NULL || *port_part == '\0') + port_part = EBNET_DEFAULT_PORT; + + for (port_part_p = port_part; *port_part_p != '\0'; port_part_p++) { + if (!ASCII_ISDIGIT(*port_part_p)) + goto failed; + } + *port = atoi(port_part); + + /* + * Check path. + */ + path_part = url_parts_path(&parts); + if (path_part == NULL || *path_part == '\0') { + *book_name = '\0'; + *file_path = '\0'; + } else { + slash = strchr(path_part + 1, '/'); + if (slash == NULL) { + book_name_length = strlen(path_part + 1); + if (EBNET_MAX_BOOK_NAME_LENGTH < book_name_length) + goto failed; + strcpy(book_name, path_part + 1); + *file_path = '\0'; + } else { + book_name_length = slash - (path_part + 1); + if (book_name_length == 0 + || EBNET_MAX_BOOK_NAME_LENGTH < book_name_length) + goto failed; + memcpy(book_name, path_part + 1, book_name_length); + *(book_name + book_name_length) = '\0'; + + if (EB_MAX_RELATIVE_PATH_LENGTH < strlen(slash + 1)) + goto failed; + strcpy(file_path, slash + 1); + } + } + + url_parts_finalize(&parts); + return 0; + + /* + * An error occurs... + */ + failed: + *host = '\0'; + *port = 0; + *book_name = '\0'; + *file_path = '\0'; + url_parts_finalize(&parts); + return -1; +} + + +/* + * Check whether `string' is integer or not. + * Return 1 if it is, 0 otherwise. + */ +static int +is_integer(const char *string) +{ + const char *s = string; + + if (*s == '-') + s++; + if (!ASCII_ISDIGIT(*s)) + return 0; + s++; + + while (*s != '\0') { + if (!ASCII_ISDIGIT(*s)) + return 0; + s++; + } + + return 1; +} + + +/* + * Write data to a file. + * It repeats to call write() until all data will have written. + * The function returns 1 upon success, 0 upon timeout, -1 upon error. + */ +static int +write_string_all(int file, int timeout, const char *string) +{ + const char *string_p = string; + ssize_t rest_length = strlen(string); + fd_set fdset; + struct timeval timeval; + int select_result; + ssize_t write_result; + + while (0 < rest_length) { + errno = 0; + FD_ZERO(&fdset); + FD_SET(file, &fdset); + + if (timeout == 0) + select_result = select(file + 1, NULL, &fdset, NULL, NULL); + else { + timeval.tv_sec = timeout; + timeval.tv_usec = 0; + select_result = select(file + 1, NULL, &fdset, NULL, &timeval); + } + if (select_result < 0) { + if (errno == EINTR) + continue; + return -1; + } else if (select_result == 0) { + return 0; + } + + errno = 0; + write_result = send(file, string_p, rest_length, 0); + if (write_result < 0) { + if (errno == EINTR) + continue; + return -1; + } else { + rest_length -= write_result; + string_p += write_result; + } + } + + return 1; +} + + diff --git a/lib/ebu/ebu/ebnet.h b/lib/ebu/ebu/ebnet.h new file mode 100644 index 0000000..1ab8eb7 --- /dev/null +++ b/lib/ebu/ebu/ebnet.h @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EBNET_H +#define EBNET_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "eb.h" + +/* + * Service name. + */ +#define EBNET_SERVICE_NAME "ebnet" + +/* + * Default port number. + */ +#define EBNET_DEFAULT_PORT "22010" + +/* + * Maximum length of book name. + * EBNETD defins 14, but we add +4 for the ".app" suffix here. + */ +#define EBNET_MAX_BOOK_NAME_LENGTH 18 + +/* + * Maximum length of book title. + * EBNETD defins 80, and EB Library uses the same value. + */ +#define EBNET_MAX_BOOK_TITLE_LENGTH 80 + +/* + * Maximum length of an EBNET request or response line. + */ +#define EBNET_MAX_LINE_LENGTH 511 + +/* + * Timeout period in seconds. + */ +#define EBNET_TIMEOUT_SECONDS 30 + +/* + * Function declarations. + */ +/* multiplex.c */ +void ebnet_initialize_multiplex(void); +void ebnet_finalize(void); +void ebnet_set_hello_hook(int (*hook)(int file)); +void ebnet_set_bye_hook(int (*hook)(int file)); +int ebnet_connect_socket(const char *host, int port, int family); +void ebnet_disconnect_socket(int file); +int ebnet_reconnect_socket(int file); +int ebnet_set_lost_sync(int file); +int ebnet_set_book_name(int file, const char *book_name); +const char *ebnet_get_book_name(int file); +int ebnet_set_file_path(int file, const char *file_path); +const char *ebnet_get_file_path(int file); +int ebnet_set_offset(int file, off_t offset); +off_t ebnet_get_offset(int file); +int ebnet_set_file_size(int file, off_t file_size); +off_t ebnet_get_file_size(int file); + +/* ebnet.c */ +void ebnet_initialize(void); +EB_Error_Code ebnet_bind_booklist(EB_BookList *booklist, const char *url); +EB_Error_Code ebnet_bind(EB_Book *book, const char *url); +EB_Error_Code ebnet_bind_appendix(EB_Appendix *appendix, const char *url); +void ebnet_finalize_book(EB_Book *book); +void ebnet_finalize_appendix(EB_Appendix *appendix); +int ebnet_open(const char *url); +int ebnet_close(int file); +off_t ebnet_lseek(int file, off_t offset, int whence); +ssize_t ebnet_read(int *file, char *buffer, size_t length); +EB_Error_Code ebnet_fix_directory_name(const char *url, char *directory_name); +EB_Error_Code ebnet_find_file_name(const char *url, + const char *target_file_name, char *found_file_name); +EB_Error_Code ebnet_canonicalize_url(char *url); + +#endif /* EBNET_H */ diff --git a/lib/ebu/ebu/ebnet.lo b/lib/ebu/ebu/ebnet.lo new file mode 100644 index 0000000..8de235c --- /dev/null +++ b/lib/ebu/ebu/ebnet.lo @@ -0,0 +1,12 @@ +# ebnet.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/ebnet.o' + +# Name of the non-PIC object +non_pic_object='ebnet.o' + diff --git a/lib/ebu/ebu/endword.c b/lib/ebu/ebu/endword.c new file mode 100644 index 0000000..e16bee9 --- /dev/null +++ b/lib/ebu/ebu/endword.c @@ -0,0 +1,192 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `ENDWORD SEARCH' + * or not. + */ +int +eb_have_endword_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_endword_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of endword search. + */ + if (book->subbook_current->endword_alphabet.start_page == 0 + && book->subbook_current->endword_asis.start_page == 0 + && book->subbook_current->endword_kana.start_page == 0) + goto failed; + + LOG(("out: eb_have_endword_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_endword_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Endword search. + */ +EB_Error_Code +eb_search_endword(EB_Book *book, const char *input_word) +{ + EB_Error_Code error_code; + EB_Word_Code word_code; + EB_Search_Context *context; + + eb_lock(&book->lock); + LOG(("in: eb_search_endword(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Initialize search context. + */ + eb_reset_search_contexts(book); + context = book->search_contexts; + context->code = EB_SEARCH_ENDWORD; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_word'. + */ + error_code = eb_set_endword(book, input_word, context->word, + context->canonicalized_word, &word_code); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Get a page number. + */ + switch (word_code) { + case EB_WORD_ALPHABET: + if (book->subbook_current->endword_alphabet.start_page != 0) + context->page = book->subbook_current->endword_alphabet.start_page; + else if (book->subbook_current->endword_asis.start_page != 0) + context->page = book->subbook_current->endword_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_KANA: + if (book->subbook_current->endword_kana.start_page != 0) + context->page = book->subbook_current->endword_kana.start_page; + else if (book->subbook_current->endword_asis.start_page != 0) + context->page = book->subbook_current->endword_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_OTHER: + if (book->subbook_current->endword_asis.start_page != 0) + context->page = book->subbook_current->endword_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + default: + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Choose comparison functions. + */ + + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word; + } else if (context->page == book->subbook_current->word_kana.start_page) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word_kana_single; + context->compare_group = eb_match_word_kana_group; + } else { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word_kana_group; + } + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_search_endword() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_endword() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/endword.lo b/lib/ebu/ebu/endword.lo new file mode 100644 index 0000000..680a436 --- /dev/null +++ b/lib/ebu/ebu/endword.lo @@ -0,0 +1,12 @@ +# endword.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/endword.o' + +# Name of the non-PIC object +non_pic_object='endword.o' + diff --git a/lib/ebu/ebu/error.c b/lib/ebu/ebu/error.c new file mode 100644 index 0000000..99489d4 --- /dev/null +++ b/lib/ebu/ebu/error.c @@ -0,0 +1,286 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Mutex for gettext function call. + */ +#if defined(ENABLE_NLS) && defined(ENABLE_PTHREAD) +pthread_mutex_t gettext_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Error code strings. + */ +static const char * const error_strings[] = { + /* 0 -- 4 */ + "EB_SUCCESS", + "EB_ERR_MEMORY_EXHAUSTED", + "EB_ERR_EMPTY_FILE_NAME", + "EB_ERR_TOO_LONG_FILE_NAME", + "EB_ERR_BAD_FILE_NAME", + + /* 5 -- 9 */ + "EB_ERR_BAD_DIR_NAME", + "EB_ERR_TOO_LONG_WORD", + "EB_ERR_BAD_WORD", + "EB_ERR_EMPTY_WORD", + "EB_ERR_FAIL_GETCWD", + + /* 10 -- 14 */ + "EB_ERR_FAIL_OPEN_CAT", + "EB_ERR_FAIL_OPEN_CATAPP", + "EB_ERR_FAIL_OPEN_TEXT", + "EB_ERR_FAIL_OPEN_FONT", + "EB_ERR_FAIL_OPEN_APP", + + /* 15 -- 19 */ + "EB_ERR_FAIL_OPEN_BINARY", + "EB_ERR_FAIL_READ_CAT", + "EB_ERR_FAIL_READ_CATAPP", + "EB_ERR_FAIL_READ_TEXT", + "EB_ERR_FAIL_READ_FONT", + + /* 20 -- 24 */ + "EB_ERR_FAIL_READ_APP", + "EB_ERR_FAIL_READ_BINARY", + "EB_ERR_FAIL_SEEK_CAT", + "EB_ERR_FAIL_SEEK_CATAPP", + "EB_ERR_FAIL_SEEK_TEXT", + + /* 25 -- 29 */ + "EB_ERR_FAIL_SEEK_FONT", + "EB_ERR_FAIL_SEEK_APP", + "EB_ERR_FAIL_SEEK_BINARY", + "EB_ERR_UNEXP_CAT", + "EB_ERR_UNEXP_CATAPP", + + /* 30 -- 34 */ + "EB_ERR_UNEXP_TEXT", + "EB_ERR_UNEXP_FONT", + "EB_ERR_UNEXP_APP", + "EB_ERR_UNEXP_BINARY", + "EB_ERR_UNBOUND_BOOK", + + /* 35 -- 39 */ + "EB_ERR_UNBOUND_APP", + "EB_ERR_NO_SUB", + "EB_ERR_NO_APPSUB", + "EB_ERR_NO_FONT", + "EB_ERR_NO_TEXT", + + /* 40 -- 44 */ + "EB_ERR_NO_STOPCODE", + "EB_ERR_NO_ALT", + "EB_ERR_NO_CUR_SUB", + "EB_ERR_NO_CUR_APPSUB", + "EB_ERR_NO_CUR_FONT", + + /* 45 -- 49 */ + "EB_ERR_NO_CUR_BINARY", + "EB_ERR_NO_SUCH_SUB", + "EB_ERR_NO_SUCH_APPSUB", + "EB_ERR_NO_SUCH_FONT", + "EB_ERR_NO_SUCH_CHAR_BMP", + + /* 50 -- 54 */ + "EB_ERR_NO_SUCH_CHAR_TEXT", + "EB_ERR_NO_SUCH_SEARCH", + "EB_ERR_NO_SUCH_HOOK", + "EB_ERR_NO_SUCH_BINARY", + "EB_ERR_DIFF_CONTENT", + + /* 55 -- 59 */ + "EB_ERR_NO_PREV_SEARCH", + "EB_ERR_NO_SUCH_MULTI_ID", + "EB_ERR_NO_SUCH_ENTRY_ID", + "EB_ERR_TOO_MANY_WORDS", + "EB_ERR_NO_WORD", + + /* 60 -- 64 */ + "EB_ERR_NO_CANDIDATES", + "EB_ERR_END_OF_CONTENT", + "EB_ERR_NO_PREV_SEEK", + "EB_ERR_EBNET_UNSUPPORTED", + "EB_ERR_EBNET_FAIL_CONNECT", + + /* 65 -- 69 */ + "EB_ERR_EBNET_SERVER_BUSY", + "EB_ERR_EBNET_NO_PERMISSION", + "EB_ERR_UNBOUND_BOOKLIST", + "EB_ERR_NO_SUCH_BOOK", + "EB_ERR_NO_SUCH_COLOR", + + NULL +}; + +/* + * Look up the error message corresponding to the error code `error_code'. + */ +const char * +eb_error_string(EB_Error_Code error_code) +{ + const char *string; + + if (0 <= error_code && error_code < EB_NUMBER_OF_ERRORS) + string = error_strings[error_code]; + else + string = "EB_ERR_UNKNOWN"; + + return string; +} + + +/* + * Error messages. + */ +static const char * const error_messages[] = { + /* 0 -- 4 */ + N_("no error"), + N_("memory exhausted"), + N_("an empty file name"), + N_("too long file name"), + N_("bad file name"), + + /* 5 -- 9 */ + N_("bad directory name"), + N_("too long word"), + N_("a word contains bad character"), + N_("an empty word"), + N_("failed to get the current working directory"), + + /* 10 -- 14 */ + N_("failed to open a catalog file"), + N_("failed to open an appendix catalog file"), + N_("failed to open a text file"), + N_("failed to open a font file"), + N_("failed to open an appendix file"), + + /* 15 -- 19 */ + N_("failed to open a binary file"), + N_("failed to read a catalog file"), + N_("failed to read an appendix catalog file"), + N_("failed to read a text file"), + N_("failed to read a font file"), + + /* 20 -- 24 */ + N_("failed to read an appendix file"), + N_("failed to read a binary file"), + N_("failed to seek a catalog file"), + N_("failed to seek an appendix catalog file"), + N_("failed to seek a text file"), + + /* 25 -- 29 */ + N_("failed to seek a font file"), + N_("failed to seek an appendix file"), + N_("failed to seek a binary file"), + N_("unexpected format in a catalog file"), + N_("unexpected format in an appendix catalog file"), + + /* 30 -- 34 */ + N_("unexpected format in a text file"), + N_("unexpected format in a font file"), + N_("unexpected format in an appendix file"), + N_("unexpected format in a binary file"), + N_("book not bound"), + + /* 35 -- 39 */ + N_("appendix not bound"), + N_("no subbook"), + N_("no subbook in the appendix"), + N_("no font"), + N_("no text file"), + + /* 40 -- 44 */ + N_("no stop-code"), + N_("no alternation string"), + N_("no current subbook"), + N_("no current appendix subbook"), + N_("no current font"), + + /* 45 -- 49 */ + N_("no current binary"), + N_("no such subbook"), + N_("no such appendix subbook"), + N_("no such font"), + N_("no such character bitmap"), + + /* 50 -- 54 */ + N_("no such character text"), + N_("no such search method"), + N_("no such hook"), + N_("no such binary"), + N_("different content type"), + + /* 55 -- 59 */ + N_("no previous search"), + N_("no such multi search"), + N_("no such multi search entry"), + N_("too many words specified"), + N_("no word specified"), + + /* 60 -- 64 */ + N_("no candidates"), + N_("end of content"), + N_("no previous seek"), + N_("ebnet is not supported"), + N_("failed to connect to an ebnet server"), + + /* 65 -- 69 */ + N_("ebnet server is busy"), + N_("no access permission"), + N_("booklist not bound"), + N_("no such book"), + N_("no such color"), + + NULL +}; + +/* + * Look up the error message corresponding to the error code `error_code'. + */ +const char * +eb_error_message(EB_Error_Code error_code) +{ + const char *message; + + if (0 <= error_code && error_code < EB_NUMBER_OF_ERRORS) + message = error_messages[error_code]; + else + message = N_("unknown error"); + +#ifdef ENABLE_NLS + message = dgettext(EB_TEXT_DOMAIN_NAME, message); +#endif /* ENABLE_NLS */ + + return message; +} diff --git a/lib/ebu/ebu/error.h b/lib/ebu/ebu/error.h new file mode 100644 index 0000000..c48266b --- /dev/null +++ b/lib/ebu/ebu/error.h @@ -0,0 +1,152 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_ERROR_H +#define EB_ERROR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef EB_BUILD_LIBRARY +#include "defs.h" +#else +#include +#endif + +/* + * Error codes. + */ +#define EB_SUCCESS 0 +#define EB_ERR_MEMORY_EXHAUSTED 1 +#define EB_ERR_EMPTY_FILE_NAME 2 +#define EB_ERR_TOO_LONG_FILE_NAME 3 +#define EB_ERR_BAD_FILE_NAME 4 + +#define EB_ERR_BAD_DIR_NAME 5 +#define EB_ERR_TOO_LONG_WORD 6 +#define EB_ERR_BAD_WORD 7 +#define EB_ERR_EMPTY_WORD 8 +#define EB_ERR_FAIL_GETCWD 9 + +#define EB_ERR_FAIL_OPEN_CAT 10 +#define EB_ERR_FAIL_OPEN_CATAPP 11 +#define EB_ERR_FAIL_OPEN_TEXT 12 +#define EB_ERR_FAIL_OPEN_FONT 13 +#define EB_ERR_FAIL_OPEN_APP 14 + +#define EB_ERR_FAIL_OPEN_BINARY 15 +#define EB_ERR_FAIL_READ_CAT 16 +#define EB_ERR_FAIL_READ_CATAPP 17 +#define EB_ERR_FAIL_READ_TEXT 18 +#define EB_ERR_FAIL_READ_FONT 19 + +#define EB_ERR_FAIL_READ_APP 20 +#define EB_ERR_FAIL_READ_BINARY 21 +#define EB_ERR_FAIL_SEEK_CAT 22 +#define EB_ERR_FAIL_SEEK_CATAPP 23 +#define EB_ERR_FAIL_SEEK_TEXT 24 + +#define EB_ERR_FAIL_SEEK_FONT 25 +#define EB_ERR_FAIL_SEEK_APP 26 +#define EB_ERR_FAIL_SEEK_BINARY 27 +#define EB_ERR_UNEXP_CAT 28 +#define EB_ERR_UNEXP_CATAPP 29 + +#define EB_ERR_UNEXP_TEXT 30 +#define EB_ERR_UNEXP_FONT 31 +#define EB_ERR_UNEXP_APP 32 +#define EB_ERR_UNEXP_BINARY 33 +#define EB_ERR_UNBOUND_BOOK 34 + +#define EB_ERR_UNBOUND_APP 35 +#define EB_ERR_NO_SUB 36 +#define EB_ERR_NO_APPSUB 37 +#define EB_ERR_NO_FONT 38 +#define EB_ERR_NO_TEXT 39 + +#define EB_ERR_NO_STOPCODE 40 +#define EB_ERR_NO_ALT 41 +#define EB_ERR_NO_CUR_SUB 42 +#define EB_ERR_NO_CUR_APPSUB 43 +#define EB_ERR_NO_CUR_FONT 44 + +#define EB_ERR_NO_CUR_BINARY 45 +#define EB_ERR_NO_SUCH_SUB 46 +#define EB_ERR_NO_SUCH_APPSUB 47 +#define EB_ERR_NO_SUCH_FONT 48 +#define EB_ERR_NO_SUCH_CHAR_BMP 49 + +#define EB_ERR_NO_SUCH_CHAR_TEXT 50 +#define EB_ERR_NO_SUCH_SEARCH 51 +#define EB_ERR_NO_SUCH_HOOK 52 +#define EB_ERR_NO_SUCH_BINARY 53 +#define EB_ERR_DIFF_CONTENT 54 + +#define EB_ERR_NO_PREV_SEARCH 55 +#define EB_ERR_NO_SUCH_MULTI_ID 56 +#define EB_ERR_NO_SUCH_ENTRY_ID 57 +#define EB_ERR_TOO_MANY_WORDS 58 +#define EB_ERR_NO_WORD 59 + +#define EB_ERR_NO_CANDIDATES 60 +#define EB_ERR_END_OF_CONTENT 61 +#define EB_ERR_NO_PREV_SEEK 62 +#define EB_ERR_EBNET_UNSUPPORTED 63 +#define EB_ERR_EBNET_FAIL_CONNECT 64 + +#define EB_ERR_EBNET_SERVER_BUSY 65 +#define EB_ERR_EBNET_NO_PERMISSION 66 +#define EB_ERR_UNBOUND_BOOKLIST 67 +#define EB_ERR_NO_SUCH_BOOK 68 + +#define EB_ERR_NO_SUCH_COLOR 69 + + +/* + * The number of error codes. + */ +#define EB_NUMBER_OF_ERRORS 70 + +/* + * The maximum length of an error message. + */ +#define EB_MAX_ERROR_MESSAGE_LENGTH 127 + +/* + * Function declarations. + */ +/* error.c */ +const char *eb_error_string(EB_Error_Code error_code); +const char *eb_error_message(EB_Error_Code error_code); + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_ERROR_H */ diff --git a/lib/ebu/ebu/error.lo b/lib/ebu/ebu/error.lo new file mode 100644 index 0000000..0074fc0 --- /dev/null +++ b/lib/ebu/ebu/error.lo @@ -0,0 +1,12 @@ +# error.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/error.o' + +# Name of the non-PIC object +non_pic_object='error.o' + diff --git a/lib/ebu/ebu/exactword.c b/lib/ebu/ebu/exactword.c new file mode 100644 index 0000000..a87dde7 --- /dev/null +++ b/lib/ebu/ebu/exactword.c @@ -0,0 +1,189 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `EXACTWORD SEARCH' + * or not. + */ +int +eb_have_exactword_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_exactword_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of word search. + */ + if (book->subbook_current->word_alphabet.start_page == 0 + && book->subbook_current->word_asis.start_page == 0 + && book->subbook_current->word_kana.start_page == 0) + goto failed; + + LOG(("out: eb_have_exactword_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_exactword_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Exactword search. + */ +EB_Error_Code +eb_search_exactword(EB_Book *book, const char *input_word) +{ + EB_Error_Code error_code; + EB_Word_Code word_code; + EB_Search_Context *context; + + eb_lock(&book->lock); + LOG(("in: eb_search_exactword(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Initialize search context. + */ + eb_reset_search_contexts(book); + context = book->search_contexts; + context->code = EB_SEARCH_EXACTWORD; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_word'. + */ + error_code = eb_set_word(book, input_word, context->word, + context->canonicalized_word, &word_code); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Get a page number. + */ + switch (word_code) { + case EB_WORD_ALPHABET: + if (book->subbook_current->word_alphabet.start_page != 0) + context->page = book->subbook_current->word_alphabet.start_page; + else if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_KANA: + if (book->subbook_current->word_kana.start_page != 0) + context->page = book->subbook_current->word_kana.start_page; + else if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_OTHER: + if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + default: + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Choose comparison functions. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_exact_pre_match_word_latin; + context->compare_single = eb_exact_match_word_latin; + context->compare_group = eb_exact_match_word_latin; + } else if (context->page == book->subbook_current->word_kana.start_page) { + context->compare_pre = eb_exact_pre_match_word_jis; + context->compare_single = eb_exact_match_word_kana_single; + context->compare_group = eb_exact_match_word_kana_group; + } else { + context->compare_pre = eb_exact_pre_match_word_jis; + context->compare_single = eb_exact_match_word_jis; + context->compare_group = eb_exact_match_word_kana_group; + } + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_search_exactword() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_exactword() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} diff --git a/lib/ebu/ebu/exactword.lo b/lib/ebu/ebu/exactword.lo new file mode 100644 index 0000000..e427454 --- /dev/null +++ b/lib/ebu/ebu/exactword.lo @@ -0,0 +1,12 @@ +# exactword.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/exactword.o' + +# Name of the non-PIC object +non_pic_object='exactword.o' + diff --git a/lib/ebu/ebu/filename.c b/lib/ebu/ebu/filename.c new file mode 100644 index 0000000..ee87969 --- /dev/null +++ b/lib/ebu/ebu/filename.c @@ -0,0 +1,783 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif +#include "build-post.h" + +#if defined(DOS_FILE_PATH) && defined(HAVE_MBSTRING_H) +/* a path may contain double-byte chars in SJIS. */ +#include +#define strchr _mbschr +#define strrchr _mbsrchr +#endif + + +#ifndef DOS_FILE_PATH + +/* + * Canonicalize `path_name' (UNIX version). + * Convert a path name to an absolute path. + */ +EB_Error_Code +eb_canonicalize_path_name(char *path_name) +{ + char cwd[EB_MAX_PATH_LENGTH + 1]; + char temporary_path_name[EB_MAX_PATH_LENGTH + 1]; + char *last_slash; + + if (*path_name != '/') { + /* + * `path_name' is an relative path. Convert to an absolute + * path. + */ + if (getcwd(cwd, EB_MAX_PATH_LENGTH + 1) == NULL) + return EB_ERR_FAIL_GETCWD; + if (EB_MAX_PATH_LENGTH < strlen(cwd) + 1 + strlen(path_name)) + return EB_ERR_TOO_LONG_FILE_NAME; + + if (strcmp(path_name, ".") == 0) { + strcpy(path_name, cwd); + } else if (strncmp(path_name, "./", 2) == 0) { + sprintf(temporary_path_name, "%s/%s", cwd, path_name + 2); + strcpy(path_name, temporary_path_name); + } else { + sprintf(temporary_path_name, "%s/%s", cwd, path_name); + strcpy(path_name, temporary_path_name); + } + } + + /* + * Unless `path_name' is "/", eliminate `/' in the tail of the + * path name. + */ + last_slash = strrchr(path_name, '/'); + if (last_slash != path_name && *(last_slash + 1) == '\0') + *last_slash = '\0'; + + return EB_SUCCESS; +} + +#else /* DOS_FILE_PATH */ + +/* + * Canonicalize `path_name' (DOS version). + * Convert a path name to an absolute path with drive letter unless + * that is an UNC path. + * + * Original version by KSK Jan/30/1998. + * Current version by Motoyuki Kasahara. + */ +EB_Error_Code +eb_canonicalize_path_name(char *path_name) +{ + char cwd[EB_MAX_PATH_LENGTH + 1]; + char temporary_path_name[EB_MAX_PATH_LENGTH + 1]; + char *slash; + char *last_backslash; + + /* + * Replace `/' with `\\'. + */ + slash = path_name; + for (;;) { + slash = strchr(slash, '/'); + if (slash == NULL) + break; + *slash++ = '\\'; + } + + if (*path_name == '\\' && *(path_name + 1) == '\\') { + /* + * `path_name' is UNC path. Nothing to be done. + */ + } else if (ASCII_ISALPHA(*path_name) && *(path_name + 1) == ':') { + /* + * `path_name' has a drive letter. + * Nothing to be done if it is an absolute path. + */ + if (*(path_name + 2) != '\\') { + /* + * `path_name' is a relative path. + * Covert the path name to an absolute path. + */ + if (getdcwd(ASCII_TOUPPER(*path_name) - 'A' + 1, cwd, + EB_MAX_PATH_LENGTH + 1) == NULL) { + return EB_ERR_FAIL_GETCWD; + } + if (EB_MAX_PATH_LENGTH < strlen(cwd) + 1 + strlen(path_name + 2)) + return EB_ERR_TOO_LONG_FILE_NAME; + sprintf(temporary_path_name, "%s\\%s", cwd, path_name + 2); + strcpy(path_name, temporary_path_name); + } + } else if (*path_name == '\\') { + /* + * `path_name' has no drive letter and is an absolute path. + * Add a drive letter to the path name. + */ + if (getcwd(cwd, EB_MAX_PATH_LENGTH + 1) == NULL) + return EB_ERR_FAIL_GETCWD; + cwd[1] = '\0'; + if (EB_MAX_PATH_LENGTH < strlen(cwd) + 1 + strlen(path_name)) + return EB_ERR_TOO_LONG_FILE_NAME; + sprintf(temporary_path_name, "%s:%s", cwd, path_name); + strcpy(path_name, temporary_path_name); + + } else { + /* + * `path_name' has no drive letter and is a relative path. + * Add a drive letter and convert it to an absolute path. + */ + if (getcwd(cwd, EB_MAX_PATH_LENGTH + 1) == NULL) + return EB_ERR_FAIL_GETCWD; + + if (EB_MAX_PATH_LENGTH < strlen(cwd) + 1 + strlen(path_name)) + return EB_ERR_TOO_LONG_FILE_NAME; + sprintf(temporary_path_name, "%s\\%s", cwd, path_name); + strcpy(path_name, temporary_path_name); + } + + + /* + * Now `path_name' is `X:\...' or `\\...'. + * Unless it is "X:\", eliminate `\' in the tail of the path name. + */ + last_backslash = strrchr(path_name, '\\'); + if (ASCII_ISALPHA(*path_name)) { + if (last_backslash != path_name + 2 && *(last_backslash + 1) == '\0') + *last_backslash = '\0'; + } else { + if (last_backslash != path_name + 1 && *(last_backslash + 1) == '\0') + *last_backslash = '\0'; + } + + return EB_SUCCESS; +} + +#endif /* DOS_FILE_PATH */ + + +/* + * Canonicalize file name. + * - Suffix including dot is removed + * - Version including semicolon is removed. + * - Letters are converted to upper case. + * + * We minght fail to load a file after we fix the file name. + * If loading the file is tried again, we need the original file name, + * not fixed file name. Therefore, we get orignal file name from fixed + * file name using this function. + */ +void +eb_canonicalize_file_name(char *file_name) +{ + char *p; + + for (p = file_name; *p != '\0' && *p != '.' && *p != ';'; p++) + *p = ASCII_TOUPPER(*p); + *p = '\0'; +} + + +/* + * Rewrite `directory_name' to a real directory name in the `path' directory. + * + * If a directory matched to `directory_name' exists, then EB_SUCCESS is + * returned, and `directory_name' is rewritten to that name. Otherwise + * EB_ERR_BAD_DIR_NAME is returned. + */ +EB_Error_Code +eb_fix_directory_name(const char *path, char *directory_name) +{ + struct dirent *entry; + DIR *dir; + +#ifdef ENABLE_EBNET + if (is_ebnet_url(path)) + return ebnet_fix_directory_name(path, directory_name); +#endif + + /* + * Open the directory `path'. + */ + dir = opendir(path); + if (dir == NULL) + goto failed; + + for (;;) { + /* + * Read the directory entry. + */ + entry = readdir(dir); + if (entry == NULL) + goto failed; + + if (strcasecmp(entry->d_name, directory_name) == 0) + break; + } + + strcpy(directory_name, entry->d_name); + closedir(dir); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (dir != NULL) + closedir(dir); + return EB_ERR_BAD_DIR_NAME; +} + + +/* + * Rewrite `sub_directory_name' to a real sub directory name in the + * `path/directory_name' directory. + * + * If a directory matched to `sub_directory_name' exists, then EB_SUCCESS + * is returned, and `directory_name' is rewritten to that name. Otherwise + * EB_ERR_BAD_FILE_NAME is returned. + */ +EB_Error_Code +eb_fix_directory_name2(const char *path, const char *directory_name, + char *sub_directory_name) +{ + char sub_path_name[EB_MAX_PATH_LENGTH + 1]; + + eb_compose_path_name(path, directory_name, sub_path_name); + return eb_fix_directory_name(sub_path_name, sub_directory_name); +} + + +/* + * Fix suffix of `path_name'. + * + * If `suffix' is an empty string, delete suffix from `path_name'. + * Otherwise, add `suffix' to `path_name'. + */ +void +eb_fix_path_name_suffix(char *path_name, const char *suffix) +{ + char *base_name; + char *dot; + char *semicolon; + +#ifndef DOS_FILE_PATH + base_name = strrchr(path_name, '/'); +#else + if (is_ebnet_url(path_name)) + base_name = strrchr(path_name, '/'); + else + base_name = strrchr(path_name, '\\'); +#endif + if (base_name == NULL) + base_name = path_name; + else + base_name++; + + dot = strchr(base_name, '.'); + semicolon = strchr(base_name, ';'); + + if (*suffix == '\0') { + /* + * Remove `.xxx' from `fixed_file_name': + * foo.xxx --> foo + * foo.xxx;1 --> foo;1 + * foo. --> foo. (unchanged) + * foo.;1 --> foo.;1 (unchanged) + */ + if (dot != NULL && *(dot + 1) != '\0' && *(dot + 1) != ';') { + if (semicolon != NULL) + sprintf(dot, ";%c", *(semicolon + 1)); + else + *dot = '\0'; + } + } else { + /* + * Add `.xxx' to `fixed_file_name': + * foo --> foo.xxx + * foo. --> foo.xxx + * foo;1 --> foo.xxx;1 + * foo.;1 --> foo.xxx;1 + * foo.xxx --> foo.xxx (unchanged) + */ + if (dot != NULL) { + if (semicolon != NULL) + sprintf(dot, "%s;%c", suffix, *(semicolon + 1)); + else + strcpy(dot, suffix); + } else { + if (semicolon != NULL) + sprintf(semicolon, "%s;%c", suffix, *(semicolon + 1)); + else + strcat(base_name, suffix); + } + } +} + + +#define FOUND_NONE 0 +#define FOUND_EBZ 1 +#define FOUND_BASENAME 2 +#define FOUND_ORG 3 + +/* + * Rewrite `found_file_name' to a real file name in the `path_name' + * directory. + * + * If a file matched to `target_file_name' exists, then EB_SUCCESS + * is returned, and `found_file_name' is rewritten to that name. + * Otherwise EB_ERR_BAD_FILE_NAME is returned. + * + * Note that `target_file_name' must not contain `.' or excceed + * EB_MAX_DIRECTORY_NAME_LENGTH characters. + */ +EB_Error_Code +eb_find_file_name(const char *path_name, const char *target_file_name, + char *found_file_name) +{ + char ebz_target_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char org_target_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + char candidate_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + DIR *dir; + struct dirent *entry; + size_t d_namlen; + int found = FOUND_NONE; + +#ifdef ENABLE_EBNET + if (is_ebnet_url(path_name)) { + return ebnet_find_file_name(path_name, target_file_name, + found_file_name); + } +#endif + + strcpy(ebz_target_file_name, target_file_name); + strcat(ebz_target_file_name, ".ebz"); + strcpy(org_target_file_name, target_file_name); + strcat(org_target_file_name, ".org"); + candidate_file_name[0] = '\0'; + + /* + * Open the directory `path_name'. + */ + dir = opendir(path_name); + if (dir == NULL) + goto failed; + + for (;;) { + /* + * Read the directory entry. + */ + entry = readdir(dir); + if (entry == NULL) + break; + + /* + * Compare the given file names and the current entry name. + * We consider they are matched when one of the followings + * is true: + * + * == + * +";1' == + * +"." == + * +".;1" == + * +".ebz" == + * +".ebz;1" == + * +".org" == + * +".org;1" == + * + * All the comparisons are done without case sensitivity. + * We support version number ";1" only. + */ + d_namlen = strlen(entry->d_name); + if (2 < d_namlen + && *(entry->d_name + d_namlen - 2) == ';' + && ASCII_ISDIGIT(*(entry->d_name + d_namlen - 1))) { + d_namlen -= 2; + } + if (1 < d_namlen && *(entry->d_name + d_namlen - 1) == '.') + d_namlen--; + + if (strcasecmp(entry->d_name, ebz_target_file_name) == 0 + && *(ebz_target_file_name + d_namlen) == '\0' + && found < FOUND_EBZ) { + strcpy(candidate_file_name, entry->d_name); + found = FOUND_EBZ; + } + if (strncasecmp(entry->d_name, target_file_name, d_namlen) == 0 + && *(target_file_name + d_namlen) == '\0' + && found < FOUND_BASENAME) { + strcpy(candidate_file_name, entry->d_name); + found = FOUND_BASENAME; + } + if (strcasecmp(entry->d_name, org_target_file_name) == 0 + && *(org_target_file_name + d_namlen) == '\0' + && found < FOUND_ORG) { + strcpy(candidate_file_name, entry->d_name); + found = FOUND_ORG; + break; + } + } + + if (found == FOUND_NONE) + goto failed; + + closedir(dir); + strcpy(found_file_name, candidate_file_name); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (dir != NULL) + closedir(dir); + return EB_ERR_BAD_FILE_NAME; +} + + +/* + * Rewrite `file_name' to a real file name in the directory + * `path_name/sub_directory_name'. + * + * If a file matched to `file_name' exists, then EB_SUCCESS is returned, + * and `file_name' is rewritten to that name. Otherwise EB_ERR_BAD_FILE_NAME + * is returned. + */ +EB_Error_Code +eb_find_file_name2(const char *path_name, const char *sub_directory_name, + const char *target_file_name, char *found_file_name) +{ + char sub_path_name[EB_MAX_PATH_LENGTH + 1]; + + eb_compose_path_name(path_name, sub_directory_name, sub_path_name); + return eb_find_file_name(sub_path_name, target_file_name, found_file_name); +} + + +EB_Error_Code +eb_find_file_name3(const char *path_name, const char *sub_directory_name, + const char *sub2_directory_name, const char *target_file_name, + char *found_file_name) +{ + char sub2_path_name[EB_MAX_PATH_LENGTH + 1]; + + eb_compose_path_name2(path_name, sub_directory_name, sub2_directory_name, + sub2_path_name); + return eb_find_file_name(sub2_path_name, target_file_name, + found_file_name); +} + + +/* + * Compose a file name + * `path_name/file_name' + * and copy it into `composed_path_name'. + */ +void +eb_compose_path_name(const char *path_name, const char *file_name, + char *composed_path_name) +{ +#ifndef DOS_FILE_PATH + if (strcmp(path_name, "/") == 0) + sprintf(composed_path_name, "%s%s", path_name, file_name); + else + sprintf(composed_path_name, "%s/%s", path_name, file_name); +#else + if (is_ebnet_url(path_name)) + sprintf(composed_path_name, "%s/%s", path_name, file_name); + else if (ASCII_ISALPHA(*path_name) && strcmp(path_name + 1, ":\\") == 0) + sprintf(composed_path_name, "%s%s", path_name, file_name); + else + sprintf(composed_path_name, "%s\\%s", path_name, file_name); +#endif +} + + +/* + * Compose a file name + * `path_name/sub_directory/file_name' + * and copy it into `composed_path_name'. + */ +void +eb_compose_path_name2(const char *path_name, const char *sub_directory_name, + const char *file_name, char *composed_path_name) +{ +#ifndef DOS_FILE_PATH + if (strcmp(path_name, "/") == 0) { + sprintf(composed_path_name, "%s%s/%s", + path_name, sub_directory_name, file_name); + } else { + sprintf(composed_path_name, "%s/%s/%s", + path_name, sub_directory_name, file_name); + } +#else + if (is_ebnet_url(path_name)) { + sprintf(composed_path_name, "%s/%s/%s", + path_name, sub_directory_name, file_name); + } else if (ASCII_ISALPHA(*path_name) + && strcmp(path_name + 1, ":\\") == 0) { + sprintf(composed_path_name, "%s%s\\%s", + path_name, sub_directory_name, file_name); + } else { + sprintf(composed_path_name, "%s\\%s\\%s", + path_name, sub_directory_name, file_name); + } +#endif +} + + +/* + * Compose a file name + * `path_name/sub_directory/sub2_directory/file_name' + * and copy it into `composed_path_name'. + */ +void +eb_compose_path_name3(const char *path_name, const char *sub_directory_name, + const char *sub2_directory_name, const char *file_name, + char *composed_path_name) +{ +#ifndef DOS_FILE_PATH + if (strcmp(path_name, "/") == 0) { + sprintf(composed_path_name, "%s%s/%s/%s", + path_name, sub_directory_name, sub2_directory_name, file_name); + } else { + sprintf(composed_path_name, "%s/%s/%s/%s", + path_name, sub_directory_name, sub2_directory_name, file_name); + } +#else + if (is_ebnet_url(path_name)) { + sprintf(composed_path_name, "%s/%s/%s/%s", + path_name, sub_directory_name, sub2_directory_name, file_name); + } else if (ASCII_ISALPHA(*path_name) + && strcmp(path_name + 1, ":\\") == 0) { + sprintf(composed_path_name, "%s%s\\%s\\%s", + path_name, sub_directory_name, sub2_directory_name, file_name); + } else { + sprintf(composed_path_name, "%s\\%s\\%s\\%s", + path_name, sub_directory_name, sub2_directory_name, file_name); + } +#endif +} + + +/* + * Compose movie file name from argv[], and copy the result to + * `composed_file_name'. Note that upper letters are converted to lower + * letters. + * + * If a file `composed_path_name' exists, then EB_SUCCESS is returned. + * Otherwise EB_ERR_BAD_FILE_NAME is returned. + */ +EB_Error_Code +eb_compose_movie_file_name(const unsigned int *argv, char *composed_file_name) +{ + unsigned short jis_characters[EB_MAX_DIRECTORY_NAME_LENGTH]; + const unsigned int *arg_p; + char *composed_p; + unsigned short c; + int i; + + /* + * Initialize `jis_characters[]'. + */ + for (i = 0, arg_p = argv; + i + 1 < EB_MAX_DIRECTORY_NAME_LENGTH; i += 2, arg_p++) { + jis_characters[i] = (*arg_p >> 16) & 0xffff; + jis_characters[i + 1] = (*arg_p) & 0xffff; + } + if (i < EB_MAX_DIRECTORY_NAME_LENGTH) + jis_characters[i] = (*arg_p >> 16) & 0xffff; + + /* + * Compose file name. + */ + for (i = 0, composed_p = composed_file_name; + i < EB_MAX_DIRECTORY_NAME_LENGTH; i++, composed_p++) { + c = jis_characters[i]; + if (c == 0x2121 || c == 0x0000) + break; + if ((0x2330 <= c && c <= 0x2339) || (0x2361 <= c && c <= 0x237a)) + *composed_p = c & 0xff; + else if (0x2341 <= c && c <= 0x235a) + *composed_p = (c | 0x20) & 0xff; + else + return EB_ERR_BAD_FILE_NAME; + } + + *composed_p = '\0'; + + return EB_SUCCESS; +} + + +/* + * This function is similar to eb_compose_movie_file_name(), but it + * returns full path of the movie file name. + */ +EB_Error_Code +eb_compose_movie_path_name(EB_Book *book, const unsigned int *argv, + char *composed_path_name) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + char composed_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; + + /* + * Lock the book. + */ + eb_lock(&book->lock); + LOG(("in: eb_compose_movie_path_name(book=%d, argv=%x)", + (int)book->code, argv)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + subbook = book->subbook_current; + + error_code = eb_compose_movie_file_name(argv, composed_file_name); + if (error_code != EB_SUCCESS) + goto failed; + + error_code = eb_find_file_name3(book->path, subbook->directory_name, + subbook->movie_directory_name, composed_file_name, composed_file_name); + if (error_code != EB_SUCCESS) + goto failed; + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->movie_directory_name, composed_file_name, composed_path_name); + + LOG(("out: eb_compse_movie_path_name() = %s", + eb_error_string(EB_SUCCESS))); + + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_compse_movie_path_name() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Decompose movie file name into argv[]. This is the reverse of + * eb_compose_movie_file_name(). Note that lower letters are converted + * to upper letters. + * + * EB_SUCCESS is returned upon success, EB_ERR_BAD_FILE_NAME otherwise. + */ +EB_Error_Code +eb_decompose_movie_file_name(unsigned int *argv, + const char *composed_file_name) +{ + unsigned short jis_characters[EB_MAX_DIRECTORY_NAME_LENGTH]; + unsigned int *arg_p; + const char *composed_p; + int i; + + /* + * Initialize `jis_characters[]'. + */ + for (i = 0; i < EB_MAX_DIRECTORY_NAME_LENGTH; i++) + jis_characters[i] = 0x0000; + + /* + * Set jis_characters[]. + */ + for (i = 0, composed_p = composed_file_name; + i < EB_MAX_DIRECTORY_NAME_LENGTH && *composed_p != '\0'; + i++, composed_p++) { + if ('0' <= *composed_p && *composed_p <= '9') + jis_characters[i] = 0x2330 + (*composed_p - '0'); + else if ('A' <= *composed_p && *composed_p <= 'Z') + jis_characters[i] = 0x2341 + (*composed_p - 'A'); + else if ('a' <= *composed_p && *composed_p <= 'z') + jis_characters[i] = 0x2341 + (*composed_p - 'a'); + else + return EB_ERR_BAD_FILE_NAME; + } + if (*composed_p != '\0') + return EB_ERR_BAD_FILE_NAME; + + /* + * Decompose file name. + */ + for (i = 0, arg_p = argv; + i + 1 < EB_MAX_DIRECTORY_NAME_LENGTH; i += 2, arg_p++) { + *arg_p = (jis_characters[i] << 16) | jis_characters[i + 1]; + } + if (i < EB_MAX_DIRECTORY_NAME_LENGTH) { + *arg_p++ = jis_characters[i] << 16; + } + *arg_p = '\0'; + + return EB_SUCCESS; +} + + +void +eb_path_name_zio_code(const char *path_name, Zio_Code default_zio_code, + Zio_Code *zio_code) +{ + const char *base_name; + const char *dot; + +#ifndef DOS_FILE_PATH + base_name = strrchr(path_name, '/'); +#else + if (is_ebnet_url(path_name)) + base_name = strrchr(path_name, '/'); + else + base_name = strrchr(path_name, '\\'); +#endif + if (base_name != NULL) + base_name++; + else + base_name = path_name; + + dot = strchr(base_name, '.'); + if (dot != NULL && strncasecmp(dot, ".ebz", 4) == 0) + *zio_code = ZIO_EBZIP1; + else if (dot != NULL && strncasecmp(dot, ".org", 4) == 0) + *zio_code = ZIO_PLAIN; + else + *zio_code = default_zio_code; +} diff --git a/lib/ebu/ebu/filename.lo b/lib/ebu/ebu/filename.lo new file mode 100644 index 0000000..dcfcf33 --- /dev/null +++ b/lib/ebu/ebu/filename.lo @@ -0,0 +1,12 @@ +# filename.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/filename.o' + +# Name of the non-PIC object +non_pic_object='filename.o' + diff --git a/lib/ebu/ebu/font.c b/lib/ebu/ebu/font.c new file mode 100644 index 0000000..6d28ca1 --- /dev/null +++ b/lib/ebu/ebu/font.c @@ -0,0 +1,551 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "font.h" +#include "build-post.h" + +/* + * Initialize all fonts in the current subbook. + */ +void +eb_initialize_fonts(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Font *font; + int i; + + LOG(("in: eb_initialize_fonts(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + for (i = 0, font = subbook->narrow_fonts; i < EB_MAX_FONTS; i++, font++) { + font->font_code = EB_FONT_INVALID; + font->initialized = 0; + font->start = -1; + font->end = -1; + font->page = 0; + font->glyphs = NULL; + zio_initialize(&font->zio); + } + + for (i = 0, font = subbook->wide_fonts; i < EB_MAX_FONTS; i++, font++) { + font->font_code = EB_FONT_INVALID; + font->initialized = 0; + font->start = -1; + font->end = -1; + font->page = 0; + font->glyphs = NULL; + zio_initialize(&font->zio); + } + + LOG(("out: eb_initialize_fonts()")); +} + + +/* + * Load font files. + */ +void +eb_load_font_headers(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font_Code i; + + LOG(("in: eb_load_fonts(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + /* + * Load narrow font headers. + */ + for (i = 0; i < EB_MAX_FONTS; i++) { + if (subbook->narrow_fonts[i].font_code == EB_FONT_INVALID + || subbook->narrow_fonts[i].initialized) + continue; + + error_code = eb_open_narrow_font_file(book, i); + if (error_code == EB_SUCCESS) + error_code = eb_load_narrow_font_header(book, i); + if (error_code != EB_SUCCESS) + subbook->narrow_fonts[i].font_code = EB_FONT_INVALID; + subbook->narrow_fonts[i].initialized = 1; + zio_close(&subbook->narrow_fonts[i].zio); + } + + /* + * Load wide font header. + */ + for (i = 0; i < EB_MAX_FONTS; i++) { + if (subbook->wide_fonts[i].font_code == EB_FONT_INVALID + || subbook->wide_fonts[i].initialized) + continue; + + error_code = eb_open_wide_font_file(book, i); + if (error_code == EB_SUCCESS) + error_code = eb_load_wide_font_header(book, i); + if (error_code != EB_SUCCESS) + subbook->wide_fonts[i].font_code = EB_FONT_INVALID; + subbook->wide_fonts[i].initialized = 1; + zio_close(&subbook->wide_fonts[i].zio); + } + + LOG(("out: eb_load_font_headers()")); +} + + +/* + * Finalize all fonts in the current subbook. + */ +void +eb_finalize_fonts(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Font *font; + int i; + + LOG(("in: eb_finalize_fonts(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + for (i = 0, font = subbook->narrow_fonts; i < EB_MAX_FONTS; i++, font++) { + zio_finalize(&font->zio); + if (font->glyphs != NULL) { + free(font->glyphs); + font->glyphs = NULL; + } + } + + for (i = 0, font = subbook->wide_fonts; i < EB_MAX_FONTS; i++, font++) { + zio_finalize(&font->zio); + if (font->glyphs != NULL) { + free(font->glyphs); + font->glyphs = NULL; + } + } + + LOG(("out: eb_finalize_fonts()")); +} + + +/* + * Look up the height of the current font of the current subbook in + * `book'. + */ +EB_Error_Code +eb_font(EB_Book *book, EB_Font_Code *font_code) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_font(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Look up the height of the current font. + */ + if (book->subbook_current->narrow_current != NULL) + *font_code = book->subbook_current->narrow_current->font_code; + else if (book->subbook_current->wide_current != NULL) + *font_code = book->subbook_current->wide_current->font_code; + else { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + LOG(("out: eb_font(font_code=%d) = %s", (int)*font_code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *font_code = EB_FONT_INVALID; + LOG(("out: eb_font() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Set the font with `font_code' as the current font of the current + * subbook in `book'. + */ +EB_Error_Code +eb_set_font(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + + eb_lock(&book->lock); + LOG(("in: eb_set_font(book=%d, font_code=%d)", (int)book->code, + (int)font_code)); + + /* + * Check `font_code'. + */ + if (font_code < 0 || EB_MAX_FONTS <= font_code) { + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * If the current font is the font with `font_code', return immediately. + * Otherwise close the current font and continue. + */ + if (subbook->narrow_current != NULL) { + if (subbook->narrow_current->font_code == font_code) + goto succeeded; + if (book->disc_code == EB_DISC_EPWING) + zio_close(&subbook->narrow_current->zio); + subbook->narrow_current = NULL; + } + if (subbook->wide_current != NULL) { + if (subbook->wide_current->font_code == font_code) + goto succeeded; + if (book->disc_code == EB_DISC_EPWING) + zio_close(&subbook->wide_current->zio); + subbook->wide_current = NULL; + } + + /* + * Set the current font. + */ + if (subbook->narrow_fonts[font_code].font_code != EB_FONT_INVALID) + subbook->narrow_current = subbook->narrow_fonts + font_code; + if (subbook->wide_fonts[font_code].font_code != EB_FONT_INVALID) + subbook->wide_current = subbook->wide_fonts + font_code; + + if (subbook->narrow_current == NULL && subbook->wide_current == NULL) { + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + /* + * Initialize current font informtaion. + */ + if (subbook->narrow_current != NULL) { + error_code = eb_open_narrow_font_file(book, font_code); + if (error_code != EB_SUCCESS) + goto failed; + if (is_ebnet_url(book->path)) { + error_code = eb_load_narrow_font_glyphs(book, font_code); + if (error_code != EB_SUCCESS) + goto failed; + } + } + if (subbook->wide_current != NULL) { + error_code = eb_open_wide_font_file(book, font_code); + if (error_code != EB_SUCCESS) + goto failed; + if (is_ebnet_url(book->path)) { + error_code = eb_load_wide_font_glyphs(book, font_code); + if (error_code != EB_SUCCESS) + goto failed; + } + } + + + succeeded: + LOG(("out: eb_set_font() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_unset_font(book); + LOG(("out: eb_set_font() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Unset the font in the current subbook in `book'. + */ +void +eb_unset_font(EB_Book *book) +{ + EB_Subbook *subbook; + + eb_lock(&book->lock); + LOG(("in: eb_unset_font(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + if (subbook == NULL) + goto succeeded; + + /* + * Close font files. + */ + if (subbook->narrow_current != NULL) { + zio_close(&subbook->narrow_current->zio); + if (subbook->narrow_current->glyphs != NULL) { + free(subbook->narrow_current->glyphs); + subbook->narrow_current->glyphs = NULL; + } + } + if (subbook->wide_current != NULL) { + zio_close(&subbook->wide_current->zio); + if (subbook->wide_current->glyphs != NULL) { + free(subbook->wide_current->glyphs); + subbook->wide_current->glyphs = NULL; + } + } + + book->subbook_current->narrow_current = NULL; + book->subbook_current->wide_current = NULL; + + succeeded: + LOG(("out: eb_unset_font()")); + eb_unlock(&book->lock); +} + + +/* + * Make a list of fonts in the current subbook in `book'. + */ +EB_Error_Code +eb_font_list(EB_Book *book, EB_Font_Code *font_list, int *font_count) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font_Code *list_p; + int i; + + eb_lock(&book->lock); + LOG(("in: eb_font_list(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Scan the font table in the book. + */ + subbook = book->subbook_current; + list_p = font_list; + *font_count = 0; + for (i = 0; i < EB_MAX_FONTS; i++) { + if (subbook->narrow_fonts[i].font_code != EB_FONT_INVALID + || subbook->wide_fonts[i].font_code != EB_FONT_INVALID) { + *list_p++ = i; + *font_count += 1; + } + } + + LOG(("out: eb_font(font_count=%d) = %s", *font_count, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_font_list() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Test whether the current subbook in `book' has a font with + * `font_code' or not. + */ +int +eb_have_font(EB_Book *book, EB_Font_Code font_code) +{ + EB_Subbook *subbook; + + eb_lock(&book->lock); + LOG(("in: eb_have_font(book=%d, font_code=%d)", (int)book->code, + (int)font_code)); + + /* + * Check `font_code'. + */ + if (font_code < 0 || EB_MAX_FONTS <= font_code) + goto failed; + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) + goto failed; + + if (subbook->narrow_fonts[font_code].font_code == EB_FONT_INVALID + && subbook->wide_fonts[font_code].font_code == EB_FONT_INVALID) + goto failed; + + LOG(("out: eb_have_font() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_font() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Get height of the font `font_code' in the current subbook of `book'. + */ +EB_Error_Code +eb_font_height(EB_Book *book, int *height) +{ + EB_Error_Code error_code; + EB_Font_Code font_code; + + eb_lock(&book->lock); + LOG(("in: eb_font_height(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current != NULL) + font_code = book->subbook_current->narrow_current->font_code; + else if (book->subbook_current->wide_current != NULL) + font_code = book->subbook_current->wide_current->font_code; + else { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + /* + * Calculate height. + */ + error_code = eb_font_height2(font_code, height); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_font_heigt(height=%d) = %s", *height, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *height = 0; + LOG(("out: eb_font_height() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get height of the font `font_code'. + */ +EB_Error_Code +eb_font_height2(EB_Font_Code font_code, int *height) +{ + EB_Error_Code error_code; + + LOG(("in: eb_font_height2(font_code=%d)", (int)font_code)); + + switch (font_code) { + case EB_FONT_16: + *height = EB_HEIGHT_FONT_16; + break; + case EB_FONT_24: + *height = EB_HEIGHT_FONT_24; + break; + case EB_FONT_30: + *height = EB_HEIGHT_FONT_30; + break; + case EB_FONT_48: + *height = EB_HEIGHT_FONT_48; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_font_heigt2(height=%d) = %s", *height, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *height = 0; + LOG(("out: eb_font_height2() = %s", eb_error_string(error_code))); + return error_code; +} + + diff --git a/lib/ebu/ebu/font.h b/lib/ebu/ebu/font.h new file mode 100644 index 0000000..640c3ec --- /dev/null +++ b/lib/ebu/ebu/font.h @@ -0,0 +1,200 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_FONT_H +#define EB_FONT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef EB_BUILD_LIBRARY +#include "defs.h" +#else +#include +#endif + +/* + * Font types. + */ +#define EB_FONT_16 0 +#define EB_FONT_24 1 +#define EB_FONT_30 2 +#define EB_FONT_48 3 +#define EB_FONT_INVALID -1 + +/* + * Font sizes. + */ +#define EB_SIZE_NARROW_FONT_16 16 +#define EB_SIZE_WIDE_FONT_16 32 +#define EB_SIZE_NARROW_FONT_24 48 +#define EB_SIZE_WIDE_FONT_24 72 +#define EB_SIZE_NARROW_FONT_30 60 +#define EB_SIZE_WIDE_FONT_30 120 +#define EB_SIZE_NARROW_FONT_48 144 +#define EB_SIZE_WIDE_FONT_48 288 + +/* + * Font width. + */ +#define EB_WIDTH_NARROW_FONT_16 8 +#define EB_WIDTH_WIDE_FONT_16 16 +#define EB_WIDTH_NARROW_FONT_24 16 +#define EB_WIDTH_WIDE_FONT_24 24 +#define EB_WIDTH_NARROW_FONT_30 16 +#define EB_WIDTH_WIDE_FONT_30 32 +#define EB_WIDTH_NARROW_FONT_48 24 +#define EB_WIDTH_WIDE_FONT_48 48 + +/* + * Font height. + */ +#define EB_HEIGHT_FONT_16 16 +#define EB_HEIGHT_FONT_24 24 +#define EB_HEIGHT_FONT_30 30 +#define EB_HEIGHT_FONT_48 48 + +/* + * Bitmap image sizes. + */ +#define EB_SIZE_NARROW_FONT_16_XBM 184 +#define EB_SIZE_WIDE_FONT_16_XBM 284 +#define EB_SIZE_NARROW_FONT_16_XPM 266 +#define EB_SIZE_WIDE_FONT_16_XPM 395 +#define EB_SIZE_NARROW_FONT_16_GIF 186 +#define EB_SIZE_WIDE_FONT_16_GIF 314 +#define EB_SIZE_NARROW_FONT_16_BMP 126 +#define EB_SIZE_WIDE_FONT_16_BMP 126 +#define EB_SIZE_NARROW_FONT_16_PNG 131 +#define EB_SIZE_WIDE_FONT_16_PNG 147 + +#define EB_SIZE_NARROW_FONT_24_XBM 383 +#define EB_SIZE_WIDE_FONT_24_XBM 533 +#define EB_SIZE_NARROW_FONT_24_XPM 555 +#define EB_SIZE_WIDE_FONT_24_XPM 747 +#define EB_SIZE_NARROW_FONT_24_GIF 450 +#define EB_SIZE_WIDE_FONT_24_GIF 642 +#define EB_SIZE_NARROW_FONT_24_BMP 158 +#define EB_SIZE_WIDE_FONT_24_BMP 158 +#define EB_SIZE_NARROW_FONT_24_PNG 171 +#define EB_SIZE_WIDE_FONT_24_PNG 195 + +#define EB_SIZE_NARROW_FONT_30_XBM 458 +#define EB_SIZE_WIDE_FONT_30_XBM 833 +#define EB_SIZE_NARROW_FONT_30_XPM 675 +#define EB_SIZE_WIDE_FONT_30_XPM 1155 +#define EB_SIZE_NARROW_FONT_30_GIF 552 +#define EB_SIZE_WIDE_FONT_30_GIF 1032 +#define EB_SIZE_NARROW_FONT_30_BMP 182 +#define EB_SIZE_WIDE_FONT_30_BMP 182 +#define EB_SIZE_NARROW_FONT_30_PNG 189 +#define EB_SIZE_WIDE_FONT_30_PNG 249 + +#define EB_SIZE_NARROW_FONT_48_XBM 983 +#define EB_SIZE_WIDE_FONT_48_XBM 1883 +#define EB_SIZE_NARROW_FONT_48_XPM 1419 +#define EB_SIZE_WIDE_FONT_48_XPM 2571 +#define EB_SIZE_NARROW_FONT_48_GIF 1242 +#define EB_SIZE_WIDE_FONT_48_GIF 2394 +#define EB_SIZE_NARROW_FONT_48_BMP 254 +#define EB_SIZE_WIDE_FONT_48_BMP 446 +#define EB_SIZE_NARROW_FONT_48_PNG 291 +#define EB_SIZE_WIDE_FONT_48_PNG 435 + +#define EB_SIZE_FONT_IMAGE EB_SIZE_WIDE_FONT_48_XPM + +/* + * Function declarations. + */ +/* bitmap.c */ +EB_Error_Code eb_narrow_font_xbm_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_narrow_font_xpm_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_narrow_font_gif_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_narrow_font_bmp_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_narrow_font_png_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_xbm_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_xpm_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_gif_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_bmp_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_png_size(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_bitmap_to_xbm(const char *bitmap, int width, int height, + char *xbm, size_t *xbm_length); +EB_Error_Code eb_bitmap_to_xpm(const char *bitmap, int width, int height, + char *xpm, size_t *xpm_length); +EB_Error_Code eb_bitmap_to_gif(const char *bitmap, int width, int height, + char *gif, size_t *gif_length); +EB_Error_Code eb_bitmap_to_bmp(const char *bitmap, int width, int height, + char *bmp, size_t *bmp_length); +EB_Error_Code eb_bitmap_to_png(const char *bitmap, int width, int height, + char *png, size_t *png_length); + +/* font.c */ +EB_Error_Code eb_font(EB_Book *book, EB_Font_Code *font_code); +EB_Error_Code eb_set_font(EB_Book *book, EB_Font_Code font_code); +void eb_unset_font(EB_Book *book); +EB_Error_Code eb_font_list(EB_Book *book, EB_Font_Code *font_list, + int *font_count); +int eb_have_font(EB_Book *book, EB_Font_Code font_code); +EB_Error_Code eb_font_height(EB_Book *book, int *height); +EB_Error_Code eb_font_height2(EB_Font_Code font_code, int *height); + +/* narwfont.c */ +int eb_have_narrow_font(EB_Book *book); +EB_Error_Code eb_narrow_font_width(EB_Book *book, int *width); +EB_Error_Code eb_narrow_font_width2(EB_Font_Code font_code, int *width); +EB_Error_Code eb_narrow_font_size(EB_Book *book, size_t *size); +EB_Error_Code eb_narrow_font_size2(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_narrow_font_start(EB_Book *book, int *start); +EB_Error_Code eb_narrow_font_end(EB_Book *book, int *end); +EB_Error_Code eb_narrow_font_character_bitmap(EB_Book *book, int, char *); +EB_Error_Code eb_forward_narrow_font_character(EB_Book *book, int, int *); +EB_Error_Code eb_backward_narrow_font_character(EB_Book *book, int, int *); + +/* widefont.c */ +int eb_have_wide_font(EB_Book *book); +EB_Error_Code eb_wide_font_width(EB_Book *book, int *width); +EB_Error_Code eb_wide_font_width2(EB_Font_Code font_code, int *width); +EB_Error_Code eb_wide_font_size(EB_Book *book, size_t *size); +EB_Error_Code eb_wide_font_size2(EB_Font_Code font_code, size_t *size); +EB_Error_Code eb_wide_font_start(EB_Book *book, int *start); +EB_Error_Code eb_wide_font_end(EB_Book *book, int *end); +EB_Error_Code eb_wide_font_character_bitmap(EB_Book *book, + int character_number, char *bitmap); +EB_Error_Code eb_forward_wide_font_character(EB_Book *book, int n, + int *character_number); +EB_Error_Code eb_backward_wide_font_character(EB_Book *book, int n, + int *character_number); + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_FONT_H */ diff --git a/lib/ebu/ebu/font.lo b/lib/ebu/ebu/font.lo new file mode 100644 index 0000000..2859e65 --- /dev/null +++ b/lib/ebu/ebu/font.lo @@ -0,0 +1,12 @@ +# font.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/font.o' + +# Name of the non-PIC object +non_pic_object='font.o' + diff --git a/lib/ebu/ebu/getaddrinfo.c b/lib/ebu/ebu/getaddrinfo.c new file mode 100644 index 0000000..a763e8d --- /dev/null +++ b/lib/ebu/ebu/getaddrinfo.c @@ -0,0 +1,556 @@ +/* + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * This program provides getaddrinfo() and getnameinfo() described in + * RFC2133, 2553 and 3493. These functions are mainly used for IPv6 + * application to resolve hostname or address. + * + * This program is designed to be working on traditional IPv4 systems + * which don't have those functions. Therefore, this implementation + * supports IPv4 only. + * + * This program is useful for application which should support both IPv6 + * and traditional IPv4 systems. Use genuine getaddrinfo() and getnameinfo() + * provided by system if the system supports IPv6. Otherwise, use this + * implementation. + * + * This program is intended to be used in combination with GNU Autoconf. + * + * This program also provides freeaddrinfo() and gai_strerror(). + * + * To use this program in your application, insert the following lines to + * C source files after including `sys/types.h', `sys/socket.h' and + * `netdb.h'. `getaddrinfo.h' defines `struct addrinfo' and AI_, NI_, + * EAI_ macros. + * + * #ifndef HAVE_GETADDRINFO + * #include "getaddrinfo.h" + * #endif + * + * Restriction: + * getaddrinfo() and getnameinfo() of this program are NOT thread + * safe, unless the cpp macro ENABLE_PTHREAD is defined. + */ + +/* + * Add the following code to your configure.ac (or configure.in). + * AC_TYPE_SOCKLEN_T + * AC_TYPE_IN_PORT_T + * AC_DECL_H_ERRNO + * + * AC_CHECK_FUNCS(getaddrinfo getnameinfo) + * if test "$ac_cv_func_getaddrinfo$ac_cv_func_getnameinfo" != yesyes ; then + * LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" + * fi + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#ifdef ENABLE_WINSOCK2 +#include +#include +#else +#include +#include +#include +#include +#endif +#include +#include + +#ifdef ENABLE_PTHREAD +#include +#endif + +#ifdef ENABLE_NLS +#include +#endif + +#if !defined(H_ERRNO_DECLARED) && !defined(ENABLE_WINSOCK2) +extern int h_errno; +#endif + +#include "getaddrinfo.h" + +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define gettext(string) (string) +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Error messages for gai_strerror(). + */ +static char *eai_errlist[] = { + N_("Success"), + + /* EAI_ADDRFAMILY */ + N_("Address family for hostname not supported"), + + /* EAI_AGAIN */ + N_("Temporary failure in name resolution"), + + /* EAI_BADFLAGS */ + N_("Invalid value for ai_flags"), + + /* EAI_FAIL */ + N_("Non-recoverable failure in name resolution"), + + /* EAI_FAMILY */ + N_("ai_family not supported"), + + /* EAI_MEMORY */ + N_("Memory allocation failure"), + + /* EAI_NONAME */ + N_("hostname nor servname provided, or not known"), + + /* EAI_OVERFLOW */ + N_("An argument buffer overflowed"), + + /* EAI_SERVICE */ + N_("servname not supported for ai_socktype"), + + /* EAI_SOCKTYPE */ + N_("ai_socktype not supported"), + + /* EAI_SYSTEM */ + N_("System error returned in errno") +}; + +/* + * Default hints for getaddrinfo(). + */ +static struct addrinfo default_hints = { + 0, PF_UNSPEC, 0, 0, 0, NULL, NULL, NULL +}; + +/* + * Mutex. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t gai_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Declaration of static functions. + */ +static int is_integer(const char *s); +static int is_address(const char *s); +static int itoa_length(int n); + + +/* + * gai_strerror(). + */ +const char * +gai_strerror(int ecode) +{ + if (ecode < 0 || ecode > EAI_SYSTEM) + return _("Unknown error"); + + return gettext(eai_errlist[ecode]); +} + +/* + * freeaddrinfo(). + */ +void +freeaddrinfo(struct addrinfo *ai) +{ + struct addrinfo *next_ai; + + while (ai != NULL) { + if (ai->ai_canonname != NULL) + free(ai->ai_canonname); + if (ai->ai_addr != NULL) + free(ai->ai_addr); + next_ai = ai->ai_next; + free(ai); + ai = next_ai; + } +} + +/* + * Return 1 if the string `s' represents an integer. + */ +static int +is_integer(const char *s) +{ + if (*s == '-' || *s == '+') + s++; + if (*s < '0' || '9' < *s) + return 0; + + s++; + while ('0' <= *s && *s <= '9') + s++; + + return (*s == '\0'); +} + +/* + * Return 1 if the string `s' represents an IPv4 address. + * Unlike inet_addr(), it doesn't permit malformed nortation such + * as "192.168". + */ +static int +is_address(const char *s) +{ + const static char delimiters[] = {'.', '.', '.', '\0'}; + int i, j; + int octet; + + for (i = 0; i < 4; i++) { + if (*s == '0' && *(s + 1) != delimiters[i]) + return 0; + for (j = 0, octet = 0; '0' <= *s && *s <= '9' && j < 3; s++, j++) + octet = octet * 10 + (*s - '0'); + if (j == 0 || octet > 255 || *s != delimiters[i]) + return 0; + s++; + } + + return 1; +} + +/* + * Calcurate length of the string `s', where `s' is set by + * sprintf(s, "%d", n). + */ +static int +itoa_length(int n) +{ + int result = 1; + + if (n < 0) { + n = -n; + result++; + } + + while (n >= 10) { + result++; + n /= 10; + } + + return result; +} + +/* + * getaddrinfo(). + */ +int +getaddrinfo(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res) +{ + struct addrinfo *head_res = NULL; + struct addrinfo *tail_res = NULL; + struct addrinfo *new_res; + struct sockaddr_in *sa_in; + struct in_addr **addr_list; + struct in_addr *addr_list_buf[2]; + struct in_addr addr_buf; + struct in_addr **ap; + struct servent *servent; + struct hostent *hostent; + const char *canonname = NULL; + in_port_t port; + int saved_h_errno; + int result = 0; + +#ifdef ENABLE_PTHREAD + pthread_mutex_lock(&gai_mutex); +#endif + + saved_h_errno = h_errno; + + if (nodename == NULL && servname == NULL) { + result = EAI_NONAME; + goto end; + } + + if (hints != NULL) { + if (hints->ai_family != PF_INET && hints->ai_family != PF_UNSPEC) { + result = EAI_FAMILY; + goto end; + } + if (hints->ai_socktype != SOCK_DGRAM + && hints->ai_socktype != SOCK_STREAM + && hints->ai_socktype != 0) { + result = EAI_SOCKTYPE; + goto end; + } + } else { + hints = &default_hints; + } + + if (servname != NULL) { + if (is_integer(servname)) + port = htons(atoi(servname)); + else { + if (hints->ai_flags & AI_NUMERICSERV) { + result = EAI_NONAME; + goto end; + } + + if (hints->ai_socktype == SOCK_DGRAM) + servent = getservbyname(servname, "udp"); + else if (hints->ai_socktype == SOCK_STREAM) + servent = getservbyname(servname, "tcp"); + else if (hints->ai_socktype == 0) + servent = getservbyname(servname, "tcp"); + else { + result = EAI_SOCKTYPE; + goto end; + } + + if (servent == NULL) { + result = EAI_SERVICE; + goto end; + } + port = servent->s_port; + } + } else { + port = htons(0); + } + + if (nodename != NULL) { + if (is_address(nodename)) { + addr_buf.s_addr = inet_addr(nodename); + addr_list_buf[0] = &addr_buf; + addr_list_buf[1] = NULL; + addr_list = addr_list_buf; + + if (hints->ai_flags & AI_CANONNAME + && !(hints->ai_flags & AI_NUMERICHOST)) { + hostent = gethostbyaddr((char *)&addr_buf, + sizeof(struct in_addr), AF_INET); + if (hostent != NULL) + canonname = hostent->h_name; + else + canonname = nodename; + } + } else { + if (hints->ai_flags & AI_NUMERICHOST) { + result = EAI_NONAME; + goto end; + } + + hostent = gethostbyname(nodename); + if (hostent == NULL) { + switch (h_errno) { + case HOST_NOT_FOUND: + case NO_DATA: + result = EAI_NONAME; + goto end; + case TRY_AGAIN: + result = EAI_AGAIN; + goto end; + default: + result = EAI_FAIL; + goto end; + } + } + addr_list = (struct in_addr **)hostent->h_addr_list; + + if (hints->ai_flags & AI_CANONNAME) + canonname = hostent->h_name; + } + } else { + if (hints->ai_flags & AI_PASSIVE) + addr_buf.s_addr = htonl(INADDR_ANY); + else + addr_buf.s_addr = htonl(0x7F000001); + addr_list_buf[0] = &addr_buf; + addr_list_buf[1] = NULL; + addr_list = addr_list_buf; + } + + for (ap = addr_list; *ap != NULL; ap++) { + new_res = (struct addrinfo *)malloc(sizeof(struct addrinfo)); + if (new_res == NULL) { + if (head_res != NULL) + freeaddrinfo(head_res); + result = EAI_MEMORY; + goto end; + } + + new_res->ai_family = PF_INET; + new_res->ai_socktype = hints->ai_socktype; + new_res->ai_protocol = hints->ai_protocol; + new_res->ai_addr = NULL; + new_res->ai_addrlen = sizeof(struct sockaddr_in); + new_res->ai_canonname = NULL; + new_res->ai_next = NULL; + + new_res->ai_addr = (struct sockaddr *) + malloc(sizeof(struct sockaddr_in)); + if (new_res->ai_addr == NULL) { + free(new_res); + if (head_res != NULL) + freeaddrinfo(head_res); + result = EAI_MEMORY; + goto end; + } + + sa_in = (struct sockaddr_in *)new_res->ai_addr; + memset(sa_in, 0, sizeof(struct sockaddr_in)); + sa_in->sin_family = PF_INET; + sa_in->sin_port = port; + memcpy(&sa_in->sin_addr, *ap, sizeof(struct in_addr)); + + if (head_res == NULL) + head_res = new_res; + else + tail_res->ai_next = new_res; + tail_res = new_res; + } + + if (canonname != NULL && head_res != NULL) { + head_res->ai_canonname = (char *)malloc(strlen(canonname) + 1); + if (head_res->ai_canonname != NULL) + strcpy(head_res->ai_canonname, canonname); + } + + *res = head_res; + + end: +#ifndef ENABLE_WINSOCK2 + h_errno = saved_h_errno; +#else + WSASetLastError(saved_h_errno); +#endif +#ifdef ENABLE_PTHREAD + pthread_mutex_unlock(&gai_mutex); +#endif + return result; +} + +/* + * getnameinfo(). + */ +int +getnameinfo(const struct sockaddr *sa, socklen_t salen, char *node, + socklen_t nodelen, char *serv, socklen_t servlen, int flags) +{ + const struct sockaddr_in *sa_in = (const struct sockaddr_in *)sa; + struct hostent *hostent; + struct servent *servent; + char *ntoa_address; + int saved_h_errno; + int result = 0; + +#ifdef ENABLE_PTHREAD + pthread_mutex_lock(&gai_mutex); +#endif + + saved_h_errno = h_errno; + + if (sa_in->sin_family != PF_INET) { + result = EAI_FAMILY; + goto end; + } else if (node == NULL && serv == NULL) { + result = EAI_NONAME; + goto end; + } + + if (serv != NULL && servlen > 0) { + if (flags & NI_NUMERICSERV) + servent = NULL; + else if (flags & NI_DGRAM) + servent = getservbyport(sa_in->sin_port, "udp"); + else + servent = getservbyport(sa_in->sin_port, "tcp"); + + if (servent != NULL) { + if (servlen <= strlen(servent->s_name)) { + result = EAI_OVERFLOW; + goto end; + } + strcpy(serv, servent->s_name); + } else { + if (servlen <= itoa_length(ntohs(sa_in->sin_port))) { + result = EAI_OVERFLOW; + goto end; + } + sprintf(serv, "%d", ntohs(sa_in->sin_port)); + } + } + + if (node != NULL && nodelen > 0) { + if (flags & NI_NUMERICHOST) + hostent = NULL; + else { + hostent = gethostbyaddr((char *)&sa_in->sin_addr, + sizeof(struct in_addr), AF_INET); + } + if (hostent != NULL) { + if (nodelen <= strlen(hostent->h_name)) { + result = EAI_OVERFLOW; + goto end; + } + strcpy(node, hostent->h_name); + } else { + if (flags & NI_NAMEREQD) { + result = EAI_NONAME; + goto end; + } + ntoa_address = inet_ntoa(sa_in->sin_addr); + if (nodelen <= strlen(ntoa_address)) { + result = EAI_OVERFLOW; + goto end; + } + strcpy(node, ntoa_address); + } + + } + + end: +#ifndef ENABLE_WINSOCK2 + h_errno = saved_h_errno; +#else + WSASetLastError(saved_h_errno); +#endif +#ifdef ENABLE_PTHREAD + pthread_mutex_unlock(&gai_mutex); +#endif + return result; +} + diff --git a/lib/ebu/ebu/getaddrinfo.h b/lib/ebu/ebu/getaddrinfo.h new file mode 100644 index 0000000..2f9d6b3 --- /dev/null +++ b/lib/ebu/ebu/getaddrinfo.h @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef GETADDRINFO_H +#define GETADDRINFO_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif + +#include "build-pre.h" + +/********************************************************************/ +/* + * Undefine all the macros. + * might defines some of them. + */ +#ifdef EAI_ADDRFAMILY +#undef EAI_ADDRFAMILY +#endif +#ifdef EAI_AGAIN +#undef EAI_AGAIN +#endif +#ifdef EAI_BADFLAGS +#undef EAI_BADFLAGS +#endif +#ifdef EAI_FAIL +#undef EAI_FAIL +#endif +#ifdef EAI_FAMILY +#undef EAI_FAMILY +#endif +#ifdef EAI_MEMORY +#undef EAI_MEMORY +#endif +#ifdef EAI_NONAME +#undef EAI_NONAME +#endif +#ifdef EAI_OVERFLOW +#undef EAI_OVERFLOW +#endif +#ifdef EAI_SERVICE +#undef EAI_SERVICE +#endif +#ifdef EAI_SOCKTYPE +#undef EAI_SOCKTYPE +#endif +#ifdef EAI_SYSTEM +#undef EAI_SYSTEM +#endif + +#ifdef AI_PASSIVE +#undef AI_PASSIVE +#endif +#ifdef AI_CANONNAME +#undef AI_CANONNAME +#endif +#ifdef AI_NUMERICHOST +#undef AI_NUMERICHOST +#endif +#ifdef AI_NUMERICSERV +#undef AI_NUMERICSERV +#endif +#ifdef AI_V4MAPPED +#undef AI_V4MAPPED +#endif +#ifdef AI_ALL +#undef AI_ALL +#endif +#ifdef AI_ADDRCONFIG +#undef AI_ADDRCONFIG +#endif +#ifdef AI_DEFAULT +#undef AI_DEFAULT +#endif + +#ifdef NI_NOFQDN +#undef NI_NOFQDN +#endif +#ifdef NI_NUMERICHOST +#undef NI_NUMERICHOST +#endif +#ifdef NI_NAMEREQD +#undef NI_NAMEREQD +#endif +#ifdef NI_NUMERICSERV +#undef NI_NUMERICSERV +#endif +#ifdef NI_NUMERICSCOPE +#undef NI_NUMERICSCOPE +#endif + +#ifdef NI_DGRAM +#undef NI_DGRAM +#endif +#ifdef NI_MAXHOST +#undef NI_MAXHOST +#endif +#ifdef NI_MAXSERV +#undef NI_MAXSERV +#endif + +/* + * Fake struct and function names. + * might declares all or some of them. + */ +#if defined(HAVE_GETADDRINFO) || defined(HAVE_GETNAMEINFO) +#define addrinfo ebnet_addrinfo +#define gai_strerror ebnet_gai_strerror +#define freeaddrinfo ebnet_freeaddrinfo +#define getaddrinfo ebnet_getaddrinfo +#define getnameinfo ebnet_getnameinfo +#endif + +/********************************************************************/ +/* + * Error codes. + */ +#define EAI_ADDRFAMILY 1 +#define EAI_AGAIN 2 +#define EAI_BADFLAGS 3 +#define EAI_FAIL 4 +#define EAI_FAMILY 5 +#define EAI_MEMORY 6 +#define EAI_NONAME 7 +#define EAI_OVERFLOW 8 +#define EAI_SERVICE 9 +#define EAI_SOCKTYPE 10 +#define EAI_SYSTEM 11 + +/* + * Flags for getaddrinfo(). + */ +#define AI_ADDRCONFIG 0x0001 +#define AI_ALL 0x0002 +#define AI_CANONNAME 0x0004 +#define AI_NUMERICHOST 0x0008 +#define AI_NUMERICSERV 0x0010 +#define AI_PASSIVE 0x0020 +#define AI_V4MAPPED 0x0040 +#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) + +/* + * Flags for getnameinfo(). + */ +#define NI_DGRAM 0x0001 +#define NI_NAMEREQD 0x0002 +#define NI_NOFQDN 0x0004 +#define NI_NUMERICHOST 0x0008 +#define NI_NUMERICSCOPE 0x0010 +#define NI_NUMERICSERV 0x0020 + +/* + * Maximum length of FQDN and servie name for getnameinfo(). + */ +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 + +/* + * Address families and Protocol families. + */ +#ifndef AF_UNSPEC +#define AF_UNSPEC AF_INET +#endif +#ifndef PF_UNSPEC +#define PF_UNSPEC PF_INET +#endif + +/* + * struct addrinfo. + */ +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + socklen_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; + +/* + * Functions. + */ +const char *gai_strerror(int ecode); +void freeaddrinfo(struct addrinfo *ai); +int getaddrinfo(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res); +int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *node, + socklen_t nodelen, char *serv, socklen_t servlen, int flags); + +#endif /* not GETADDRINFO_H */ diff --git a/lib/ebu/ebu/getaddrinfo.lo b/lib/ebu/ebu/getaddrinfo.lo new file mode 100644 index 0000000..97acad2 --- /dev/null +++ b/lib/ebu/ebu/getaddrinfo.lo @@ -0,0 +1,12 @@ +# getaddrinfo.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/getaddrinfo.o' + +# Name of the non-PIC object +non_pic_object='getaddrinfo.o' + diff --git a/lib/ebu/ebu/hook.c b/lib/ebu/ebu/hook.c new file mode 100644 index 0000000..9590e51 --- /dev/null +++ b/lib/ebu/ebu/hook.c @@ -0,0 +1,321 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#include "text.h" +#include "build-post.h" + +/* + * Default hookset. + */ +EB_Hookset eb_default_hookset; + + +/* + * Initialize default hookset. + */ +void +eb_initialize_default_hookset(void) +{ + LOG(("in: eb_initialize_default_hookset()")); + + eb_initialize_hookset(&eb_default_hookset); + + LOG(("out: eb_initialize_default_hookset()")); +} + + +/* + * Initialize a hookset. + */ +void +eb_initialize_hookset(EB_Hookset *hookset) +{ + int i; + + LOG(("in: eb_initialize_hookset()")); + + eb_initialize_lock(&hookset->lock); + + for (i = 0; i < EB_NUMBER_OF_HOOKS; i++) { + hookset->hooks[i].code = i; + hookset->hooks[i].function = NULL; + } + hookset->hooks[EB_HOOK_NARROW_JISX0208].function + = eb_hook_euc_to_ascii; + hookset->hooks[EB_HOOK_NARROW_FONT].function + = eb_hook_narrow_character_text; + hookset->hooks[EB_HOOK_WIDE_FONT].function + = eb_hook_wide_character_text; + hookset->hooks[EB_HOOK_NEWLINE].function + = eb_hook_newline; + + LOG(("out: eb_initialize_hookset()")); +} + + +/* + * Finalize a hookset. + */ +void +eb_finalize_hookset(EB_Hookset *hookset) +{ + int i; + + LOG(("in: eb_finalize_hookset()")); + + for (i = 0; i < EB_NUMBER_OF_HOOKS; i++) { + hookset->hooks[i].code = i; + hookset->hooks[i].function = NULL; + } + eb_finalize_lock(&hookset->lock); + + LOG(("out: eb_finalize_hookset()")); +} + + +/* + * Set a hook. + */ +EB_Error_Code +eb_set_hook(EB_Hookset *hookset, const EB_Hook *hook) +{ + EB_Error_Code error_code; + + eb_lock(&hookset->lock); + LOG(("in: eb_set_hook(hook=%d)", (int)hook->code)); + + /* + * Set a hook. + */ + if (hook->code < 0 || EB_NUMBER_OF_HOOKS <= hook->code) { + error_code = EB_ERR_NO_SUCH_HOOK; + goto failed; + } + hookset->hooks[hook->code].function = hook->function; + + LOG(("out: eb_set_hook() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&hookset->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_hook() = %s", eb_error_string(error_code))); + eb_unlock(&hookset->lock); + return error_code; +} + + +/* + * Set a list of hooks. + */ +EB_Error_Code +eb_set_hooks(EB_Hookset *hookset, const EB_Hook *hook) +{ + EB_Error_Code error_code; + const EB_Hook *h; + + eb_lock(&hookset->lock); + LOG(("in: eb_set_hooks(hooks=[below])")); + + if (eb_log_flag) { + for (h = hook; h->code != EB_HOOK_NULL; h++) + LOG((" hook=%d", h->code)); + } + + /* + * Set hooks. + */ + for (h = hook; h->code != EB_HOOK_NULL; h++) { + if (h->code < 0 || EB_NUMBER_OF_HOOKS <= h->code) { + error_code = EB_ERR_NO_SUCH_HOOK; + goto failed; + } + hookset->hooks[h->code].function = h->function; + } + + /* + * Unlock the hookset. + */ + LOG(("out: eb_set_hooks() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&hookset->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_hooks() = %s", eb_error_string(error_code))); + eb_unlock(&hookset->lock); + return error_code; +} + + +/* + * EUC JP to ASCII conversion table. + */ +#define EUC_TO_ASCII_TABLE_START 0xa0 +#define EUC_TO_ASCII_TABLE_END 0xff + +static const unsigned char euc_a1_to_ascii_table[] = { + 0x00, 0x20, 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x3a, /* 0xa0 */ + 0x3b, 0x3f, 0x21, 0x00, 0x00, 0x00, 0x60, 0x00, /* 0xa8 */ + 0x5e, 0x7e, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2f, /* 0xb8 */ + 0x5c, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x27, /* 0xc0 */ + 0x00, 0x22, 0x28, 0x29, 0x00, 0x00, 0x5b, 0x5d, /* 0xc8 */ + 0x7b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0 */ + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2d, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x3d, 0x00, 0x3c, 0x3e, 0x00, 0x00, 0x00, /* 0xe0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, /* 0xe8 */ + 0x24, 0x00, 0x00, 0x25, 0x23, 0x26, 0x2a, 0x40, /* 0xf0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + +static const unsigned char euc_a3_to_ascii_table[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8 */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0xb0 */ + 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8 */ + 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0xc0 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0xc8 */ + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0xd0 */ + 0x58, 0x59, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0xe0 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0xe8 */ + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0xf0 */ + 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + + +/* + * Hook which converts a character from EUC-JP to ASCII. + */ +EB_Error_Code +eb_hook_euc_to_ascii(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) +{ + int in_code1, in_code2; + int out_code = 0; + + in_code1 = argv[0] >> 8; + in_code2 = argv[0] & 0xff; + + if (in_code2 < EUC_TO_ASCII_TABLE_START + || EUC_TO_ASCII_TABLE_END < in_code2) { + out_code = 0; + } else if (in_code1 == 0xa1) { + out_code = euc_a1_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; + } else if (in_code1 == 0xa3) { + out_code = euc_a3_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; + } + + if (out_code == 0) + eb_write_text_byte2(book, in_code1, in_code2); + else + eb_write_text_byte1(book, out_code); + + return EB_SUCCESS; +} + + +/* + * Hook for narrow local character. + */ +EB_Error_Code +eb_hook_narrow_character_text(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv) +{ + char alt_text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + + if (appendix == NULL + || eb_narrow_alt_character_text(appendix, (int)argv[0], alt_text) + != EB_SUCCESS) { + eb_write_text_string(book, ""); + } else { + eb_write_text_string(book, alt_text); + } + + return EB_SUCCESS; +} + + +/* + * Hook for wide local character. + */ +EB_Error_Code +eb_hook_wide_character_text(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv) +{ + char alt_text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + + if (appendix == NULL + || eb_wide_alt_character_text(appendix, (int)argv[0], alt_text) + != EB_SUCCESS) { + eb_write_text_string(book, ""); + } else { + eb_write_text_string(book, alt_text); + } + + return EB_SUCCESS; +} + + +/* + * Hook for a newline character. + */ +EB_Error_Code +eb_hook_newline(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code code, int argc, const unsigned int *argv) +{ + eb_write_text_byte1(book, '\n'); + + return EB_SUCCESS; +} + + +/* + * Hook which does nothing. + */ +EB_Error_Code +eb_hook_empty(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) +{ + return EB_SUCCESS; +} + + diff --git a/lib/ebu/ebu/hook.lo b/lib/ebu/ebu/hook.lo new file mode 100644 index 0000000..ec6c19d --- /dev/null +++ b/lib/ebu/ebu/hook.lo @@ -0,0 +1,12 @@ +# hook.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/hook.o' + +# Name of the non-PIC object +non_pic_object='hook.o' + diff --git a/lib/ebu/ebu/jacode.c b/lib/ebu/ebu/jacode.c new file mode 100644 index 0000000..dfc974f --- /dev/null +++ b/lib/ebu/ebu/jacode.c @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" + +/* + * Convert a string from JIS X 0208 to EUC JP. + */ +void +eb_jisx0208_to_euc(char *out_string, const char *in_string) +{ + unsigned char *out_p = (unsigned char *)out_string; + const unsigned char *in_p = (unsigned char *)in_string; + + while (*in_p != '\0') + *out_p++ = ((*in_p++) | 0x80); + + *out_p = '\0'; +} + + +/* + * Convert a string from shift-JIS to EUC JP. + * (Shift-JIS is used only in the `LANGUAGE' file.) + */ +void +eb_sjis_to_euc(char *out_string, const char *in_string) +{ + unsigned char *out_p = (unsigned char *)out_string; + const unsigned char *in_p = (unsigned char *)in_string; + unsigned char c1, c2; + + for (;;) { + /* + * Break at '\0'. + */ + c1 = *in_p++; + if (c1 == '\0') + break; + + if (c1 <= 0x7f) { + /* + * JIS X 0201 Roman character. + */ + *out_p++ = c1; + } else if (0xa1 <= c1 && c1 <= 0xdf) { + /* + * JIS X 0201 Kana. + */ + *out_p++ = ' '; + } else { + /* + * JIS X 0208 character. + */ + c2 = *in_p++; + if (c2 == 0x00) + break; + + if (c2 < 0x9f) { + if (c1 < 0xdf) + c1 = ((c1 - 0x30) << 1) - 1; + else + c1 = ((c1 - 0x70) << 1) - 1; + + if (c2 < 0x7f) + c2 += 0x61; + else + c2 += 0x60; + } else { + if (c1 < 0xdf) + c1 = (c1 - 0x30) << 1; + else + c1 = (c1 - 0x70) << 1; + c2 += 0x02; + } + + *out_p++ = c1; + *out_p++ = c2; + } + } + + *out_p = '\0'; +} + + +/* + * Convert a string from EBCDIC code page 37 to ascii. + * non-ascii characters are converted into SP. + */ +static const char ebcdic_ascii_table[] = { + 0x00, 0x01, 0x02, 0x03, 0x20, 0x09, 0x20, 0x7f, + 0x20, 0x20, 0x20, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x20, 0x20, 0x08, 0x20, + 0x18, 0x19, 0x20, 0x20, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x17, 0x1b, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x05, 0x06, 0x07, + 0x20, 0x20, 0x16, 0x20, 0x20, 0x20, 0x20, 0x04, + 0x20, 0x20, 0x20, 0x20, 0x15, 0x15, 0x20, 0x1a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x2e, 0x3c, 0x28, 0x2b, 0x7c, + 0x26, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x20, + 0x2d, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x2c, 0x25, 0x5f, 0x3e, 0x3f, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x60, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, + 0x71, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x7e, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x5e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x5b, 0x5d, 0x20, 0x20, 0x20, 0x20, + 0x7b, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x7d, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, + 0x51, 0x52, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x5c, 0x20, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, +}; + +void +eb_ebcdic037_to_ascii(char *out_string, const char *in_string) +{ + while (*in_string != 0) { + *out_string = ebcdic_ascii_table[(unsigned char)*in_string]; + out_string++; + in_string++; + } +} diff --git a/lib/ebu/ebu/jacode.lo b/lib/ebu/ebu/jacode.lo new file mode 100644 index 0000000..b2d9f7f --- /dev/null +++ b/lib/ebu/ebu/jacode.lo @@ -0,0 +1,12 @@ +# jacode.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/jacode.o' + +# Name of the non-PIC object +non_pic_object='jacode.o' + diff --git a/lib/ebu/ebu/keyword.c b/lib/ebu/ebu/keyword.c new file mode 100644 index 0000000..71f48d9 --- /dev/null +++ b/lib/ebu/ebu/keyword.c @@ -0,0 +1,192 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `KEYWORD SEARCH' + * or not. + */ +int +eb_have_keyword_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_keyword_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + if (book->subbook_current->keyword.start_page == 0) + goto failed; + + LOG(("out: eb_have_keyword_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_keyword_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Keyword search. + */ +EB_Error_Code +eb_search_keyword(EB_Book *book, const char * const input_words[]) +{ + EB_Error_Code error_code; + EB_Search_Context *context; + EB_Word_Code word_code; + int word_count; + int i; + + /* + * Lock the book. + */ + eb_lock(&book->lock); + LOG(("in: eb_search_keyword(book=%d, input_words=[below])", + (int)book->code)); + + if (eb_log_flag) { + for (i = 0; i < EB_MAX_KEYWORDS && input_words[i] != NULL; i++) { + LOG((" input_words[%d]=%s", i, + eb_quoted_string(input_words[i]))); + } + LOG((" input_words[%d]=NULL", i)); + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check whether the current subbook has keyword search. + */ + if (book->subbook_current->keyword.start_page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Attach a search context for each keyword, and pre-search the + * keywords. + */ + eb_reset_search_contexts(book); + word_count = 0; + + for (i = 0; i < EB_MAX_KEYWORDS; i++) { + if (input_words[i] == NULL) + break; + + /* + * Initialize search context. + */ + context = book->search_contexts + word_count; + context->code = EB_SEARCH_KEYWORD; + + /* + * Choose comparison functions. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word; + } else { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word_kana_group; + } + context->page = book->subbook_current->keyword.start_page; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_words[i]'. + */ + error_code = eb_set_keyword(book, input_words[i], context->word, + context->canonicalized_word, &word_code); + if (error_code == EB_ERR_EMPTY_WORD) + continue; + else if (error_code != EB_SUCCESS) + goto failed; + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + word_count++; + } + if (word_count == 0) { + error_code = EB_ERR_NO_WORD; + goto failed; + } else if (EB_MAX_KEYWORDS <= i && input_words[i] != NULL) { + error_code = EB_ERR_TOO_MANY_WORDS; + goto failed; + } + + /* + * Set `EB_SEARCH_NONE' to the rest unused search context. + */ + for (i = word_count; i < EB_MAX_KEYWORDS; i++) + (book->search_contexts + i)->code = EB_SEARCH_NONE; + + LOG(("out: eb_search_keyword() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_keyword() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/keyword.lo b/lib/ebu/ebu/keyword.lo new file mode 100644 index 0000000..98ea1dc --- /dev/null +++ b/lib/ebu/ebu/keyword.lo @@ -0,0 +1,12 @@ +# keyword.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/keyword.o' + +# Name of the non-PIC object +non_pic_object='keyword.o' + diff --git a/lib/ebu/ebu/libebu.la b/lib/ebu/ebu/libebu.la new file mode 100644 index 0000000..cae7c5d --- /dev/null +++ b/lib/ebu/ebu/libebu.la @@ -0,0 +1,41 @@ +# libebu.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libebu.so.17' + +# Names of this library. +library_names='libebu.so.17.0.0 libebu.so.17 libebu.so' + +# The name of the static archive. +old_library='libebu.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags=' -fopenmp' + +# Libraries that this one depends upon. +dependency_libs=' -lz -lnsl' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libebu. +current=17 +age=0 +revision=0 + +# Is this an already installed library? +installed=no + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib' diff --git a/lib/ebu/ebu/linebuf.c b/lib/ebu/ebu/linebuf.c new file mode 100644 index 0000000..dd5865d --- /dev/null +++ b/lib/ebu/ebu/linebuf.c @@ -0,0 +1,422 @@ +/* + * copyright (c) 1997-2005 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#ifdef ENABLE_WINSOCK2 +#include +#include +#else +#include +#endif +#include +#include +#include +#include + +#include "linebuf.h" + +#ifdef USE_FAKELOG +#include "fakelog.h" +#endif + + +/* + * Initialize `linebuffer'. + */ +void +initialize_line_buffer(Line_Buffer *line_buffer) +{ + line_buffer->buffer[0] = '\0'; + line_buffer->file = -1; + line_buffer->cache_length = 0; + line_buffer->timeout = 0; +} + + +/* + * Finalize `line_buffer'. + */ +void +finalize_line_buffer(Line_Buffer *line_buffer) +{ + line_buffer->buffer[0] = '\0'; + line_buffer->file = -1; + line_buffer->cache_length = 0; + line_buffer->timeout = 0; +} + + +/* + * Set timeout seconds. + */ +void +set_line_buffer_timeout(Line_Buffer *line_buffer, int timeout) +{ + line_buffer->timeout = timeout; +} + + +/* + * Bind `file' to `line_buffer'. + */ +void +bind_file_to_line_buffer(Line_Buffer *line_buffer, int file) +{ + if (line_buffer->file < 0) + initialize_line_buffer(line_buffer); + line_buffer->file = file; +} + + +/* + * Return file descriptor bound to `line_buffer'. + * Return -1 when no file is bound. + */ +int +file_bound_to_line_buffer(Line_Buffer *line_buffer) +{ + return line_buffer->file; +} + + +/* + * Discard cache data in `line_buffer'. + */ +void +discard_cache_in_line_buffer(Line_Buffer *line_buffer) +{ + line_buffer->cache_length = 0; +} + + +/* + * Get the length of cache data in `line_buffer'. + */ +size_t +cache_length_in_line_buffer(Line_Buffer *line_buffer) +{ + return line_buffer->cache_length; +} + + +/* + * Read a line from the file bound to `line_buffer', and copy the read + * line to `line'. It reads at most `max_line_length' bytes. + * + * The function recognizes both "\n" and "\r\n" as end of line. + * "\n" or "\r\n" is not copied to `buffer', but "\0" is added, instead. + * + * The function returns the number of characters in the line, upon + * successful. It doesn't count "\n" or "\r\n" in the tail of the line, + * so that 0 is returned for an empty line, and the line length doesn't + * exceed one less than `max_line_length'. + * + * If EOF is received or an error occurs, -1 is returned. If the + * line is too long, `max_line_length' is returned. + */ +ssize_t +read_line_buffer(Line_Buffer *line_buffer, char *line, size_t max_line_length) +{ + char *line_p; + char *newline; + size_t search_length; + size_t additional_length; + size_t line_length; + fd_set fdset; + struct timeval timeval; + int select_result; + ssize_t read_result; + + /* + * Return -1 if no file is bound, or if `max_line_length' is 0. + */ + if (line_buffer->file < 0) + return -1; + if (max_line_length == 0) + return -1; + + /* + * Read a file until newline is appeared. + */ + line_length = 0; + line_p = line; + + for (;;) { + if (0 < line_buffer->cache_length) { + /* + * Find a newline in the cache data. + */ + if (max_line_length - line_length < line_buffer->cache_length) + search_length = max_line_length - line_length; + else + search_length = line_buffer->cache_length; + + newline = (char *)memchr(line_buffer->buffer, '\n', search_length); + + /* + * Append cache data in front of the newline to `line'. + */ + if (newline != NULL) + additional_length = newline - line_buffer->buffer + 1; + else + additional_length = search_length; + memcpy(line_p, line_buffer->buffer, additional_length); + line_p += additional_length; + line_length += additional_length; + line_buffer->cache_length -= additional_length; + + /* + * If cache data not copied to `line' are remained in the + * buffer, we move them to the beginning of the buffer. + */ + memmove(line_buffer->buffer, + line_buffer->buffer + additional_length, + line_buffer->cache_length); + + if (newline != NULL) + break; + } + + /* + * Check for the length of the current line. Return if the + * line is too long. + * + * Note that the following conditional expression can be + * substituted to (line_buffer->cache_length != 0), because + * remained cache data mean that the line is too long. + */ + if (max_line_length <= line_length) + return line_length; + + /* + * Call select(). + */ + errno = 0; + FD_ZERO(&fdset); + FD_SET(line_buffer->file, &fdset); + + if (line_buffer->timeout == 0) { + select_result = select(line_buffer->file + 1, &fdset, NULL, NULL, + NULL); + } else { + timeval.tv_sec = line_buffer->timeout; + timeval.tv_usec = 0; + select_result = select(line_buffer->file + 1, &fdset, NULL, NULL, + &timeval); + } + if (select_result < 0) { + if (errno == EINTR) + continue; + return -1; + } else if (select_result == 0) { + return -1; + } + + /* + * Read from a file. (No cache data are remaind.) + */ + errno = 0; + read_result = recv(line_buffer->file, line_buffer->buffer, + LINEBUF_BUFFER_SIZE, 0); + if (read_result < 0) { + if (errno == EINTR) + continue; + return -1; + } else if (read_result == 0) { + if (line_length == 0) { + return -1; + } + return line_length; + } + line_buffer->cache_length += read_result; + } + + /* + * Overwrite `\n' with `\0'. + */ + line_p--; + *line_p = '\0'; + line_length--; + + /* + * If the line is end with `\r\n', remove not only `\n' but `\r'. + */ + if (0 < line_length && *(line_p - 1) == '\r') { + line_p--; + *line_p = '\0'; + line_length--; + } + + return line_length; +} + + +/* + * Read just `stream_length' bytes from the file bound to `line_buffer', + * and copy the read bytes to `stream'. + * + * Unlike read_line_buffer(), it doesn't append `\0' to the read data, + * nor remove newline character in the read data. + * + * If it succeeds, the number of bytes actually read is returned. + * If EOF is received or an error occurs, -1 is returned. + */ +ssize_t +binary_read_line_buffer(Line_Buffer *line_buffer, char *stream, + size_t stream_length) +{ + char *stream_p; + size_t done_length; + fd_set fdset; + struct timeval timeval; + int select_result; + ssize_t read_result; + + /* + * Return -1 if no file is bound. + */ + if (line_buffer->file < 0) + return -1; + + /* + * Return 0 if `stream_length' is 0. + */ + if (stream_length == 0) + return 0; + + /* + * Test whether cache data are left in `line_buffer->buffer'. + * If they are, copy them to `stream'. + */ + stream_p = stream; + done_length = 0; + + if (0 < line_buffer->cache_length) { + if (stream_length <= line_buffer->cache_length) + done_length = stream_length; + else + done_length = line_buffer->cache_length; + + memcpy(stream_p, line_buffer->buffer, done_length); + stream_p += done_length; + line_buffer->cache_length -= done_length; + memmove(line_buffer->buffer, + line_buffer->buffer + done_length, + line_buffer->cache_length); + } + + /* + * Read the file until the number of read bytes (`done_length') is + * reached to `stream_length'. + */ + while (done_length < stream_length) { + /* + * Call select(). + */ + errno = 0; + FD_ZERO(&fdset); + FD_SET(line_buffer->file, &fdset); + + if (line_buffer->timeout == 0) { + select_result = select(line_buffer->file + 1, NULL, &fdset, NULL, + NULL); + } else { + timeval.tv_sec = line_buffer->timeout; + timeval.tv_usec = 0; + select_result = select(line_buffer->file + 1, NULL, &fdset, NULL, + &timeval); + } + if (select_result < 0) { + if (errno == EINTR) + continue; + return -1; + } else if (select_result == 0) { + return -1; + } + + /* + * Read from a file. + */ + errno = 0; + read_result = recv(line_buffer->file, stream_p, + stream_length - done_length, 0); + if (read_result < 0) { + if (errno == EINTR) + continue; + return read_result; + } else if (read_result == 0) { + if (done_length == 0) { + return -1; + } + return done_length; + } + stream_p += read_result; + done_length += read_result; + } + + return stream_length; +} + + +/* + * Skip too long line read by read_line_buffer(). + * + * If a line read by read_line_buffer() doesn't contain a newline + * character, the line is too long. This function reads and discards + * the rest of the line. + * + * If EOF is received or an error occurs, -1 is returned. + * Otherwise, 0 is returned. + */ +int +skip_line_buffer(Line_Buffer *line_buffer) +{ + ssize_t line_length; + + /* + * Read data until the end of the line is found. + */ + for (;;) { + line_length = read_line_buffer(line_buffer, line_buffer->buffer, + LINEBUF_BUFFER_SIZE); + if (line_length < 0) + return -1; + if (line_length < LINEBUF_BUFFER_SIZE) + break; + } + + return 0; +} + + diff --git a/lib/ebu/ebu/linebuf.h b/lib/ebu/ebu/linebuf.h new file mode 100644 index 0000000..82fdd4c --- /dev/null +++ b/lib/ebu/ebu/linebuf.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef LINEBUF_H +#define LINEBUF_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* + * Buffer size of `Line_Buffer' struct. + */ +#define LINEBUF_BUFFER_SIZE 256 + +/* + * Line buffer manager. + */ +typedef struct { + int file; /* file descriptor */ + int timeout; /* idle timeout interval */ + size_t cache_length; /* length of cache data */ + char buffer[LINEBUF_BUFFER_SIZE]; /* buffer */ +} Line_Buffer; + + +/* + * Function declarations. + */ +void initialize_line_buffer(Line_Buffer *line_buffer); +void finalize_line_buffer(Line_Buffer *line_buffer); +void set_line_buffer_timeout(Line_Buffer *line_buffer, int timeout); +void bind_file_to_line_buffer(Line_Buffer *line_buffer, int file); +int file_bound_to_line_buffer(Line_Buffer *line_buffer); +void discard_cache_in_line_buffer(Line_Buffer *line_buffer); +size_t cache_length_in_line_buffer(Line_Buffer *line_buffer); +ssize_t read_line_buffer(Line_Buffer *line_buffer, char *line, + size_t max_line_length); +ssize_t binary_read_line_buffer(Line_Buffer *line_buffer, char *stream, + size_t stream_length); +int skip_line_buffer(Line_Buffer *line_buffer); + +#endif /* not LINEBUF_H */ diff --git a/lib/ebu/ebu/linebuf.lo b/lib/ebu/ebu/linebuf.lo new file mode 100644 index 0000000..ffcbe5a --- /dev/null +++ b/lib/ebu/ebu/linebuf.lo @@ -0,0 +1,12 @@ +# linebuf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/linebuf.o' + +# Name of the non-PIC object +non_pic_object='linebuf.o' + diff --git a/lib/ebu/ebu/lock.c b/lib/ebu/ebu/lock.c new file mode 100644 index 0000000..faded3e --- /dev/null +++ b/lib/ebu/ebu/lock.c @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "defs.h" +#include "build-post.h" + +/* + * Examine whether built library supports Pthread. + */ +int +eb_pthread_enabled(void) +{ +#ifdef ENABLE_PTHREAD + return 1; +#else + return 0; +#endif +} + + +/* + * These functions are compiled only when ENABLE_PTHREAD is defined. + */ +#ifdef ENABLE_PTHREAD + +/* + * Ininialize a lock manager. + */ +void +eb_initialize_lock(EB_Lock *lock) +{ + pthread_mutex_init(&lock->lock_count_mutex, NULL); + pthread_mutex_init(&lock->entity_mutex, NULL); + lock->lock_count = 0; +} + + +/* + * Finalize a lock manager. + */ +void +eb_finalize_lock(EB_Lock *lock) +{ + /* Nothing to be done. */ +} + + +/* + * Lock an entity. + */ +void +eb_lock(EB_Lock *lock) +{ + pthread_mutex_lock(&lock->lock_count_mutex); + if (lock->lock_count == 0) + pthread_mutex_lock(&lock->entity_mutex); + lock->lock_count++; + pthread_mutex_unlock(&lock->lock_count_mutex); +} + + +/* + * Unlock an entity. + */ +void +eb_unlock(EB_Lock *lock) +{ + pthread_mutex_lock(&lock->lock_count_mutex); + if (0 < lock->lock_count) { + lock->lock_count--; + if (lock->lock_count == 0) + pthread_mutex_unlock(&lock->entity_mutex); + } + pthread_mutex_unlock(&lock->lock_count_mutex); +} + +#endif /* ENABLE_PTHREAD */ diff --git a/lib/ebu/ebu/lock.lo b/lib/ebu/ebu/lock.lo new file mode 100644 index 0000000..1f7cf27 --- /dev/null +++ b/lib/ebu/ebu/lock.lo @@ -0,0 +1,12 @@ +# lock.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/lock.o' + +# Name of the non-PIC object +non_pic_object='lock.o' + diff --git a/lib/ebu/ebu/log.c b/lib/ebu/ebu/log.c new file mode 100644 index 0000000..6c0d3ed --- /dev/null +++ b/lib/ebu/ebu/log.c @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "build-post.h" + +#include + + +/* + * Mutex. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Initialization flag. + */ +int eb_log_initialized = 0; + +/* + * Debug log flag. + */ +int eb_log_flag = 0; + +/* + * Pointer to log function. + */ +static void (*eb_log_function)(const char *message, va_list) = eb_log_stderr; + + +/* + * Initialize logging sub-system. + */ +void +eb_initialize_log(void) +{ + if (eb_log_initialized) + return; + + eb_log_flag = (getenv(EB_DEBUG_ENVIRONMENT_VARIABLE) != NULL); + eb_log_function = eb_log_stderr; + eb_log_initialized = 1; +} + +/* + * Set log function. + */ +void +eb_set_log_function(void (*function)(const char *message, va_list ap)) +{ + if (!eb_log_initialized) + eb_initialize_log(); + eb_log_function = function; +} + +/* + * Enable logging. + */ +void +eb_enable_log(void) +{ + if (!eb_log_initialized) + eb_initialize_log(); + eb_log_flag = 1; +} + +/* + * Disable logging. + */ +void +eb_disable_log(void) +{ + if (!eb_log_initialized) + eb_initialize_log(); + eb_log_flag = 0; +} + +/* + * Log a message. + */ +void +eb_log(const char *message, ...) +{ + va_list ap; + + va_start(ap, message); + + if (eb_log_flag && eb_log_function != NULL) + eb_log_function(message, ap); + + va_end(ap); +} + +/* + * Output a log message to standard error. + * This is the default log handler. + * + * Currently, this function doesn't work if the system lacks vprintf() + * and dopront(). + */ +void +eb_log_stderr(const char *message, va_list ap) +{ + pthread_mutex_lock(&log_mutex); + + fputs("[EB] ", stderr); + + vfprintf(stderr, message, ap); + fputc('\n', stderr); + fflush(stderr); + + pthread_mutex_unlock(&log_mutex); +} + +#define MAX_QUOTED_STREAM_LENGTH 100 + +/* + * Return Quoted printable string of `stream'. + */ +const char * +eb_quoted_stream(const char *stream, size_t stream_length) +{ + static char quoted_streams[EB_MAX_KEYWORDS][MAX_QUOTED_STREAM_LENGTH + 3]; + static int current_index = 0; + unsigned char *quoted_p; + const unsigned char *stream_p; + size_t quoted_length = 0; + int i; + + current_index = (current_index + 1) % EB_MAX_KEYWORDS; + quoted_p = (unsigned char *)quoted_streams[current_index]; + stream_p = (const unsigned char *)stream; + + if (stream == NULL) + return ""; + + for (i = 0; i < stream_length && *stream_p != '\0'; i++) { + if (0x20 <= *stream_p && *stream_p <= 0x7f && *stream_p != '=') { + if (MAX_QUOTED_STREAM_LENGTH < quoted_length + 1) { + *quoted_p++ = '.'; + *quoted_p++ = '.'; + break; + } + *quoted_p++ = *stream_p; + quoted_length++; + } else { + if (MAX_QUOTED_STREAM_LENGTH < quoted_length + 3) { + *quoted_p++ = '.'; + *quoted_p++ = '.'; + break; + } + *quoted_p++ = '='; + *quoted_p++ = "0123456789ABCDEF" [*stream_p / 0x10]; + *quoted_p++ = "0123456789ABCDEF" [*stream_p % 0x10]; + quoted_length += 3; + } + stream_p++; + } + + *quoted_p = '\0'; + return quoted_streams[current_index]; +} + + +/* + * Return Quoted printable string. + */ +const char * +eb_quoted_string(const char *string) +{ + return eb_quoted_stream(string, strlen(string)); +} diff --git a/lib/ebu/ebu/log.lo b/lib/ebu/ebu/log.lo new file mode 100644 index 0000000..3bd976b --- /dev/null +++ b/lib/ebu/ebu/log.lo @@ -0,0 +1,12 @@ +# log.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/log.o' + +# Name of the non-PIC object +non_pic_object='log.o' + diff --git a/lib/ebu/ebu/match.c b/lib/ebu/ebu/match.c new file mode 100644 index 0000000..c619083 --- /dev/null +++ b/lib/ebu/ebu/match.c @@ -0,0 +1,585 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "build-post.h" + +/* + * Compare `word' and `pattern'. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When `word' is equal to `pattern', or equal to the beginning of + * `pattern', 0 is returned. A positive or negateive integer is + * returned according as `pattern' is greater or less than `word'. + */ +int +eb_match_word(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_match_word(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + result = 0; + break; + } + + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_match_word() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' for pre-search. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When `word' is equal to `pattern', or equal to the beginning of + * `pattern', 0 is returned. A positive or negateive integer is + * returned according as `pattern' is greater or less than `word'. + */ +int +eb_pre_match_word(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_pre_match_word(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = 0; + break; + } + if (*word_p == '\0') { + result = 0; + break; + } + + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_pre_match_word() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When the word is equal to the pattern, 0 is returned. A positive or + * negateive integer is returned according as `pattern' is greater or + * less than `word'. + */ +int +eb_exact_match_word_jis(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_exact_match_word_jis(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + /* ignore spaces in the tail of the pattern */ + while (i < length && *pattern_p == '\0') { + pattern_p++; + i++; + } + result = (i - length); + break; + } + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_exact_match_word_jis() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208 for pre-search. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When the word is equal to the pattern, 0 is returned. A positive or + * negateive integer is returned according as `pattern' is greater or + * less than `word'. + */ +int +eb_exact_pre_match_word_jis(const char *word, const char *pattern, + size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_exact_pre_match_word_jis(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = 0; + break; + } + if (*word_p == '\0') { + /* ignore spaces in the tail of the pattern */ + while (i < length && *pattern_p == '\0') { + pattern_p++; + i++; + } + result = (i - length); + break; + } + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_exact_pre_match_word_jis() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in Latin1. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When the word is equal to the pattern, 0 is returned. A positive or + * negateive integer is returned according as `pattern' is greater or + * less than `word'. + */ +int +eb_exact_match_word_latin(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_exact_match_word_latin(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + /* ignore spaces in the tail of the pattern */ + while (i < length && (*pattern_p == ' ' || *pattern_p == '\0')) { + pattern_p++; + i++; + } + result = (i - length); + break; + } + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_exact_match_word_latin() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in Latin1 for pre-search. + * `word' must be terminated by `\0' and `pattern' is assumed to be + * `length' characters long. + * + * When the word is equal to the pattern, 0 is returned. A positive or + * negateive integer is returned according as `pattern' is greater or + * less than `word'. + */ +int +eb_exact_pre_match_word_latin(const char *word, const char *pattern, + size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + int result; + + LOG(("in: eb_exact_pre_match_word_latin(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = 0; + break; + } + if (*word_p == '\0') { + /* ignore spaces in the tail of the pattern */ + while (i < length && (*pattern_p == ' ' || *pattern_p == '\0')) { + pattern_p++; + i++; + } + result = (i - length); + break; + } + if (*word_p != *pattern_p) { + result = *word_p - *pattern_p; + break; + } + + word_p++; + pattern_p++; + i++; + } + + LOG(("out: eb_exact_pre_match_word_latin() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208. + * + * This function is equivalent to eb_match_word() except that this function + * ignores differences of kana (katakana and hiragana). The order of + * hiragana and katakana characters is: + * + * If `word' and `pattern' differ, the function compares their characters + * with the following rule: + * + * HIRAGANA `KA' < HIRAGANA `GA' < KATAKANA `KA' < KATAKANA `GA' + */ +int +eb_match_word_kana_group(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + unsigned char wc0, wc1, pc0, pc1; + int result; + + LOG(("in: eb_match_word_kana_group(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + result = 0; + break; + } + if (length <= i + 1 || *(word_p + 1) == '\0') { + result = *word_p - *pattern_p; + break; + } + + wc0 = *word_p; + wc1 = *(word_p + 1); + pc0 = *pattern_p; + pc1 = *(pattern_p + 1); + + if ((wc0 == 0x24 || wc0 == 0x25) && (pc0 == 0x24 || pc0 == 0x25)) { + if (wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } else { + if (wc0 != pc0 || wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } + word_p += 2; + pattern_p += 2; + i += 2; + } + + LOG(("out: eb_match_word_kana_group() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208. + * + * This function is equivalent to eb_match_word() except that this function + * ignores differences of kana (katakana and hiragana). The order of + * hiragana and katakana characters is: + * + * If `word' and `pattern' differ, the function compares their characters + * with the following rule: + * + * HIRAGANA `KA' == KATAKANA `KA' < HIRAGANA `GA' == KATAKANA `GA'. + */ +int +eb_match_word_kana_single(const char *word, const char *pattern, size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + unsigned char wc0, wc1, pc0, pc1; + int result; + + LOG(("in: eb_match_word_kana_single(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + result = 0; + break; + } + if (length <= i + 1 || *(word_p + 1) == '\0') { + result = *word_p - *pattern_p; + break; + } + + wc0 = *word_p; + wc1 = *(word_p + 1); + pc0 = *pattern_p; + pc1 = *(pattern_p + 1); + + if ((wc0 == 0x24 || wc0 == 0x25) && (pc0 == 0x24 || pc0 == 0x25)) { + if (wc1 != pc1) { + result = wc1 - pc1; + break; + } + } else { + if (wc0 != pc0 || wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } + word_p += 2; + pattern_p += 2; + i += 2; + } + + LOG(("out: eb_match_word_kana_single() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208. + * + * This function is equivalent to eb_exact_match_word_jis() except that + * this function ignores differences of kana (katakana and hiragana). + * + * If `word' and `pattern' differ, the function compares their characters + * with the following rule: + * + * HIRAGANA `KA' < HIRAGANA `GA' < KATAKANA `KA' < KATAKANA `GA' + */ +int +eb_exact_match_word_kana_group(const char *word, const char *pattern, + size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + unsigned char wc0, wc1, pc0, pc1; + int result; + + LOG(("in: eb_exact_match_word_kana_group(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + result = - *pattern_p; + break; + } + if (length <= i + 1 || *(word_p + 1) == '\0') { + result = *word_p - *pattern_p; + break; + } + wc0 = *word_p; + wc1 = *(word_p + 1); + pc0 = *pattern_p; + pc1 = *(pattern_p + 1); + + if ((wc0 == 0x24 || wc0 == 0x25) && (pc0 == 0x24 || pc0 == 0x25)) { + if (wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } else { + if (wc0 != pc0 || wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } + word_p += 2; + pattern_p += 2; + i += 2; + } + + LOG(("out: eb_exact_match_word_kana_group() = %d", result)); + return result; +} + + +/* + * Compare `word' and `pattern' in JIS X 0208. + * + * This function is equivalent to eb_exact_match_word_jis() except that + * this function ignores differences of kana (katakana and hiragana). + * The order of hiragana and katakana characters is: + * + * If `word' and `pattern' differ, the function compares their characters + * with the following rule: + * + * HIRAGANA `KA' == KATAKANA `KA' < HIRAGANA `GA' == KATAKANA `GA'. + */ +int +eb_exact_match_word_kana_single(const char *word, const char *pattern, + size_t length) +{ + int i = 0; + unsigned char *word_p = (unsigned char *)word; + unsigned char *pattern_p = (unsigned char *)pattern; + unsigned char wc0, wc1, pc0, pc1; + int result; + + LOG(("in: eb_exact_match_word_kana_single(word=%s, pattern=%s)", + eb_quoted_stream(word, EB_MAX_WORD_LENGTH), + eb_quoted_stream(pattern, length))); + + for (;;) { + if (length <= i) { + result = *word_p; + break; + } + if (*word_p == '\0') { + result = - *pattern_p; + break; + } + if (length <= i + 1 || *(word_p + 1) == '\0') { + result = *word_p - *pattern_p; + break; + } + wc0 = *word_p; + wc1 = *(word_p + 1); + pc0 = *pattern_p; + pc1 = *(pattern_p + 1); + + if ((wc0 == 0x24 || wc0 == 0x25) && (pc0 == 0x24 || pc0 == 0x25)) { + if (wc1 != pc1) { + result = wc1 - pc1; + break; + } + } else { + if (wc0 != pc0 || wc1 != pc1) { + result = ((wc0 << 8) + wc1) - ((pc0 << 8) + pc1); + break; + } + } + word_p += 2; + pattern_p += 2; + i += 2; + } + + LOG(("out: eb_exact_match_word_kana_single() = %d", result)); + return result; +} + + diff --git a/lib/ebu/ebu/match.lo b/lib/ebu/ebu/match.lo new file mode 100644 index 0000000..d973f42 --- /dev/null +++ b/lib/ebu/ebu/match.lo @@ -0,0 +1,12 @@ +# match.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/match.o' + +# Name of the non-PIC object +non_pic_object='match.o' + diff --git a/lib/ebu/ebu/menu.c b/lib/ebu/ebu/menu.c new file mode 100644 index 0000000..298be55 --- /dev/null +++ b/lib/ebu/ebu/menu.c @@ -0,0 +1,206 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `MENU SEARCH' + * or not. + */ +int +eb_have_menu(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_menu(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of menu search. + */ + if (book->subbook_current->menu.start_page == 0) + goto failed; + + LOG(("out: eb_have_menu() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_menu() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Menu. + */ +EB_Error_Code +eb_menu(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_menu(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of menu search. + */ + page = book->subbook_current->menu.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Copy the position to `position'. + */ + position->page = page; + position->offset = 0; + + LOG(("out: eb_menu(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_menu() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + +/* + * Examine whether the current subbook in `book' supports `GRAPHIC MENU SEARCH' + * or not. + */ +int +eb_have_image_menu(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_image_menu(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of graphic menu search. + */ + if (book->subbook_current->image_menu.start_page == 0) + goto failed; + + LOG(("out: eb_have_image_menu() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_image_menu() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Graphic Menu. + */ +EB_Error_Code +eb_image_menu(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_image_menu(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of graphic menu search. + */ + page = book->subbook_current->image_menu.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Copy the position to `position'. + */ + position->page = page; + position->offset = 0; + + LOG(("out: eb_image_menu(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_image_menu() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} diff --git a/lib/ebu/ebu/menu.lo b/lib/ebu/ebu/menu.lo new file mode 100644 index 0000000..645478a --- /dev/null +++ b/lib/ebu/ebu/menu.lo @@ -0,0 +1,12 @@ +# menu.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/menu.o' + +# Name of the non-PIC object +non_pic_object='menu.o' + diff --git a/lib/ebu/ebu/multi.c b/lib/ebu/ebu/multi.c new file mode 100644 index 0000000..45ffc93 --- /dev/null +++ b/lib/ebu/ebu/multi.c @@ -0,0 +1,844 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Get information about the current subbook. + */ +EB_Error_Code +eb_load_multi_searches(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Multi_Search *multi; + EB_Search *entry; + char buffer[EB_SIZE_PAGE]; + char *buffer_p; + int index_count; + int index_id; + int i, j, k; + + LOG(("in: eb_load_multi_searches(book=%d)", book->code)); + + subbook = book->subbook_current; + + for (i = 0, multi = subbook->multis; i < subbook->multi_count; + i++, multi++) { + /* + * Read the index table page of the multi search. + */ + if (zio_lseek(&subbook->text_zio, + ((off_t) multi->search.start_page - 1) * EB_SIZE_PAGE, SEEK_SET) + < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&subbook->text_zio, buffer, EB_SIZE_PAGE) + != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Get the number of entries in this multi search. + */ + multi->entry_count = eb_uint2(buffer); + if (EB_MAX_MULTI_SEARCHES <= multi->entry_count) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + buffer_p = buffer + 16; + for (j = 0, entry = multi->entries; + j < multi->entry_count; j++, entry++) { + /* + * Get the number of indexes in this entry, and title + * of this entry. + */ + index_count = eb_uint1(buffer_p); + strncpy(entry->label, buffer_p + 2, EB_MAX_MULTI_LABEL_LENGTH); + entry->label[EB_MAX_MULTI_LABEL_LENGTH] = '\0'; + eb_jisx0208_to_euc(entry->label, entry->label); + buffer_p += EB_MAX_MULTI_LABEL_LENGTH + 2; + + /* + * Initialize index page information of the entry. + */ + for (k = 0; k < index_count; k++) { + /* + * Get the index page information of the entry. + */ + index_id = eb_uint1(buffer_p); + switch (index_id) { + case 0x71: + case 0x91: + case 0xa1: + if (entry->start_page != 0 && entry->index_id != 0x71) + break; + entry->start_page = eb_uint4(buffer_p + 2); + entry->end_page = entry->start_page + + eb_uint4(buffer_p + 6) - 1; + entry->index_id = index_id; + entry->katakana = EB_INDEX_STYLE_ASIS; + entry->lower = EB_INDEX_STYLE_CONVERT; + entry->mark = EB_INDEX_STYLE_ASIS; + entry->long_vowel = EB_INDEX_STYLE_ASIS; + entry->double_consonant = EB_INDEX_STYLE_ASIS; + entry->contracted_sound = EB_INDEX_STYLE_ASIS; + entry->voiced_consonant = EB_INDEX_STYLE_ASIS; + entry->small_vowel = EB_INDEX_STYLE_ASIS; + entry->p_sound = EB_INDEX_STYLE_ASIS; + entry->space = EB_INDEX_STYLE_ASIS; + break; + case 0x01: + entry->candidates_page = eb_uint4(buffer_p + 2); + break; + } + buffer_p += 16; + } + } + } + + LOG(("out: eb_load_multi_searches() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_multi_searches() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Default multi search titles (written in JIS X 0208). + */ +static const char *default_multi_titles_jisx0208[] = { + "J#9g8!:w#1", /* Multi search 1. */ + "J#9g8!:w#2", /* Multi search 2. */ + "J#9g8!:w#3", /* Multi search 3. */ + "J#9g8!:w#4", /* Multi search 4. */ + "J#9g8!:w#5", /* Multi search 5. */ + "J#9g8!:w#6", /* Multi search 6. */ + "J#9g8!:w#7", /* Multi search 7. */ + "J#9g8!:w#8", /* Multi search 8. */ + "J#9g8!:w#9", /* Multi search 9. */ + "J#9g8!:w#1#0", /* Multi search 10. */ +}; + +/* + * Default multi search titles (written in ASCII, subset of ISO 8859-1). + */ +static const char *default_multi_titles_latin[] = { + "Multi search 1", + "Multi search 2", + "Multi search 3", + "Multi search 4", + "Multi search 5", + "Multi search 6", + "Multi search 7", + "Multi search 8", + "Multi search 9", + "Multi search 10", +}; + +/* + * Load multi search titles. + */ +EB_Error_Code +eb_load_multi_titles(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + char buffer[EB_SIZE_PAGE]; + int title_count; + char *title; + size_t offset; + int i; + + LOG(("in: eb_load_multi_searches(book=%d)", book->code)); + + subbook = book->subbook_current; + + /* + * Set default titles. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + for (i = 0; i < subbook->multi_count; i++) { + title = subbook->multis[i].title; + strcpy(title, default_multi_titles_latin[i]); + } + } else { + for (i = 0; i < subbook->multi_count; i++) { + title = subbook->multis[i].title; + strcpy(title, default_multi_titles_jisx0208[i]); + eb_jisx0208_to_euc(title, title); + } + } + + if (book->disc_code != EB_DISC_EPWING || subbook->search_title_page == 0) + goto succeeded; + + /* + * Read the page of the multi search. + */ + if (zio_lseek(&subbook->text_zio, + ((off_t) subbook->search_title_page - 1) * EB_SIZE_PAGE, SEEK_SET) + < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&subbook->text_zio, buffer, EB_SIZE_PAGE) != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + title_count = eb_uint2(buffer); + if (EB_MAX_SEARCH_TITLES < title_count) + title_count = EB_MAX_SEARCH_TITLES; + + /* + * We need titles for multi searches only. + * titles[ 0]: title for word and endword searches. + * titles[ 1]: title for keyword search. + * titles[ 2]: common title for all multi searches. + * (we don't need this) + * titles[ 3]: title for multi search 1. + * : + * titles[12]: title for multi search 10. + * titles[13]: title for menu search. + * + * The offset of titles[3] is: + * the number of entries(2bytes) + * + reserved 1 (68bytes) + * + title for word and endword searches (70bytes) + * + title for keyword search (70bytes) + * + common title for all multi searches (70bytes) + * + reserved 2 (70bytes) + * = 2 + 68 + 70 + 70 + 70 + 70 = 350 + */ + for (i = 4, offset = 350; i < EB_MAX_SEARCH_TITLES; i++, offset += 70) { + if (subbook->multi_count <= i - 4) + break; + if (eb_uint2(buffer + offset) != 0x02) + continue; + + /* + * Each titles[] consists of + * parameter (2bytes) + * short title (16bytes) + * long title (32bytes) + * We get long title rather than short one. + */ + title = subbook->multis[i - 4].title; + strncpy(title, buffer + offset + 2 + 16, EB_MAX_MULTI_TITLE_LENGTH); + title[EB_MAX_MULTI_TITLE_LENGTH] = '\0'; + eb_jisx0208_to_euc(title, title); + } + +succeeded: + LOG(("out: eb_load_multi_titles() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_multi_titles() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Examine whether the current subbook in `book' supports `MULTI SEARCH' + * or not. + */ +int +eb_have_multi_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_multi_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + if (book->subbook_current->multi_count == 0) + goto failed; + + LOG(("out: eb_have_multi_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_multi_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Return a title of the multi search `multi_id'. + */ +EB_Error_Code +eb_multi_title(EB_Book *book, EB_Multi_Search_Code multi_id, char *title) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + + eb_lock(&book->lock); + LOG(("in: eb_multi_title(book=%d, multi_id=%d)", + (int)book->code, (int)multi_id)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * `multi_id' must be a valid code. + */ + if (multi_id < 0 || subbook->multi_count <= multi_id) { + error_code = EB_ERR_NO_SUCH_MULTI_ID; + goto failed; + } + + strcpy(title, subbook->multis[multi_id].title); + + LOG(("out: eb_multi_title(title=%s) = %s", title, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *title = '\0'; + LOG(("out: eb_multi_title() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a list of multi search ids in `book'. + */ +EB_Error_Code +eb_multi_search_list(EB_Book *book, EB_Multi_Search_Code *search_list, + int *search_count) +{ + EB_Error_Code error_code; + EB_Subbook_Code *list_p; + int i; + + eb_lock(&book->lock); + LOG(("in: eb_multi_search_list(book=%d)", (int)book->code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + *search_count = book->subbook_current->multi_count; + for (i = 0, list_p = search_list; i < *search_count; i++, list_p++) + *list_p = i; + + LOG(("out: eb_multi_search_list(search_count=%d) = %s", *search_count, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *search_count = 0; + LOG(("out: eb_multi_search_list() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return the number of entries that the multi search `multi_id' in `book'. + */ +EB_Error_Code +eb_multi_entry_count(EB_Book *book, EB_Multi_Search_Code multi_id, + int *entry_count) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_multi_entry_count(book=%d, multi_id=%d)", (int)book->code, + (int)multi_id)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * `multi_id' must be a valid code. + */ + if (multi_id < 0 || book->subbook_current->multi_count <= multi_id) { + error_code = EB_ERR_NO_SUCH_MULTI_ID; + goto failed; + } + + *entry_count = book->subbook_current->multis[multi_id].entry_count; + + LOG(("out: eb_multi_entry_count(entry_count=%d) = %s", (int)*entry_count, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *entry_count = 0; + LOG(("out: eb_multi_entry_count() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a list of entries that the multi search `multi_id' in `book' has. + * (Legacy function) + */ +EB_Error_Code +eb_multi_entry_list(EB_Book *book, EB_Multi_Search_Code multi_id, + int *entry_list, int *entry_count) +{ + EB_Error_Code error_code; + EB_Subbook_Code *list_p; + int i; + + error_code = eb_multi_entry_count(book, multi_id, entry_count); + if (error_code != EB_SUCCESS) + return error_code; + + for (i = 0, list_p = entry_list; i < *entry_count; i++, list_p++) + *list_p = i; + + return EB_SUCCESS; +} + + +/* + * Return a lable of the entry `entry_index' in the multi search `multi_id'. + */ +EB_Error_Code +eb_multi_entry_label(EB_Book *book, EB_Multi_Search_Code multi_id, + int entry_index, char *label) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + + eb_lock(&book->lock); + LOG(("in: eb_multi_entry_label(book=%d, multi_id=%d, entry_index=%d)", + (int)book->code, (int)multi_id, entry_index)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Current subbook must have been set. + */ + subbook = book->subbook_current; + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * `multi_id' must be a valid code. + */ + if (multi_id < 0 || subbook->multi_count <= multi_id) { + error_code = EB_ERR_NO_SUCH_MULTI_ID; + goto failed; + } + + /* + * `entry_index' must be a valid code. + */ + if (entry_index < 0 + || subbook->multis[multi_id].entry_count <= entry_index) { + error_code = EB_ERR_NO_SUCH_ENTRY_ID; + goto failed; + } + + strcpy(label, subbook->multis[multi_id].entries[entry_index].label); + + LOG(("out: eb_multi_entry_label(label=%s) = %s", label, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *label = '\0'; + LOG(("out: eb_multi_entry_label() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Whether the entry `entry_index' in the multi search `multi_id' has + * candidates or not. + */ +int +eb_multi_entry_have_candidates(EB_Book *book, EB_Multi_Search_Code multi_id, + int entry_index) +{ + EB_Multi_Search *multi; + + eb_lock(&book->lock); + LOG(("in: eb_multi_entry_have_candidates(book=%d, multi_id=%d, \ +entry_index=%d)", + (int)book->code, (int)multi_id, entry_index)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) + goto failed; + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * `multi_id' must be a valid code. + */ + if (multi_id < 0 || book->subbook_current->multi_count <= multi_id) + goto failed; + + /* + * `entry_index' must be a valid code. + */ + multi = book->subbook_current->multis + multi_id; + if (entry_index < 0 || multi->entry_count <= entry_index) + goto failed; + + if (multi->entries[entry_index].candidates_page == 0) + goto failed; + + LOG(("out: eb_multi_entry_have_candidates() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_multi_entry_have_candidates() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Return a position of candidates for the entry `entry_index' in the multi + * search `multi_id'. + */ +EB_Error_Code +eb_multi_entry_candidates(EB_Book *book, EB_Multi_Search_Code multi_id, + int entry_index, EB_Position *position) +{ + EB_Error_Code error_code; + EB_Multi_Search *multi; + + eb_lock(&book->lock); + LOG(("in: eb_multi_entry_candidates(book=%d, multi_id=%d, entry_index=%d)", + (int)book->code, (int)multi_id, entry_index)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * `multi_id' must be a valid code. + */ + if (multi_id < 0 || book->subbook_current->multi_count <= multi_id) { + error_code = EB_ERR_NO_SUCH_MULTI_ID; + goto failed; + } + + /* + * `entry_index' must be a valid code. + */ + multi = book->subbook_current->multis + multi_id; + if (entry_index < 0 || multi->entry_count <= entry_index) { + error_code = EB_ERR_NO_SUCH_ENTRY_ID; + goto failed; + } + + if (multi->entries[entry_index].candidates_page == 0) { + error_code = EB_ERR_NO_CANDIDATES; + goto failed; + } + + position->page = multi->entries[entry_index].candidates_page; + position->offset = 0; + + LOG(("out: eb_multi_entry_candidates(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_multi_entry_candidates() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Multi search. + */ +EB_Error_Code +eb_search_multi(EB_Book *book, EB_Multi_Search_Code multi_id, + const char * const input_words[]) +{ + EB_Error_Code error_code; + EB_Search_Context *context; + EB_Search *entry; + EB_Word_Code word_code; + int word_count; + int i; + + eb_lock(&book->lock); + LOG(("in: eb_search_multi(book=%d, multi_id=%d, input_words=[below])", + (int)book->code, (int)multi_id)); + + if (eb_log_flag) { + for (i = 0; i < EB_MAX_KEYWORDS && input_words[i] != NULL; i++) { + LOG((" input_words[%d]=%s", i, + eb_quoted_string(input_words[i]))); + } + LOG((" input_words[%d]=NULL", i)); + } + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check whether the current subbook has keyword search. + */ + if (multi_id < 0 || book->subbook_current->multi_count <= multi_id) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Attach a search context for each keyword, and pre-search the + * keywords. + */ + eb_reset_search_contexts(book); + word_count = 0; + + for (i = 0, entry = book->subbook_current->multis[multi_id].entries; + i < book->subbook_current->multis[multi_id].entry_count; + i++, entry++) { + + if (input_words[i] == NULL) + break; + + /* + * Initialize search context. + */ + context = book->search_contexts + word_count; + context->code = EB_SEARCH_MULTI; + + /* + * Choose comparison functions. + */ + if (entry->candidates_page == 0) { + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word; + } else { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word_kana_group; + } + } else { + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_exact_pre_match_word_latin; + context->compare_single = eb_exact_match_word_latin; + context->compare_group = eb_exact_match_word_latin; + } else { + context->compare_pre = eb_exact_pre_match_word_jis; + context->compare_single = eb_exact_match_word_jis; + context->compare_group = eb_exact_match_word_kana_group; + } + } + context->page = entry->start_page; + if (context->page == 0) + continue; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_words[i]'. + */ + error_code = eb_set_multiword(book, multi_id, i, input_words[i], + context->word, context->canonicalized_word, &word_code); + if (error_code == EB_ERR_EMPTY_WORD) + continue; + else if (error_code != EB_SUCCESS) + goto failed; + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + word_count++; + } + if (word_count == 0) { + error_code = EB_ERR_NO_WORD; + goto failed; + } else if (book->subbook_current->multis[multi_id].entry_count <= i + && input_words[i] != NULL) { + error_code = EB_ERR_TOO_MANY_WORDS; + goto failed; + } + + /* + * Set `EB_SEARCH_NONE' to the rest unused search context. + */ + for (i = word_count; i < EB_MAX_KEYWORDS; i++) + (book->search_contexts + i)->code = EB_SEARCH_NONE; + + LOG(("out: eb_search_multi() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_multi() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/multi.lo b/lib/ebu/ebu/multi.lo new file mode 100644 index 0000000..7d158d4 --- /dev/null +++ b/lib/ebu/ebu/multi.lo @@ -0,0 +1,12 @@ +# multi.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/multi.o' + +# Name of the non-PIC object +non_pic_object='multi.o' + diff --git a/lib/ebu/ebu/multiplex.c b/lib/ebu/ebu/multiplex.c new file mode 100644 index 0000000..617e8e3 --- /dev/null +++ b/lib/ebu/ebu/multiplex.c @@ -0,0 +1,970 @@ +/* + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#include +#include +#endif + +#ifdef HAVE_NET_IF_H +#include +#endif + +#include "build-pre.h" +#include "eb.h" +#include "build-post.h" +#include "dummyin6.h" + +#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO) +#include "getaddrinfo.h" +#endif + +#include "ebnet.h" + +#ifndef IF_NAMESIZE +#ifdef IFNAMSIZ +#define IF_NAMESIZE IFNAMSIZ +#else +#define IF_NAMESIZE 16 +#endif +#endif + +#ifndef AI_NUMERICHOST +#define AI_NUMERICHOST 0 +#endif +#ifndef NI_WITHSCOPEID +#define NI_WITHSCOPEID 0 +#endif + +#ifdef ENABLE_WINSOCK2 +#define close closesocket +#endif + +/* + * Maximum length (including NUL) of a TCP/UDP port number string. + */ +#define IN_PORTSTRLEN 6 + +/* + * Socket entry pool. + */ +typedef struct EBNet_Socket_Entry_Struct EBNet_Socket_Entry; +struct EBNet_Socket_Entry_Struct { + /* IPv6 or IPv4 Address of peer */ + char address[INET6_ADDRSTRLEN + IF_NAMESIZE]; + + /* destination port */ + in_port_t port; + + /* socket file */ + int file; + + /* reference count of the entry */ + int reference_count; + + /* object ID of the entry */ + int reference_id; + + /* lost synchronization flag */ + int lost_sync; + + /* next and previous entries. */ + EBNet_Socket_Entry *next; + EBNet_Socket_Entry *back; + + /* book name */ + char book_name[EBNET_MAX_BOOK_NAME_LENGTH + 1]; + + /* file path */ + char file_path[EB_MAX_RELATIVE_PATH_LENGTH + 1]; + + /* current file pointer */ + off_t offset; + + /* file size */ + off_t file_size; +}; + +static EBNet_Socket_Entry *ebnet_socket_entries; +static EBNet_Socket_Entry *ebnet_socket_entry_cache; + +/* + * Host name information cache. + */ +typedef struct { + /* hostname or IP address */ + char *host; + + /* IPv6 address of `host' */ + char ipv6_address[INET6_ADDRSTRLEN + IF_NAMESIZE]; + + /* IPv4 address of `host' */ + char ipv4_address[INET_ADDRSTRLEN]; +} EBNet_Host_Info; + +static EBNet_Host_Info ebnet_host_info_cache; + + +/* + * Hello and Bye hooks. + * + * The multiplex module invokes the hello hook each time it establish + * a new connection with a server, and invokes the bye hook each time + * it closes a last socket connected with a server. + */ +static int (*hello_hook)(int file); +static int (*bye_hook)(int file); + +/* + * Unexported functions. + */ +static void ebnet_get_addresses(const char *host, char *ipv6_address, + char *ipv4_address); +static EBNet_Socket_Entry *ebnet_find_multiplex_entry(const char *ipv6_address, + const char *ipv4_address, int port, int family); +static int ebnet_create_new_connection(const char *address, int port); +static void ebnet_add_socket_entry(EBNet_Socket_Entry *new_entry); +static void ebnet_delete_socket_entry(EBNet_Socket_Entry *target_entry); +static EBNet_Socket_Entry *ebnet_find_socket_entry(int file); + + +/* + * Initialize the multiplex module. + */ +void +ebnet_initialize_multiplex(void) +{ + ebnet_socket_entries = NULL; + ebnet_socket_entry_cache = NULL; + + ebnet_host_info_cache.host = NULL; + ebnet_host_info_cache.ipv6_address[0] = '\0'; + ebnet_host_info_cache.ipv4_address[0] = '\0'; + + hello_hook = NULL; + bye_hook = NULL; +} + + +/* + * Finalize the multiplex module. + */ +void +ebnet_finalize(void) +{ + while (ebnet_socket_entries != NULL) { + close(ebnet_socket_entries->file); + ebnet_delete_socket_entry(ebnet_socket_entries); + } + + ebnet_socket_entries = NULL; + ebnet_socket_entry_cache = NULL; + + if (ebnet_host_info_cache.host != NULL) + free(ebnet_host_info_cache.host); +} + + +/* + * Set hello hook. + */ +void +ebnet_set_hello_hook(int (*hook)(int file)) +{ + hello_hook = hook; +} + + +/* + * Set bye hook. + */ +void +ebnet_set_bye_hook(int (*hook)(int file)) +{ + bye_hook = hook; +} + + +/* + * Create a socket connected with a server. + * + * `host' is a host name or an IP address of the server. `port' is + * destination port number of the TCP connection. `family' is protocol + * family: PF_INET, PF_INET6 or PF_UNSPEC. + * + * Upon success, file descriptor of the socket is returned. + * Otherwise -1 is returned. + * + * If there has been a socket entry in `ebnet_socket_entries' which is + * connected with the server, this function simply duplicates the socket. + */ +int +ebnet_connect_socket(const char *host, int port, int family) +{ + char ipv6_address[INET6_ADDRSTRLEN + IF_NAMESIZE]; + char ipv4_address[INET_ADDRSTRLEN]; + EBNet_Socket_Entry *multiplex_entry = NULL; + EBNet_Socket_Entry *new_entry = NULL; + int new_file = -1; + + /* + * Get IP addresses of `host'. + */ + *ipv6_address = '\0'; + *ipv4_address = '\0'; + ebnet_get_addresses(host, ipv6_address, ipv4_address); + + switch (family) { + case PF_UNSPEC: + if (*ipv6_address == '\0' && *ipv4_address == '\0') + goto failed; + break; + + case PF_INET6: + if (*ipv6_address == '\0') + goto failed; + break; + + case PF_INET: + if (*ipv4_address == '\0') + goto failed; + break; + } + + /* + * Search `ebnet_socket_entries' for a connection entry with + * the server. + */ + multiplex_entry = ebnet_find_multiplex_entry(ipv6_address, ipv4_address, + port, family); + + /* + * Create a socket entry. + */ + new_entry = (EBNet_Socket_Entry *)malloc(sizeof(EBNet_Socket_Entry)); + if (new_entry == NULL) + goto failed; + + new_entry->address[0] = '\0'; + new_entry->port = port; + new_entry->file = -1; + new_entry->reference_count = 1; + new_entry->reference_id = -1; + new_entry->lost_sync = 0; + new_entry->next = NULL; + new_entry->back = NULL; + new_entry->book_name[0] = '\0'; + new_entry->file_path[0] = '\0'; + new_entry->offset = 0; + new_entry->file_size = 0; + + if (multiplex_entry != NULL) { + /* + * There is an IPv6 or IPv4 socket with the server. + * Duplicate the socket entry. + */ +#ifndef ENABLE_WINSOCK2 + new_file = dup(multiplex_entry->file); +#else /* ENABLE_WINSOCK2 */ + { + WSAPROTOCOL_INFO info; + + if (WSADuplicateSocket(multiplex_entry->file, + GetCurrentProcessId(), &info) != 0) + goto failed; + new_file = WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, + FROM_PROTOCOL_INFO, &info, 0, 0); + } +#endif /* ENABLE_WINSOCK2 */ + if (new_file < 0) + goto failed; + + strcpy(new_entry->address, multiplex_entry->address); + new_entry->file = new_file; + new_entry->reference_count = multiplex_entry->reference_count; + new_entry->reference_id = multiplex_entry->reference_id; + + } else { + /* + * There is no socket connected with the server. + * Establish a connection with the server. + */ + do { + if ((family == PF_INET6 || family == PF_UNSPEC) + && *ipv6_address != '\0') { + new_file = ebnet_create_new_connection(ipv6_address, port); + if (0 <= new_file) { + strcpy(new_entry->address, ipv6_address); + new_entry->file = new_file; + new_entry->reference_id = new_file; + break; + } + } + if ((family == PF_INET || family == PF_UNSPEC) + && *ipv4_address != '\0') { + new_file = ebnet_create_new_connection(ipv4_address, port); + if (0 <= new_file) { + strcpy(new_entry->address, ipv4_address); + new_entry->file = new_file; + new_entry->reference_id = new_file; + break; + } + } + goto failed; + + } while (0); + + } + + /* + * Add the entry to `ebnet_socket_entries'. + */ + ebnet_add_socket_entry(new_entry); + + /* + * Say hello. + */ + if (multiplex_entry == NULL && hello_hook != NULL) { + if (hello_hook(new_file) < 0) + goto failed; + } + + return new_file; + + /* + * An error occurs... + */ + failed: + if (new_entry != NULL) { + if (ebnet_find_socket_entry(new_file) != NULL) + ebnet_delete_socket_entry(new_entry); + else + free(new_entry); + } + if (new_file >= 0) + close(new_file); + return -1; +} + + +/* + * Get IPv6 and IPv4 addresses of `host'. + * + * `host' may be either an host name or an IP address. + * If `host' has an IPv6 address, the address is written on `ipv6_address'. + * Otherwise an empty string is written. + * If `host' has an IPv4 address, the address is written on `ipv4_address'. + * Otherwise an empty string is written. + */ +static void +ebnet_get_addresses(const char *host, char *ipv6_address, char *ipv4_address) +{ + struct addrinfo hints; + struct addrinfo *info_list = NULL; + struct addrinfo *info; + char dummy_service[IN_PORTSTRLEN]; + int gai_error; + + *ipv6_address = '\0'; + *ipv4_address = '\0'; + + /* + * Look up `ebnet_host_info_cache'. + */ + if (ebnet_host_info_cache.host != NULL + && strcmp(ebnet_host_info_cache.host, host) == 0) { + strcpy(ipv6_address, ebnet_host_info_cache.ipv6_address); + strcpy(ipv4_address, ebnet_host_info_cache.ipv4_address); + return; + } + + /* + * Get IP addresses using getaddrinfo(). + */ + hints.ai_flags = 0; + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + hints.ai_addrlen = 0; + hints.ai_canonname = NULL; + hints.ai_addr = NULL; + hints.ai_next = NULL; + + gai_error = getaddrinfo(host, EBNET_DEFAULT_PORT, &hints, &info_list); + if (gai_error != 0) + return; + + for (info = info_list; info != NULL; info = info->ai_next) { + if (info->ai_family != PF_INET6) + continue; + gai_error = getnameinfo(info->ai_addr, info->ai_addrlen, + ipv6_address, INET6_ADDRSTRLEN + IF_NAMESIZE, + dummy_service, sizeof(dummy_service), + NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID); +#if NI_WITHSCOPEID != 0 + if (gai_error != 0) { + gai_error = getnameinfo(info->ai_addr, info->ai_addrlen, + ipv6_address, INET6_ADDRSTRLEN + IF_NAMESIZE, + dummy_service, sizeof(dummy_service), + NI_NUMERICHOST | NI_NUMERICSERV); + } +#endif + if (gai_error == 0) + break; + *ipv6_address = '\0'; + } + + for (info = info_list; info != NULL; info = info->ai_next) { + if (info->ai_family != PF_INET) + continue; + gai_error = getnameinfo(info->ai_addr, info->ai_addrlen, + ipv4_address, INET_ADDRSTRLEN, + dummy_service, sizeof(dummy_service), + NI_NUMERICHOST | NI_NUMERICSERV); + if (gai_error == 0) + break; + *ipv4_address = '\0'; + } + + freeaddrinfo(info_list); + + /* + * Update `ebnet_host_info_cache'. + */ + if (ebnet_host_info_cache.host != NULL) { + free(ebnet_host_info_cache.host); + ebnet_host_info_cache.host = NULL; + } + ebnet_host_info_cache.host = malloc(strlen(host) + 1); + if (ebnet_host_info_cache.host != NULL) { + strcpy(ebnet_host_info_cache.host, host); + strcpy(ebnet_host_info_cache.ipv6_address, ipv6_address); + strcpy(ebnet_host_info_cache.ipv4_address, ipv4_address); + } + + return; +} + + +/* + * Find `ebnet_socket_entries' for a socket entry which matches with + * port, family and either `ipv6_address' or `ipv4_address'. + * + * If found, the function returns the entry. Otherwise it returns NULL. + */ +static EBNet_Socket_Entry * +ebnet_find_multiplex_entry(const char *ipv6_address, const char *ipv4_address, + int port, int family) +{ + EBNet_Socket_Entry *entry; + + /* + * Inspect `ebnet_socket_entry_cache'. + */ + if (ebnet_socket_entry_cache != NULL + && (family == PF_INET6 || family == PF_UNSPEC) + && strcasecmp(ebnet_socket_entry_cache->address, ipv6_address) == 0 + && ebnet_socket_entry_cache->port == port + && !ebnet_socket_entry_cache->lost_sync) { + return ebnet_socket_entry_cache; + } + if (ebnet_socket_entry_cache != NULL + && (family == PF_INET || family == PF_UNSPEC) + && strcasecmp(ebnet_socket_entry_cache->address, ipv4_address) == 0 + && ebnet_socket_entry_cache->port == port + && !ebnet_socket_entry_cache->lost_sync) { + return ebnet_socket_entry_cache; + } + + /* + * Then inspect entires in `ebnet_socket_entries'. + */ + for (entry = ebnet_socket_entries; entry != NULL; entry = entry->next) { + if ((family == PF_INET6 || family == PF_UNSPEC) + && strcasecmp(entry->address, ipv6_address) == 0 + && entry->port == port + && !entry->lost_sync) { + ebnet_socket_entry_cache = entry; + return entry; + } + if ((family == PF_INET || family == PF_UNSPEC) + && strcasecmp(entry->address, ipv4_address) == 0 + && entry->port == port + && !entry->lost_sync) { + ebnet_socket_entry_cache = entry; + return entry; + } + } + + return NULL; +} + + +/* + * Establish a TCP connection with an EBNET server. + * + * `host' is a host name or an IP address of the server. `port' is + * destination port number of the TCP connection. + * + * Upon success, file descriptor of the socket is returned. + * Otherwise -1 is returned. + */ +static int +ebnet_create_new_connection(const char *address, int port) +{ + struct addrinfo hints; + struct addrinfo *info_list = NULL; + int new_file = -1; + int gai_error; + char port_string[IN_PORTSTRLEN]; +#ifdef O_NONBLOCK + int file_flags; +#endif + + if (port < 0 || 65535 < port) + goto failed; + sprintf(port_string, "%d", port); + + hints.ai_flags = AI_NUMERICHOST; + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = 0; + hints.ai_addrlen = 0; + hints.ai_canonname = NULL; + hints.ai_addr = NULL; + hints.ai_next = NULL; + + gai_error = getaddrinfo(address, port_string, &hints, &info_list); + if (gai_error != 0) + goto failed; + + new_file = socket(info_list->ai_addr->sa_family, SOCK_STREAM, 0); + if (new_file < 0) + goto failed; + if (connect(new_file, info_list->ai_addr, info_list->ai_addrlen) < 0) + goto failed; + +#ifdef O_NONBLOCK + file_flags = fcntl(new_file, F_GETFL, 0); + if (file_flags >= 0) + fcntl(new_file, F_SETFL, file_flags | O_NONBLOCK); +#endif + + freeaddrinfo(info_list); + + return new_file; + + /* + * An error occurs... + */ + failed: + if (info_list != NULL) + freeaddrinfo(info_list); + if (new_file >= 0) + close(new_file); + return -1; +} + + +/* + * Add `new_entry' to `ebnet_socket_entries'. + */ +static void +ebnet_add_socket_entry(EBNet_Socket_Entry *new_entry) +{ + EBNet_Socket_Entry *entry; + int reference_count; + + /* + * Increment reference counts. + */ + reference_count = 1; + for (entry = ebnet_socket_entries; entry != NULL; entry = entry->next) { + if (entry->reference_id == new_entry->reference_id) { + entry->reference_count++; + reference_count = entry->reference_count; + } + } + + new_entry->reference_count = reference_count; + + /* + * Add `new_entry' to `ebnet_socket_entries'. + */ + if (ebnet_socket_entries != NULL) + ebnet_socket_entries->back = new_entry; + new_entry->back = NULL; + new_entry->next = ebnet_socket_entries; + ebnet_socket_entries = new_entry; + + ebnet_socket_entry_cache = new_entry; +} + + +/* + * Delete `target_entry' from `ebnet_socket_entries'. + */ +static void +ebnet_delete_socket_entry(EBNet_Socket_Entry *target_entry) +{ + EBNet_Socket_Entry *entry; + int new_reference_id; + + if (ebnet_socket_entry_cache == target_entry) + ebnet_socket_entry_cache = NULL; + + /* + * Delete `target_entry' from `ebnet_socket_entries'. + */ + if (target_entry->next != NULL) + target_entry->next->back = target_entry->back; + if (target_entry->back != NULL) + target_entry->back->next = target_entry->next; + if (target_entry == ebnet_socket_entries) + ebnet_socket_entries = ebnet_socket_entries->next; + + /* + * Decrement reference counts and update reference ID. + */ + entry = ebnet_socket_entries; + while (entry != NULL) { + if (entry->reference_id == target_entry->reference_id) { + new_reference_id = entry->file; + break; + } + entry = entry->next; + } + while (entry != NULL) { + if (entry->reference_id == target_entry->reference_id) { + entry->reference_id = new_reference_id; + entry->reference_count--; + } + entry = entry->next; + } + + /* + * Dispose `target_entry'. + */ + free(target_entry); +} + + +/* + * Disconnect with a server. + */ +void +ebnet_disconnect_socket(int file) +{ + EBNet_Socket_Entry *entry; + + /* + * Search `ebnet_socket_entries' for a connection entry with `file'. + */ + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return; + + /* + * Say good bye and close the connection. + */ + if (entry->reference_count == 1 && !entry->lost_sync && bye_hook != NULL) + bye_hook(entry->file); + + close(entry->file); + ebnet_delete_socket_entry(entry); +} + + +/* + * Reconnect `file'. + * It returns `file' upon success, -1 otherwise. + */ +int +ebnet_reconnect_socket(int file) +{ + EBNet_Socket_Entry *old_entry; + EBNet_Socket_Entry *new_entry = NULL; + int new_file; + + /* + * Search `ebnet_socket_entries' for a connection entry with `file'. + */ + old_entry = ebnet_find_socket_entry(file); + if (old_entry == NULL) + goto failed; + + /* + * Say good bye. + */ + if (old_entry->reference_count == 1 && !old_entry->lost_sync + && bye_hook != NULL) + bye_hook(old_entry->file); + + /* + * Establish a new connection with the server. + */ + ebnet_set_lost_sync(file); + new_file = ebnet_connect_socket(old_entry->address, old_entry->port, + PF_UNSPEC); + if (new_file < 0) + goto failed; + + new_entry = ebnet_find_socket_entry(new_file); + if (new_entry == NULL) + goto failed; + + /* + * Replace `old_entry' by `new_entry'. + */ + strcpy(new_entry->book_name, old_entry->book_name); + strcpy(new_entry->file_path, old_entry->file_path); + new_entry->offset = old_entry->offset; + new_entry->file_size = old_entry->file_size; + + ebnet_delete_socket_entry(old_entry); + +#ifndef ENABLE_WINSOCK2 + if (dup2(new_entry->file, file) < 0) + goto failed; + close(new_entry->file); + + if (new_entry->reference_id == new_entry->file) + new_entry->reference_id = file; + new_entry->file = file; +#else + close(file); +#endif + + return new_entry->file; + + /* + * An error occurs... + */ + failed: + if (new_entry != NULL && new_entry->file != file) + ebnet_disconnect_socket(new_entry->file); + return -1; +} + + +/* + * Mark files as lost-synchronization. + * + * Socket entries in `ebnet_socket_entries' which has the same reference + * ID as `file' are marked as lost-synchronization. + * The function doesn't close the files, but ebnet_connect_socket() + * doesn't duplicate lost-synchronized files. + */ +int +ebnet_set_lost_sync(int file) +{ + EBNet_Socket_Entry *entry; + int reference_id; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + reference_id = entry->reference_id; + + for (entry = ebnet_socket_entries; entry != NULL; entry = entry->next) { + if (entry->reference_id == reference_id) + entry->lost_sync = 1; + } + + return 0; +} + + +/* + * Search `ebnet_socket_entries' for a connection entry with `file'. + */ +static EBNet_Socket_Entry * +ebnet_find_socket_entry(int file) +{ + EBNet_Socket_Entry *entry; + + if (ebnet_socket_entry_cache != NULL + && ebnet_socket_entry_cache->file == file) + return ebnet_socket_entry_cache; + + for (entry = ebnet_socket_entries; entry != NULL; entry = entry->next) { + if (entry->file == file) { + ebnet_socket_entry_cache = entry; + return entry; + } + } + + return NULL; +} + + +/* + * Set book name associated with `file'. + */ +int +ebnet_set_book_name(int file, const char *book_name) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + strncpy(entry->book_name, book_name, EBNET_MAX_BOOK_NAME_LENGTH + 1); + *(entry->book_name + EBNET_MAX_BOOK_NAME_LENGTH) = '\0'; + + return 0; +} + + +/* + * Get book name associated with `file'. + */ +const char * +ebnet_get_book_name(int file) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return NULL; + + return entry->book_name; +} + + +/* + * Set book name associated with `file'. + */ +int +ebnet_set_file_path(int file, const char *file_path) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + strncpy(entry->file_path, file_path, EB_MAX_RELATIVE_PATH_LENGTH + 1); + *(entry->file_path + EB_MAX_RELATIVE_PATH_LENGTH + 1) = '\0'; + + return 0; +} + + +/* + * Get file path associated with `file'. + */ +const char * +ebnet_get_file_path(int file) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return NULL; + + return entry->file_path; +} + + +/* + * Set file offset. + */ +int +ebnet_set_offset(int file, off_t offset) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + entry->offset = offset; + return 0; +} + + +/* + * Get file offset. + */ +off_t +ebnet_get_offset(int file) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + return entry->offset; +} + + +/* + * Set file size. + */ +int +ebnet_set_file_size(int file, off_t file_size) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + entry->file_size = file_size; + return 0; +} + + +/* + * Get file size. + */ +off_t +ebnet_get_file_size(int file) +{ + EBNet_Socket_Entry *entry; + + entry = ebnet_find_socket_entry(file); + if (entry == NULL) + return -1; + + return entry->file_size; +} + + diff --git a/lib/ebu/ebu/multiplex.lo b/lib/ebu/ebu/multiplex.lo new file mode 100644 index 0000000..6113bd7 --- /dev/null +++ b/lib/ebu/ebu/multiplex.lo @@ -0,0 +1,12 @@ +# multiplex.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/multiplex.o' + +# Name of the non-PIC object +non_pic_object='multiplex.o' + diff --git a/lib/ebu/ebu/narwalt.c b/lib/ebu/ebu/narwalt.c new file mode 100644 index 0000000..eb07991 --- /dev/null +++ b/lib/ebu/ebu/narwalt.c @@ -0,0 +1,628 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_narrow_character_text_jis(EB_Appendix *appendix, + int character_number, char *text); +static EB_Error_Code eb_narrow_character_text_latin(EB_Appendix *appendix, + int character_number, char *text); + +/* + * Hash macro for cache data. + */ +#define EB_HASH_ALT_CACHE(c) ((c) & 0x0f) + + +/* + * Examine whether the current subbook in `book' has a narrow font + * alternation or not. + */ +int +eb_have_narrow_alt(EB_Appendix *appendix) +{ + eb_lock(&appendix->lock); + LOG(("in: eb_have_narrow_alt(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) + goto failed; + + if (appendix->subbook_current->narrow_page == 0) + goto failed; + + LOG(("out: eb_have_narrow_alt() = %d", 1)); + eb_unlock(&appendix->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_narrow_alt() = %d", 0)); + eb_unlock(&appendix->lock); + return 0; +} + + +/* + * Look up the character number of the start of the narrow font alternation + * of the current subbook in `book'. + */ +EB_Error_Code +eb_narrow_alt_start(EB_Appendix *appendix, int *start) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_narrow_alt_start(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + if (appendix->subbook_current->narrow_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + *start = appendix->subbook_current->narrow_start; + + LOG(("out: eb_narrow_alt_start(start=%d) = %s", *start, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *start = -1; + LOG(("out: eb_narrow_alt_start() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Return the character number of the end of the narrow font alternation + * of the current subbook in `book'. + */ +EB_Error_Code +eb_narrow_alt_end(EB_Appendix *appendix, int *end) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_narrow_alt_end(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + if (appendix->subbook_current->narrow_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + *end = appendix->subbook_current->narrow_end; + + LOG(("out: eb_narrow_alt_end(end=%d) = %s", *end, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *end = -1; + LOG(("out: eb_narrow_alt_end() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +EB_Error_Code +eb_narrow_alt_character_text(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_narrow_alt_character_text(appendix=%d, character_number=%d)", + (int)appendix->code, character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (appendix->subbook_current->narrow_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + error_code = eb_narrow_character_text_latin(appendix, + character_number, text); + } else { + error_code = eb_narrow_character_text_jis(appendix, character_number, + text); + } + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_narrow_alt_character_text(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_narrow_alt_character_text() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +static EB_Error_Code +eb_narrow_character_text_jis(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + int start; + int end; + off_t location; + EB_Alternation_Cache *cachep; + + LOG(("in: eb_narrow_alt_character_text_jis(appendix=%d, \ +character_number=%d)", + (int)appendix->code, character_number)); + + start = appendix->subbook_current->narrow_start; + end = appendix->subbook_current->narrow_end; + + /* + * Check for `character_number'. Is it in a font? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x21 + || 0x7e < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Calculate the location of alternation data. + */ + location + = (appendix->subbook_current->narrow_page - 1) * EB_SIZE_PAGE + + (((character_number >> 8) - (start >> 8)) * 0x5e + + (character_number & 0xff) - (start & 0xff)) + * (EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + + /* + * Check for the cache data. + */ + cachep = appendix->narrow_cache + EB_HASH_ALT_CACHE(character_number); + if (cachep->character_number == character_number) { + memcpy(text, cachep->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + goto succeeded; + } + + /* + * Read the alternation data. + */ + if (zio_lseek(&appendix->subbook_current->zio, location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + cachep->character_number = -1; + if (zio_read(&appendix->subbook_current->zio, cachep->text, + EB_MAX_ALTERNATION_TEXT_LENGTH + 1) + != EB_MAX_ALTERNATION_TEXT_LENGTH + 1) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + + /* + * Update cache data. + */ + memcpy(text, cachep->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + cachep->text[EB_MAX_ALTERNATION_TEXT_LENGTH] = '\0'; + cachep->character_number = character_number; + + succeeded: + LOG(("out: eb_narrow_alt_character_text_jis(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_narrow_alt_character_text_jis() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +static EB_Error_Code +eb_narrow_character_text_latin(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + int start; + int end; + off_t location; + EB_Alternation_Cache *cache_p; + + LOG(("in: eb_narrow_alt_character_text_latin(appendix=%d, \ +character_number=%d)", + (int)appendix->code, character_number)); + + start = appendix->subbook_current->narrow_start; + end = appendix->subbook_current->narrow_end; + + /* + * Check for `character_number'. Is it in a font? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x01 + || 0xfe < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Calculate the location of alternation data. + */ + location + = (appendix->subbook_current->narrow_page - 1) * EB_SIZE_PAGE + + (((character_number >> 8) - (start >> 8)) * 0xfe + + (character_number & 0xff) - (start & 0xff)) + * (EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + + /* + * Check for the cache data. + */ + cache_p = appendix->narrow_cache + EB_HASH_ALT_CACHE(character_number); + if (cache_p->character_number == character_number) { + memcpy(text, cache_p->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + goto succeeded; + } + + /* + * Read the alternation data. + */ + if (zio_lseek(&appendix->subbook_current->zio, location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + cache_p->character_number = -1; + if (zio_read(&appendix->subbook_current->zio, cache_p->text, + EB_MAX_ALTERNATION_TEXT_LENGTH + 1) + != EB_MAX_ALTERNATION_TEXT_LENGTH + 1) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + + /* + * Update cache data. + */ + memcpy(text, cache_p->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + cache_p->text[EB_MAX_ALTERNATION_TEXT_LENGTH] = '\0'; + cache_p->character_number = character_number; + + succeeded: + LOG(("out: eb_narrow_alt_character_text_latin(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_narrow_alt_character_text_latin() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Return next `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_forward_narrow_alt_character(EB_Appendix *appendix, int n, + int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) { + return eb_backward_narrow_alt_character(appendix, -n, + character_number); + } + + eb_lock(&appendix->lock); + LOG(("in: eb_forward_narrow_alt_character(appendix=%d, n=%d, \ +character_number=%d)", + (int)appendix->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (appendix->subbook_current->narrow_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + start = appendix->subbook_current->narrow_start; + end = appendix->subbook_current->narrow_end; + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if (0xfe <= (*character_number & 0xff)) + *character_number += 3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if (0x7e <= (*character_number & 0xff)) + *character_number += 0xa3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } + + LOG(("out: eb_forkward_narrow_alt_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_forward_narrow_alt_character() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Return previous `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_backward_narrow_alt_character(EB_Appendix *appendix, int n, + int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) { + return eb_forward_narrow_alt_character(appendix, -n, character_number); + } + + eb_lock(&appendix->lock); + LOG(("in: eb_backward_narrow_alt_character(appendix=%d, n=%d, \ +character_number=%d)", + (int)appendix->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (appendix->subbook_current->narrow_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + start = appendix->subbook_current->narrow_start; + end = appendix->subbook_current->narrow_end; + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x01) + *character_number -= 3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x21) + *character_number -= 0xa3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } + + LOG(("out: eb_backward_narrow_alt_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_backward_narrow_alt_character() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/narwalt.lo b/lib/ebu/ebu/narwalt.lo new file mode 100644 index 0000000..3ce55e3 --- /dev/null +++ b/lib/ebu/ebu/narwalt.lo @@ -0,0 +1,12 @@ +# narwalt.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/narwalt.o' + +# Name of the non-PIC object +non_pic_object='narwalt.o' + diff --git a/lib/ebu/ebu/narwfont.c b/lib/ebu/ebu/narwfont.c new file mode 100644 index 0000000..245a751 --- /dev/null +++ b/lib/ebu/ebu/narwfont.c @@ -0,0 +1,1099 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "font.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_narrow_character_bitmap_jis(EB_Book *book, + int character_number, char *bitmap); +static EB_Error_Code eb_narrow_character_bitmap_latin(EB_Book *book, + int character_number, char *bitmap); + + +/* + * Open a font file. + */ +EB_Error_Code +eb_open_narrow_font_file(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *narrow_font; + char font_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code zio_code; + + LOG(("in: eb_open_narrow_font(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + narrow_font = subbook->narrow_fonts + font_code; + + if (narrow_font->font_code == EB_FONT_INVALID) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + if (0 <= zio_file(&narrow_font->zio)) + goto succeeded; + + /* + * If the book is EBWING, open the narrow font file. + * (In EB books, font data are stored in the `START' file.) + */ + zio_code = ZIO_INVALID; + + if (book->disc_code == EB_DISC_EB) { + if (narrow_font->initialized) { + if (zio_mode(&narrow_font->zio) != ZIO_INVALID) + zio_code = ZIO_REOPEN; + } else { + zio_code = zio_mode(&subbook->text_zio); + } + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, font_path_name); + + } else { + if (narrow_font->initialized) { + if (zio_mode(&narrow_font->zio) != ZIO_INVALID) + zio_code = ZIO_REOPEN; + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, narrow_font->file_name, + font_path_name); + } else { + eb_canonicalize_file_name(narrow_font->file_name); + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, narrow_font->file_name, + narrow_font->file_name) != EB_SUCCESS) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, narrow_font->file_name, + font_path_name); + eb_path_name_zio_code(font_path_name, ZIO_PLAIN, &zio_code); + } + } + + if (zio_code != ZIO_INVALID + && zio_open(&narrow_font->zio, font_path_name, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + + succeeded: + LOG(("out: eb_open_narrow_font_file(file=%d) = %s", + zio_file(&narrow_font->zio), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_open_narrow_font_file() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read font header. + */ +EB_Error_Code +eb_load_narrow_font_header(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *narrow_font; + char buffer[16]; + int character_count; + Zio *zio; + + LOG(("in: eb_load_narrow_font_header(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + narrow_font = subbook->narrow_fonts + font_code; + zio = &narrow_font->zio; + + if (narrow_font->initialized) + goto succeeded; + + /* + * Read information from the text file. + */ + if (zio_lseek(zio, ((off_t) narrow_font->page - 1) * EB_SIZE_PAGE, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + + /* + * If the number of characters (`character_count') is 0, the font + * is unavailable. We return EB_ERR_NO_SUCH_FONT. + */ + character_count = eb_uint2(buffer + 12); + if (character_count == 0) { + zio_close(zio); + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + /* + * Set the information. + */ + narrow_font->start = eb_uint2(buffer + 10); + if (book->character_code == EB_CHARCODE_ISO8859_1) { + narrow_font->end = narrow_font->start + + ((character_count / 0xfe) << 8) + (character_count % 0xfe) - 1; + if (0xfe < (narrow_font->end & 0xff)) + narrow_font->end += 3; + } else { + narrow_font->end = narrow_font->start + + ((character_count / 0x5e) << 8) + (character_count % 0x5e) - 1; + if (0x7e < (narrow_font->end & 0xff)) + narrow_font->end += 0xa3; + } + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + if ((narrow_font->start & 0xff) < 0x01 + || 0xfe < (narrow_font->start & 0xff) + || narrow_font->start < 0x0001 + || 0x1efe < narrow_font->end) { + error_code = EB_ERR_UNEXP_FONT; + goto failed; + } + } else { + if ((narrow_font->start & 0xff) < 0x21 + || 0x7e < (narrow_font->start & 0xff) + || narrow_font->start < 0xa121 + || 0xfe7e < narrow_font->end) { + error_code = EB_ERR_UNEXP_FONT; + goto failed; + } + } + + succeeded: + LOG(("out: eb_load_narrow_font_header()", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_narrow_font_header()", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read font glyph data. + */ +EB_Error_Code +eb_load_narrow_font_glyphs(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *narrow_font; + int character_count; + size_t glyph_size; + size_t total_glyph_size; + Zio *zio; + + LOG(("in: eb_load_narrow_font_glyphs(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + narrow_font = subbook->narrow_fonts + font_code; + zio = &narrow_font->zio; + + if (narrow_font->glyphs != NULL) + goto succeeded; + + /* + * Calculate size of glyph data (`total_glyph_size'). + * + * Set the number of local defined characters to `character_count'. + * Set the number of character glpyhs in a page to `page_glyph_count'. + * Set size of glyph data to `total_glyph_size'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) { + character_count + = ((narrow_font->end >> 8) - (narrow_font->start >> 8)) * 0xfe + + ((narrow_font->end & 0xff) - (narrow_font->start & 0xff)) + 1; + } else { + character_count + = ((narrow_font->end >> 8) - (narrow_font->start >> 8)) * 0x5e + + ((narrow_font->end & 0xff) - (narrow_font->start & 0xff)) + 1; + } + + eb_narrow_font_size2(font_code, &glyph_size); + total_glyph_size + = (character_count / (1024 / glyph_size)) * 1024 + + (character_count % (1024 / glyph_size)) * glyph_size; + + /* + * Allocate memory for glyph data. + */ + narrow_font->glyphs = (char *) malloc(total_glyph_size); + if (narrow_font->glyphs == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + + /* + * Read glyphs. + */ + if (zio_lseek(zio, (off_t) narrow_font->page * EB_SIZE_PAGE, SEEK_SET) + < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, narrow_font->glyphs, total_glyph_size) + != total_glyph_size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + + succeeded: + LOG(("out: eb_load_narrow_font_glyphs()", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_narrow_font_glyphs()", eb_error_string(error_code))); + if (narrow_font->glyphs != NULL) { + free(narrow_font->glyphs); + narrow_font->glyphs = NULL; + } + return error_code; +} + + +/* + * Examine whether the current subbook in `book' has a narrow font. + */ +int +eb_have_narrow_font(EB_Book *book) +{ + int i; + + eb_lock(&book->lock); + LOG(("in: eb_have_narrow_font(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * If the narrow font has already set, the subbook has narrow fonts. + */ + if (book->subbook_current->narrow_current != NULL) + goto succeeded; + + /* + * Scan the font table. + */ + for (i = 0; i < EB_MAX_FONTS; i++) { + if (book->subbook_current->narrow_fonts[i].font_code + != EB_FONT_INVALID) + break; + } + + if (EB_MAX_FONTS <= i) + goto failed; + + succeeded: + LOG(("out: eb_have_narrow_font() = %d", 1)); + eb_unlock(&book->lock); + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_narrow_font() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Get width of the font `font_code' in the current subbook of `book'. + */ +EB_Error_Code +eb_narrow_font_width(EB_Book *book, int *width) +{ + EB_Error_Code error_code; + EB_Font_Code font_code; + + eb_lock(&book->lock); + LOG(("in: eb_narrow_font_width(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + /* + * Calculate width. + */ + font_code = book->subbook_current->narrow_current->font_code; + error_code = eb_narrow_font_width2(font_code, width); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_narrow_font_width(width=%d) = %s", (int)*width, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *width = 0; + LOG(("out: eb_narrow_font_width() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get width of the font `font_code'. + */ +EB_Error_Code +eb_narrow_font_width2(EB_Font_Code font_code, int *width) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_width2(font_code=%d)", (int)font_code)); + + switch (font_code) { + case EB_FONT_16: + *width = EB_WIDTH_NARROW_FONT_16; + break; + case EB_FONT_24: + *width = EB_WIDTH_NARROW_FONT_24; + break; + case EB_FONT_30: + *width = EB_WIDTH_NARROW_FONT_30; + break; + case EB_FONT_48: + *width = EB_WIDTH_NARROW_FONT_48; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_width2(width=%d) = %s", *width, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *width = 0; + LOG(("out: eb_narrow_font_width2() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the bitmap size of the font `font_code' in the current subbook + * of `book'. + */ +EB_Error_Code +eb_narrow_font_size(EB_Book *book, size_t *size) +{ + EB_Error_Code error_code; + EB_Font_Code font_code; + int width; + int height; + + eb_lock(&book->lock); + LOG(("in: eb_narrow_font_size(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + /* + * Calculate size. + */ + font_code = book->subbook_current->narrow_current->font_code; + error_code = eb_narrow_font_width2(font_code, &width); + if (error_code != EB_SUCCESS) + goto failed; + error_code = eb_font_height2(font_code, &height); + if (error_code != EB_SUCCESS) + goto failed; + *size = (width / 8) * height; + + LOG(("out: eb_narrow_font_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_size() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get the bitmap size of a character in `font_code' of the current + * subbook. + */ +EB_Error_Code +eb_narrow_font_size2(EB_Font_Code font_code, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_narrow_font_size2(font_code=%d)", (int)font_code)); + + switch (font_code) { + case EB_FONT_16: + *size = EB_SIZE_NARROW_FONT_16; + break; + case EB_FONT_24: + *size = EB_SIZE_NARROW_FONT_24; + break; + case EB_FONT_30: + *size = EB_SIZE_NARROW_FONT_30; + break; + case EB_FONT_48: + *size = EB_SIZE_NARROW_FONT_48; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_narrow_font_size2(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_narrow_font_size2() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the character number of the start of the narrow font of the current + * subbook in `book'. + */ +EB_Error_Code +eb_narrow_font_start(EB_Book *book, int *start) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_narrow_font_start(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + *start = book->subbook_current->narrow_current->start; + + LOG(("out: eb_narrow_font_start(start=%d) = %s", *start, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_narrow_font_start() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get the character number of the end of the narrow font of the current + * subbook in `book'. + */ +EB_Error_Code +eb_narrow_font_end(EB_Book *book, int *end) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_narrow_font_end(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + *end = book->subbook_current->narrow_current->end; + + LOG(("out: eb_narrow_font_end(end=%d) = %s", *end, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_narrow_font_end() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current narrow font of the current subbook in `book'. + */ +EB_Error_Code +eb_narrow_font_character_bitmap(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_narrow_font_character_bitmap(book=%d, character_number=%d)", + (int)book->code, character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + error_code = eb_narrow_character_bitmap_latin(book, character_number, + bitmap); + } else { + error_code = eb_narrow_character_bitmap_jis(book, character_number, + bitmap); + } + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_narrow_font_character_bitmap() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_narrow_font_character_bitmap() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current narrow font of the current subbook in `book'. + */ +static EB_Error_Code +eb_narrow_character_bitmap_jis(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + EB_Font *narrow_current; + int start; + int end; + int character_index; + off_t offset; + size_t size; + Zio *zio; + + LOG(("in: eb_narrow_font_character_bitmap_jis(book=%d, \ +character_number=%d)", + (int)book->code, character_number)); + + start = book->subbook_current->narrow_current->start; + end = book->subbook_current->narrow_current->end; + narrow_current = book->subbook_current->narrow_current; + + /* + * Check for `character_number'. Is it in a range of bitmaps? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x21 + || 0x7e < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Calculate the size and the location of bitmap data. + */ + error_code = eb_narrow_font_size(book, &size); + if (error_code != EB_SUCCESS) + goto failed; + + character_index = ((character_number >> 8) - (start >> 8)) * 0x5e + + ((character_number & 0xff) - (start & 0xff)); + offset + = (character_index / (1024 / size)) * 1024 + + (character_index % (1024 / size)) * size; + + /* + * Read bitmap data. + */ + if (narrow_current->glyphs == NULL) { + zio = &narrow_current->zio; + + if (zio_lseek(zio, + (off_t) narrow_current->page * EB_SIZE_PAGE + offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, bitmap, size) != size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + } else { + memcpy(bitmap, narrow_current->glyphs + offset, size); + } + + LOG(("out: eb_narrow_font_character_bitmap_jis() = %s", + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_narrow_font_character_bitmap_jis() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current narrow font of the current subbook in `book'. + */ +static EB_Error_Code +eb_narrow_character_bitmap_latin(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + EB_Font *narrow_current; + int start; + int end; + int character_index; + off_t offset; + size_t size; + Zio *zio; + + LOG(("in: eb_narrow_font_character_bitmap_latin(book=%d, \ +character_number=%d)", + (int)book->code, character_number)); + + start = book->subbook_current->narrow_current->start; + end = book->subbook_current->narrow_current->end; + narrow_current = book->subbook_current->narrow_current; + + /* + * Check for `ch'. Is it in a range of bitmaps? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x01 + || 0xfe < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Calculate the size and the location of bitmap data. + */ + error_code = eb_narrow_font_size(book, &size); + if (error_code != EB_SUCCESS) + goto failed; + + character_index = ((character_number >> 8) - (start >> 8)) * 0xfe + + ((character_number & 0xff) - (start & 0xff)); + offset + = (character_index / (1024 / size)) * 1024 + + (character_index % (1024 / size)) * size; + + /* + * Read bitmap data. + */ + if (narrow_current->glyphs == NULL) { + zio = &narrow_current->zio; + + if (zio_lseek(zio, + (off_t) narrow_current->page * EB_SIZE_PAGE + offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, bitmap, size) != size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + } else { + memcpy(bitmap, narrow_current->glyphs + offset, size); + } + + LOG(("out: eb_narrow_font_character_bitmap_latin() = %s", + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_narrow_font_character_bitmap_latin() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Return next `n'th character number from `character_number'. + */ +EB_Error_Code +eb_forward_narrow_font_character(EB_Book *book, int n, int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) + return eb_backward_narrow_font_character(book, -n, character_number); + + eb_lock(&book->lock); + LOG(("in: eb_forward_narrow_font_character(book=%d, n=%d, \ +character_number=%d)", + (int)book->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + start = book->subbook_current->narrow_current->start; + end = book->subbook_current->narrow_current->end; + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if (0xfe <= (*character_number & 0xff)) + *character_number += 3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if (0x7e <= (*character_number & 0xff)) + *character_number += 0xa3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } + + LOG(("out: eb_forward_narrow_font_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_forward_narrow_font_character() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return previous `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_backward_narrow_font_character(EB_Book *book, int n, int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) + return eb_forward_narrow_font_character(book, -n, character_number); + + eb_lock(&book->lock); + LOG(("in: eb_backward_narrow_font_character(book=%d, n=%d, \ +character_number=%d)", + (int)book->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The narrow font must exist in the current subbook. + */ + if (book->subbook_current->narrow_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + start = book->subbook_current->narrow_current->start; + end = book->subbook_current->narrow_current->end; + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x01) + *character_number -= 3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x21) + *character_number -= 0xa3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } + + LOG(("out: eb_backward_narrow_font_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_backward_narrow_font_character() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/narwfont.lo b/lib/ebu/ebu/narwfont.lo new file mode 100644 index 0000000..11f767a --- /dev/null +++ b/lib/ebu/ebu/narwfont.lo @@ -0,0 +1,12 @@ +# narwfont.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/narwfont.o' + +# Name of the non-PIC object +non_pic_object='narwfont.o' + diff --git a/lib/ebu/ebu/readtext.c b/lib/ebu/ebu/readtext.c new file mode 100644 index 0000000..604478c --- /dev/null +++ b/lib/ebu/ebu/readtext.c @@ -0,0 +1,2288 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "text.h" +#include "build-post.h" + +/* + * The maximum number of arguments for an escape sequence. + */ +#define EB_MAX_ARGV 7 + +/* + * Read next when the length of cached data is shorter than this value. + */ +#define SIZE_FEW_REST 48 + +/* + * Special skip-code that represents `no skip-code is set'. + */ +#define SKIP_CODE_NONE -1 + +/* + * Cache data buffer. + */ +static char cache_buffer[EB_SIZE_PAGE]; + +/* + * Book code of which `cache_buffer' records data. + */ +static EB_Book_Code cache_book_code = EB_BOOK_NONE; + +/* + * Location of cache data loaded in `cache_buffer'. + */ +static off_t cache_location; + +/* + * Length of cache data loaded in `cache_buffer'. + */ +static size_t cache_length; + +/* + * Null hook. + */ +static const EB_Hook null_hook = {EB_HOOK_NULL, NULL}; + +/* + * Mutex for cache variables. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t cache_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Unexported functions. + */ +static EB_Error_Code eb_read_text_internal(EB_Book *book, + EB_Appendix *appendix, EB_Hookset *hookset, void *container, + size_t text_max_length, char *text, ssize_t *text_length, + int forward_only); +static int eb_is_stop_code(EB_Book *book, EB_Appendix *appendix, + unsigned int code0, unsigned int code1); + + +/* + * Initialize text context of `book'. + */ +void +eb_initialize_text_context(EB_Book *book) +{ + LOG(("in: eb_initialize_text_context(book=%d)", (int)book->code)); + + book->text_context.code = EB_TEXT_INVALID; + book->text_context.location = -1; + book->text_context.out = NULL; + book->text_context.out_rest_length = 0; + book->text_context.unprocessed = NULL; + book->text_context.unprocessed_size = 0; + book->text_context.out_step = 0; + book->text_context.narrow_flag = 0; + book->text_context.printable_count = 0; + book->text_context.file_end_flag = 0; + book->text_context.text_status = EB_TEXT_STATUS_CONTINUED; + book->text_context.skip_code = SKIP_CODE_NONE; + book->text_context.auto_stop_code = -1; + book->text_context.candidate[0] = '\0'; + book->text_context.is_candidate = 0; + book->text_context.ebxac_gaiji_flag = 0; + + LOG(("out: eb_initialize_text_context()")); +} + + +/* + * Finalize text context of `book'. + */ +void +eb_finalize_text_context(EB_Book *book) +{ + LOG(("in: eb_finalize_text_context(book=%d)", (int)book->code)); + + if (book->text_context.unprocessed != NULL) + free(book->text_context.unprocessed); + + LOG(("out: eb_finalize_text_context()")); +} + + +/* + * Reset text context of `book'. + * Note that `contexxt_code' and `context_location' are unchanged. + */ +void +eb_reset_text_context(EB_Book *book) +{ + LOG(("in: eb_reset_text_context(book=%d)", (int)book->code)); + + eb_finalize_text_context(book); + + book->text_context.out = NULL; + book->text_context.out_rest_length = 0; + book->text_context.unprocessed = NULL; + book->text_context.unprocessed_size = 0; + book->text_context.out_step = 0; + book->text_context.narrow_flag = 0; + book->text_context.printable_count = 0; + book->text_context.file_end_flag = 0; + book->text_context.text_status = EB_TEXT_STATUS_CONTINUED; + book->text_context.skip_code = SKIP_CODE_NONE; + book->text_context.auto_stop_code = -1; + book->text_context.candidate[0] = '\0'; + book->text_context.is_candidate = 0; + book->text_context.ebxac_gaiji_flag = 0; + + LOG(("out: eb_reset_text_context()")); +} + + +/* + * Invalidate text context of `book'. + */ +void +eb_invalidate_text_context(EB_Book *book) +{ + LOG(("in: eb_invalidate_text_context(book=%d)", (int)book->code)); + + eb_finalize_text_context(book); + eb_initialize_text_context(book); + book->text_context.code = EB_TEXT_INVALID; + + LOG(("out: eb_invalidate_text_context()")); +} + + +/* + * Reposition the offset of the subbook file. + */ +EB_Error_Code +eb_seek_text(EB_Book *book, const EB_Position *position) +{ + EB_Error_Code error_code; + + pthread_mutex_lock(&cache_mutex); + eb_lock(&book->lock); + LOG(("in: eb_seek_text(book=%d, position={%d,%d})", (int)book->code, + position->page, position->offset)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + if (position->page <= 0 || position->offset < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + /* + * Set text-context variables. + */ + eb_reset_text_context(book); + book->text_context.code = EB_TEXT_SEEKED; + book->text_context.location = ((off_t) position->page - 1) * EB_SIZE_PAGE + + position->offset; + + /* + * Unlock cache data and the book. + */ + LOG(("out: eb_seek_text() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + pthread_mutex_unlock(&cache_mutex); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_invalidate_text_context(book); + LOG(("out: eb_seek_text() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + pthread_mutex_unlock(&cache_mutex); + return error_code; +} + + +/* + * Get the current text position of the subbook file. + */ +EB_Error_Code +eb_tell_text(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_tell_text(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + position->page = book->text_context.location / EB_SIZE_PAGE + 1; + position->offset = book->text_context.location % EB_SIZE_PAGE; + + LOG(("out: eb_seek_text(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_invalidate_text_context(book); + LOG(("out: eb_seek_text() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get text in the current subbook in `book'. + */ +EB_Error_Code +eb_read_text(EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, + void *container, size_t text_max_length, char *text, ssize_t *text_length) +{ + EB_Error_Code error_code; + const EB_Hook *hook; + EB_Position position; + + eb_lock(&book->lock); + if (appendix != NULL) + eb_lock(&appendix->lock); + if (hookset != NULL) + eb_lock(&hookset->lock); + LOG(("in: eb_read_text(book=%d, appendix=%d, text_max_length=%ld)", + (int)book->code, (appendix != NULL) ? (int)appendix->code : 0, + (long)text_max_length)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + /* + * Use `eb_default_hookset' when `hookset' is `NULL'. + */ + if (hookset == NULL) + hookset = &eb_default_hookset; + + /* + * Set text mode to `text'. + */ + if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code == EB_TEXT_SEEKED) { + eb_tell_text(book, &position); + eb_reset_text_context(book); + + if (book->subbook_current->menu.start_page <= position.page + && position.page <= book->subbook_current->menu.end_page) + book->text_context.code = EB_TEXT_OPTIONAL_TEXT; + else if (book->subbook_current->image_menu.start_page <= position.page + && position.page <= book->subbook_current->image_menu.end_page) + book->text_context.code = EB_TEXT_OPTIONAL_TEXT; + else if (book->subbook_current->copyright.start_page <= position.page + && position.page <= book->subbook_current->copyright.end_page) + book->text_context.code = EB_TEXT_OPTIONAL_TEXT; + else + book->text_context.code = EB_TEXT_MAIN_TEXT; + + hook = hookset->hooks + EB_HOOK_INITIALIZE; + if (hook->function != NULL) { + error_code = hook->function(book, appendix, container, + EB_HOOK_INITIALIZE, 0, NULL); + if (error_code != EB_SUCCESS) + goto failed; + } + } else if (book->text_context.code != EB_TEXT_MAIN_TEXT + && book->text_context.code != EB_TEXT_OPTIONAL_TEXT) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + error_code = eb_read_text_internal(book, appendix, hookset, container, + text_max_length, text, text_length, 0); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_read_text(text_length=%ld) = %s", (long)*text_length, + eb_error_string(EB_SUCCESS))); + if (hookset != &eb_default_hookset) + eb_unlock(&hookset->lock); + if (appendix != NULL) + eb_unlock(&appendix->lock); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_invalidate_text_context(book); + LOG(("out: eb_read_text() = %s", eb_error_string(error_code))); + if (hookset != &eb_default_hookset) + eb_unlock(&hookset->lock); + if (appendix != NULL) + eb_unlock(&appendix->lock); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get text in the current subbook in `book'. + */ +EB_Error_Code +eb_read_heading(EB_Book *book, EB_Appendix *appendix, EB_Hookset *hookset, + void *container, size_t text_max_length, char *text, ssize_t *text_length) +{ + EB_Error_Code error_code; + const EB_Hook *hook; + + eb_lock(&book->lock); + if (appendix != NULL) + eb_lock(&appendix->lock); + if (hookset != NULL) + eb_lock(&hookset->lock); + LOG(("in: eb_read_heading(book=%d, appendix=%d, text_max_length=%ld)", + (int)book->code, (appendix != NULL) ? (int)appendix->code : 0, + (long)text_max_length)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + /* + * Use `eb_default_hookset' when `hookset' is `NULL'. + */ + if (hookset == NULL) + hookset = &eb_default_hookset; + + /* + * Set text mode to `heading'. + */ + if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code == EB_TEXT_SEEKED) { + eb_reset_text_context(book); + book->text_context.code = EB_TEXT_HEADING; + + hook = hookset->hooks + EB_HOOK_INITIALIZE; + if (hook->function != NULL) { + error_code = hook->function(book, appendix, container, + EB_HOOK_INITIALIZE, 0, NULL); + if (error_code != EB_SUCCESS) + goto failed; + } + } else if (book->text_context.code != EB_TEXT_HEADING) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + error_code = eb_read_text_internal(book, appendix, hookset, container, + text_max_length, text, text_length, 0); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_read_heading(text_length=%ld) = %s", (long)*text_length, + eb_error_string(EB_SUCCESS))); + if (hookset != &eb_default_hookset) + eb_unlock(&hookset->lock); + if (appendix != NULL) + eb_unlock(&appendix->lock); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_invalidate_text_context(book); + LOG(("out: eb_read_heading() = %s", eb_error_string(error_code))); + if (hookset != &eb_default_hookset) + eb_unlock(&hookset->lock); + if (appendix != NULL) + eb_unlock(&appendix->lock); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Read data from the subbook file directly. + */ +EB_Error_Code +eb_read_rawtext(EB_Book *book, size_t text_max_length, char *text, + ssize_t *text_length) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_read_rawtext(book=%d, text_max_length=%ld)", + (int)book->code, (long)text_max_length)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + /* + * Set text mode to `rawtext'. + */ + if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code == EB_TEXT_SEEKED) { + eb_reset_text_context(book); + book->text_context.code = EB_TEXT_RAWTEXT; + } else if (book->text_context.code != EB_TEXT_RAWTEXT) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + /* + * Seek START file and read data. + */ + if (zio_lseek(&book->subbook_current->text_zio, + book->text_context.location, SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + *text_length = zio_read(&book->subbook_current->text_zio, text, + text_max_length); + book->text_context.location += *text_length; + if (*text_length < 0) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + LOG(("out: eb_read_rawtext(text_length=%ld) = %s", (long)*text_length, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text_length = -1; + eb_invalidate_text_context(book); + LOG(("out: eb_read_rawtext() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get text or heading. + */ +static EB_Error_Code +eb_read_text_internal(EB_Book *book, EB_Appendix *appendix, + EB_Hookset *hookset, void *container, size_t text_max_length, char *text, + ssize_t *text_length, int forward_only) +{ + EB_Error_Code error_code; + EB_Text_Context *context; + unsigned char c1, c2; + char *cache_p; + const EB_Hook *hook; + unsigned char *candidate_p; + size_t candidate_length; + size_t cache_rest_length; + size_t in_step; + unsigned int argv[EB_MAX_ARGV]; + int argc; + + pthread_mutex_lock(&cache_mutex); + LOG(("in: eb_read_text_internal(book=%d, appendix=%d, \ +text_max_length=%ld, forward=%d)", + (int)book->code, (appendix != NULL) ? (int)appendix->code : 0, + (long)text_max_length, forward_only)); + + /* + * Initialize variables. + */ + context = &book->text_context; + context->out = text; + context->out_rest_length = text_max_length; + if (context->is_candidate) { + candidate_length = strlen(context->candidate); + candidate_p = (unsigned char *)context->candidate + candidate_length; + } else { + candidate_length = 0; + candidate_p = NULL; + } + + /* + * If unprocessed string are rest in `context->unprocessed', + * copy them to `context->out'. + */ + if (context->unprocessed != NULL) { + if (!forward_only) { + if (context->out_rest_length < context->unprocessed_size) + goto succeeded; + memcpy(context->out, context->unprocessed, + context->unprocessed_size); + context->out += context->unprocessed_size; + context->out_rest_length -= context->unprocessed_size; + } + free(context->unprocessed); + context->unprocessed = NULL; + context->unprocessed_size = 0; + } + + /* + * Return immediately if text-end-flag has been set. + */ + if (context->text_status != EB_TEXT_STATUS_CONTINUED) + goto succeeded; + + /* + * Check for cache data. + * If cache data is not what we need, discard it. + */ + if (book->code == cache_book_code + && cache_location <= context->location + && context->location < cache_location + cache_length) { + cache_p = cache_buffer + (context->location - cache_location); + cache_rest_length = cache_length + - (context->location - cache_location); + } else { + cache_book_code = EB_BOOK_NONE; + cache_p = cache_buffer; + cache_length = 0; + cache_rest_length = 0; + } + + for (;;) { + in_step = 0; + context->out_step = 0; + argc = 1; + + /* + * If it reaches to the near of the end of the cache buffer, + * then moves remaind cache text to the beginning of the cache + * buffer, and reads a next chunk from a file. + */ + if (cache_rest_length < SIZE_FEW_REST && !context->file_end_flag) { + ssize_t read_result; + + if (0 < cache_rest_length) + memmove(cache_buffer, cache_p, cache_rest_length); + if (zio_lseek(&book->subbook_current->text_zio, + context->location + cache_rest_length, SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + read_result = zio_read(&book->subbook_current->text_zio, + cache_buffer + cache_rest_length, + EB_SIZE_PAGE - cache_rest_length); + if (read_result < 0) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } else if (read_result != EB_SIZE_PAGE - cache_rest_length) + context->file_end_flag = 1; + + cache_book_code = book->code; + cache_location = context->location; + cache_length = cache_rest_length + read_result; + cache_p = cache_buffer; + cache_rest_length = cache_length; + } + + /* + * Get 1 byte from the buffer. + */ + if (cache_rest_length < 1) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + c1 = eb_uint1(cache_p); + + if (c1 == 0x1f) { + hook = &null_hook; + + /* + * This is escape sequences. + */ + if (cache_rest_length < 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argv[0] = eb_uint2(cache_p); + c2 = eb_uint1(cache_p + 1); + + switch (c2) { + case 0x02: + /* beginning of text */ + in_step = 2; + break; + + case 0x03: + /* end of text (don't set `in_step') */ + context->text_status = EB_TEXT_STATUS_HARD_STOP; + if (forward_only) { + error_code = EB_ERR_END_OF_CONTENT; + goto failed; + } + goto succeeded; + + case 0x04: + /* beginning of NARROW */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_NARROW; + context->narrow_flag = 1; + break; + + case 0x05: + /* end of NARROW */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_NARROW; + context->narrow_flag = 0; + break; + + case 0x06: + /* beginning of subscript */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_SUBSCRIPT; + break; + + case 0x07: + /* end of subscript */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_SUBSCRIPT; + break; + + case 0x09: + /* set indent */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 2; + argv[1] = eb_uint2(cache_p + 2); + + if (0 < context->printable_count + && context->code == EB_TEXT_MAIN_TEXT) { + if (eb_is_stop_code(book, appendix, argv[0], argv[1])) { + context->text_status = EB_TEXT_STATUS_SOFT_STOP; + goto succeeded; + } + } + + hook = hookset->hooks + EB_HOOK_SET_INDENT; + break; + + case 0x0a: + /* newline */ + in_step = 2; + if (context->code == EB_TEXT_HEADING) { + context->text_status = EB_TEXT_STATUS_SOFT_STOP; + context->location += in_step; + goto succeeded; + } + hook = hookset->hooks + EB_HOOK_NEWLINE; + break; + + case 0x0b: + /* beginning of unicode */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_UNICODE; + break; + + case 0x0c: + /* end of unicode */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_UNICODE; + break; + + case 0x0e: + /* beginning of superscript */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_SUPERSCRIPT; + break; + + case 0x0f: + /* end of superscript */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_SUPERSCRIPT; + break; + + case 0x10: + /* beginning of newline prohibition */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_NO_NEWLINE; + break; + + case 0x11: + /* end of newline prohibition */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_NO_NEWLINE; + break; + + case 0x12: + /* beginning of emphasis */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_EMPHASIS; + break; + + case 0x13: + /* end of emphasis */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_EMPHASIS; + break; + + case 0x14: + /* beginning of color chart */ + /* argv[1] is number of color (1-). */ + argc = 2; + if(eb_uint2(cache_p + 4) == 0x1f15) { + char in_buffer[2]; + if (eb_uint1(cache_p + 2) != 0x1e) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + in_buffer[0] = 0; + in_buffer[1] = *(cache_p + 3); + in_step = 4; + argv[1] = eb_bcd2(in_buffer); + } else if(eb_uint2(cache_p + 6) == 0x1f15) { + char in_buffer[2]; + if (eb_uint1(cache_p + 2) != 0x1e || + eb_uint1(cache_p + 4) != 0x1e) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + in_buffer[0] = *(cache_p + 3); + in_buffer[1] = *(cache_p + 5); + in_step = 6; + argv[1] = eb_bcd2(in_buffer); + } else { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_BEGIN_COLOR_CHART; + break; + + case 0x15: + /* end of color chart */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_COLOR_CHART; + break; + + case 0x1a: case 0x1b: case 0x1e: case 0x1f: + /* emphasis; described in JIS X 4081-1996 */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + /* Some old EB books don't take an argument. */ + if (book->disc_code != EB_DISC_EPWING + && eb_uint1(cache_p + 2) >= 0x1f) + in_step = 2; + break; + + case 0x1c: + if (book->character_code == EB_CHARCODE_JISX0208_GB2312) { + /* beginning of EBXA-C gaiji */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_BEGIN_EBXAC_GAIJI; + context->ebxac_gaiji_flag = 1; + } else { + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + /* Some old EB books don't take an argument. */ + if (book->disc_code != EB_DISC_EPWING + && eb_uint1(cache_p + 2) >= 0x1f) + in_step = 2; + } + break; + + case 0x1d: + if (book->character_code == EB_CHARCODE_JISX0208_GB2312) { + /* end of EBXA-C gaiji */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_EBXAC_GAIJI; + context->ebxac_gaiji_flag = 0; + } else { + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + /* Some old EB books don't take an argument. */ + if (book->disc_code != EB_DISC_EPWING + && eb_uint1(cache_p + 2) >= 0x1f) + in_step = 2; + } + break; + + case 0x32: + /* beginning of reference to monochrome graphic */ + in_step = 2; + argc = 4; + argv[1] = 0; + argv[2] = 0; + argv[3] = 0; + hook = hookset->hooks + EB_HOOK_BEGIN_MONO_GRAPHIC; + break; + + case 0x39: + /* beginning of MPEG movie */ + in_step = 46; + argc = 6; + argv[1] = eb_uint4(cache_p + 2); + argv[2] = eb_uint4(cache_p + 22); + argv[3] = eb_uint4(cache_p + 26); + argv[4] = eb_uint4(cache_p + 30); + argv[5] = eb_uint4(cache_p + 34); + hook = hookset->hooks + EB_HOOK_BEGIN_MPEG; + break; + + case 0x3c: + /* beginning of inline color graphic */ + in_step = 20; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 4; + argv[1] = eb_uint2(cache_p + 2); + argv[2] = eb_bcd4(cache_p + 14); + argv[3] = eb_bcd2(cache_p + 18); + if (argv[1] >> 8 == 0x00) + hook = hookset->hooks + EB_HOOK_BEGIN_IN_COLOR_BMP; + else + hook = hookset->hooks + EB_HOOK_BEGIN_IN_COLOR_JPEG; + break; + + case 0x35: case 0x36: case 0x37: case 0x38: case 0x3a: + case 0x3b: case 0x3d: case 0x3e: case 0x3f: + in_step = 2; + context->skip_code = eb_uint1(cache_p + 1) + 0x20; + break; + + case 0x41: + /* beginning of keyword */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 2; + argv[1] = eb_uint2(cache_p + 2); + + if (0 < context->printable_count + && context->code == EB_TEXT_MAIN_TEXT) { + if (eb_is_stop_code(book, appendix, argv[0], argv[1])) { + context->text_status = EB_TEXT_STATUS_SOFT_STOP; + goto succeeded; + } + } + if (context->auto_stop_code < 0) + context->auto_stop_code = eb_uint2(cache_p + 2); + + hook = hookset->hooks + EB_HOOK_BEGIN_KEYWORD; + break; + + case 0x42: + /* beginning of reference */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + if (eb_uint1(cache_p + 2) != 0x00) + in_step -= 2; + hook = hookset->hooks + EB_HOOK_BEGIN_REFERENCE; + break; + + case 0x43: + /* beginning of an entry of a candidate */ + in_step = 2; + if (context->skip_code == SKIP_CODE_NONE) { + context->candidate[0] = '\0'; + context->is_candidate = 1; + candidate_length = 0; + candidate_p = (unsigned char *)context->candidate; + } + hook = hookset->hooks + EB_HOOK_BEGIN_CANDIDATE; + break; + + case 0x44: + /* beginning of monochrome graphic */ + in_step = 12; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 4; + argv[1] = eb_uint2(cache_p + 2); + argv[2] = eb_bcd4(cache_p + 4); + argv[3] = eb_bcd4(cache_p + 8); + if (0 < argv[2] && 0 < argv[3]) + hook = hookset->hooks + EB_HOOK_BEGIN_MONO_GRAPHIC; + break; + + case 0x45: + /* beginning of graphic block */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + if (eb_uint1(cache_p + 2) != 0x1f) { + argc = 2; + argv[1] = eb_bcd4(cache_p + 2); + } else { + in_step = 2; + } + break; + + case 0x4a: + /* beginning of WAVE sound */ + in_step = 18; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 6; + argv[1] = eb_uint4(cache_p + 2); + argv[2] = eb_bcd4(cache_p + 6); + argv[3] = eb_bcd2(cache_p + 10); + argv[4] = eb_bcd4(cache_p + 12); + argv[5] = eb_bcd2(cache_p + 16); + hook = hookset->hooks + EB_HOOK_BEGIN_WAVE; + break; + + case 0x4b: + /* beginning of paged reference */ + in_step = 8; + if (cache_rest_length < in_step + 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 3; + argv[1] = eb_bcd4(cache_p + 2); + argv[2] = eb_bcd2(cache_p + 6); + if (cache_p[8]==0x1f && cache_p[9]==0x6b) { + context->text_status = EB_TEXT_STATUS_SOFT_STOP; + hook = hookset->hooks + EB_HOOK_GRAPHIC_REFERENCE; + in_step = 10; + } else { + hook = hookset->hooks + EB_HOOK_BEGIN_GRAPHIC_REFERENCE; + } + break; + + case 0x4c: + /* beginning of image page */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_BEGIN_IMAGE_PAGE; + break; + + case 0x4d: + /* beginning of color graphic (BMP or JPEG) */ + in_step = 20; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 4; + argv[1] = eb_uint2(cache_p + 2); + argv[2] = eb_bcd4(cache_p + 14); + argv[3] = eb_bcd2(cache_p + 18); + if (argv[1] >> 8 == 0x00) + hook = hookset->hooks + EB_HOOK_BEGIN_COLOR_BMP; + else + hook = hookset->hooks + EB_HOOK_BEGIN_COLOR_JPEG; + break; + + case 0x4f: + /* beginning of clickable area */ + in_step = 34; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 7; + argv[1] = eb_bcd2(cache_p + 8); + argv[2] = eb_bcd2(cache_p + 10); + argv[3] = eb_bcd2(cache_p + 12); + argv[4] = eb_bcd2(cache_p + 14); + argv[5] = eb_bcd4(cache_p + 28); + argv[6] = eb_bcd2(cache_p + 32); + hook = hookset->hooks + EB_HOOK_BEGIN_CLICKABLE_AREA; + break; + + case 0x49: case 0x4e: + + in_step = 2; + context->skip_code = eb_uint1(cache_p + 1) + 0x20; + break; + + case 0x52: + /* end of reference to monochrome graphic */ + in_step = 8; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 3; + argv[1] = eb_bcd4(cache_p + 2); + argv[2] = eb_bcd2(cache_p + 6); + hook = hookset->hooks + EB_HOOK_END_MONO_GRAPHIC; + break; + + case 0x53: + /* end of EB sound */ + in_step = 10; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + break; + + case 0x59: + /* end of MPEG movie */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_MPEG; + break; + + case 0x5c: + /* end of inline color graphic */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_IN_COLOR_GRAPHIC; + break; + + case 0x61: + /* end of keyword */ + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_KEYWORD; + break; + + case 0x62: + /* end of reference */ + in_step = 8; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 3; + argv[1] = eb_bcd4(cache_p + 2); + argv[2] = eb_bcd2(cache_p + 6); + hook = hookset->hooks + EB_HOOK_END_REFERENCE; + break; + + case 0x63: + /* end of an entry of a candidate */ + in_step = 8; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 3; + argv[1] = eb_bcd4(cache_p + 2); + argv[2] = eb_bcd2(cache_p + 6); + if (argv[1] == 0 && argv[2] == 0) + hook = hookset->hooks + EB_HOOK_END_CANDIDATE_LEAF; + else + hook = hookset->hooks + EB_HOOK_END_CANDIDATE_GROUP; + break; + + case 0x64: + /* end of monochrome graphic */ + in_step = 8; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 3; + argv[1] = eb_bcd4(cache_p + 2); + argv[2] = eb_bcd2(cache_p + 6); + hook = hookset->hooks + EB_HOOK_END_MONO_GRAPHIC; + break; + + case 0x6b: + /* end of paged reference */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_GRAPHIC_REFERENCE; + break; + + case 0x6a: + /* end of WAVE sound */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_WAVE; + break; + + case 0x6c: + /* end of image page */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->text_status = EB_TEXT_STATUS_SOFT_STOP; + hook = hookset->hooks + EB_HOOK_END_IMAGE_PAGE; + break; + + case 0x6d: + /* end of color graphic (BMP or JPEG) */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_COLOR_GRAPHIC; + break; + + case 0x6f: + /* end of clickable area */ + in_step = 2; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + hook = hookset->hooks + EB_HOOK_END_CLICKABLE_AREA; + break; + + case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: + case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: case 0x7b: + case 0x7c: case 0x7d: case 0x7e: case 0x7f: + case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: + case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: + case 0x8c: case 0x8d: case 0x8e: case 0x8f: + in_step = 2; + context->skip_code = eb_uint1(cache_p + 1) + 0x20; + break; + + case 0xd0: + /* halfwidth local character for UTF-8 text */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + argv[0] = eb_uint2(cache_p + 2) | 0x8080; + hook = hookset->hooks + EB_HOOK_NARROW_FONT; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + ; /* do nothing */ + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_NARROW_FONT, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + break; + case 0xd1: + /* fullwidth local character for UTF-8 text */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + argv[0] = eb_uint2(cache_p + 2) | 0x8080; + hook = hookset->hooks + EB_HOOK_WIDE_FONT; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + ; /* do nothing */ + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_WIDE_FONT, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + case 0xe0: + /* character modification */ + in_step = 4; + if (cache_rest_length < in_step) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + argc = 2; + argv[1] = eb_uint2(cache_p + 2); + hook = hookset->hooks + EB_HOOK_BEGIN_DECORATION; + + /* Some old EB books don't take an argument. */ + if (book->disc_code != EB_DISC_EPWING + && eb_uint1(cache_p + 2) >= 0x1f) { + in_step = 2; + hook = &null_hook; + } + break; + + case 0xe1: + in_step = 2; + hook = hookset->hooks + EB_HOOK_END_DECORATION; + break; + + case 0xe4: case 0xe6: case 0xe8: case 0xea: case 0xec: case 0xee: + case 0xf0: case 0xf2: case 0xf4: case 0xf6: case 0xf8: case 0xfa: + case 0xfc: case 0xfe: + in_step = 2; + context->skip_code = eb_uint1(cache_p + 1) + 0x01; + break; + + default: + in_step = 2; + if (context->skip_code == eb_uint1(cache_p + 1)) + context->skip_code = SKIP_CODE_NONE; + break; + } + + if (context->skip_code == SKIP_CODE_NONE + && hook->function != NULL + && !forward_only) { + error_code = hook->function(book, appendix, container, + hook->code, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + + /* + * Post process. Clean a candidate. + */ + if (c2 == 0x63) { + /* end of an entry of candidate */ + context->is_candidate = 0; + } + + } else if (book->character_code == EB_CHARCODE_ISO8859_1) { + /* + * The book is mainly written in ISO 8859 1. + */ + context->printable_count++; + + if ((0x20 <= c1 && c1 < 0x7f) || (0xa0 <= c1 && c1 <= 0xff)) { + /* + * This is an ISO 8859 1 character. + */ + in_step = 1; + argv[0] = eb_uint1(cache_p); + + if (context->skip_code == SKIP_CODE_NONE) { + if (context->is_candidate + && candidate_length < EB_MAX_WORD_LENGTH) { + *candidate_p++ = c1 | 0x80; + *candidate_p = '\0'; + candidate_length++; + } + + hook = hookset->hooks + EB_HOOK_ISO8859_1; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte1(book, c1); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_ISO8859_1, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } + } else { + /* + * This is a local character. + */ + if (cache_rest_length < 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + in_step = 2; + argv[0] = eb_uint2(cache_p); + if (context->skip_code == SKIP_CODE_NONE) { + hook = hookset->hooks + EB_HOOK_NARROW_FONT; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte1(book, c1); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_NARROW_FONT, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } + } + + } else if (book->character_code == EB_CHARCODE_UTF8) { + /* + * The book is mainly written in UTF-8. + */ + context->printable_count++; + + if (!(c1 & 0x80)) { + argv[0] = c1; + in_step = 1; + } else if ((cache_rest_length >= 2) && !(c1 & 0x20)) { + argv[0] = ((c1 & 0x1f) << 6) + + ((eb_uint1(cache_p + 1) & 0x3f)); + in_step = 2; + } else if ((cache_rest_length >= 3) && !(c1 & 0x10)) { + argv[0] = ((c1 & 0x0f) << 12) + + ((eb_uint1(cache_p + 1) & 0x3f) << 6) + + ((eb_uint1(cache_p + 2) & 0x3f) ); + in_step = 3; + } else if ((cache_rest_length >= 4) && !(c1 & 0x08)) { + argv[0] = ((c1 & 0x07) << 18) + + ((eb_uint1(cache_p + 1) & 0x3f) << 12) + + ((eb_uint1(cache_p + 2) & 0x3f) << 6) + + ((eb_uint1(cache_p + 3) & 0x3f) ); + in_step = 4; + } else { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + if (context->skip_code == SKIP_CODE_NONE) { + if (context->is_candidate + && candidate_length + in_step <= EB_MAX_WORD_LENGTH) { + memcpy(candidate_p, cache_p, in_step); + candidate_p += in_step; + *candidate_p = '\0'; + candidate_length += in_step; + } + + if (!forward_only) { + if (in_step == 1) { + hook = hookset->hooks + EB_HOOK_ISO8859_1; + if (hook->function == NULL) { + error_code = eb_write_text_byte1(book, c1); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, + container, EB_HOOK_ISO8859_1, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } else { + hook = hookset->hooks + EB_HOOK_UNICODE; + if (hook->function == NULL) { + error_code = eb_write_text(book, cache_p, in_step); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, + container, EB_HOOK_UNICODE, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } + } + } + } else { + /* + * The book is written in JIS X 0208 or JIS X 0208 + GB 2312. + */ + context->printable_count++; + in_step = 2; + + if (cache_rest_length < 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + c2 = eb_uint1(cache_p + 1); + + if (context->skip_code != SKIP_CODE_NONE) { + /* nothing to be done. */ + } else if (0x20 < c1 && c1 < 0x7f && 0x20 < c2 && c2 < 0x7f) { + /* + * This is a JIS X 0208 KANJI character. + */ + argv[0] = eb_uint2(cache_p) | 0x8080; + + if (context->is_candidate + && candidate_length < EB_MAX_WORD_LENGTH - 1) { + *candidate_p++ = c1 | 0x80; + *candidate_p++ = c2 | 0x80; + *candidate_p = '\0'; + candidate_length += 2; + } + + if (context->ebxac_gaiji_flag) { + hook = hookset->hooks + EB_HOOK_EBXAC_GAIJI; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1 | 0x80, + c2 | 0x80); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_EBXAC_GAIJI, 0, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } else if (context->narrow_flag) { + hook = hookset->hooks + EB_HOOK_NARROW_JISX0208; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1 | 0x80, + c2 | 0x80); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_NARROW_JISX0208, 0, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } else { + hook = hookset->hooks + EB_HOOK_WIDE_JISX0208; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1 | 0x80, + c2 | 0x80); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_WIDE_JISX0208, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } + } else if (0x20 < c1 && c1 < 0x7f && 0xa0 < c2 && c2 < 0xff) { + /* + * This is a GB 2312 HANJI character. + */ + argv[0] = eb_uint2(cache_p) | 0x8000; + + if (context->is_candidate + && candidate_length < EB_MAX_WORD_LENGTH - 1) { + *candidate_p++ = c1 | 0x80; + *candidate_p++ = c2; + *candidate_p = '\0'; + candidate_length += 2; + } + + hook = hookset->hooks + EB_HOOK_GB2312; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1 | 0x80, c2); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_GB2312, 0, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } else if (0xa0 < c1 && c1 < 0xff && 0x20 < c2 && c2 < 0x7f) { + /* + * This is a local character. + */ + argv[0] = eb_uint2(cache_p); + + if (context->narrow_flag) { + hook = hookset->hooks + EB_HOOK_NARROW_FONT; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1, c2); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_NARROW_FONT, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } else { + hook = hookset->hooks + EB_HOOK_WIDE_FONT; + if (forward_only) { + ; /* do nothing */ + } else if (hook->function == NULL) { + error_code = eb_write_text_byte2(book, c1, c2); + if (error_code != EB_SUCCESS) + goto failed; + } else { + error_code = hook->function(book, appendix, container, + EB_HOOK_WIDE_FONT, argc, argv); + if (error_code != EB_SUCCESS) + goto failed; + } + } + } + } + + /* + * Update variables. + */ + cache_p += in_step; + cache_rest_length -= in_step; + context->location += in_step; + in_step = 0; + + /* + * Break if an unprocessed character is remained. + */ + if (context->unprocessed != NULL) + break; + /* + * Break if EB_TEXT_STATUS_SOFT_STOP is set. + */ + if (context->text_status == EB_TEXT_STATUS_SOFT_STOP) + break; + } + + succeeded: + if (!forward_only) { + *text_length = (context->out - text); + *(context->out) = '\0'; + } + + LOG(("out: eb_read_text_internal(text_length=%ld) = %s", + (text_length == NULL) ? 0L : (long)*text_length, + eb_error_string(EB_SUCCESS))); + pthread_mutex_unlock(&cache_mutex); + + return EB_SUCCESS; + + /* + * An error occurs... + * Discard cache if read error occurs. + */ + failed: + if (!forward_only) { + *text_length = -1; + *text = '\0'; + } + if (error_code == EB_ERR_FAIL_READ_TEXT) + cache_book_code = EB_BOOK_NONE; + LOG(("out: eb_read_text_internal() = %s", eb_error_string(error_code))); + pthread_mutex_unlock(&cache_mutex); + return error_code; +} + + +/* + * Check whether an escape sequence is stop-code or not. + */ +static int +eb_is_stop_code(EB_Book *book, EB_Appendix *appendix, unsigned int code0, + unsigned int code1) +{ + int result; + + if (appendix == NULL + || appendix->subbook_current == NULL + || appendix->subbook_current->stop_code0 == 0) { + result = (code0 == 0x1f41 + && code1 == book->text_context.auto_stop_code); + } else { + result = (code0 == appendix->subbook_current->stop_code0 + && code1 == appendix->subbook_current->stop_code1); + } + + return result; +} + + +/* + * Have the current text context reached the end of text? + */ +int +eb_is_text_stopped(EB_Book *book) +{ + int is_stopped = 0; + + eb_lock(book); + LOG(("in: eb_is_text_stopped(book=%d)", (int)book->code)); + + if (book->subbook_current != NULL) { + if (book->text_context.code == EB_TEXT_HEADING + || book->text_context.code == EB_TEXT_MAIN_TEXT + || book->text_context.code == EB_TEXT_OPTIONAL_TEXT) { + if (book->text_context.text_status != EB_TEXT_STATUS_CONTINUED + && book->text_context.unprocessed == NULL) { + is_stopped = 1; + } + } + } + + LOG(("out: eb_is_text_stopped() = %d", is_stopped)); + return is_stopped; +} + + +/* + * Write a byte to a text buffer. + */ +EB_Error_Code +eb_write_text_byte1(EB_Book *book, int byte1) +{ + EB_Error_Code error_code; + char stream[1]; + + LOG(("in: eb_write_text_byte1(book=%d, byte1=%d)", + (int)book->code, byte1)); + + /* + * If the text buffer has enough space to write `byte1', + * save the byte in `book->text_context.unprocessed'. + */ + if (book->text_context.unprocessed != NULL + || book->text_context.out_rest_length < 1) { + *(unsigned char *)stream = byte1; + error_code = eb_write_text(book, stream, 1); + if (error_code != EB_SUCCESS) + goto failed; + } else { + *(book->text_context.out) = byte1; + book->text_context.out++; + book->text_context.out_rest_length--; + book->text_context.out_step++; + } + + LOG(("out: eb_write_text_byte1() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_write_text_byte1() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Write two bytes to a text buffer for output. + */ +EB_Error_Code +eb_write_text_byte2(EB_Book *book, int byte1, int byte2) +{ + EB_Error_Code error_code; + char stream[2]; + + LOG(("in: eb_write_text_byte2(book=%d, byte1=%d, byte2=%d)", + (int)book->code, byte1, byte2)); + + /* + * If the text buffer has enough space to write `byte1' and `byte2', + * save the bytes in `book->text_context.unprocessed'. + */ + if (book->text_context.unprocessed != NULL + || book->text_context.out_rest_length < 2) { + *(unsigned char *)stream = byte1; + *(unsigned char *)(stream + 1) = byte2; + error_code = eb_write_text(book, stream, 2); + if (error_code != EB_SUCCESS) + goto failed; + } else { + *(book->text_context.out) = byte1; + book->text_context.out++; + *(book->text_context.out) = byte2; + book->text_context.out++; + book->text_context.out_rest_length -= 2; + book->text_context.out_step += 2; + } + + LOG(("out: eb_write_text_byte2() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_write_text_byte2() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Write a string to a text buffer. + */ +EB_Error_Code +eb_write_text_string(EB_Book *book, const char *string) +{ + EB_Error_Code error_code; + size_t string_length; + + LOG(("in: eb_write_text_string(book=%d, string=%s)", + (int)book->code, eb_quoted_string(string))); + + /* + * If the text buffer has enough space to write `sting', + * save the string in `book->text_context.unprocessed'. + */ + string_length = strlen(string); + + if (book->text_context.unprocessed != NULL + || book->text_context.out_rest_length < string_length) { + error_code = eb_write_text(book, string, string_length); + if (error_code != EB_SUCCESS) + goto failed; + } else { + memcpy(book->text_context.out, string, string_length); + book->text_context.out += string_length; + book->text_context.out_rest_length -= string_length; + book->text_context.out_step += string_length; + } + + LOG(("out: eb_write_text_string() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_write_text_string() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Write a stream with `length' bytes to a text buffer. + */ +EB_Error_Code +eb_write_text(EB_Book *book, const char *stream, size_t stream_length) +{ + EB_Error_Code error_code; + char *reallocated; + + LOG(("in: eb_write_text(book=%d, stream=%s)", + (int)book->code, eb_quoted_stream(stream, stream_length))); + + /* + * If the text buffer has enough space to write `stream', + * save the stream in `book->text_context.unprocessed'. + */ + if (book->text_context.unprocessed != NULL) { + reallocated = (char *)realloc(book->text_context.unprocessed, + book->text_context.unprocessed_size + stream_length); + if (reallocated == NULL) { + free(book->text_context.unprocessed); + book->text_context.unprocessed = NULL; + book->text_context.unprocessed_size = 0; + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + memcpy(reallocated + book->text_context.unprocessed_size, stream, + stream_length); + book->text_context.unprocessed = reallocated; + book->text_context.unprocessed_size += stream_length; + + } else if (book->text_context.out_rest_length < stream_length) { + book->text_context.unprocessed + = (char *)malloc(book->text_context.out_step + stream_length); + if (book->text_context.unprocessed == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + book->text_context.unprocessed_size + = book->text_context.out_step + stream_length; + memcpy(book->text_context.unprocessed, + book->text_context.out - book->text_context.out_step, + book->text_context.out_step); + memcpy(book->text_context.unprocessed + book->text_context.out_step, + stream, stream_length); + book->text_context.out -= book->text_context.out_step; + book->text_context.out_step = 0; + + } else { + memcpy(book->text_context.out, stream, stream_length); + book->text_context.out += stream_length; + book->text_context.out_rest_length -= stream_length; + book->text_context.out_step += stream_length; + } + + LOG(("out: eb_write_text() = %s", eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_write_text() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the current candidate word for multi search. + */ +const char * +eb_current_candidate(EB_Book *book) +{ + LOG(("in: eb_current_candidate(book=%d)", (int)book->code)); + + if (!book->text_context.is_candidate) + book->text_context.candidate[0] = '\0'; + + LOG(("out: eb_current_candidate() = %s", + eb_quoted_string(book->text_context.candidate))); + + return book->text_context.candidate; +} + + +/* + * Forward text position to the next paragraph. + */ +EB_Error_Code +eb_forward_text(EB_Book *book, EB_Appendix *appendix) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_forward_text(book=%d, appendix=%d)", (int)book->code, + (appendix != NULL) ? (int)appendix->code : 0)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + if (book->text_context.code == EB_TEXT_SEEKED) { + book->text_context.code = EB_TEXT_MAIN_TEXT; + } else if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code != EB_TEXT_MAIN_TEXT + && book->text_context.code != EB_TEXT_OPTIONAL_TEXT) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + if (book->text_context.text_status == EB_TEXT_STATUS_SOFT_STOP) { + book->text_context.text_status = EB_TEXT_STATUS_CONTINUED; + goto succeeded; + } else if (book->text_context.text_status == EB_TEXT_STATUS_HARD_STOP) { + error_code = EB_ERR_END_OF_CONTENT; + goto failed; + } + + /* + * Forward text. + */ + error_code = eb_read_text_internal(book, appendix, &eb_default_hookset, + NULL, EB_SIZE_PAGE, NULL, NULL, 1); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Unlock the book and hookset. + */ + succeeded: + eb_reset_text_context(book); + LOG(("out: eb_forward_text() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (error_code != EB_ERR_END_OF_CONTENT) + eb_invalidate_text_context(book); + LOG(("out: eb_forward_text() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Forward heading position to the next paragraph. + * (for keyword search.) + */ +EB_Error_Code +eb_forward_heading(EB_Book *book) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_forward_heading(book=%d)", (int)book->code)); + + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + if (book->text_context.code == EB_TEXT_SEEKED) { + book->text_context.code = EB_TEXT_HEADING; + } else if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code != EB_TEXT_HEADING) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + if (book->text_context.text_status == EB_TEXT_STATUS_SOFT_STOP) { + book->text_context.text_status = EB_TEXT_STATUS_CONTINUED; + goto succeeded; + } else if (book->text_context.text_status == EB_TEXT_STATUS_HARD_STOP) { + error_code = EB_ERR_END_OF_CONTENT; + goto failed; + } + + /* + * Forward text. + */ + error_code = eb_read_text_internal(book, NULL, &eb_default_hookset, + NULL, EB_SIZE_PAGE, NULL, NULL, 1); + if (error_code != EB_SUCCESS) + goto failed; + + eb_reset_text_context(book); + + /* + * Unlock cache data. + */ + succeeded: + LOG(("out: eb_forward_heading() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + if (error_code != EB_ERR_END_OF_CONTENT) + eb_invalidate_text_context(book); + LOG(("out: eb_forward_heading() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Backward text position to the previous paragraph. + */ +EB_Error_Code +eb_backward_text(EB_Book *book, EB_Appendix *appendix) +{ + EB_Error_Code error_code; + EB_Text_Context saved_context; + off_t current_location; + off_t forward_location; + off_t read_location; + off_t backward_location = -1; + char text_buffer[EB_SIZE_PAGE]; + char *text_buffer_p; + ssize_t read_result; + int stop_code0, stop_code1; + + eb_lock(&book->lock); + LOG(("in: eb_backward_text(book=%d, appendix=%d)", (int)book->code, + (appendix != NULL) ? (int)appendix->code : 0)); + + /* + * Current subbook must have been set and START file must exist. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + if (zio_file(&book->subbook_current->text_zio) < 0) { + error_code = EB_ERR_NO_TEXT; + goto failed; + } + + if (book->text_context.code == EB_TEXT_SEEKED) { + book->text_context.code = EB_TEXT_MAIN_TEXT; + } else if (book->text_context.code == EB_TEXT_INVALID) { + error_code = EB_ERR_NO_PREV_SEEK; + goto failed; + } else if (book->text_context.code != EB_TEXT_MAIN_TEXT + && book->text_context.code != EB_TEXT_OPTIONAL_TEXT) { + error_code = EB_ERR_DIFF_CONTENT; + goto failed; + } + + /* + * Forward text to get auto-stop-code and location where the current + * text stops. + */ + if (book->text_context.text_status != EB_TEXT_STATUS_CONTINUED) { + forward_location = book->text_context.location; + } else { + memcpy(&saved_context, &book->text_context, sizeof(EB_Text_Context)); + error_code = eb_read_text_internal(book, NULL, &eb_default_hookset, + NULL, EB_SIZE_PAGE, NULL, NULL, 1); + if (error_code != EB_SUCCESS && error_code != EB_ERR_END_OF_CONTENT) + goto failed; + forward_location = book->text_context.location; + saved_context.auto_stop_code = book->text_context.auto_stop_code; + memcpy(&book->text_context, &saved_context, sizeof(EB_Text_Context)); + } + + /* + * Determine stop-code. + */ + if (appendix == NULL + || appendix->subbook_current == NULL + || appendix->subbook_current->stop_code0 == 0) { + stop_code0 = 0x1f41; + stop_code1 = book->text_context.auto_stop_code; + } else { + stop_code0 = appendix->subbook_current->stop_code0; + stop_code1 = appendix->subbook_current->stop_code1; + } + + /* + * If the text locator has pointed to `0x1f02' (beginning of text), + * we cannot backward. + */ + if (zio_lseek(&book->subbook_current->text_zio, + book->text_context.location, SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&book->subbook_current->text_zio, text_buffer, 2) != 2) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + if (eb_uint2(text_buffer) == 0x1f02) { + error_code = EB_ERR_END_OF_CONTENT; + goto failed; + } + + /* + * Backward text. + */ + current_location = book->text_context.location; + + while (0 < book->text_context.location) { + size_t backward_distance; + int i; + + /* + * Seek and read text. + * + * Since a stop code occupies 4 bytes and we start scanning + * stop-code at preceding byte of the current location, we read + * text in front of the current location and following 3 bytes. + * + * start scanning + * | current location + * | | + * [..] [..] [..] [1F] [41] [00] [01] + * =================== + * may be stop-code + */ + if (book->text_context.location < EB_SIZE_PAGE + 3) + read_location = 0; + else + read_location = book->text_context.location - EB_SIZE_PAGE + 3; + backward_distance = book->text_context.location - read_location; + + if (zio_lseek(&book->subbook_current->text_zio, read_location, + SEEK_SET) == -1) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + + memset(text_buffer, 0x00, EB_SIZE_PAGE); + read_result = zio_read(&book->subbook_current->text_zio, text_buffer, + EB_SIZE_PAGE); + if (read_result < 0 || read_result < backward_distance) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Scan stop-code. + */ + text_buffer_p = text_buffer + backward_distance - 1; + i = backward_distance - 1; + + while (0 <= i) { + if (eb_uint2(text_buffer_p) == 0x1f02) { + book->text_context.location = read_location + i; + if (current_location <= book->text_context.location + 2) { + error_code = EB_ERR_END_OF_CONTENT; + goto failed; + } + backward_location = book->text_context.location; + goto loop_end; + } + if (book->text_context.code != EB_TEXT_MAIN_TEXT + || eb_uint2(text_buffer_p) != stop_code0 + || eb_uint2(text_buffer_p + 2) != stop_code1) { + text_buffer_p--; + i--; + continue; + } + + eb_reset_text_context(book); + book->text_context.location = read_location + i; + error_code = eb_read_text_internal(book, appendix, + &eb_default_hookset, NULL, EB_SIZE_PAGE, NULL, NULL, 1); + if (error_code != EB_SUCCESS + && error_code != EB_ERR_END_OF_CONTENT) + goto failed; + + if (book->text_context.location >= current_location - 4 + && book->text_context.location <= current_location + 4 + && backward_location < 0) + forward_location = current_location; + if (book->text_context.location >= forward_location - 4 + && book->text_context.location <= forward_location + 4) + backward_location = read_location + i; + else if (book->text_context.location < forward_location) + goto loop_end; + + text_buffer_p--; + i--; + } + + book->text_context.location = read_location - 1; + } + + loop_end: + if (backward_location < 0) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + eb_reset_text_context(book); + + /* + * Unlock the book and hookset. + */ + LOG(("out: eb_forward_text() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_invalidate_text_context(book); + LOG(("out: eb_backward_text() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/readtext.lo b/lib/ebu/ebu/readtext.lo new file mode 100644 index 0000000..c68a57f --- /dev/null +++ b/lib/ebu/ebu/readtext.lo @@ -0,0 +1,12 @@ +# readtext.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/readtext.o' + +# Name of the non-PIC object +non_pic_object='readtext.o' + diff --git a/lib/ebu/ebu/search.c b/lib/ebu/ebu/search.c new file mode 100644 index 0000000..2155d4b --- /dev/null +++ b/lib/ebu/ebu/search.c @@ -0,0 +1,1656 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "text.h" +#include "build-post.h" + +/* + * Page-ID macros. + */ +#define PAGE_ID_IS_LEAF_LAYER(page_id) (((page_id) & 0x80) == 0x80) +#define PAGE_ID_IS_LAYER_START(page_id) (((page_id) & 0x40) == 0x40) +#define PAGE_ID_IS_LAYER_END(page_id) (((page_id) & 0x20) == 0x20) +#define PAGE_ID_HAVE_GROUP_ENTRY(page_id) (((page_id) & 0x10) == 0x10) + +/* + * The maximum number of hit entries for tomporary hit lists. + * This is used in eb_hit_list(). + */ +#define EB_TMP_MAX_HITS 64 + +/* + * Book-code of the book in which you want to search a word. + */ +static EB_Book_Code cache_book_code = EB_BOOK_NONE; + +/* + * Cache buffer for the current page. + */ +static char cache_buffer[EB_SIZE_PAGE]; + +/* + * Cache buffer for the current page. + */ +static int cache_page; + +/* + * Mutex for cache variables. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t cache_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Unexported functions. + */ +static EB_Error_Code eb_hit_list_word(EB_Book *book, + EB_Search_Context *context, int max_hit_count, EB_Hit *hit_list, + int *hit_count); +static EB_Error_Code eb_hit_list_keyword(EB_Book *book, + EB_Search_Context *context, int max_hit_count, EB_Hit *hit_list, + int *hit_count); +static EB_Error_Code eb_hit_list_multi(EB_Book *book, + EB_Search_Context *context, int max_hit_count, EB_Hit *hit_list, + int *hit_count); +static void eb_and_hit_lists(EB_Hit and_list[EB_TMP_MAX_HITS], + int *and_count, int max_and_count, int hit_list_count, + EB_Hit hit_lists[EB_NUMBER_OF_SEARCH_CONTEXTS][EB_TMP_MAX_HITS], + int hit_counts[EB_NUMBER_OF_SEARCH_CONTEXTS]); + + +/* + * Intialize search contexts of `book'. + */ +void +eb_initialize_search_contexts(EB_Book *book) +{ + EB_Search_Context *context; + int i; + + LOG(("in: eb_initialize_search_context(book=%d)", (int)book->code)); + + for (i = 0, context = book->search_contexts; + i < EB_NUMBER_OF_SEARCH_CONTEXTS; i++, context++) { + context->code = EB_SEARCH_NONE; + context->compare_pre = NULL; + context->compare_single = NULL; + context->compare_group = NULL; + context->comparison_result = -1; + context->word[0] = '\0'; + context->canonicalized_word[0] = '\0'; + context->page = 0; + context->offset = 0; + context->page_id = 0; + context->entry_count = 0; + context->entry_index = 0; + context->entry_length = 0; + context->entry_arrangement = EB_ARRANGE_INVALID; + context->in_group_entry = 0; + context->keyword_heading.page = 0; + context->keyword_heading.offset = 0; + } + + LOG(("out: eb_initialize_search_context()")); +} + + +/* + * Finalize search contexts of `book'. + */ +void +eb_finalize_search_contexts(EB_Book *book) +{ + LOG(("in+out: eb_finalize_search_context(book=%d)", (int)book->code)); + + /* nothing to be done */ +} + + +/* + * Reset search context of `book'. + */ +void +eb_reset_search_contexts(EB_Book *book) +{ + LOG(("in: eb_reset_search_context(book=%d)", (int)book->code)); + + eb_initialize_search_contexts(book); + + LOG(("out: eb_reset_search_context()")); +} + + +/* + * Intialize a search element. + */ +void +eb_initialize_search(EB_Search *search) +{ + search->index_id = 0; + search->start_page = 0; + search->end_page = 0; + search->candidates_page = 0; + search->katakana = EB_INDEX_STYLE_CONVERT; + search->lower = EB_INDEX_STYLE_CONVERT; + search->mark = EB_INDEX_STYLE_DELETE; + search->long_vowel = EB_INDEX_STYLE_CONVERT; + search->double_consonant = EB_INDEX_STYLE_CONVERT; + search->contracted_sound = EB_INDEX_STYLE_CONVERT; + search->voiced_consonant = EB_INDEX_STYLE_CONVERT; + search->small_vowel = EB_INDEX_STYLE_CONVERT; + search->p_sound = EB_INDEX_STYLE_CONVERT; + search->space = EB_INDEX_STYLE_DELETE; + search->label[0] = '\0'; +} + + +/* + * Finalize a search element. + */ +void +eb_finalize_search(EB_Search *search) +{ + /* nothing to be done */ +} + + +/* + * Initialize all search elements in the current subbook. + */ +void +eb_initialize_searches(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Multi_Search *multi; + EB_Search *entry; + int i, j; + + LOG(("in: eb_initialize_searches(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + eb_initialize_search(&subbook->word_alphabet); + eb_initialize_search(&subbook->word_asis); + eb_initialize_search(&subbook->word_kana); + eb_initialize_search(&subbook->endword_alphabet); + eb_initialize_search(&subbook->endword_asis); + eb_initialize_search(&subbook->endword_kana); + eb_initialize_search(&subbook->keyword); + eb_initialize_search(&subbook->cross); + eb_initialize_search(&subbook->menu); + eb_initialize_search(&subbook->image_menu); + eb_initialize_search(&subbook->copyright); + eb_initialize_search(&subbook->text); + eb_initialize_search(&subbook->sound); + + for (i = 0, multi = subbook->multis; i < EB_MAX_MULTI_SEARCHES; + i++, multi++) { + eb_initialize_search(&multi->search); + multi->title[0] = '\0'; + multi->entry_count = 0; + for (j = 0, entry = multi->entries; + j < EB_MAX_MULTI_ENTRIES; j++, entry++) { + eb_initialize_search(entry); + } + } + + LOG(("out: eb_initialize_searches(book=%d)", (int)book->code)); +} + + +/* + * Finalize all search elements in the current subbook. + */ +void +eb_finalize_searches(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Multi_Search *multi; + EB_Search *entry; + int i, j; + + LOG(("in: eb_finalize_searches(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + eb_finalize_search(&subbook->word_alphabet); + eb_finalize_search(&subbook->word_asis); + eb_finalize_search(&subbook->word_kana); + eb_finalize_search(&subbook->endword_alphabet); + eb_finalize_search(&subbook->endword_asis); + eb_finalize_search(&subbook->endword_kana); + eb_finalize_search(&subbook->keyword); + eb_finalize_search(&subbook->menu); + eb_finalize_search(&subbook->image_menu); + eb_finalize_search(&subbook->copyright); + eb_finalize_search(&subbook->text); + eb_finalize_search(&subbook->sound); + + for (i = 0, multi = subbook->multis; i < EB_MAX_KEYWORDS; + i++, multi++) { + eb_finalize_search(&multi->search); + multi->entry_count = 0; + for (j = 0, entry = multi->entries; + j < multi->entry_count; j++, entry++) { + eb_finalize_search(entry); + } + } + + LOG(("out: eb_finalize_searches()")); +} + + +/* + * Pre-search for a word described in the current search context. + * It descends intermediate indexes and reached to a leaf page that + * may have the word. + * If succeeded, 0 is returned. Otherwise -1 is returned. + */ +EB_Error_Code +eb_presearch_word(EB_Book *book, EB_Search_Context *context) +{ + EB_Error_Code error_code; + int next_page; + int index_depth; + char *cache_p; + + pthread_mutex_lock(&cache_mutex); + LOG(("in: eb_presearch_word(book=%d)", (int)book->code)); + + /* + * Discard cache data. + */ + cache_book_code = EB_BOOK_NONE; + + /* + * Search the word in intermediate indexes. + * Find a page number of the leaf index page. + */ + for (index_depth = 0; index_depth < EB_MAX_INDEX_DEPTH; index_depth++) { + next_page = context->page; + + /* + * Seek and read a page. + */ + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) context->page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + cache_book_code = EB_BOOK_NONE; + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&book->subbook_current->text_zio, cache_buffer, + EB_SIZE_PAGE) != EB_SIZE_PAGE) { + cache_book_code = EB_BOOK_NONE; + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Get some data from the read page. + */ + context->page_id = eb_uint1(cache_buffer); + context->entry_length = eb_uint1(cache_buffer + 1); + if (context->entry_length == 0) + context->entry_arrangement = EB_ARRANGE_VARIABLE; + else + context->entry_arrangement = EB_ARRANGE_FIXED; + context->entry_count = eb_uint2(cache_buffer + 2); + context->offset = 4; + cache_p = cache_buffer + 4; + + LOG(("aux: eb_presearch_word(page=%d, page_id=0x%02x, \ +entry_length=%d, entry_arrangement=%d, entry_count=%d)", + context->page, context->page_id, context->entry_length, + context->entry_arrangement, context->entry_count)); + + /* + * Exit the loop if it reached to the leaf index. + */ + if (PAGE_ID_IS_LEAF_LAYER(context->page_id)) + break; + + /* + * Search a page of next level index. + */ + for (context->entry_index = 0; + context->entry_index < context->entry_count; + context->entry_index++) { + if (EB_SIZE_PAGE < context->offset + context->entry_length + 4) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + if (context->compare_pre(context->canonicalized_word, cache_p, + context->entry_length) <= 0) { + next_page = eb_uint4(cache_p + context->entry_length); + break; + } + cache_p += context->entry_length + 4; + context->offset += context->entry_length + 4; + } + if (context->entry_count <= context->entry_index + || context->page == next_page) { + context->comparison_result = -1; + goto succeeded; + } + context->page = next_page; + } + + /* + * Check for the index depth. + */ + if (index_depth == EB_MAX_INDEX_DEPTH) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Update search context and cache information. + */ + context->entry_index = 0; + context->comparison_result = 1; + context->in_group_entry = 0; + cache_book_code = book->code; + cache_page = context->page; + + succeeded: + LOG(("out: eb_presearch_word() = %s", eb_error_string(EB_SUCCESS))); + pthread_mutex_unlock(&cache_mutex); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_presearch_word() = %s", eb_error_string(error_code))); + pthread_mutex_unlock(&cache_mutex); + return error_code; +} + +/* + * Get hit entries of a submitted search request. + */ +EB_Error_Code +eb_hit_list(EB_Book *book, int max_hit_count, EB_Hit *hit_list, int *hit_count) +{ + EB_Error_Code error_code; + EB_Search_Context temporary_context; + EB_Hit temporary_hit_lists[EB_NUMBER_OF_SEARCH_CONTEXTS][EB_TMP_MAX_HITS]; + int temporary_hit_counts[EB_NUMBER_OF_SEARCH_CONTEXTS]; + int more_hit_count; + int i; + + /* + * Lock cache data and the book. + */ + pthread_mutex_lock(&cache_mutex); + eb_lock(&book->lock); + LOG(("in: eb_hit_list(book=%d, max_hit_count=%d)", (int)book->code, + max_hit_count)); + + if (max_hit_count == 0) + goto succeeded; + + *hit_count = 0; + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Get a list of hit entries. + */ + switch (book->search_contexts->code) { + case EB_SEARCH_EXACTWORD: + case EB_SEARCH_WORD: + case EB_SEARCH_ENDWORD: + /* + * In case of exactword, word of endword search. + */ + error_code = eb_hit_list_word(book, book->search_contexts, + max_hit_count, hit_list, hit_count); + if (error_code != EB_SUCCESS) + goto failed; + break; + + case EB_SEARCH_KEYWORD: + case EB_SEARCH_CROSS: + /* + * In case of keyword or cross search. + */ + for (;;) { + int search_is_over = 0; + + for (i = 0; i < EB_MAX_KEYWORDS; i++) { + if (book->search_contexts[i].code != EB_SEARCH_KEYWORD + && book->search_contexts[i].code != EB_SEARCH_CROSS) + break; + memcpy(&temporary_context, book->search_contexts + i, + sizeof(EB_Search_Context)); + error_code = eb_hit_list_keyword(book, &temporary_context, + EB_TMP_MAX_HITS, temporary_hit_lists[i], + temporary_hit_counts + i); + if (error_code != EB_SUCCESS) + goto failed; + if (temporary_hit_counts[i] == 0) { + search_is_over = 1; + break; + } + } + if (search_is_over) + break; + + eb_and_hit_lists(hit_list + *hit_count, &more_hit_count, + max_hit_count - *hit_count, i, temporary_hit_lists, + temporary_hit_counts); + + for (i = 0; i < EB_MAX_MULTI_ENTRIES; i++) { + if (book->search_contexts[i].code != EB_SEARCH_KEYWORD + && book->search_contexts[i].code != EB_SEARCH_CROSS) + break; + error_code = eb_hit_list_keyword(book, + book->search_contexts + i, temporary_hit_counts[i], + temporary_hit_lists[i], temporary_hit_counts + i); + if (error_code != EB_SUCCESS) + goto failed; + } + + *hit_count += more_hit_count; + if (max_hit_count <= *hit_count) + break; + } + break; + + case EB_SEARCH_MULTI: + /* + * In case of multi search. + */ + for (;;) { + int search_is_over = 0; + + for (i = 0; i < EB_MAX_MULTI_ENTRIES; i++) { + if (book->search_contexts[i].code != EB_SEARCH_MULTI) + break; + memcpy(&temporary_context, book->search_contexts + i, + sizeof(EB_Search_Context)); + error_code = eb_hit_list_multi(book, &temporary_context, + EB_TMP_MAX_HITS, temporary_hit_lists[i], + temporary_hit_counts + i); + if (error_code != EB_SUCCESS) + goto failed; + if (temporary_hit_counts[i] == 0) { + search_is_over = 1; + break; + } + } + if (search_is_over) + break; + + eb_and_hit_lists(hit_list + *hit_count, &more_hit_count, + max_hit_count - *hit_count, i, temporary_hit_lists, + temporary_hit_counts); + + for (i = 0; i < EB_MAX_MULTI_ENTRIES; i++) { + if (book->search_contexts[i].code != EB_SEARCH_MULTI) + break; + error_code = eb_hit_list_multi(book, + book->search_contexts + i, temporary_hit_counts[i], + temporary_hit_lists[i], temporary_hit_counts + i); + if (error_code != EB_SUCCESS) + goto failed; + } + + *hit_count += more_hit_count; + if (max_hit_count <= *hit_count) + break; + } + break; + + default: + /* not reached */ + error_code = EB_ERR_NO_PREV_SEARCH; + goto failed; + } + + /* + * Unlock cache data and the book. + */ + succeeded: + LOG(("out: eb_hit_list(hit_count=%d) = %s", + *hit_count, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + pthread_mutex_unlock(&cache_mutex); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *hit_count = 0; + LOG(("out: eb_hit_list() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + pthread_mutex_unlock(&cache_mutex); + return error_code; +} + + +/* + * Get hit entries of a submitted exactword/word/endword search request. + */ +static EB_Error_Code +eb_hit_list_word(EB_Book *book, EB_Search_Context *context, int max_hit_count, + EB_Hit *hit_list, int *hit_count) +{ + EB_Error_Code error_code; + EB_Hit *hit; + int group_id; + char *cache_p; + + LOG(("in: eb_hit_list_word(book=%d, max_hit_count=%d)", (int)book->code, + max_hit_count)); + + hit = hit_list; + *hit_count = 0; + + /* + * If the result of previous comparison is negative value, all + * matched entries have been found. + */ + if (context->comparison_result < 0 || max_hit_count <= 0) + goto succeeded; + + for (;;) { + /* + * Read a page to search, if the page is not on the cache buffer. + * + * Cache may be missed by the two reasons: + * 1. the search process reaches to the end of an index page, + * and tries to read the next page. + * 2. Someone else used the cache buffer. + * + * At the case of 1, the search process reads the page and update + * the search context. At the case of 2. it reads the page but + * must not update the context! + */ + if (cache_book_code != book->code || cache_page != context->page) { + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) context->page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&book->subbook_current->text_zio, + cache_buffer, EB_SIZE_PAGE) != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Update search context. + */ + if (context->entry_index == 0) { + context->page_id = eb_uint1(cache_buffer); + context->entry_length = eb_uint1(cache_buffer + 1); + if (context->entry_length == 0) + context->entry_arrangement = EB_ARRANGE_VARIABLE; + else + context->entry_arrangement = EB_ARRANGE_FIXED; + context->entry_count = eb_uint2(cache_buffer + 2); + context->entry_index = 0; + context->offset = 4; + } + + cache_book_code = book->code; + cache_page = context->page; + } + + cache_p = cache_buffer + context->offset; + + LOG(("aux: eb_hit_list_word(page=%d, page_id=0x%02x, \ +entry_length=%d, entry_arrangement=%d, entry_count=%d)", + context->page, context->page_id, context->entry_length, + context->entry_arrangement, context->entry_count)); + + if (!PAGE_ID_IS_LEAF_LAYER(context->page_id)) { + /* + * Not a leaf index. It is an error. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_FIXED) { + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 12) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 6); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 10); + hit->text.page + = eb_uint4(cache_p + context->entry_length); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 4); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 12; + cache_p += context->entry_length + 12; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_VARIABLE) { + + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 1) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->entry_length = eb_uint1(cache_p); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 13) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p + 1, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 7); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 11); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 1); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 5); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 13; + cache_p += context->entry_length + 13; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else { + /* + * The leaf index have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + group_id = eb_uint1(cache_p); + + if (group_id == 0x00) { + /* + * 0x00 -- Single entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 14) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->canonicalized_word, + cache_p + 2, context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 8); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 12); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 2); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 6); + hit++; + *hit_count += 1; + } + context->in_group_entry = 0; + context->offset += context->entry_length + 14; + cache_p += context->entry_length + 14; + + } else if (group_id == 0x80) { + /* + * 0x80 -- Start of group entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 4) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->comparison_result + = context->compare_single(context->canonicalized_word, + cache_p + 4, context->entry_length); + context->in_group_entry = 1; + cache_p += context->entry_length + 4; + context->offset += context->entry_length + 4; + + } else if (group_id == 0xc0) { + /* + * Element of the group entry + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE < context->offset + 14) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + if (context->comparison_result == 0 + && context->in_group_entry + && context->compare_group(context->word, cache_p + 2, + context->entry_length) == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 8); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 12); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 2); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 6); + hit++; + *hit_count += 1; + } + context->offset += context->entry_length + 14; + cache_p += context->entry_length + 14; + + } else { + /* + * Unknown group ID. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + context->entry_index++; + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + } + + /* + * Go to a next page if available. + */ + if (PAGE_ID_IS_LAYER_END(context->page_id)) { + context->comparison_result = -1; + goto succeeded; + } + context->page++; + context->entry_index = 0; + } + + succeeded: + LOG(("out: eb_hit_list_word(hit_count=%d) = %s", + *hit_count, eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + * Discard cache if read error occurs. + */ + failed: + if (error_code == EB_ERR_FAIL_READ_TEXT) + cache_book_code = EB_BOOK_NONE; + *hit_count = 0; + LOG(("out: eb_hit_list_word() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get hit entries of a submitted keyword search request. + */ +static EB_Error_Code +eb_hit_list_keyword(EB_Book *book, EB_Search_Context *context, + int max_hit_count, EB_Hit *hit_list, int *hit_count) +{ + EB_Error_Code error_code; + EB_Text_Context text_context; + EB_Hit *hit; + int group_id; + char *cache_p; + + LOG(("in: eb_hit_list_keyword(book=%d, max_hit_count=%d)", + (int)book->code, max_hit_count)); + + hit = hit_list; + *hit_count = 0; + + /* + * Backup the text context in `book'. + */ + memcpy(&text_context, &book->text_context, sizeof(EB_Text_Context)); + + /* + * Seek text file. + */ + if (context->in_group_entry && context->comparison_result == 0) { + error_code = eb_seek_text(book, &context->keyword_heading); + if (error_code != EB_SUCCESS) + goto failed; + } + + /* + * If the result of previous comparison is negative value, all + * matched entries have been found. + */ + if (context->comparison_result < 0 || max_hit_count <= 0) + goto succeeded; + + for (;;) { + /* + * Read a page to search, if the page is not on the cache buffer. + * + * Cache may be missed by the two reasons: + * 1. the search process reaches to the end of an index page, + * and tries to read the next page. + * 2. Someone else used the cache buffer. + * + * At the case of 1, the search process reads the page and update + * the search context. At the case of 2. it reads the page but + * must not update the context! + */ + if (cache_book_code != book->code || cache_page != context->page) { + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) context->page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&book->subbook_current->text_zio, cache_buffer, + EB_SIZE_PAGE) != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Update search context. + */ + if (context->entry_index == 0) { + context->page_id = eb_uint1(cache_buffer); + context->entry_length = eb_uint1(cache_buffer + 1); + if (context->entry_length == 0) + context->entry_arrangement = EB_ARRANGE_VARIABLE; + else + context->entry_arrangement = EB_ARRANGE_FIXED; + context->entry_count = eb_uint2(cache_buffer + 2); + context->entry_index = 0; + context->offset = 4; + } + + cache_book_code = book->code; + cache_page = context->page; + } + + cache_p = cache_buffer + context->offset; + + LOG(("aux: eb_hit_list_keyword(page=%d, page_id=0x%02x, \ +entry_length=%d, entry_arrangement=%d, entry_count=%d)", + context->page, context->page_id, context->entry_length, + context->entry_arrangement, context->entry_count)); + + if (!PAGE_ID_IS_LEAF_LAYER(context->page_id)) { + /* + * Not a leaf index. It is an error. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_FIXED) { + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 12) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 6); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 10); + hit->text.page + = eb_uint4(cache_p + context->entry_length); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 4); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 12; + cache_p += context->entry_length + 12; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_VARIABLE) { + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 1) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->entry_length = eb_uint1(cache_p); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 13) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p + 1, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 7); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 11); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 1); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 5); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 13; + cache_p += context->entry_length + 13; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else { + /* + * The leaf index have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + group_id = eb_uint1(cache_p); + + if (group_id == 0x00) { + /* + * 0x00 -- Single entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 14) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->canonicalized_word, + cache_p + 2, context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 8); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 12); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 2); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 6); + hit++; + *hit_count += 1; + } + context->in_group_entry = 0; + context->offset += context->entry_length + 14; + cache_p += context->entry_length + 14; + + } else if (group_id == 0x80) { + /* + * 0x80 -- Start of group entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 12) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->comparison_result + = context->compare_single(context->word, cache_p + 6, + context->entry_length); + context->keyword_heading.page + = eb_uint4(cache_p + context->entry_length + 6); + context->keyword_heading.offset + = eb_uint2(cache_p + context->entry_length + 10); + context->in_group_entry = 1; + cache_p += context->entry_length + 12; + context->offset += context->entry_length + 12; + + if (context->comparison_result == 0) { + error_code + = eb_seek_text(book, &context->keyword_heading); + if (error_code != EB_SUCCESS) + goto failed; + } + + } else if (group_id == 0xc0) { + /* + * Element of the group entry. + */ + if (EB_SIZE_PAGE < context->offset + 7) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + if (context->in_group_entry + && context->comparison_result == 0) { + error_code + = eb_tell_text(book, &context->keyword_heading); + if (error_code != EB_SUCCESS) + goto failed; + hit->heading.page = context->keyword_heading.page; + hit->heading.offset = context->keyword_heading.offset; + hit->text.page = eb_uint4(cache_p + 1); + hit->text.offset = eb_uint2(cache_p + 5); + hit++; + *hit_count += 1; + error_code = eb_forward_heading(book); + if (error_code != EB_SUCCESS) + goto failed; + } + context->offset += 7; + cache_p += 7; + + } else { + /* + * Unknown group ID. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + context->entry_index++; + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + } + + /* + * Go to a next page if available. + */ + if (PAGE_ID_IS_LAYER_END(context->page_id)) { + context->comparison_result = -1; + goto succeeded; + } + context->page++; + context->entry_index = 0; + } + + succeeded: + if (context->in_group_entry && context->comparison_result == 0) { + error_code = eb_tell_text(book, &context->keyword_heading); + if (error_code != EB_SUCCESS) + goto failed; + } + + /* + * Restore the text context in `book'. + */ + memcpy(&book->text_context, &text_context, sizeof(EB_Text_Context)); + LOG(("out: eb_hit_list_keyword(hit_count=%d) = %s", + *hit_count, eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + * Discard cache if read error occurs. + */ + failed: + if (error_code == EB_ERR_FAIL_READ_TEXT) + cache_book_code = EB_BOOK_NONE; + *hit_count = 0; + memcpy(&book->text_context, &text_context, sizeof(EB_Text_Context)); + LOG(("out: eb_hit_list_keyword() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get hit entries of a submitted multi search request. + */ +static EB_Error_Code +eb_hit_list_multi(EB_Book *book, EB_Search_Context *context, int max_hit_count, + EB_Hit *hit_list, int *hit_count) +{ + EB_Error_Code error_code; + EB_Hit *hit; + int group_id; + char *cache_p; + + LOG(("in: eb_hit_list_multi(book=%d, max_hit_count=%d)", (int)book->code, + max_hit_count)); + + hit = hit_list; + *hit_count = 0; + + /* + * If the result of previous comparison is negative value, all + * matched entries have been found. + */ + if (context->comparison_result < 0 || max_hit_count <= 0) + goto succeeded; + + for (;;) { + /* + * Read a page to search, if the page is not on the cache buffer. + * + * Cache may be missed by the two reasons: + * 1. the search process reaches to the end of an index page, + * and tries to read the next page. + * 2. Someone else used the cache buffer. + * + * At the case of 1, the search process reads the page and update + * the search context. At the case of 2. it reads the page but + * must not update the context! + */ + if (cache_book_code != book->code || cache_page != context->page) { + if (zio_lseek(&book->subbook_current->text_zio, + ((off_t) context->page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&book->subbook_current->text_zio, cache_buffer, + EB_SIZE_PAGE) != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Update search context. + */ + if (context->entry_index == 0) { + context->page_id = eb_uint1(cache_buffer); + context->entry_length = eb_uint1(cache_buffer + 1); + if (context->entry_length == 0) + context->entry_arrangement = EB_ARRANGE_VARIABLE; + else + context->entry_arrangement = EB_ARRANGE_FIXED; + context->entry_count = eb_uint2(cache_buffer + 2); + context->entry_index = 0; + context->offset = 4; + } + + cache_book_code = book->code; + cache_page = context->page; + } + + cache_p = cache_buffer + context->offset; + + LOG(("aux: eb_hit_list_multi(page=%d, page_id=0x%02x, \ +entry_length=%d, entry_arrangement=%d, entry_count=%d)", + context->page, context->page_id, context->entry_length, + context->entry_arrangement, context->entry_count)); + + if (!PAGE_ID_IS_LEAF_LAYER(context->page_id)) { + /* + * Not a leaf index. It is an error. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_FIXED) { + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 13) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 6); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 10); + hit->text.page + = eb_uint4(cache_p + context->entry_length); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 4); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 12; + cache_p += context->entry_length + 12; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else if (!PAGE_ID_HAVE_GROUP_ENTRY(context->page_id) + && context->entry_arrangement == EB_ARRANGE_VARIABLE) { + /* + * The leaf index doesn't have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 1) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->entry_length = eb_uint1(cache_p); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 13) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->word, cache_p + 1, + context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 7); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 11); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 1); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 5); + hit++; + *hit_count += 1; + } + context->entry_index++; + context->offset += context->entry_length + 13; + cache_p += context->entry_length + 13; + + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + + } else { + /* + * The leaf index have a group entry. + * Find text and heading locations. + */ + while (context->entry_index < context->entry_count) { + if (EB_SIZE_PAGE < context->offset + 2) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + group_id = eb_uint1(cache_p); + + if (group_id == 0x00) { + /* + * 0x00 -- Single entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 14) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + context->comparison_result + = context->compare_single(context->canonicalized_word, + cache_p + 2, context->entry_length); + if (context->comparison_result == 0) { + hit->heading.page + = eb_uint4(cache_p + context->entry_length + 8); + hit->heading.offset + = eb_uint2(cache_p + context->entry_length + 12); + hit->text.page + = eb_uint4(cache_p + context->entry_length + 2); + hit->text.offset + = eb_uint2(cache_p + context->entry_length + 6); + hit++; + *hit_count += 1; + } + context->in_group_entry = 0; + context->offset += context->entry_length + 14; + cache_p += context->entry_length + 14; + + } else if (group_id == 0x80) { + /* + * 0x80 -- Start of group entry. + */ + context->entry_length = eb_uint1(cache_p + 1); + if (EB_SIZE_PAGE + < context->offset + context->entry_length + 6) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + context->comparison_result + = context->compare_single(context->word, cache_p + 6, + context->entry_length); + context->in_group_entry = 1; + cache_p += context->entry_length + 6; + context->offset += context->entry_length + 6; + + } else if (group_id == 0xc0) { + /* + * Element of the group entry. + */ + if (EB_SIZE_PAGE < context->offset + 13) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Compare word and pattern. + * If matched, add it to a hit list. + */ + if (context->in_group_entry + && context->comparison_result == 0) { + hit->heading.page = eb_uint4(cache_p + 7); + hit->heading.offset = eb_uint2(cache_p + 11); + hit->text.page = eb_uint4(cache_p + 1); + hit->text.offset = eb_uint2(cache_p + 5); + hit++; + *hit_count += 1; + } + context->offset += 13; + cache_p += 13; + + } else { + /* + * Unknown group ID. + */ + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + context->entry_index++; + if (context->comparison_result < 0 + || max_hit_count <= *hit_count) + goto succeeded; + } + } + + /* + * Go to a next page if available. + */ + if (PAGE_ID_IS_LAYER_END(context->page_id)) { + context->comparison_result = -1; + goto succeeded; + } + context->page++; + context->entry_index = 0; + } + + succeeded: + LOG(("out: eb_hit_list_multi(hit_count=%d) = %s", + *hit_count, eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + * Discard cache if read error occurs. + */ + failed: + if (error_code == EB_ERR_FAIL_READ_TEXT) + cache_book_code = EB_BOOK_NONE; + *hit_count = 0; + LOG(("out: eb_hit_list_multi() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Do AND operation of hit lists. + * and_list = hit_lists[0] AND hit_lists[1] AND ... + */ +static void +eb_and_hit_lists(EB_Hit and_list[EB_TMP_MAX_HITS], int *and_count, + int max_and_count, int hit_list_count, + EB_Hit hit_lists[EB_NUMBER_OF_SEARCH_CONTEXTS][EB_TMP_MAX_HITS], + int hit_counts[EB_NUMBER_OF_SEARCH_CONTEXTS]) +{ + int hit_indexes[EB_NUMBER_OF_SEARCH_CONTEXTS]; + int greatest_list; + int greatest_page; + int greatest_offset; + int current_page; + int current_offset; + int equal_count; + int increment_count; + int i; + + LOG(("in: eb_and_hit_lists(max_and_count=%d, hit_list_count=%d)", + max_and_count, hit_list_count)); + + /* + * Initialize indexes for the hit_lists[]. + */ + for (i = 0; i < hit_list_count; i++) + hit_indexes[i] = 0; + + /* + * Generate the new list `and_list'. + */ + *and_count = 0; + while (*and_count < max_and_count) { + /* + * Initialize variables. + */ + greatest_list = -1; + greatest_page = 0; + greatest_offset = 0; + current_page = 0; + current_offset = 0; + equal_count = 0; + + /* + * Compare the current elements of the lists. + */ + for (i = 0; i < hit_list_count; i++) { + /* + * If we have been reached to the tail of the hit_lists[i], + * skip the list. + */ + if (hit_counts[i] <= hit_indexes[i]) + continue; + + /* + * Compare {current_page, current_offset} and {greatest_page, + * greatest_offset}. + */ + current_page = hit_lists[i][hit_indexes[i]].text.page; + current_offset = hit_lists[i][hit_indexes[i]].text.offset; + + if (greatest_list == -1) { + greatest_page = current_page; + greatest_offset = current_offset; + greatest_list = i; + equal_count++; + } else if (greatest_page < current_page) { + greatest_page = current_page; + greatest_offset = current_offset; + greatest_list = i; + } else if (current_page == greatest_page + && greatest_offset < current_offset) { + greatest_page = current_page; + greatest_offset = current_offset; + greatest_list = i; + } else if (current_page == greatest_page + && current_offset == greatest_offset) { + equal_count++; + } + } + + if (equal_count == hit_list_count) { + /* + * All the current elements of the lists point to the same + * position. This is hit element. Increase indexes of all + * lists. + */ + memcpy(and_list + *and_count, hit_lists[0] + hit_indexes[0], + sizeof(EB_Hit)); + *and_count += 1; + for (i = 0; i < hit_list_count; i++) { + if (hit_counts[i] <= hit_indexes[i]) + continue; + hit_indexes[i]++; + } + } else { + /* + * This is not hit element. Increase indexes of all lists + * except for greatest element(s). If there is no list + * whose index is incremented, our job has been completed. + */ + increment_count = 0; + for (i = 0; i < hit_list_count; i++) { + if (hit_counts[i] <= hit_indexes[i]) + continue; + current_page = hit_lists[i][hit_indexes[i]].text.page; + current_offset = hit_lists[i][hit_indexes[i]].text.offset; + if (current_page != greatest_page + || current_offset != greatest_offset) { + hit_indexes[i]++; + increment_count++; + } + } + if (increment_count == 0) + break; + } + } + + /* + * Update hit_counts[]. + * The hit counts of the lists are set to the current indexes. + */ + for (i = 0; i < hit_list_count; i++) + hit_counts[i] = hit_indexes[i]; + + LOG(("out: eb_and_hit_lists(and_count=%d)", *and_count)); +} diff --git a/lib/ebu/ebu/search.lo b/lib/ebu/ebu/search.lo new file mode 100644 index 0000000..37a4d7d --- /dev/null +++ b/lib/ebu/ebu/search.lo @@ -0,0 +1,12 @@ +# search.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/search.o' + +# Name of the non-PIC object +non_pic_object='search.o' + diff --git a/lib/ebu/ebu/setword.c b/lib/ebu/ebu/setword.c new file mode 100644 index 0000000..08082ec --- /dev/null +++ b/lib/ebu/ebu/setword.c @@ -0,0 +1,1495 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static void eb_fix_word(EB_Book *book, const EB_Search *search, char *word, + char *canonicalized_word); +static EB_Error_Code eb_convert_latin(EB_Book *book, const char *input_word, + char *word, EB_Word_Code *word_code); +static EB_Error_Code eb_convert_utf8(EB_Book *book, const char *input_word, + char *word, EB_Word_Code *word_code); +static EB_Error_Code eb_convert_euc_jp(EB_Book *book, const char *input_word, + char *word, EB_Word_Code *word_code); +static void eb_convert_katakana_jis(char *word); +static void eb_convert_hiragana_jis(char *word); +static void eb_convert_lower_latin(char *word); +static void eb_convert_lower_jis(char *word); +static void eb_delete_marks_jis(char *word); +static void eb_convert_long_vowels_jis(char *word); +static void eb_delete_long_vowels_jis(char *word); +static void eb_convert_double_consonants_jis(char *word); +static void eb_convert_contracted_sounds_jis(char *word); +static void eb_convert_small_vowels_jis(char *word); +static void eb_convert_voiced_consonants_jis(char *word); +static void eb_convert_p_sounds_jis(char *word); +static void eb_delete_spaces_latin(char *word); +static void eb_delete_spaces_jis(char *word); +static void eb_reverse_word_latin(char *word); +static void eb_reverse_word_utf8(char *word); +static void eb_reverse_word_jis(char *word); + + +/* + * Make a fixed word and a cannonicalized word for `WORD SEARCH'. + * + * If `inputword' is a KANA word, EB_WORD_KANA is returned. + * If `inputword' is a alphabetic word, EB_WORD_ALPHABET is returned. + * Otherwise, -1 is returned. It means that an error occurs. + */ +EB_Error_Code +eb_set_word(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + const EB_Search *search; + + LOG(("in: eb_set_word(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Make a fixed word and a canonicalized word from `input_word'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) + error_code = eb_convert_latin(book, input_word, word, word_code); + else if (book->character_code == EB_CHARCODE_UTF8) + error_code = eb_convert_utf8(book, input_word, word, word_code); + else + error_code = eb_convert_euc_jp(book, input_word, word, word_code); + if (error_code != EB_SUCCESS) + goto failed; + strcpy(canonicalized_word, word); + + /* + * Determine search method. + */ + switch (*word_code) { + case EB_WORD_ALPHABET: + if (book->subbook_current->word_alphabet.start_page != 0) + search = &book->subbook_current->word_alphabet; + else if (book->subbook_current->word_asis.start_page != 0) + search = &book->subbook_current->word_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_KANA: + if (book->subbook_current->word_kana.start_page != 0) + search = &book->subbook_current->word_kana; + else if (book->subbook_current->word_asis.start_page != 0) + search = &book->subbook_current->word_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_OTHER: + if (book->subbook_current->word_asis.start_page != 0) + search = &book->subbook_current->word_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + default: + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Fix the word. + */ + eb_fix_word(book, search, word, canonicalized_word); + + LOG(("out: eb_set_word(word=%s, canonicalized_word=%s, word_code=%d) = %s", + eb_quoted_string(word), eb_quoted_string(canonicalized_word), + (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *canonicalized_word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_set_word() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Make a fixed word and a cannonicalized word for `ENDWORD SEARCH'. + * + * If `input_word' is a KANA word, EB_WORD_KANA is retuend. + * If `input_word' is a alphabetic word, EB_WORD_ALPHABET is retuend. + * Otherwise, -1 is returned. It means that an error occurs. + */ +EB_Error_Code +eb_set_endword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + const EB_Search *search; + + LOG(("in: eb_set_endword(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Make a fixed word and a canonicalized word from `input_word'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) + error_code = eb_convert_latin(book, input_word, word, word_code); + else if (book->character_code == EB_CHARCODE_UTF8) + error_code = eb_convert_utf8(book, input_word, word, word_code); + else + error_code = eb_convert_euc_jp(book, input_word, word, word_code); + if (error_code != EB_SUCCESS) + goto failed; + strcpy(canonicalized_word, word); + + /* + * Determine search method. + */ + switch (*word_code) { + case EB_WORD_ALPHABET: + if (book->subbook_current->endword_alphabet.start_page != 0) + search = &book->subbook_current->endword_alphabet; + else if (book->subbook_current->endword_asis.start_page != 0) + search = &book->subbook_current->endword_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_KANA: + if (book->subbook_current->endword_kana.start_page != 0) + search = &book->subbook_current->endword_kana; + else if (book->subbook_current->endword_asis.start_page != 0) + search = &book->subbook_current->endword_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_OTHER: + if (book->subbook_current->endword_asis.start_page != 0) + search = &book->subbook_current->endword_asis; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + default: + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Fix the word. + */ + eb_fix_word(book, search, word, canonicalized_word); + + /* + * Reverse the word. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) { + eb_reverse_word_latin(word); + eb_reverse_word_latin(canonicalized_word); + } else if (book->character_code == EB_CHARCODE_UTF8) { + eb_reverse_word_utf8(word); + eb_reverse_word_utf8(canonicalized_word); + } else { + eb_reverse_word_jis(word); + eb_reverse_word_jis(canonicalized_word); + } + + LOG(("out: eb_set_endword(word=%s, canonicalized_word=%s, word_code=%d) \ += %s", + eb_quoted_string(word), eb_quoted_string(canonicalized_word), + (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *canonicalized_word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_set_endword() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Make a fixed word and a cannonicalized word for `KEYWORD SEARCH' + * or `CROSS SEARCH'. + * + * If `inputword' is a KANA word, EB_WORD_KANA is returned. + * If `inputword' is a alphabetic word, EB_WORD_ALPHABET is returned. + * Otherwise, -1 is returned. It means that an error occurs. + */ +EB_Error_Code +eb_set_keyword(EB_Book *book, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + + LOG(("in: eb_set_keyword(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Make a fixed word and a canonicalized word from `input_word'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) + error_code = eb_convert_latin(book, input_word, word, word_code); + else if (book->character_code == EB_CHARCODE_UTF8) + error_code = eb_convert_utf8(book, input_word, word, word_code); + else + error_code = eb_convert_euc_jp(book, input_word, word, word_code); + if (error_code != EB_SUCCESS) + goto failed; + strcpy(canonicalized_word, word); + + /* + * Fix the word. + */ + eb_fix_word(book, &book->subbook_current->keyword, word, + canonicalized_word); + + LOG(("out: eb_set_keyword(word=%s, canonicalized_word=%s, word_code=%d) \ += %s", + eb_quoted_string(word), eb_quoted_string(canonicalized_word), + (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *canonicalized_word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_set_keyword() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Make a fixed word and a cannonicalized word for `MULTI SEARCH'. + * + * If `inputword' is a KANA word, EB_WORD_KANA is returned. + * If `inputword' is a alphabetic word, EB_WORD_ALPHABET is returned. + * Otherwise, -1 is returned. It means that an error occurs. + */ +EB_Error_Code +eb_set_multiword(EB_Book *book, EB_Multi_Search_Code multi_id, + EB_Multi_Entry_Code entry_id, const char *input_word, char *word, + char *canonicalized_word, EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + EB_Search *search; + + LOG(("in: eb_set_multiword(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Make a fixed word and a canonicalized word from `input_word'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) + error_code = eb_convert_latin(book, input_word, word, word_code); + else if (book->character_code == EB_CHARCODE_UTF8) + error_code = eb_convert_utf8(book, input_word, word, word_code); + else + error_code = eb_convert_euc_jp(book, input_word, word, word_code); + if (error_code != EB_SUCCESS) + goto failed; + strcpy(canonicalized_word, word); + + /* + * Fix the word. + */ + search = &book->subbook_current->multis[multi_id].entries[entry_id]; + eb_fix_word(book, search, word, canonicalized_word); + + LOG(("out: eb_set_multiword(word=%s, canonicalized_word=%s, word_code=%d) \ += %s", + eb_quoted_string(word), eb_quoted_string(canonicalized_word), + (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *canonicalized_word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_set_multiword() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Fix `canonicalized_word' and `word' according with `book->character_code' + * and `search'. + */ +static void +eb_fix_word(EB_Book *book, const EB_Search *search, char *word, + char *canonicalized_word) +{ + LOG(("in: eb_fix_word(book=%d, word=%s, canonicalized_word=%s)", + (int)book->code, eb_quoted_string(word), + eb_quoted_string(canonicalized_word))); + + if (search->index_id == 0xa1 && search->candidates_page != 0) + return; + + if (book->character_code == EB_CHARCODE_UTF8) { + return; + + } else if (book->character_code == EB_CHARCODE_ISO8859_1) { + if (search->space == EB_INDEX_STYLE_DELETE) + eb_delete_spaces_latin(canonicalized_word); + + if (search->lower == EB_INDEX_STYLE_CONVERT) + eb_convert_lower_latin(canonicalized_word); + + } else { + if (search->space == EB_INDEX_STYLE_DELETE) + eb_delete_spaces_jis(canonicalized_word); + + if (search->katakana == EB_INDEX_STYLE_CONVERT) + eb_convert_katakana_jis(canonicalized_word); + else if (search->katakana == EB_INDEX_STYLE_REVERSED_CONVERT) + eb_convert_hiragana_jis(canonicalized_word); + + if (search->lower == EB_INDEX_STYLE_CONVERT) + eb_convert_lower_jis(canonicalized_word); + + if (search->mark == EB_INDEX_STYLE_DELETE) + eb_delete_marks_jis(canonicalized_word); + + if (search->long_vowel == EB_INDEX_STYLE_CONVERT) + eb_convert_long_vowels_jis(canonicalized_word); + else if (search->long_vowel == EB_INDEX_STYLE_DELETE) + eb_delete_long_vowels_jis(canonicalized_word); + + if (search->double_consonant == EB_INDEX_STYLE_CONVERT) + eb_convert_double_consonants_jis(canonicalized_word); + + if (search->contracted_sound == EB_INDEX_STYLE_CONVERT) + eb_convert_contracted_sounds_jis(canonicalized_word); + + if (search->small_vowel == EB_INDEX_STYLE_CONVERT) + eb_convert_small_vowels_jis(canonicalized_word); + + if (search->voiced_consonant == EB_INDEX_STYLE_CONVERT) + eb_convert_voiced_consonants_jis(canonicalized_word); + + if (search->p_sound == EB_INDEX_STYLE_CONVERT) + eb_convert_p_sounds_jis(canonicalized_word); + } + + if (search->index_id != 0x70 && search->index_id != 0x90) + strcpy(word, canonicalized_word); + + LOG(("out: eb_fix_word(word=%s, canonicalized_word=%s)", + eb_quoted_string(word), eb_quoted_string(canonicalized_word))); +} + + +/* + * Convert `input_word' to ISO 8859 1 and put it into `word'. + * + * If `input_word' is a valid string to search, EB_WORD_ALPHABET is returned. + * Otherwise, -1 is returned. + */ +static EB_Error_Code +eb_convert_latin(EB_Book *book, const char *input_word, char *word, + EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + unsigned char *wp = (unsigned char *) word; + const unsigned char *inp = (const unsigned char *) input_word; + const unsigned char *tail; + unsigned char c1; + int word_length = 0; + + LOG(("in: eb_convert_latin(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Find the tail of `input_word'. + */ + tail = (const unsigned char *) input_word + strlen(input_word) - 1; + while ((const unsigned char *)input_word <= tail + && (*tail == ' ' || *tail == '\t')) + tail--; + tail++; + + /* + * Ignore spaces and tabs in the beginning of `input_word'. + */ + while (*inp == ' ' || *inp == '\t') + inp++; + + while (inp < tail) { + /* + * Check for the length of the word. + * If exceeds, return with an error code. + */ + if (EB_MAX_WORD_LENGTH < word_length + 1) { + error_code = EB_ERR_TOO_LONG_WORD; + goto failed; + } + + c1 = *inp++; + + /* + * Tabs are translated to spaces. + */ + if (c1 == '\t') + c1 = ' '; + + *wp++ = c1; + + /* + * Skip successive spaces and tabs. + */ + if (c1 == ' ') { + while (*inp == '\t' || *inp == ' ') + inp++; + } + + word_length++; + } + *wp = '\0'; + + if (word_length == 0) { + error_code = EB_ERR_EMPTY_WORD; + goto failed; + } + *word_code = EB_WORD_ALPHABET; + + LOG(("out: eb_convert_latin(word=%s, word_code=%d) = %s", + eb_quoted_string(word), (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_convert_latin() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Table used to convert JIS X 0208 to ASCII. + */ +static const unsigned int jisx0208_table[] = { + /* 0x20 -- 0x2f */ + 0x2121, 0x212a, 0x2149, 0x2174, 0x2170, 0x2173, 0x2175, 0x2147, + 0x214a, 0x214b, 0x2176, 0x215c, 0x2124, 0x215d, 0x2125, 0x213f, + /* 0x30 -- 0x3f */ + 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337, + 0x2338, 0x2339, 0x2127, 0x2128, 0x2163, 0x2161, 0x2164, 0x2129, + /* 0x40 -- 0x4f */ + 0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347, + 0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d, 0x234e, 0x234f, + /* 0x50 -- 0x5f */ + 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357, + 0x2358, 0x2359, 0x235a, 0x214e, 0x2140, 0x214f, 0x2130, 0x2132, + /* 0x60 -- 0x6f */ + 0x2146, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, + 0x2368, 0x2369, 0x236a, 0x236b, 0x236c, 0x236d, 0x236e, 0x236f, + /* 0x70 -- 0x7e */ + 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, + 0x2378, 0x2379, 0x237a, 0x2150, 0x2143, 0x2151, 0x2141 +}; + +/* + * Table used to convert JIS X 0201 KATAKANA to JIS X 0208. + */ +static const unsigned int jisx0201_table[] = { + /* 0xa0 -- 0xaf */ + 0x0000, 0x2123, 0x2156, 0x2157, 0x2122, 0x2126, 0x2572, 0x2521, + 0x2523, 0x2525, 0x2527, 0x2529, 0x2563, 0x2565, 0x2567, 0x2543, + /* 0xb0 -- 0xbf */ + 0x213c, 0x2522, 0x2524, 0x2526, 0x2528, 0x252a, 0x252b, 0x252d, + 0x252f, 0x2531, 0x2533, 0x2535, 0x2537, 0x2539, 0x253b, 0x253d, + /* 0xc0 -- 0xcf */ + 0x253f, 0x2541, 0x2544, 0x2546, 0x2548, 0x254a, 0x254b, 0x254c, + 0x254d, 0x254e, 0x254f, 0x2552, 0x2555, 0x2558, 0x255b, 0x255e, + /* 0xd0 -- 0xdf */ + 0x255f, 0x2560, 0x2561, 0x2562, 0x2564, 0x2566, 0x2568, 0x2569, + 0x256a, 0x256b, 0x256c, 0x256d, 0x256f, 0x2573, 0x212b, 0x212c +}; + +/* + * Convert `input_word' to JIS X0208 and put it into `word'. + * + * If `input_word' is a valid string to search, EB_WORD_ALPHABET or + * EB_WORD_KANA is returned. + * Otherwise, -1 is returned. + */ +static EB_Error_Code +eb_convert_euc_jp(EB_Book *book, const char *input_word, char *word, + EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + unsigned char *wp = (unsigned char *) word; + const unsigned char *inp = (const unsigned char *) input_word; + const unsigned char *tail; + unsigned char c1 = 0, c2 = 0; + int kana_count = 0; + int alphabet_count = 0; + int kanji_count = 0; + int word_length = 0; + + LOG(("in: eb_convert_euc_jp(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Find the tail of `input_word'. + */ + tail = (const unsigned char *) input_word + strlen(input_word) - 1; + for (;;) { + if (inp < tail && (*tail == ' ' || *tail == '\t')) + tail--; + else if (inp < tail - 1 && *tail == 0xa1 && *(tail - 1) == 0xa1) + tail -= 2; + else + break; + } + tail++; + + /* + * Ignore spaces and tabs in the beginning of `input_word'. + */ + for (;;) { + if (*inp == ' ' || *inp == '\t') + inp++; + else if (*inp == 0xa1 && *(inp + 1) == 0xa1) + inp += 2; + else + break; + } + + while (inp < tail) { + /* + * Check for the length of the word. + * If exceeds, return with an error code. + */ + if (EB_MAX_WORD_LENGTH < word_length + 2) { + error_code = EB_ERR_TOO_LONG_WORD; + goto failed; + } + + /* + * Tabs are translated to spaces. + */ + c1 = *inp++; + if (c1 == '\t') + c1 = ' '; + + if (0x20 <= c1 && c1 <= 0x7e) { + /* + * `c1' is a character in ASCII. + */ + unsigned int c = jisx0208_table[c1 - 0x20]; + c1 = c >> 8; + c2 = c & 0xff; + } else if (0xa1 <= c1 && c1 <= 0xfe) { + /* + * `c1' is a character in JIS X 0208, or local character. + */ + c2 = *inp++; + + if (0xa1 <= c2 && c2 <= 0xfe) { + c1 &= 0x7f; + c2 &= 0x7f; + } else if (c2 < 0x20 || 0x7e < c2) { + error_code = EB_ERR_BAD_WORD; + goto failed; + } + } else if (c1 == 0x8e) { + /* + * `c1' is SS2. + */ + if (c2 < 0xa1 || 0xdf < c2) { + error_code = EB_ERR_BAD_WORD; + goto failed; + } + c2 = jisx0201_table[c2 - 0xa0]; + c1 = 0x25; + } else { + error_code = EB_ERR_BAD_WORD; + goto failed; + } + + /* + * The following characters are recognized as alphabet. + * 2330 - 2339: `0' .. `9' + * 2341 - 235a: `A' .. `Z' + * 2361 - 237a: `a' .. `z' (convert to upper cases) + */ + *wp++ = c1; + *wp++ = c2; + + if (c1 == 0x23) + alphabet_count++; + else if (c1 == 0x24 || c1 == 0x25) + kana_count++; + else if (c1 != 0x21) + kanji_count++; + + word_length += 2; + } + *wp = '\0'; + + if (word_length == 0) { + error_code = EB_ERR_EMPTY_WORD; + goto failed; + } + if (alphabet_count == 0 && kana_count != 0 && kanji_count == 0) + *word_code = EB_WORD_KANA; + else if (alphabet_count != 0 && kana_count == 0 && kanji_count == 0) + *word_code = EB_WORD_ALPHABET; + else + *word_code = EB_WORD_OTHER; + + LOG(("out: eb_convert_euc_jp(word=%s, word_code=%d) = %s", + eb_quoted_string(word), (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_convert_euc_jp() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Convert KATAKANA to HIRAGANA in `word'. + */ +static void +eb_convert_katakana_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_katakana_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x25 && 0x21 <= c2 && c2 <= 0x76) { + /* + * This is a KATAKANA. Convert to corresponding HIRAGANA. + */ + *wp = 0x24; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_katakana_jis()")); +} + + +/* + * Convert HIRAGANA to KATAKANA in `word'. + */ +static void +eb_convert_hiragana_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_hiragana_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x24 && 0x21 <= c2 && c2 <= 0x76) { + /* + * This is a HIRAGANA. Convert to corresponding KATAKANA. + */ + *wp = 0x25; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_hiragana_jis()")); +} + + +/* + * Convert lower case to upper case in `word'. + */ +static void +eb_convert_lower_latin(char *word) +{ + unsigned char *wp = (unsigned char *) word; + + LOG(("in: eb_convert_lower_latin(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0') { + if (('a' <= *wp && *wp <= 'z') + || (0xe0 <= *wp && *wp <= 0xf6) || (0xf8 <= *wp && *wp <= 0xfe)) { + /* + * This is a lower case letter. Convert to upper case. + */ + *wp -= 0x20; + } + wp++; + } + *wp = '\0'; + + LOG(("out: eb_convert_lower_latin()")); +} + + +/* + * Convert lower case to upper case in `word'. + */ +static void +eb_convert_lower_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_lower_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x23 && 0x61 <= c2 && c2 <= 0x7a) { + /* + * This is a lower case letter. Convert to upper case. + */ + *(wp + 1) = c2 - 0x20; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_lower_jis()")); +} + + +/* + * Delete some marks in `word'. + */ +static void +eb_delete_marks_jis(char *word) +{ + unsigned char *in_wp = (unsigned char *) word; + unsigned char *out_wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_delete_marks_jis(word=%s)", eb_quoted_string(word))); + + while (*in_wp != '\0' && *(in_wp + 1) != '\0') { + c1 = *in_wp; + c2 = *(in_wp + 1); + + if (c1 != 0x21 + || (c2 != 0x26 && c2 != 0x3e && c2 != 0x47 && c2 != 0x5d)) { + /* + * This is not a character to be deleted. + */ + *out_wp = c1; + *(out_wp + 1) = c2; + out_wp += 2; + } + in_wp += 2; + } + *out_wp = '\0'; + + LOG(("out: eb_delete_marks_jis()")); +} + + +/* + * The table is used to convert long vowel marks. + */ +static const char long_vowel_table[] = { + 0x22, /* a(21) -> A(22) */ 0x22, /* A(22) -> A(22) */ + 0x24, /* i(23) -> I(24) */ 0x24, /* I(24) -> I(24) */ + 0x26, /* u(25) -> U(26) */ 0x26, /* U(26) -> U(26) */ + 0x28, /* e(27) -> E(28) */ 0x28, /* E(28) -> E(28) */ + 0x2a, /* o(29) -> O(2a) */ 0x2a, /* O(2a) -> O(2a) */ + 0x22, /* KA(2b) -> A(22) */ 0x22, /* GA(2c) -> A(22) */ + 0x24, /* KI(2d) -> I(24) */ 0x24, /* GI(2e) -> I(24) */ + 0x26, /* KU(2f) -> U(26) */ 0x26, /* GU(30) -> U(26) */ + 0x28, /* KE(31) -> E(28) */ 0x28, /* GE(32) -> E(28) */ + 0x2a, /* KO(33) -> O(2a) */ 0x2a, /* GO(34) -> O(2a) */ + 0x22, /* SA(35) -> A(22) */ 0x22, /* ZA(36) -> A(22) */ + 0x24, /* SI(37) -> I(24) */ 0x24, /* ZI(38) -> I(24) */ + 0x26, /* SU(39) -> U(26) */ 0x26, /* ZU(3a) -> U(26) */ + 0x28, /* SE(3b) -> E(28) */ 0x28, /* ZE(3c) -> E(28) */ + 0x2a, /* SO(3d) -> O(2a) */ 0x2a, /* ZO(3e) -> O(2a) */ + 0x22, /* TA(3f) -> A(22) */ 0x22, /* DA(40) -> A(22) */ + 0x24, /* TI(41) -> I(24) */ 0x24, /* DI(42) -> I(24) */ + 0x26, /* tu(43) -> U(26) */ 0x26, /* TU(44) -> U(26) */ + 0x26, /* DU(45) -> U(26) */ 0x28, /* TE(46) -> E(28) */ + 0x28, /* DE(47) -> E(28) */ 0x2a, /* TO(48) -> O(2a) */ + 0x2a, /* DO(49) -> O(2a) */ 0x22, /* NA(4a) -> A(22) */ + 0x24, /* NI(4b) -> I(24) */ 0x26, /* NU(4c) -> U(26) */ + 0x28, /* NE(4d) -> E(28) */ 0x2a, /* NO(4e) -> O(2a) */ + 0x22, /* HA(4f) -> A(22) */ 0x22, /* BA(50) -> A(22) */ + 0x22, /* PA(51) -> A(22) */ 0x24, /* HI(52) -> I(24) */ + 0x24, /* BI(53) -> I(24) */ 0x24, /* PI(54) -> I(24) */ + 0x26, /* HU(55) -> U(26) */ 0x26, /* BU(56) -> U(26) */ + 0x26, /* PU(57) -> U(26) */ 0x28, /* HE(58) -> E(28) */ + 0x28, /* BE(59) -> E(28) */ 0x28, /* PE(5a) -> E(28) */ + 0x2a, /* HO(5b) -> O(2a) */ 0x2a, /* BO(5c) -> O(2a) */ + 0x2a, /* PO(5d) -> O(2a) */ 0x22, /* MA(5e) -> A(22) */ + 0x24, /* MI(5f) -> I(24) */ 0x26, /* MU(60) -> U(26) */ + 0x28, /* ME(61) -> E(28) */ 0x2a, /* MO(62) -> O(2a) */ + 0x22, /* ya(63) -> A(22) */ 0x22, /* YA(64) -> A(22) */ + 0x26, /* yu(65) -> U(26) */ 0x26, /* YU(66) -> U(26) */ + 0x2a, /* yo(67) -> O(2a) */ 0x2a, /* YO(68) -> O(2a) */ + 0x22, /* RA(69) -> A(22) */ 0x24, /* RI(6a) -> I(24) */ + 0x26, /* RU(6b) -> U(26) */ 0x28, /* RE(6c) -> E(28) */ + 0x2a, /* RO(6d) -> O(2a) */ 0x22, /* wa(6e) -> A(22) */ + 0x22, /* WA(6f) -> A(22) */ 0x24, /* WI(70) -> I(24) */ + 0x28, /* WE(71) -> E(28) */ 0x2a, /* WO(72) -> O(2a) */ + 0x73, /* N (73) -> N(73) */ 0x26, /* VU(74) -> U(26) */ + 0x22, /* ka(75) -> A(22) */ 0x28 /* ke(76) -> E(28) */ +}; + + +/* + * Convert long vowel marks in `word' to the previous vowels. + */ +static void +eb_convert_long_vowels_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + unsigned char previous_c1 = '\0', previous_c2 = '\0'; + + LOG(("in: eb_convert_long_vowels_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x21 && c2 == 0x3c) { + /* + * The is a long vowel mark. + * Convert to a vowel of the prev_ KANA character. + * If prev_ character is not KANA, the conversion is + * not done. + */ + if ((previous_c1 == 0x24 || previous_c1 == 0x25) + && 0x21 <= previous_c2 && previous_c2 <= 0x76) { + *wp = previous_c1; + *(wp + 1) = long_vowel_table[previous_c2 - 0x21]; + } + } + previous_c1 = c1; + previous_c2 = c2; + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_long_vowels_jis()")); +} + + +/* + * Delete long vowel marks in `word'. + */ +static void +eb_delete_long_vowels_jis(char *word) +{ + unsigned char *in_wp = (unsigned char *) word; + unsigned char *out_wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_delete_long_vowels_jis(word=%s)", eb_quoted_string(word))); + + while (*in_wp != '\0' && *(in_wp + 1) != '\0') { + c1 = *in_wp; + c2 = *(in_wp + 1); + + if (c1 != 0x21 || c2 != 0x3c) { + /* + * The is not a long vowel mark. + */ + *out_wp = c1; + *(out_wp + 1) = c2; + out_wp += 2; + } + in_wp += 2; + } + *out_wp = '\0'; + + LOG(("out: eb_delete_long_vowels_jis()")); +} + + +/* + * Convert the double consonant mark `tu' to `TU'. + */ +static void +eb_convert_double_consonants_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_double_consonants_jis(word=%s)", + eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if ((c1 == 0x24 || c1 == 0x25) && c2 == 0x43) { + /* + * This is a double sound mark. Convert to the corresponding + * sound mark. + */ + *(wp + 1) = c2 + 1; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_double_consonants_jis()")); +} + + +/* + * Convert the contracted sound marks to the corresponding + * non-contracted sound marks. + * (`ya', `yu', `yo', `wa', `ka', `ke' -> `YA', `YU', `YO', `WA', `KA', `KE') + */ +static void +eb_convert_contracted_sounds_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_contracted_sounds_jis(word=%s)", + eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x24 || c1 == 0x25) { + /* + * This is HIRAGANA or KANAKANA. + * If this is a contracted sound mark, convert to the + * corresponding uncontracted sound mark. + */ + if (c2 == 0x63 || c2 == 0x65 || c2 == 0x67 || c2 == 0x6e) + *(wp + 1) = c2 + 1; + else if (c2 == 0x75) + *(wp + 1) = 0x2b; + else if (c2 == 0x76) + *(wp + 1) = 0x31; + } + wp += 2; + } + *wp = '\0'; + + LOG(("in: eb_convert_contracted_sounds_jis()")); +} + + +/* + * Convert the small vowels to the normal vowels. + * (`a', `i', `u', `e', `o' -> `A', `I', `U', `E', `O') + */ +static void +eb_convert_small_vowels_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_small_vowels_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x24 || c1 == 0x25) { + /* + * This is HIRAGANA or KANAKANA. + * If this is a small vowel mark, convert to a normal vowel. + */ + if (c2 == 0x21 || c2 == 0x23 || c2 == 0x25 || c2 == 0x27 + || c2 == 0x29) + *(wp + 1) = c2 + 1; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_small_vowels_jis()")); +} + + +/* + * The table is used to convert voiced consonant marks. + */ +static const char voiced_consonant_table[] = { + 0x21, /* a(21) -> a(22) */ 0x22, /* A(22) -> A(22) */ + 0x23, /* i(23) -> i(24) */ 0x24, /* I(24) -> I(24) */ + 0x25, /* u(25) -> u(26) */ 0x26, /* U(26) -> U(26) */ + 0x27, /* e(27) -> e(28) */ 0x28, /* E(28) -> E(28) */ + 0x29, /* o(29) -> o(2a) */ 0x2a, /* O(2a) -> O(2a) */ + 0x2b, /* KA(2b) -> KA(2b) */ 0x2b, /* GA(2c) -> KA(2b) */ + 0x2d, /* KI(2d) -> KI(2d) */ 0x2d, /* GI(2e) -> KI(2d) */ + 0x2f, /* KU(2f) -> KU(2f) */ 0x2f, /* GU(30) -> KU(2f) */ + 0x31, /* KE(31) -> KE(31) */ 0x31, /* GE(32) -> KE(31) */ + 0x33, /* KO(33) -> KO(33) */ 0x33, /* GO(34) -> KO(33) */ + 0x35, /* SA(35) -> SA(35) */ 0x35, /* ZA(36) -> SA(35) */ + 0x37, /* SI(37) -> SI(37) */ 0x37, /* ZI(38) -> SI(37) */ + 0x39, /* SU(39) -> SU(39) */ 0x39, /* ZU(3a) -> SU(39) */ + 0x3b, /* SE(3b) -> SE(3b) */ 0x3b, /* ZE(3c) -> SE(3b) */ + 0x3d, /* SO(3d) -> SO(3d) */ 0x3d, /* ZO(3e) -> SO(3d) */ + 0x3f, /* TA(3f) -> TA(3f) */ 0x3f, /* DA(40) -> TA(3f) */ + 0x41, /* TI(41) -> TI(41) */ 0x41, /* DI(42) -> TI(41) */ + 0x43, /* tu(43) -> TU(43) */ 0x44, /* TU(44) -> TU(44) */ + 0x44, /* DU(45) -> TU(44) */ 0x46, /* TE(46) -> TE(46) */ + 0x46, /* DE(47) -> TE(46) */ 0x48, /* TO(48) -> TO(48) */ + 0x48, /* DO(49) -> TO(48) */ 0x4a, /* NA(4a) -> NA(4a) */ + 0x4b, /* NI(4b) -> NI(4b) */ 0x4c, /* NU(4c) -> NU(4c) */ + 0x4d, /* NE(4d) -> NE(4d) */ 0x4e, /* NO(4e) -> NO(4e) */ + 0x4f, /* HA(4f) -> HA(4f) */ 0x4f, /* BA(50) -> HA(4f) */ + 0x51, /* PA(51) -> PA(51) */ 0x52, /* HI(52) -> HI(52) */ + 0x52, /* BI(53) -> HI(52) */ 0x54, /* PI(54) -> PU(54) */ + 0x55, /* HU(55) -> HU(55) */ 0x55, /* BU(56) -> HU(55) */ + 0x57, /* PU(57) -> PU(57) */ 0x58, /* HE(58) -> HE(58) */ + 0x58, /* BE(59) -> HE(58) */ 0x5a, /* PE(5a) -> PE(5a) */ + 0x5b, /* HO(5b) -> HO(5b) */ 0x5b, /* BO(5c) -> HO(5b) */ + 0x5d, /* PO(5d) -> PO(5d) */ 0x5e, /* MA(5e) -> MA(5e) */ + 0x5f, /* MI(5f) -> MI(5f) */ 0x60, /* MU(60) -> MU(60) */ + 0x61, /* ME(61) -> ME(61) */ 0x62, /* MO(62) -> MO(62) */ + 0x64, /* ya(63) -> ya(63) */ 0x64, /* YA(64) -> YA(64) */ + 0x66, /* yu(65) -> yu(65) */ 0x66, /* YU(66) -> YU(66) */ + 0x68, /* yo(67) -> yo(67) */ 0x68, /* YO(68) -> YO(68) */ + 0x69, /* RA(69) -> TA(69) */ 0x6a, /* RI(6a) -> RI(6a) */ + 0x6b, /* RU(6b) -> RU(6b) */ 0x6c, /* RE(6c) -> RE(6c) */ + 0x6d, /* RO(6d) -> RO(6d) */ 0x6e, /* wa(6e) -> wa(6e) */ + 0x6f, /* WA(6f) -> WA(6f) */ 0x70, /* WI(70) -> WI(70) */ + 0x71, /* WE(71) -> WE(71) */ 0x72, /* WO(72) -> WO(72) */ + 0x73, /* N(73) -> N(73) */ 0x26, /* VU(74) -> U(26) */ + 0x75, /* ka(75) -> ka(75) */ 0x76 /* ke(76) -> ke(76) */ +}; + +/* + * Convert the contracted sound marks to the corresponding + * non-contracted sound marks (e.g. `GA' to `KA'). + */ +static void +eb_convert_voiced_consonants_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_voiced_consonants_jis(word=%s)", + eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if ((c1 == 0x24 || c1 == 0x25) && 0x21 <= c2 && c2 <= 0x76) { + /* + * This is a voiced constonat mark. Convert to the + * corresponding unvoiced constonant mark. + */ + *(wp + 1) = voiced_consonant_table[c2 - 0x21]; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_voiced_consonants_jis()")); +} + + +/* + * Convert the p sound marks + * (`PA', `PI', `PU', `PE', `PO' -> `HA', `HI', `HU', `HE', `HO') + */ +static void +eb_convert_p_sounds_jis(char *word) +{ + unsigned char *wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_convert_p_sounds_jis(word=%s)", eb_quoted_string(word))); + + while (*wp != '\0' && *(wp + 1) != '\0') { + c1 = *wp; + c2 = *(wp + 1); + + if (c1 == 0x24 || c1 == 0x25) { + /* + * This is HIRAGANA or KANAKANA. + * If this is a p-sound mark, convert to the corresponding + * unvoiced consonant mark. + */ + if (c2 == 0x51 || c2 == 0x54 || c2 == 0x57 || c2 == 0x5a + || c2 == 0x5d) + *(wp + 1) = c2 - 2; + } + wp += 2; + } + *wp = '\0'; + + LOG(("out: eb_convert_p_sounds_jis()")); +} + + +/* + * Delete spaces in `word'. + */ +static void +eb_delete_spaces_latin(char *word) +{ + unsigned char *in_wp = (unsigned char *) word; + unsigned char *out_wp = (unsigned char *) word; + + LOG(("in: eb_delete_space_latin(word=%s)", eb_quoted_string(word))); + + while (*in_wp != '\0') { + if (*in_wp != ' ') { + /* + * This is not a space character of ISO 8859 1. + */ + *out_wp = *in_wp; + out_wp++; + } + in_wp++; + } + *out_wp = '\0'; + + LOG(("out: eb_delete_space_latin()")); +} + + +/* + * Delete spaces in `word'. + */ +static void +eb_delete_spaces_jis(char *word) +{ + unsigned char *in_wp = (unsigned char *) word; + unsigned char *out_wp = (unsigned char *) word; + unsigned char c1, c2; + + LOG(("in: eb_delete_space_jis(word=%s)", eb_quoted_string(word))); + + while (*in_wp != '\0' && *(in_wp + 1) != '\0') { + c1 = *in_wp; + c2 = *(in_wp + 1); + + if (c1 != 0x21 || c2 != 0x21) { + /* + * This is not a space character of JIS X 0208. + */ + *out_wp = c1; + *(out_wp + 1) = c2; + out_wp += 2; + } + in_wp += 2; + } + *out_wp = '\0'; + + LOG(("out: eb_delete_space_jis()")); +} + + +/* + * Reverse a word for ENDWORD SEARCH. + * + * `word' is a word to reverse. It must be an alphabetic word. + * The reversed word is also put into `word'. + */ +static void +eb_reverse_word_latin(char *word) +{ + char *p1, *p2; + int word_length; + char c; + + LOG(("in: eb_reverse_word_latin(word=%s)", eb_quoted_string(word))); + + word_length = strlen(word); + if (word_length == 0) + return; + for (p1 = word, p2 = word + word_length - 1; p1 < p2; p1++, p2--) { + c = *p1; + *p1 = *p2; + *p2 = c; + } + + LOG(("out: eb_reverse_word_latin()")); +} + + +/* + * Reverse a word for ENDWORD SEARCH. + * + * `word' is a word to reverse. It must be a KANA word. + * The reversed word is also put into `word'. + */ +static void +eb_reverse_word_jis(char *word) +{ + char *p1, *p2; + int word_length; + char c; + + LOG(("in: eb_reverse_word_jis(word=%s)", eb_quoted_string(word))); + + word_length = strlen(word); + if (word_length % 2 == 1) { + *(word + word_length - 1) = '\0'; + word_length--; + } + for (p1 = word, p2 = word + word_length - 2; p1 < p2; p1 += 2, p2 -= 2) { + c = *p1; + *p1 = *p2; + *p2 = c; + c = *(p1 + 1); + *(p1 + 1) = *(p2 + 1); + *(p2 + 1) = c; + } + + LOG(("out: eb_reverse_word_jis()")); +} + + +/* + * Convert `input_word' to UTF 8 and put it into `word'. + * + * If `input_word' is a valid string to search, EB_WORD_OTHER is returned. + * Otherwise, -1 is returned. + */ +static EB_Error_Code +eb_convert_utf8(EB_Book *book, const char *input_word, char *word, + EB_Word_Code *word_code) +{ + EB_Error_Code error_code; + unsigned char *wp = (unsigned char *) word; + const unsigned char *inp = (const unsigned char *) input_word; + const unsigned char *tail; + int word_length = 0; + int count = 0, chr; + char *result; + + LOG(("in: eb_convert_utf8(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + tail = (const unsigned char *) input_word + strlen(input_word); + + while (inp < tail) { + if (*inp < 0x20) { + inp++; + continue; + } + + count = eb_read_utf8 ((const char *)inp, &chr); + if (!count) { + error_code = EB_ERR_BAD_WORD; + goto failed; + } + +/* + if (*inp < 0x80) { + count = 1; + chr = *inp; + } else if (0xc0 <= *inp && *inp <= 0xdf && + 0x80 <= *(inp + 1) && *(inp + 1) <= 0xbf) { + count = 2; + chr = ((*(inp + 0) & 0x1f) << 6) + + (*(inp + 1) & 0x3f); + } else if (0xe0 <= *inp && *inp <= 0xef && + 0x80 <= *(inp + 1) && *(inp + 1) <= 0xbf && + 0x80 <= *(inp + 2) && *(inp + 2) <= 0xbf) { + count = 3; + chr = ((*(inp + 0) & 0x0f) << 12) + + ((*(inp + 1) & 0x3f) << 6) + + (*(inp + 2) & 0x3f); + } else if (0xf0 <= *inp && *inp <= 0xf7 && + 0x80 <= *(inp + 1) && *(inp + 1) <= 0xbf && + 0x80 <= *(inp + 2) && *(inp + 2) <= 0xbf && + 0x80 <= *(inp + 3) && *(inp + 3) <= 0xbf) { + count = 4; + chr = ((*(inp + 0) & 0x07) << 18) + + ((*(inp + 1) & 0x3f) << 12) + + ((*(inp + 2) & 0x3f) << 6) + + (*(inp + 2) & 0x3f); + } else { + error_code = EB_ERR_BAD_WORD; + goto failed; + } +*/ + result = eb_normalize_utf8(book, chr); + + if (result == NULL) { + if (EB_MAX_WORD_LENGTH < word_length + count) { + error_code = EB_ERR_TOO_LONG_WORD; + goto failed; + } + memcpy (wp, inp, count); + wp += count; + word_length += count; + } else if (strlen(result)) { + if (EB_MAX_WORD_LENGTH < word_length + strlen(result)) { + error_code = EB_ERR_TOO_LONG_WORD; + goto failed; + } + memcpy (wp, result, strlen(result)); + wp += strlen(result); + word_length += strlen(result); + } + inp += count; + } + + if (word_length == 0) { + wp = (unsigned char *) word; + inp = (const unsigned char *) input_word; + while (inp < tail) { + if (*inp <= 0x20) { + inp++; + continue; + } + *wp = *inp; + wp++; + inp++; + word_length++; + } + } + + if (word_length == 0) { + error_code = EB_ERR_EMPTY_WORD; + goto failed; + } + + *wp = '\0'; + *word_code = EB_WORD_OTHER; + + LOG(("out: eb_convert_utf8(word=%s, word_code=%d) = %s", + eb_quoted_string(word), (int)*word_code, eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *word = '\0'; + *word_code = EB_WORD_INVALID; + LOG(("out: eb_convert_utf8() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Reverse a word for ENDWORD SEARCH. + * + * `word' is a word to reverse. It must be an alphabetic word. + * The reversed word is also put into `word'. + */ +static void +eb_reverse_word_utf8(char *word) +{ + char *p1, *p2, *p3; + int word_length; + char tmp[EB_MAX_WORD_LENGTH]; + + LOG(("in: eb_reverse_word_utf8(word=%s)", eb_quoted_string(word))); + + word_length = strlen(word); + if (word_length == 0) + return; + + p1 = word + word_length - 1; + p2 = tmp; + p3 = p1; + + while (p1 >= word) { + while (!((unsigned char) *p1 <= 0x7f + || (*p1 >= (char) 0xc0 && *p1 <= (char) 0xdf) + || (*p1 >= (char) 0xe0 && *p1 <= (char) 0xef) + || (*p1 >= (char) 0xf0 && *p1 <= (char) 0xf7))) + p1--; + if (p1 < word) p1 = word; + memcpy(p2, p1, p3 - p1 + 1); + p2 += p3 - p1 + 1; + p1--; + p3 = p1; + } + + memcpy(word, tmp, word_length); + + LOG(("out: eb_reverse_word_utf8(word=%s)", eb_quoted_string(word))); +} diff --git a/lib/ebu/ebu/setword.lo b/lib/ebu/ebu/setword.lo new file mode 100644 index 0000000..26b1559 --- /dev/null +++ b/lib/ebu/ebu/setword.lo @@ -0,0 +1,12 @@ +# setword.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/setword.o' + +# Name of the non-PIC object +non_pic_object='setword.o' + diff --git a/lib/ebu/ebu/stamp-build-post-h b/lib/ebu/ebu/stamp-build-post-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/lib/ebu/ebu/stamp-build-post-h @@ -0,0 +1 @@ +timestamp diff --git a/lib/ebu/ebu/stamp-sysdefs-h b/lib/ebu/ebu/stamp-sysdefs-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/lib/ebu/ebu/stamp-sysdefs-h @@ -0,0 +1 @@ +timestamp diff --git a/lib/ebu/ebu/stamp-widealt-h b/lib/ebu/ebu/stamp-widealt-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/lib/ebu/ebu/stamp-widealt-h @@ -0,0 +1 @@ +timestamp diff --git a/lib/ebu/ebu/stamp-widefont-h b/lib/ebu/ebu/stamp-widefont-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/lib/ebu/ebu/stamp-widefont-h @@ -0,0 +1 @@ +timestamp diff --git a/lib/ebu/ebu/stopcode.c b/lib/ebu/ebu/stopcode.c new file mode 100644 index 0000000..ba71452 --- /dev/null +++ b/lib/ebu/ebu/stopcode.c @@ -0,0 +1,113 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#include "text.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `appendix' has a stop-code. + */ +int +eb_have_stop_code(EB_Appendix *appendix) +{ + eb_lock(&appendix->lock); + LOG(("in: eb_have_stop_code(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) + goto failed; + + if (appendix->subbook_current->stop_code0 == 0) + goto failed; + + LOG(("out: eb_have_stop_code() = %d", 1)); + eb_unlock(&appendix->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_stop_code() = %d", 0)); + eb_unlock(&appendix->lock); + return 0; +} + + +/* + * Return the stop-code of the current subbook in `appendix'. + */ +EB_Error_Code +eb_stop_code(EB_Appendix *appendix, int *stop_code) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_stop_code(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + if (appendix->subbook_current->stop_code0 == 0) { + error_code = EB_ERR_NO_STOPCODE; + goto failed; + } + + stop_code[0] = appendix->subbook_current->stop_code0; + stop_code[1] = appendix->subbook_current->stop_code1; + + LOG(("out: eb_stop_code(stop_code=%d,%d) = %s", + stop_code[0], stop_code[1], eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + stop_code[0] = -1; + stop_code[1] = -1; + LOG(("out: eb_stop_code() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/stopcode.lo b/lib/ebu/ebu/stopcode.lo new file mode 100644 index 0000000..3a72113 --- /dev/null +++ b/lib/ebu/ebu/stopcode.lo @@ -0,0 +1,12 @@ +# stopcode.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/stopcode.o' + +# Name of the non-PIC object +non_pic_object='stopcode.o' + diff --git a/lib/ebu/ebu/strcasecmp.c b/lib/ebu/ebu/strcasecmp.c new file mode 100644 index 0000000..469f071 --- /dev/null +++ b/lib/ebu/ebu/strcasecmp.c @@ -0,0 +1,117 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * This program requires the following Autoconf macros: + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#else + +/* Define to empty if the keyword `const' does not work. */ +/* #define const */ + +/* Define if `size_t' is not defined. */ +/* #define size_t unsigned */ + +#endif /* not HAVE_CONFIG_H */ + +#include + +/* + * Compare strings. + * Cases in the strings are insensitive. + */ +int +eb_strcasecmp(const char *string1, const char *string2) +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + int c1, c2; + + while (*string1_p != '\0') { + if ('a' <= *string1_p && *string1_p <= 'z') + c1 = *string1_p - ('a' - 'A'); + else + c1 = *string1_p; + + if ('a' <= *string2_p && *string2_p <= 'z') + c2 = *string2_p - ('a' - 'A'); + else + c2 = *string2_p; + + if (c1 != c2) + return c1 - c2; + + string1_p++; + string2_p++; + } + + return -(*string2_p); +} + + +/* + * Compare strings within `n' characters. + * Cases in the strings are insensitive. + */ +int +eb_strncasecmp(const char *string1, const char *string2, size_t n) +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + size_t i = n; + int c1, c2; + + if (i <= 0) + return 0; + + while (*string1_p != '\0') { + if ('a' <= *string1_p && *string1_p <= 'z') + c1 = *string1_p - ('a' - 'A'); + else + c1 = *string1_p; + + if ('a' <= *string2_p && *string2_p <= 'z') + c2 = *string2_p - ('a' - 'A'); + else + c2 = *string2_p; + + if (c1 != c2) + return c1 - c2; + + string1_p++; + string2_p++; + i--; + if (i <= 0) + return 0; + } + + return -(*string2_p); +} diff --git a/lib/ebu/ebu/strcasecmp.lo b/lib/ebu/ebu/strcasecmp.lo new file mode 100644 index 0000000..3da9263 --- /dev/null +++ b/lib/ebu/ebu/strcasecmp.lo @@ -0,0 +1,12 @@ +# strcasecmp.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/strcasecmp.o' + +# Name of the non-PIC object +non_pic_object='strcasecmp.o' + diff --git a/lib/ebu/ebu/subbook.c b/lib/ebu/ebu/subbook.c new file mode 100644 index 0000000..bd912a6 --- /dev/null +++ b/lib/ebu/ebu/subbook.c @@ -0,0 +1,1235 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "binary.h" +#include "font.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_load_subbook(EB_Book *book); +static EB_Error_Code eb_load_subbook_indexes(EB_Book *book); +static EB_Error_Code eb_set_subbook_eb(EB_Book *book, + EB_Subbook_Code subbook_code); +static EB_Error_Code eb_set_subbook_epwing(EB_Book *book, + EB_Subbook_Code subbook_code); + + +/* + * Initialize all subbooks in `book'. + */ +void +eb_initialize_subbooks(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Subbook *saved_subbook_current; + int i; + + LOG(("in: eb_initialize_subbooks(book=%d)", (int)book->code)); + + saved_subbook_current = book->subbook_current; + + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + book->subbook_current = subbook; + + subbook->initialized = 0; + subbook->index_page = 1; + subbook->code = i; + zio_initialize(&subbook->text_zio); + zio_initialize(&subbook->graphic_zio); + zio_initialize(&subbook->sound_zio); + zio_initialize(&subbook->movie_zio); + subbook->title[0] = '\0'; + subbook->directory_name[0] = '\0'; + subbook->data_directory_name[0] = '\0'; + subbook->gaiji_directory_name[0] = '\0'; + subbook->movie_directory_name[0] = '\0'; + + subbook->text_file_name[0] = '\0'; + subbook->graphic_file_name[0] = '\0'; + subbook->sound_file_name[0] = '\0'; + + subbook->text_hint_zio_code = ZIO_PLAIN; + subbook->graphic_hint_zio_code = ZIO_PLAIN; + subbook->sound_hint_zio_code = ZIO_PLAIN; + + subbook->search_title_page = 0; + eb_initialize_searches(book); + subbook->multi_count = 0; + + eb_initialize_fonts(book); + subbook->narrow_current = NULL; + subbook->wide_current = NULL; + + eb_initialize_utf8_table(book); + } + + book->subbook_current = saved_subbook_current; + + LOG(("out: eb_initialize_subbooks()")); +} + + +/* + * Finalize all subbooks in `book'. + */ +void +eb_finalize_subbooks(EB_Book *book) +{ + EB_Subbook *subbook; + EB_Subbook *saved_subbook_current; + int i; + + LOG(("in: eb_finalize_subbooks(book=%d)", (int)book->code)); + + saved_subbook_current = book->subbook_current; + + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + book->subbook_current = subbook; + + zio_finalize(&subbook->text_zio); + zio_finalize(&subbook->graphic_zio); + zio_finalize(&subbook->sound_zio); + zio_finalize(&subbook->movie_zio); + + eb_finalize_searches(book); + eb_finalize_fonts(book); + eb_finalize_utf8_table(book); + + subbook->narrow_current = NULL; + subbook->wide_current = NULL; + } + + book->subbook_current = saved_subbook_current; + + LOG(("out: eb_finalize_subbooks()")); +} + + +/* + * Get information about the current subbook. + */ +static EB_Error_Code +eb_load_subbook(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + + LOG(("in: eb_load_subbook(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + /* + * Current subbook must have been set. + */ + if (subbook == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Reset contexts. + */ + eb_reset_search_contexts(book); + eb_reset_text_context(book); + eb_reset_binary_context(book); + + /* + * If the subbook has already initialized, return immediately. + */ + if (subbook->initialized) + goto succeeded; + + if (0 <= zio_file(&subbook->text_zio)) { + /* + * Read index information. + */ + error_code = eb_load_subbook_indexes(book); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Read mutli search information. + */ + error_code = eb_load_multi_searches(book); + if (error_code != EB_SUCCESS) + goto failed; + error_code = eb_load_multi_titles(book); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Rewind the file descriptor of the start file. + */ + if (zio_lseek(&subbook->text_zio, + ((off_t) subbook->index_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + } + + succeeded: + LOG(("out: eb_load_subbook() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_subbook() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get information about all subbooks in the book. + */ +EB_Error_Code +eb_load_all_subbooks(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + int i; + + eb_lock(&book->lock); + LOG(("in: eb_load_all_subbooks(book=%d)", (int)book->code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Initialize each subbook. + */ + for (i = 0, subbook = book->subbooks; i < book->subbook_count; + i++, subbook++) { + error_code = eb_set_subbook(book, subbook->code); + if (error_code != EB_SUCCESS) + goto failed; + } + eb_unset_subbook(book); + + LOG(("out: eb_load_all_subbooks() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_unset_subbook(book); + LOG(("out: eb_load_all_subbooks() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get index information in the current subbook. + * + * If succeeds, the number of indexes is returned. + * Otherwise, -1 is returned. + */ +static EB_Error_Code +eb_load_subbook_indexes(EB_Book *book) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Search search; + char buffer[EB_SIZE_PAGE]; + char *buffer_p; + int index_count; + int availability; + int global_availability; + EB_Search sebxa_zip_index; + EB_Search sebxa_zip_text; + int i; + + LOG(("in: eb_load_subbook_indexes(book=%d)", (int)book->code)); + + eb_initialize_search(&sebxa_zip_index); + eb_initialize_search(&sebxa_zip_text); + + subbook = book->subbook_current; + + /* + * Read the index table in the subbook. + */ + if (zio_lseek(&subbook->text_zio, + ((off_t) subbook->index_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&subbook->text_zio, buffer, EB_SIZE_PAGE) != EB_SIZE_PAGE) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Get start page numbers of the indexes in the subbook. + */ + index_count = eb_uint1(buffer + 1); + if (EB_SIZE_PAGE / 16 - 1 <= index_count) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Get availavility flag of the index information. + */ + global_availability = eb_uint1(buffer + 4); + if (0x02 < global_availability) + global_availability = 0; + + /* + * Set each search method information. + */ + for (i = 0, buffer_p = buffer + 16; i < index_count; i++, buffer_p += 16) { + /* + * Set index style. + */ + eb_initialize_search(&search); + + search.index_id = eb_uint1(buffer_p); + search.start_page = eb_uint4(buffer_p + 2); + search.end_page = search.start_page + eb_uint4(buffer_p + 6) - 1; + + /* + * Set canonicalization flags. + */ + availability = eb_uint1(buffer_p + 10); + if ((global_availability == 0x00 && availability == 0x02) + || global_availability == 0x02) { + unsigned int flags; + + flags = eb_uint3(buffer_p + 11); + search.katakana = (flags & 0xc00000) >> 22; + search.lower = (flags & 0x300000) >> 20; + if ((flags & 0x0c0000) >> 18 == 0) + search.mark = EB_INDEX_STYLE_DELETE; + else + search.mark = EB_INDEX_STYLE_ASIS; + search.long_vowel = (flags & 0x030000) >> 16; + search.double_consonant = (flags & 0x00c000) >> 14; + search.contracted_sound = (flags & 0x003000) >> 12; + search.small_vowel = (flags & 0x000c00) >> 10; + search.voiced_consonant = (flags & 0x000300) >> 8; + search.p_sound = (flags & 0x0000c0) >> 6; + + } else if (search.index_id == 0x70 || search.index_id == 0x90) { + search.katakana = EB_INDEX_STYLE_CONVERT; + search.lower = EB_INDEX_STYLE_CONVERT; + search.mark = EB_INDEX_STYLE_DELETE; + search.long_vowel = EB_INDEX_STYLE_CONVERT; + search.double_consonant = EB_INDEX_STYLE_CONVERT; + search.contracted_sound = EB_INDEX_STYLE_CONVERT; + search.small_vowel = EB_INDEX_STYLE_CONVERT; + search.voiced_consonant = EB_INDEX_STYLE_CONVERT; + search.p_sound = EB_INDEX_STYLE_CONVERT; + + } else { + search.katakana = EB_INDEX_STYLE_ASIS; + search.lower = EB_INDEX_STYLE_CONVERT; + search.mark = EB_INDEX_STYLE_ASIS; + search.long_vowel = EB_INDEX_STYLE_ASIS; + search.double_consonant = EB_INDEX_STYLE_ASIS; + search.contracted_sound = EB_INDEX_STYLE_ASIS; + search.small_vowel = EB_INDEX_STYLE_ASIS; + search.voiced_consonant = EB_INDEX_STYLE_ASIS; + search.p_sound = EB_INDEX_STYLE_ASIS; + } + + if (book->character_code == EB_CHARCODE_ISO8859_1 + || search.index_id == 0x72 + || search.index_id == 0x92) { + search.space = EB_INDEX_STYLE_ASIS; + } else { + search.space = EB_INDEX_STYLE_DELETE; + } + + /* + * Identify search method. + */ + switch (search.index_id) { + case 0x00: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->text, &search, sizeof(EB_Search)); + } + break; + case 0x01: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->menu, &search, sizeof(EB_Search)); + } + break; + case 0x02: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->copyright, &search, sizeof(EB_Search)); + } + break; + case 0x10: + memcpy(&subbook->image_menu, &search, sizeof(EB_Search)); + break; + case 0x16: + if (book->disc_code == EB_DISC_EPWING) + subbook->search_title_page = search.start_page; + break; + case 0x21: + if (book->disc_code == EB_DISC_EB + && zio_mode(&subbook->text_zio) == ZIO_PLAIN) + memcpy(&sebxa_zip_text, &search, sizeof(EB_Search)); + break; + case 0x22: + if (book->disc_code == EB_DISC_EB + && zio_mode(&subbook->text_zio) == ZIO_PLAIN) + memcpy(&sebxa_zip_index, &search, sizeof(EB_Search)); + break; + case 0x70: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->endword_kana, &search, sizeof(EB_Search)); + } + break; + case 0x71: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->endword_asis, &search, sizeof(EB_Search)); + } + break; + case 0x72: + memcpy(&subbook->endword_alphabet, &search, sizeof(EB_Search)); + break; + case 0x80: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->keyword, &search, sizeof(EB_Search)); + } + break; + case 0x81: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->cross, &search, sizeof(EB_Search)); + } + break; + case 0x90: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->word_kana, &search, sizeof(EB_Search)); + } + break; + case 0x91: + if (book->disc_code != EB_DISC_EPWING + || book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->word_asis, &search, sizeof(EB_Search)); + } + break; + case 0x92: + memcpy(&subbook->word_alphabet, &search, sizeof(EB_Search)); + break; + case 0xc0: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->text, &search, sizeof(EB_Search)); + } + break; + case 0xc1: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->menu, &search, sizeof(EB_Search)); + } + break; + case 0xc2: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->copyright, &search, sizeof(EB_Search)); + } + break; + case 0xc6: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->word_asis, &search, sizeof(EB_Search)); + } + break; + case 0xc7: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->endword_asis, &search, sizeof(EB_Search)); + } + break; + case 0xc8: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->keyword, &search, sizeof(EB_Search)); + } + break; + case 0xc9: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->cross, &search, sizeof(EB_Search)); + } + break; + case 0xca: + if (subbook->multi_count < EB_MAX_MULTI_SEARCHES + && book->character_code == EB_CHARCODE_UTF8) { + memcpy(&subbook->multis[subbook->multi_count].search, &search, + sizeof(EB_Search)); + subbook->multi_count++; + } + break; + case 0xcb: + if (book->disc_code == EB_DISC_EPWING + && book->character_code == EB_CHARCODE_UTF8) { + subbook->table_page = search.start_page; + subbook->table_size = search.end_page - search.start_page + 1; + error_code = eb_load_utf8_table(book); + if (error_code != EB_SUCCESS) goto failed; + } + break; + case 0xd8: + memcpy(&subbook->sound, &search, sizeof(EB_Search)); + break; + case 0xe0: + memcpy(&subbook->color_chart, &search, sizeof(EB_Search)); + break; + case 0xf1: + if (book->disc_code == EB_DISC_EB) { + subbook->wide_fonts[EB_FONT_16].page = search.start_page; + subbook->wide_fonts[EB_FONT_16].font_code = EB_FONT_16; + } + break; + case 0xf2: + if (book->disc_code == EB_DISC_EB) { + subbook->narrow_fonts[EB_FONT_16].page = search.start_page; + subbook->narrow_fonts[EB_FONT_16].font_code = EB_FONT_16; + } + break; + case 0xf3: + if (book->disc_code == EB_DISC_EB) { + subbook->wide_fonts[EB_FONT_24].page = search.start_page; + subbook->wide_fonts[EB_FONT_24].font_code = EB_FONT_24; + } + break; + case 0xf4: + if (book->disc_code == EB_DISC_EB) { + subbook->narrow_fonts[EB_FONT_24].page = search.start_page; + subbook->narrow_fonts[EB_FONT_24].font_code = EB_FONT_24; + } + break; + case 0xf5: + if (book->disc_code == EB_DISC_EB) { + subbook->wide_fonts[EB_FONT_30].page = search.start_page; + subbook->wide_fonts[EB_FONT_30].font_code = EB_FONT_30; + } + break; + case 0xf6: + if (book->disc_code == EB_DISC_EB) { + subbook->narrow_fonts[EB_FONT_30].page = search.start_page; + subbook->narrow_fonts[EB_FONT_30].font_code = EB_FONT_30; + } + break; + case 0xf7: + if (book->disc_code == EB_DISC_EB) { + subbook->wide_fonts[EB_FONT_48].page = search.start_page; + subbook->wide_fonts[EB_FONT_48].font_code = EB_FONT_48; + } + break; + case 0xf8: + if (book->disc_code == EB_DISC_EB) { + subbook->narrow_fonts[EB_FONT_48].page = search.start_page; + subbook->narrow_fonts[EB_FONT_48].font_code = EB_FONT_48; + } + break; + case 0xff: + if (subbook->multi_count < EB_MAX_MULTI_SEARCHES + && book->character_code != EB_CHARCODE_UTF8) { + memcpy(&subbook->multis[subbook->multi_count].search, &search, + sizeof(EB_Search)); + subbook->multi_count++; + } + break; + } + + eb_finalize_search(&sebxa_zip_text); + } + + /* + * Set S-EBXA compression flag. + */ + if (book->disc_code == EB_DISC_EB + && zio_mode(&subbook->text_zio) == ZIO_PLAIN + && subbook->text.start_page != 0 + && sebxa_zip_index.start_page != 0 + && sebxa_zip_text.start_page != 0) { + zio_set_sebxa_mode(&subbook->text_zio, + (sebxa_zip_index.start_page - 1) * EB_SIZE_PAGE, + (sebxa_zip_text.start_page - 1) * EB_SIZE_PAGE, + (subbook->text.start_page - 1) * EB_SIZE_PAGE, + subbook->text.end_page * EB_SIZE_PAGE - 1); + } + + eb_finalize_search(&sebxa_zip_index); + eb_finalize_search(&sebxa_zip_text); + + LOG(("out: eb_load_subbook_indexes() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_finalize_search(&sebxa_zip_index); + eb_finalize_search(&sebxa_zip_text); + LOG(("out: eb_load_subbook_indexes() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Make a subbook list in the book. + */ +EB_Error_Code +eb_subbook_list(EB_Book *book, EB_Subbook_Code *subbook_list, + int *subbook_count) +{ + EB_Error_Code error_code; + EB_Subbook_Code *list_p; + int i; + + eb_lock(&book->lock); + LOG(("in: eb_subbook_list(book=%d)", (int)book->code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + for (i = 0, list_p = subbook_list; i < book->subbook_count; i++, list_p++) + *list_p = i; + *subbook_count = book->subbook_count; + + LOG(("out: eb_subbook_list(subbook_count=%d) = %s", *subbook_count, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *subbook_count = 0; + LOG(("out: eb_subbook_list() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a subbook-code of the current subbook. + */ +EB_Error_Code +eb_subbook(EB_Book *book, EB_Subbook_Code *subbook_code) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_subbook(book=%d)", (int)book->code)); + + /* + * The current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + *subbook_code = book->subbook_current->code; + + LOG(("out: eb_subbook(subbook_code=%d) = %s", *subbook_code, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *subbook_code = EB_SUBBOOK_INVALID; + LOG(("out: eb_subbook() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a title of the current subbook. + */ +EB_Error_Code +eb_subbook_title(EB_Book *book, char *title) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_subbook_title(book=%d)", (int)book->code)); + + /* + * The current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + strcpy(title, book->subbook_current->title); + + LOG(("out: eb_subbook_title(title=%s) = %s", title, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *title = '\0'; + LOG(("out: eb_subbook_title() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a title of the specified subbook `subbook_code'. + */ +EB_Error_Code +eb_subbook_title2(EB_Book *book, EB_Subbook_Code subbook_code, char *title) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_subbook_title2(book=%d, subbook_code=%d)", + (int)book->code, (int)subbook_code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Check for the subbook-code. + */ + if (subbook_code < 0 || book->subbook_count <= subbook_code) { + error_code = EB_ERR_NO_SUCH_SUB; + goto failed; + } + + strcpy(title, (book->subbooks + subbook_code)->title); + + LOG(("out: eb_subbook_title2(title=%s) = %s", title, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *title = '\0'; + LOG(("out: eb_subbook_title2() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a directory name of the current subbook. + */ +EB_Error_Code +eb_subbook_directory(EB_Book *book, char *directory) +{ + EB_Error_Code error_code; + char *p; + + eb_lock(&book->lock); + LOG(("in: eb_subbook_directory(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Copy directory name. + * Upper letters are converted to lower letters. + */ + strcpy(directory, book->subbook_current->directory_name); + for (p = directory; *p != '\0'; p++) { + if ('A' <= *p && *p <= 'Z') + *p = ASCII_TOLOWER(*p); + } + + LOG(("out: eb_subbook_directory(directory=%s) = %s", directory, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *directory = '\0'; + LOG(("out: eb_subbook_directory() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return a directory name of the specified subbook `subbook_code'. + */ +EB_Error_Code +eb_subbook_directory2(EB_Book *book, EB_Subbook_Code subbook_code, + char *directory) +{ + EB_Error_Code error_code; + char *p; + + eb_lock(&book->lock); + LOG(("in: eb_subbook_directory2(book=%d, subbook_code=%d)", + (int)book->code, (int)subbook_code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Check for the subbook-code. + */ + if (subbook_code < 0 || book->subbook_count <= subbook_code) { + error_code = EB_ERR_NO_SUCH_SUB; + goto failed; + } + + /* + * Copy directory name. + * Upper letters are converted to lower letters. + */ + strcpy(directory, (book->subbooks + subbook_code)->directory_name); + for (p = directory; *p != '\0'; p++) { + if ('A' <= *p && *p <= 'Z') + *p = ASCII_TOLOWER(*p); + } + + LOG(("out: eb_subbook_directory2(directory=%s) = %s", directory, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *directory = '\0'; + LOG(("out: eb_subbook_directory2() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Set the subbook `subbook_code' as the current subbook. + */ +EB_Error_Code +eb_set_subbook(EB_Book *book, EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code = EB_SUCCESS; + + eb_lock(&book->lock); + LOG(("in: eb_set_subbook(book=%d, subbook_code=%d)", + (int)book->code, (int)subbook_code)); + + /* + * The book must have been bound. + */ + if (book->path == NULL) { + error_code = EB_ERR_UNBOUND_BOOK; + goto failed; + } + + /* + * Check for the subbook-code. + */ + if (subbook_code < 0 || book->subbook_count <= subbook_code) { + error_code = EB_ERR_NO_SUCH_SUB; + goto failed; + } + + /* + * If the subbook has already been set as the current subbook, + * there is nothing to be done. + * Otherwise close the previous subbook. + */ + if (book->subbook_current != NULL) { + if (book->subbook_current->code == subbook_code) + goto succeeded; + eb_unset_subbook(book); + } + + /* + * Set the current subbook. + */ + book->subbook_current = book->subbooks + subbook_code; + + /* + * Dispatch. + */ + if (book->disc_code == EB_DISC_EB) + error_code = eb_set_subbook_eb(book, subbook_code); + else + error_code = eb_set_subbook_epwing(book, subbook_code); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Load the subbook. + */ + error_code = eb_load_subbook(book); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Load font files. + */ + eb_load_font_headers(book); + + succeeded: + book->subbook_current->initialized = 1; + LOG(("out: eb_set_subbook() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return error_code; + + /* + * An error occurs... + */ + failed: + if (book->subbook_current != NULL) { + zio_close(&book->subbook_current->text_zio); + zio_close(&book->subbook_current->graphic_zio); + zio_close(&book->subbook_current->sound_zio); + zio_close(&book->subbook_current->movie_zio); + } + book->subbook_current = NULL; + LOG(("out: eb_set_subbook() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Set the subbook `subbook_code' as the current subbook. + */ +static EB_Error_Code +eb_set_subbook_eb(EB_Book *book, EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + char text_path_name[EB_MAX_PATH_LENGTH + 1]; + char graphic_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code text_zio_code; + Zio_Code graphic_zio_code; + + LOG(("in: eb_set_subbook_eb(book=%d, subbook_code=%d)", + (int)book->code, (int)subbook_code)); + + subbook = book->subbook_current; + + /* + * Open a text file if exists. + */ + text_zio_code = ZIO_INVALID; + + if (subbook->initialized) { + if (zio_mode(&subbook->text_zio) != ZIO_INVALID) + text_zio_code = ZIO_REOPEN; + } else { + eb_canonicalize_file_name(subbook->text_file_name); + if (eb_find_file_name2(book->path, subbook->directory_name, + EB_FILE_NAME_START, subbook->text_file_name) == EB_SUCCESS) { + eb_path_name_zio_code(subbook->text_file_name, ZIO_PLAIN, + &text_zio_code); + } + } + + if (text_zio_code != ZIO_INVALID) { + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, text_path_name); + if (zio_open(&subbook->text_zio, text_path_name, text_zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_TEXT; + goto failed; + } + text_zio_code = zio_mode(&subbook->text_zio); + } + + /* + * Open a graphic file if exists. + */ + graphic_zio_code = ZIO_INVALID; + + if (subbook->initialized) { + if (zio_mode(&subbook->graphic_zio) != ZIO_INVALID) + graphic_zio_code = ZIO_REOPEN; + } else if (text_zio_code != ZIO_INVALID) { + strcpy(subbook->graphic_file_name, subbook->text_file_name); + graphic_zio_code = text_zio_code; + } + + if (graphic_zio_code != ZIO_INVALID) { + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->graphic_file_name, graphic_path_name); + if (zio_open(&subbook->graphic_zio, graphic_path_name, + graphic_zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_BINARY; + goto failed; + } + graphic_zio_code = zio_mode(&subbook->graphic_zio); + } + + LOG(("out: eb_set_subbook_eb() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_subbook_eb() = %s", eb_error_string(error_code))); + return error_code; +} + +/* + * Set the subbook `subbook_code' as the current subbook. + */ +static EB_Error_Code +eb_set_subbook_epwing(EB_Book *book, EB_Subbook_Code subbook_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + char text_path_name[EB_MAX_PATH_LENGTH + 1]; + char graphic_path_name[EB_MAX_PATH_LENGTH + 1]; + char sound_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code text_zio_code; + Zio_Code graphic_zio_code; + Zio_Code sound_zio_code; + + LOG(("in: eb_set_subbook_epwing(book=%d, subbook_code=%d)", + (int)book->code, (int)subbook_code)); + + subbook = book->subbook_current; + + if (!subbook->initialized) { + /* + * Adjust directory names. + */ + strcpy(subbook->data_directory_name, EB_DIRECTORY_NAME_DATA); + eb_fix_directory_name2(book->path, subbook->directory_name, + subbook->data_directory_name); + + strcpy(subbook->gaiji_directory_name, EB_DIRECTORY_NAME_GAIJI); + eb_fix_directory_name2(book->path, subbook->directory_name, + subbook->gaiji_directory_name); + + strcpy(subbook->movie_directory_name, EB_DIRECTORY_NAME_MOVIE); + eb_fix_directory_name2(book->path, subbook->directory_name, + subbook->movie_directory_name); + } + + /* + * Open a text file if exists. + * + * If a subbook has stream data only, its index_page has been set + * to 0. In this case, we must not try to open a text file of + * the subbook, since the text file may be for another subbook. + * Remember that subbooks can share a `data' sub-directory. + */ + text_zio_code = ZIO_INVALID; + + if (subbook->initialized) { + if (zio_mode(&subbook->text_zio) != ZIO_INVALID) + text_zio_code = ZIO_REOPEN; + } else if (subbook->index_page > 0) { + eb_canonicalize_file_name(subbook->text_file_name); + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + subbook->text_file_name) == EB_SUCCESS) { + eb_path_name_zio_code(subbook->text_file_name, + subbook->text_hint_zio_code, &text_zio_code); + } + } + + if (text_zio_code != ZIO_INVALID) { + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + text_path_name); + if (zio_open(&subbook->text_zio, text_path_name, text_zio_code) < 0) { + subbook = NULL; + error_code = EB_ERR_FAIL_OPEN_TEXT; + goto failed; + } + text_zio_code = zio_mode(&subbook->text_zio); + } + + /* + * Open a graphic file if exists. + */ + graphic_zio_code = ZIO_INVALID; + + if (subbook->initialized) { + if (zio_mode(&subbook->graphic_zio) != ZIO_INVALID) + graphic_zio_code = ZIO_REOPEN; + } else if (text_zio_code != ZIO_INVALID) { + eb_canonicalize_file_name(subbook->graphic_file_name); + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + subbook->graphic_file_name) == EB_SUCCESS) { + eb_path_name_zio_code(subbook->graphic_file_name, + subbook->graphic_hint_zio_code, &graphic_zio_code); + } + } + + if (graphic_zio_code != ZIO_INVALID) { + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + graphic_path_name); + if (zio_open(&subbook->graphic_zio, graphic_path_name, + graphic_zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_BINARY; + goto failed; + } + graphic_zio_code = zio_mode(&subbook->graphic_zio); + } + + /* + * Open a sound file if exists. + */ + sound_zio_code = ZIO_INVALID; + + if (subbook->initialized) { + if (zio_mode(&subbook->sound_zio) != ZIO_INVALID) + sound_zio_code = ZIO_REOPEN; + } else if (text_zio_code != ZIO_INVALID) { + eb_canonicalize_file_name(subbook->sound_file_name); + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + subbook->sound_file_name) == EB_SUCCESS) { + eb_path_name_zio_code(subbook->sound_file_name, + subbook->sound_hint_zio_code, &sound_zio_code); + } + } + + if (sound_zio_code != ZIO_INVALID) { + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + sound_path_name); + if (zio_open(&subbook->sound_zio, sound_path_name, + sound_zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_BINARY; + goto failed; + } + sound_zio_code = zio_mode(&subbook->sound_zio); + } + + LOG(("out: eb_set_subbook_epwing() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_set_subbook_epwing() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Unset the current subbook. + */ +void +eb_unset_subbook(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_unset_subbook(book=%d)", (int)book->code)); + + /* + * Close the file of the current subbook. + */ + if (book->subbook_current != NULL) { + eb_unset_font(book); + eb_unset_binary(book); + zio_close(&book->subbook_current->text_zio); + zio_close(&book->subbook_current->graphic_zio); + zio_close(&book->subbook_current->sound_zio); + zio_close(&book->subbook_current->movie_zio); + book->subbook_current = NULL; + } + + LOG(("out: eb_unset_subbook()")); + eb_unlock(&book->lock); +} + + diff --git a/lib/ebu/ebu/subbook.lo b/lib/ebu/ebu/subbook.lo new file mode 100644 index 0000000..a6f6bd9 --- /dev/null +++ b/lib/ebu/ebu/subbook.lo @@ -0,0 +1,12 @@ +# subbook.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/subbook.o' + +# Name of the non-PIC object +non_pic_object='subbook.o' + diff --git a/lib/ebu/ebu/sysdefs.h b/lib/ebu/ebu/sysdefs.h new file mode 100644 index 0000000..b7f9bd4 --- /dev/null +++ b/lib/ebu/ebu/sysdefs.h @@ -0,0 +1,5 @@ +/* automatically generated by Makefile. */ +#define EB_VERSION_STRING "4.5-20200413" +#define EB_VERSION_MAJOR 4 +#define EB_VERSION_MINOR 5 +#define EB_ENABLE_EBNET 1 diff --git a/lib/ebu/ebu/text.c b/lib/ebu/ebu/text.c new file mode 100644 index 0000000..97f7e3b --- /dev/null +++ b/lib/ebu/ebu/text.c @@ -0,0 +1,121 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' has text body. + * or not. + */ +int +eb_have_text(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_text(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * Check for the index page of text. + */ + if (book->subbook_current->text.start_page == 0) + goto failed; + + LOG(("out: eb_have_text() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_text() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Menu. + */ +EB_Error_Code +eb_text(EB_Book *book, EB_Position *position) +{ + EB_Error_Code error_code; + int page; + + eb_lock(&book->lock); + LOG(("in: eb_text(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Check for the page number of text. + */ + page = book->subbook_current->text.start_page; + if (page == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Copy the position to `position'. + */ + position->page = page; + position->offset = 0; + + LOG(("out: eb_text(position={%d,%d}) = %s", + position->page, position->offset, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_text() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/text.h b/lib/ebu/ebu/text.h new file mode 100644 index 0000000..2dcd0a0 --- /dev/null +++ b/lib/ebu/ebu/text.h @@ -0,0 +1,170 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EB_TEXT_H +#define EB_TEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef EB_BUILD_LIBRARY +#include "defs.h" +#else +#include +#endif + +/* + * Hook codes. + * (When you add or remove a hook, update EB_NUMER_OF_HOOKS in defs.h.) + */ +#define EB_HOOK_NULL -1 +#define EB_HOOK_INITIALIZE 0 +#define EB_HOOK_BEGIN_NARROW 1 +#define EB_HOOK_END_NARROW 2 +#define EB_HOOK_BEGIN_SUBSCRIPT 3 +#define EB_HOOK_END_SUBSCRIPT 4 + +#define EB_HOOK_SET_INDENT 5 +#define EB_HOOK_NEWLINE 6 +#define EB_HOOK_BEGIN_SUPERSCRIPT 7 +#define EB_HOOK_END_SUPERSCRIPT 8 +#define EB_HOOK_BEGIN_NO_NEWLINE 9 + +#define EB_HOOK_END_NO_NEWLINE 10 +#define EB_HOOK_BEGIN_EMPHASIS 11 +#define EB_HOOK_END_EMPHASIS 12 +#define EB_HOOK_BEGIN_CANDIDATE 13 +#define EB_HOOK_END_CANDIDATE_GROUP 14 + +#define EB_HOOK_END_CANDIDATE_LEAF 15 +#define EB_HOOK_BEGIN_REFERENCE 16 +#define EB_HOOK_END_REFERENCE 17 +#define EB_HOOK_BEGIN_KEYWORD 18 +#define EB_HOOK_END_KEYWORD 19 + +#define EB_HOOK_NARROW_FONT 20 +#define EB_HOOK_WIDE_FONT 21 +#define EB_HOOK_ISO8859_1 22 +#define EB_HOOK_NARROW_JISX0208 23 +#define EB_HOOK_WIDE_JISX0208 24 + +#define EB_HOOK_GB2312 25 +#define EB_HOOK_BEGIN_MONO_GRAPHIC 26 +#define EB_HOOK_END_MONO_GRAPHIC 27 +#define EB_HOOK_BEGIN_GRAY_GRAPHIC 28 +#define EB_HOOK_END_GRAY_GRAPHIC 29 + +#define EB_HOOK_BEGIN_COLOR_BMP 30 +#define EB_HOOK_BEGIN_COLOR_JPEG 31 +#define EB_HOOK_BEGIN_IN_COLOR_BMP 32 +#define EB_HOOK_BEGIN_IN_COLOR_JPEG 33 +#define EB_HOOK_END_COLOR_GRAPHIC 34 + +#define EB_HOOK_END_IN_COLOR_GRAPHIC 35 +#define EB_HOOK_BEGIN_WAVE 36 +#define EB_HOOK_END_WAVE 37 +#define EB_HOOK_BEGIN_MPEG 38 +#define EB_HOOK_END_MPEG 39 + +#define EB_HOOK_BEGIN_GRAPHIC_REFERENCE 40 +#define EB_HOOK_END_GRAPHIC_REFERENCE 41 +#define EB_HOOK_GRAPHIC_REFERENCE 42 +#define EB_HOOK_BEGIN_DECORATION 43 +#define EB_HOOK_END_DECORATION 44 + +#define EB_HOOK_BEGIN_IMAGE_PAGE 45 +#define EB_HOOK_END_IMAGE_PAGE 46 +#define EB_HOOK_BEGIN_CLICKABLE_AREA 47 +#define EB_HOOK_END_CLICKABLE_AREA 48 + +#define EB_HOOK_BEGIN_UNICODE 49 +#define EB_HOOK_END_UNICODE 50 +#define EB_HOOK_BEGIN_EBXAC_GAIJI 51 +#define EB_HOOK_END_EBXAC_GAIJI 52 +#define EB_HOOK_EBXAC_GAIJI 53 +#define EB_HOOK_UNICODE 54 + +#define EB_HOOK_BEGIN_COLOR_CHART 55 +#define EB_HOOK_END_COLOR_CHART 56 + +/* + * Function declarations. + */ +/* hook.c */ +void eb_initialize_hookset(EB_Hookset *hookset); +void eb_finalize_hookset(EB_Hookset *hookset); +EB_Error_Code eb_set_hook(EB_Hookset *hookset, const EB_Hook *hook); +EB_Error_Code eb_set_hooks(EB_Hookset *hookset, const EB_Hook *hook); +EB_Error_Code eb_hook_euc_to_ascii(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +EB_Error_Code eb_hook_stop_code(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +EB_Error_Code eb_hook_narrow_character_text(EB_Book *book, + EB_Appendix *appendix, void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +EB_Error_Code eb_hook_wide_character_text(EB_Book *book, + EB_Appendix *appendix, void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +EB_Error_Code eb_hook_newline(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); +EB_Error_Code eb_hook_empty(EB_Book *book, EB_Appendix *appendix, + void *container, EB_Hook_Code hook_code, int argc, + const unsigned int *argv); + +/* readtext.c */ +EB_Error_Code eb_seek_text(EB_Book *book, const EB_Position *position); +EB_Error_Code eb_tell_text(EB_Book *book, EB_Position *position); +EB_Error_Code eb_read_text(EB_Book *book, EB_Appendix *appendix, + EB_Hookset *hookset, void *container, size_t text_max_length, char *text, + ssize_t *text_length); +EB_Error_Code eb_read_heading(EB_Book *book, EB_Appendix *appendix, + EB_Hookset *hookset, void *container, size_t text_max_length, char *text, + ssize_t *text_length); +EB_Error_Code eb_read_rawtext(EB_Book *book, size_t text_max_length, + char *text, ssize_t *text_length); +int eb_is_text_stopped(EB_Book *book); +EB_Error_Code eb_write_text_byte1(EB_Book *book, int byte1); +EB_Error_Code eb_write_text_byte2(EB_Book *book, int byte1, int byte2); +EB_Error_Code eb_write_text_string(EB_Book *book, const char *string); +EB_Error_Code eb_write_text(EB_Book *book, const char * stream, + size_t stream_length); +const char *eb_current_candidate(EB_Book *book); +EB_Error_Code eb_forward_text(EB_Book *book, EB_Appendix *appendix); +EB_Error_Code eb_backward_text(EB_Book *book, EB_Appendix *appendix); + +#ifdef __cplusplus +} +#endif + +#endif /* not EB_TEXT_H */ diff --git a/lib/ebu/ebu/text.lo b/lib/ebu/ebu/text.lo new file mode 100644 index 0000000..04d238e --- /dev/null +++ b/lib/ebu/ebu/text.lo @@ -0,0 +1,12 @@ +# text.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/text.o' + +# Name of the non-PIC object +non_pic_object='text.o' + diff --git a/lib/ebu/ebu/urlparts.c b/lib/ebu/ebu/urlparts.c new file mode 100644 index 0000000..e3d67d9 --- /dev/null +++ b/lib/ebu/ebu/urlparts.c @@ -0,0 +1,716 @@ +/* + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +/* + * Character type tests and conversions. + */ +#define ASCII_ISDIGIT(c) ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c) || ASCII_ISDIGIT(c)) +#define ASCII_ISXDIGIT(c) \ + (ASCII_ISDIGIT(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f')) +#define ASCII_TOUPPER(c) (('a' <= (c) && (c) <= 'z') ? (c) - 0x20 : (c)) +#define ASCII_TOLOWER(c) (('A' <= (c) && (c) <= 'Z') ? (c) + 0x20 : (c)) + +#include "urlparts.h" + +/* + * Unexported functions. + */ +static void url_parts_canonicalize_path(char *path); +static void url_parts_expand_hex(char *string); +static void url_parts_convert_to_lower(char *string); + + +/* + * Initialize a query. + */ +void +url_parts_initialize(URL_Parts *parts) +{ + /* + * Set all URL parts and whole URL to NULL. + */ + parts->url = NULL; + parts->scheme = NULL; + parts->user = NULL; + parts->password = NULL; + parts->host = NULL; + parts->port = NULL; + parts->path = NULL; + parts->params = NULL; + parts->query = NULL; + parts->fragment = NULL; + + parts->buffer = NULL; +} + + +/* + * Finalize a query. + * All allocated memories in `queue' are also disposed. + */ +void +url_parts_finalize(URL_Parts *parts) +{ + /* + * Set all URL parts and whole URL to NULL. + */ + parts->scheme = NULL; + parts->user = NULL; + parts->password = NULL; + parts->host = NULL; + parts->port = NULL; + parts->path = NULL; + parts->params = NULL; + parts->query = NULL; + parts->fragment = NULL; + + /* + * Dispose memories assigned to `parts->url' and `parts->buffer'. + */ + if (parts->url != NULL) { + free(parts->url); + parts->url = NULL; + } + + if (parts->buffer != NULL) { + free(parts->buffer); + parts->buffer = NULL; + } +} + + +/* + * Return whole URL of a parsed URL. + */ +const char * +url_parts_url(URL_Parts *parts) +{ + return parts->url; +} + + +/* + * Return scheme part of a parsed URL. + */ +const char * +url_parts_scheme(URL_Parts *parts) +{ + return parts->scheme; +} + + +/* + * Return user part of a parsed URL. + */ +const char * +url_parts_user(URL_Parts *parts) +{ + return parts->user; +} + + +/* + * Return password part of a parsed URL. + */ +const char * +url_parts_password(URL_Parts *parts) +{ + return parts->password; +} + + +/* + * Return host part of a parsed URL. + */ +const char * +url_parts_host(URL_Parts *parts) +{ + return parts->host; +} + + +/* + * Return port part of a parsed URL. + */ +const char * +url_parts_port(URL_Parts *parts) +{ + return parts->port; +} + + +/* + * Return path part of a parsed URL. + */ +const char * +url_parts_path(URL_Parts *parts) +{ + return parts->path; +} + + +/* + * Return params part of a parsed URL. + */ +const char * +url_parts_params(URL_Parts *parts) +{ + return parts->params; +} + + +/* + * Return query part of a parsed URL. + */ +const char * +url_parts_query(URL_Parts *parts) +{ + return parts->query; +} + + +/* + * Return fragment part of a parsed URL. + */ +const char * +url_parts_fragment(URL_Parts *parts) +{ + return parts->fragment; +} + + +/* + * Parse an URL and fragment. + * + * `url' is an absolute or relative URL and optional fragment. + * The function resolves the `url' into 9 parts; scheme, user, password, + * host, port, path, params, query and fragment. + * + * [scheme ":"] ["//" [][":" password] "@"]["host" [":" port]] + * ["/" path] [";" params] ["?" query] ["#" fragment] + * + * The result is put into `parts'. This functions fails only when + * memory is exhausted. The function returns -1 in this case. + * It returns 0, upon successful. + */ +int +url_parts_parse(URL_Parts *parts, const char *url) +{ + char *separator; + char *url_p; + size_t url_length; + char *right_bracket; + + /* + * Re-initialize if `url' has already been used. + */ + if (parts->buffer != NULL) { + url_parts_finalize(parts); + url_parts_initialize(parts); + } + + /* + * Copy `url' to `parts->url' and `parts->buffer'. + */ + url_length = strlen(url); + parts->url = (char *)malloc(url_length + 1); + if (parts->url == NULL) + goto failed; + memcpy(parts->url, url, url_length + 1); + + parts->buffer = (char *)malloc(url_length + 1); + if (parts->buffer == NULL) + goto failed; + memcpy(parts->buffer, url, url_length + 1); + + /* + * Get a fragment. + */ + url_p = parts->buffer; + separator = strchr(url_p, '#'); + if (separator != NULL) { + if (*(separator + 1) != '\0') + parts->fragment = separator + 1; + *separator = '\0'; + } + + /* + * Get a scheme name. + */ + separator = strchr(url_p, ':'); + if (separator != NULL) { + char *p; + + for (p = url_p; *p != ':'; p++) { + if (!ASCII_ISALNUM(*p) && *p != '+' && *p != '.' && *p != '-') + break; + } + if (*p == ':') { + parts->scheme = url_p; + *p = '\0'; + url_p = p + 1; + } + } + + /* + * Get a network location. + */ + if (*url_p == '/' && *(url_p + 1) == '/') { + char *netloc = NULL; + char *hostport = NULL; + char *userpass = NULL; + char *p1, *p2; + + /* + * Shift left 2 characters to insert a terminator ('\0') for + * the network location, and a missed slash (`/'). + * + * "//www.foo.co.jp/path..." --> "www.foo.co.jp\0\0/path..." + * "//www.foo.co.jp\0" --> "www.foo.co.jp\0/\0" + */ + netloc = url_p; + for (p1 = url_p + 2, p2 = url_p; + *p1 != '/' && *p1 != '\0'; p1++, p2++) + *p2 = *p1; + *p2++ = '\0'; + if (*p1 != '\0') + url_p = p1; + else { + *p2 = '/'; + url_p = p2; + } + + /* + * Separate `netloc' into ":" and ":". + */ + separator = strchr(netloc, '@'); + if (separator != NULL) { + if (separator != netloc) + userpass = netloc; + if (*(separator + 1) != '\0') + hostport = separator + 1; + *separator = '\0'; + } else { + hostport = netloc; + userpass = NULL; + } + + /* + * Get user and password. + */ + if (userpass != NULL) { + separator = strchr(userpass, ':'); + if (separator != NULL) { + if (separator != userpass) + parts->user = userpass; + if (*(separator + 1) != '\0') + parts->password = separator + 1; + *separator = '\0'; + } else { + parts->user = userpass; + } + } + + /* + * Get host and port. + * IPv6 address is enclosed in `[' and `]'. + */ + if (hostport != NULL) { + if (*hostport == '[') { + right_bracket = strchr(hostport + 1, ']'); + if (right_bracket == NULL) + separator = NULL; + else { + if (*(right_bracket + 1) == ':' + || *(right_bracket + 1) == '\0') { + hostport++; + *right_bracket = '\0'; + } + separator = strchr(right_bracket + 1, ':'); + } + } else { + separator = strchr(hostport, ':'); + } + } + + if (separator != NULL) { + if (separator != hostport) + parts->host = hostport; + if (*(separator + 1) != '\0') + parts->port = separator + 1; + *separator = '\0'; + } else { + parts->host = hostport; + } + } + + /* + * Parse query. + */ + separator = strchr(url_p, '?'); + if (separator != NULL) { + if (*(separator + 1) != '\0') + parts->query = separator + 1; + *separator = '\0'; + } + + /* + * Parse parameters. + * The part is deleted if present. + */ + separator = strchr(url_p, ';'); + if (separator != NULL) { + if (*(separator + 1) != '\0') + parts->params = separator + 1; + *separator = '\0'; + } + + /* + * Parse path. + */ + if (*url_p != '\0') + parts->path = url_p; + + /* + * Normalize parts. + */ + if (parts->scheme != NULL) { + url_parts_expand_hex(parts->scheme); + url_parts_convert_to_lower(parts->scheme); + } + if (parts->user != NULL) { + url_parts_expand_hex(parts->user); + } + if (parts->password != NULL) { + url_parts_expand_hex(parts->password); + } + if (parts->host != NULL) { + url_parts_expand_hex(parts->host); + url_parts_convert_to_lower(parts->host); + } + if (parts->port != NULL) { + url_parts_expand_hex(parts->port); + } + if (parts->path != NULL) { + url_parts_expand_hex(parts->path); + url_parts_canonicalize_path(parts->path); + } + if (parts->params != NULL) { + url_parts_expand_hex(parts->params); + } + if (parts->query != NULL) { + url_parts_expand_hex(parts->query); + } + if (parts->fragment != NULL) { + url_parts_expand_hex(parts->fragment); + } + + return 0; + + /* + * An error occurs... + */ + failed: + url_parts_finalize(parts); + return -1; +} + + +/* + * Canonicalize the path in URL. + * + * Replace "." and ".." segments in the path. + * All occurrences of "." segment are removed. + * All occurrences of "/.." segments where is not + * equal to "..", are removed. This process is repeated until no + * match pattern remains. + * + * For example: + * "/A/./a.html" ---> "/A/a.html" + * "/A/../a.html" ---> "/a.html" + * "/A/B/C/../../a.html" ---> "/A/a.html" + * "/../a.html" ---> "/../a.html" (*1) + * + * (*1) If a correspondig parent segment is not exist in the path, + * we don't remove "/..". + */ +static void +url_parts_canonicalize_path(char *path) +{ + char *source = path; + char *destination = path; + char *unfixed_root = path; + char *slash; + + while (*source != '\0') { + if (*source != '/') { + *destination++ = *source++; + continue; + } + + /* + * `*source' is slash (`/'). + */ + if (*(source + 1) == '/') { + /* + * "//" -- Ignore 2nd slash ("/"). + */ + source++; + } else if (*(source + 1) == '.' + && *(source + 2) == '/') { + /* + * "/./" -- Current segment itself. Removed. + */ + if (unfixed_root != destination) { + source += 2; + } else { + *destination++ = *source++; + *destination++ = *source++; + unfixed_root += 2; + } + } else if (*(source + 1) == '.' && *(source + 2) == '.' + && *(source + 3) == '/') { + /* + * "/../" -- Back to the parent segment. + */ + if (unfixed_root != destination) { + source += 3; + *destination = '\0'; + slash = strrchr(unfixed_root, '/'); + if (slash != NULL) + destination = slash; + else + destination = path; + } else { + *destination++ = *source++; + *destination++ = *source++; + *destination++ = *source++; + unfixed_root += 3; + } + } else { + /* + * "/" -- Single "/". + */ + *destination++ = *source++; + } + } + *destination = '\0'; + + slash = strrchr(unfixed_root, '/'); + if (slash != NULL + && slash != unfixed_root + && *(slash + 1) == '.' && *(slash + 2) == '\0') { + /* + * The path is end with "/.", Remove ".". + * After the canonicalization, the path is end with "/". + */ + *(slash + 1) = '\0'; + } else if (slash != NULL + && slash != unfixed_root + && *(slash + 1) == '.' && *(slash + 2) == '.' + && *(slash + 3) == '\0') { + /* + * The path is end with "/..", Back to the parent segment. + * After the canonicalization, the path is end with "/". + */ + *slash = '\0'; + slash = strrchr(unfixed_root, '/'); + if (slash == NULL) { + *path = '/'; + *(path + 1) = '\0'; + } else + *(slash + 1) = '\0'; + } +} + +/* + * All characters except for the followings are expandable characters. + * Converting "%" to that character doesn't affect URL parsing. + * + * unsafe ::= CTL | SP | <"> | "#" | "%" | "<" | ">" + * reserved ::= ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" + * + * `expandable_hex_table[]' is used to examine whether a character is + * expandable or not. + */ +static const char expandable_hex_table[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 ... 0x0f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 ... 0x1f */ + 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, /* !"#$%&'()*+,-./ */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 0123456789:;<=>? */ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* @ABCDEFGHIJKLMNO */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* PQRSTUVWXYZ[\]^_ */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* `abcdefghijklmno */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* pqrstuvwxyz{|}~ */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 ... 0x8f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 ... 0x9f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xa0 ... 0xaf */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xb0 ... 0xbf */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xc0 ... 0xcf */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xd0 ... 0xdf */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xe0 ... 0xef */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xf0 ... 0xff */ +}; + +/* + * Expand all "%" in an URL part to original characters. + */ +static void +url_parts_expand_hex(char *string) +{ + char *source = string; + char *destination = string; + int hex1; + int hex2; + int c; + + while (*source != '\0') { + /* + * "%" occurs. + * Unescape it if the character is not unsafe or reserved. + */ + if (*source == '%' + && ASCII_ISXDIGIT(*(source + 1)) + && ASCII_ISXDIGIT(*(source + 2))) { + hex1 = *(source + 1); + hex2 = *(source + 2); + c = 0; + + if ('0' <= hex1 && hex1 <= '9') + c += (hex1 - '0') << 4; + else if ('A' <= hex1 && hex1 <= 'F') + c += (hex1 - 'A' + 0x0a) << 4; + else if ('a' <= hex1 && hex1 <= 'f') + c += (hex1 - 'a' + 0x0a) << 4; + + if ('0' <= hex2 && hex2 <= '9') + c += (hex2 - '0'); + else if ('A' <= hex2 && hex2 <= 'F') + c += (hex2 - 'A' + 0x0a); + else if ('a' <= hex2 && hex2 <= 'f') + c += (hex2 - 'a' + 0x0a); + + if (expandable_hex_table[c]) + *(unsigned char *)destination++ = c; + else { + *destination++ = '%'; + *destination++ = hex1; + *destination++ = hex2; + } + source += 3; + + } else + *destination++ = *source++; + } + + *destination = '\0'; +} + + +/* + * Convert upper case letters in a stinrg `string' to lower case. + * This function is for the `scheme' and `host' parts in an URL, + * since they are case insensitive, + */ +static void +url_parts_convert_to_lower(char *string) +{ + char *p; + + for (p = string; *p != '\0'; p++) { + if (ASCII_ISUPPER(*p)) + *p = 'a' + (*p - 'A'); + } +} + + +void +url_parts_print(URL_Parts *parts) +{ + printf("url parts = {\n"); + if (parts->scheme != NULL) + printf(" scheme = %s\n", parts->scheme); + if (parts->user != NULL) + printf(" user = %s\n", parts->user); + if (parts->password != NULL) + printf(" password = %s\n", parts->password); + if (parts->host != NULL) + printf(" host = %s\n", parts->host); + if (parts->port != NULL) + printf(" port = %s\n", parts->port); + if (parts->path != NULL) + printf(" path = %s\n", parts->path); + if (parts->params != NULL) + printf(" params = %s\n", parts->params); + if (parts->query != NULL) + printf(" query = %s\n", parts->query); + if (parts->fragment != NULL) + printf(" fragment = %s\n", parts->fragment); + printf("}\n"); + fflush(stdout); +} + +/* + * Main for test. + */ +#ifdef TEST + +int +main(int argc, char *argv[]) +{ + URL_Parts url; + int i; + + if (argc < 2) { + fprintf(stderr, "usage: %s URL\n", argv[0]); + exit(1); + } + + url_parts_initialize(&url); + url_parts_parse(&url, argv[1]); + url_parts_print(&url); + fflush(stdout); + url_parts_finalize(&url); +} + +#endif diff --git a/lib/ebu/ebu/urlparts.h b/lib/ebu/ebu/urlparts.h new file mode 100644 index 0000000..b3fb863 --- /dev/null +++ b/lib/ebu/ebu/urlparts.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef URLPARTS_H +#define URLPARTS_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* + * URL Parts. + */ +typedef struct { + char *url; + char *scheme; + char *user; + char *password; + char *host; + char *port; + char *path; + char *params; + char *query; + char *fragment; + char *buffer; +} URL_Parts; + +/* + * Function Declarations. + */ +void url_parts_initialize(URL_Parts *parts); +void url_parts_finalize(URL_Parts *parts); +const char *url_parts_url(URL_Parts *parts); +const char *url_parts_scheme(URL_Parts *parts); +const char *url_parts_user(URL_Parts *parts); +const char *url_parts_password(URL_Parts *parts); +const char *url_parts_host(URL_Parts *parts); +const char *url_parts_port(URL_Parts *parts); +const char *url_parts_path(URL_Parts *parts); +const char *url_parts_params(URL_Parts *parts); +const char *url_parts_query(URL_Parts *parts); +const char *url_parts_fragment(URL_Parts *parts); +int url_parts_parse(URL_Parts *, const char *parts); +void url_parts_print(URL_Parts *parts); + +#endif /* not URLPARTS_H */ diff --git a/lib/ebu/ebu/urlparts.lo b/lib/ebu/ebu/urlparts.lo new file mode 100644 index 0000000..91be38b --- /dev/null +++ b/lib/ebu/ebu/urlparts.lo @@ -0,0 +1,12 @@ +# urlparts.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/urlparts.o' + +# Name of the non-PIC object +non_pic_object='urlparts.o' + diff --git a/lib/ebu/ebu/utf8.c b/lib/ebu/ebu/utf8.c new file mode 100644 index 0000000..b51d6e0 --- /dev/null +++ b/lib/ebu/ebu/utf8.c @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2009 Kazuhiro Ito + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "binary.h" +#include "font.h" +#include "build-post.h" + +char *eb_normalize_utf8 (EB_Book *book, int code) { + EB_Subbook *subbook; + EB_UTF8_Table *table; + int floor = -1 , ceil; + int current; + + subbook = book->subbook_current; + table = subbook->table; + ceil = subbook->table_count; + + while (floor + 1 != ceil) { + current = (floor + ceil) / 2; + if (table[current].code == code) { + return table[current].string; + } + + if (table[current].code < code) { + floor = current; + } else { + ceil = current; + } + } + + return NULL; +} + +EB_Error_Code eb_load_utf8_table (EB_Book *book) { + EB_Error_Code error_code; + EB_Subbook *subbook; + size_t buffer_size; + unsigned int count, i; + char *buffer, *read; + + LOG(("in: eb_load_utf8_table(book=%d)", (int)book->code)); + + subbook = book->subbook_current; + + /* + * If table is already loaded, do nothing. + */ + if (subbook->table_buffer) return EB_SUCCESS; + + /* + * Allocate memory for table buffer. + */ + buffer_size = subbook->table_size * EB_SIZE_PAGE; + subbook->table_buffer = malloc(buffer_size); + if (subbook->table_buffer == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + buffer = subbook->table_buffer; + + /* + * Read normalization table. + */ + if (zio_lseek(&subbook->text_zio, + ((off_t) subbook->table_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_TEXT; + goto failed; + } + if (zio_read(&subbook->text_zio, buffer, buffer_size) != buffer_size) { + error_code = EB_ERR_FAIL_READ_TEXT; + goto failed; + } + + /* + * Check version and etc. + */ + if (eb_uint4(buffer) != 1) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + subbook->table_count = eb_uint4(buffer + 4); + if (subbook->table_count > 0x10ffff) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + + /* + * Allocate memory for table elements. + */ + subbook->table = malloc(subbook->table_count * sizeof(EB_UTF8_Table)); + if (subbook->table == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + + read = buffer + 8; + for (i = 0; i < subbook->table_count; i++) { + read += eb_read_utf8(read, &(subbook->table[i].code)); + if (subbook->table[i].code == 0) { + error_code = EB_ERR_UNEXP_TEXT; + goto failed; + } + subbook->table[i].string = read; + read += strlen(read) + 1; + } + + LOG(("out: eb_load_utf8_table() = %s", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + failed: + if (subbook->table_buffer) { + free(subbook->table_buffer); + subbook->table_buffer = NULL; + } + if (subbook->table) { + free(subbook->table); + subbook->table = NULL; + } + + LOG(("out: eb_load_utf8_table() = %s", eb_error_string(error_code))); + return error_code; +} + + +void eb_initialize_utf8_table (EB_Book *book) { + EB_Subbook *subbook; + + subbook = book->subbook_current; + + subbook->table_buffer = NULL; + subbook->table = NULL; + subbook->table_count = 0; +} + +void eb_finalize_utf8_table (EB_Book *book) { + EB_Subbook *subbook; + + subbook = book->subbook_current; + + if (subbook->table_buffer) { + free(subbook->table_buffer); + subbook->table_buffer = NULL; + } + if (subbook->table) { + free(subbook->table); + subbook->table = NULL; + } + subbook->table_count = 0; +} + +int eb_read_utf8 (const char *buffer, int *code) { + if (!(((unsigned char)*buffer) & 0x80)) { + *code = *buffer; + return 1; + } else if (!(((unsigned char)*buffer) & 0x20)) { + *code = + ((((unsigned char)buffer[0]) & 0x1f) << 6) + + ((((unsigned char)buffer[1]) & 0x3f) ); + return 2; + } else if (!(((unsigned char)*buffer) & 0x10)) { + *code = + ((((unsigned char)buffer[0]) & 0x0f) << 12) + + ((((unsigned char)buffer[1]) & 0x3f) << 6) + + ((((unsigned char)buffer[2]) & 0x3f) ); + return 3; + } else if (!(((unsigned char)*buffer) & 0x08)) { + *code = + ((((unsigned char)buffer[0]) & 0x07) << 18) + + ((((unsigned char)buffer[1]) & 0x3f) << 12) + + ((((unsigned char)buffer[2]) & 0x3f) << 6) + + ((((unsigned char)buffer[3]) & 0x3f) ); + return 4; + } + + /* invalid string */ + *code = 0; + return 0; +} diff --git a/lib/ebu/ebu/utf8.lo b/lib/ebu/ebu/utf8.lo new file mode 100644 index 0000000..75f3355 --- /dev/null +++ b/lib/ebu/ebu/utf8.lo @@ -0,0 +1,12 @@ +# utf8.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/utf8.o' + +# Name of the non-PIC object +non_pic_object='utf8.o' + diff --git a/lib/ebu/ebu/widealt.c b/lib/ebu/ebu/widealt.c new file mode 100644 index 0000000..f16e937 --- /dev/null +++ b/lib/ebu/ebu/widealt.c @@ -0,0 +1,629 @@ +/* automatically generated from narwalt.c. */ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "appendix.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_wide_character_text_jis(EB_Appendix *appendix, + int character_number, char *text); +static EB_Error_Code eb_wide_character_text_latin(EB_Appendix *appendix, + int character_number, char *text); + +/* + * Hash macro for cache data. + */ +#define EB_HASH_ALT_CACHE(c) ((c) & 0x0f) + + +/* + * Examine whether the current subbook in `book' has a wide font + * alternation or not. + */ +int +eb_have_wide_alt(EB_Appendix *appendix) +{ + eb_lock(&appendix->lock); + LOG(("in: eb_have_wide_alt(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) + goto failed; + + if (appendix->subbook_current->wide_page == 0) + goto failed; + + LOG(("out: eb_have_wide_alt() = %d", 1)); + eb_unlock(&appendix->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_wide_alt() = %d", 0)); + eb_unlock(&appendix->lock); + return 0; +} + + +/* + * Look up the character number of the start of the wide font alternation + * of the current subbook in `book'. + */ +EB_Error_Code +eb_wide_alt_start(EB_Appendix *appendix, int *start) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_wide_alt_start(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + if (appendix->subbook_current->wide_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + *start = appendix->subbook_current->wide_start; + + LOG(("out: eb_wide_alt_start(start=%d) = %s", *start, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *start = -1; + LOG(("out: eb_wide_alt_start() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Return the character number of the end of the wide font alternation + * of the current subbook in `book'. + */ +EB_Error_Code +eb_wide_alt_end(EB_Appendix *appendix, int *end) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_wide_alt_end(appendix=%d)", (int)appendix->code)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + if (appendix->subbook_current->wide_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + *end = appendix->subbook_current->wide_end; + + LOG(("out: eb_wide_alt_end(end=%d) = %s", *end, + eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *end = -1; + LOG(("out: eb_wide_alt_end() = %s", eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +EB_Error_Code +eb_wide_alt_character_text(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + + eb_lock(&appendix->lock); + LOG(("in: eb_wide_alt_character_text(appendix=%d, character_number=%d)", + (int)appendix->code, character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (appendix->subbook_current->wide_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + error_code = eb_wide_character_text_latin(appendix, + character_number, text); + } else { + error_code = eb_wide_character_text_jis(appendix, character_number, + text); + } + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_wide_alt_character_text(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_wide_alt_character_text() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +static EB_Error_Code +eb_wide_character_text_jis(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + int start; + int end; + off_t location; + EB_Alternation_Cache *cachep; + + LOG(("in: eb_wide_alt_character_text_jis(appendix=%d, \ +character_number=%d)", + (int)appendix->code, character_number)); + + start = appendix->subbook_current->wide_start; + end = appendix->subbook_current->wide_end; + + /* + * Check for `character_number'. Is it in a font? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x21 + || 0x7e < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Calculate the location of alternation data. + */ + location + = (appendix->subbook_current->wide_page - 1) * EB_SIZE_PAGE + + (((character_number >> 8) - (start >> 8)) * 0x5e + + (character_number & 0xff) - (start & 0xff)) + * (EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + + /* + * Check for the cache data. + */ + cachep = appendix->wide_cache + EB_HASH_ALT_CACHE(character_number); + if (cachep->character_number == character_number) { + memcpy(text, cachep->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + goto succeeded; + } + + /* + * Read the alternation data. + */ + if (zio_lseek(&appendix->subbook_current->zio, location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + cachep->character_number = -1; + if (zio_read(&appendix->subbook_current->zio, cachep->text, + EB_MAX_ALTERNATION_TEXT_LENGTH + 1) + != EB_MAX_ALTERNATION_TEXT_LENGTH + 1) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + + /* + * Update cache data. + */ + memcpy(text, cachep->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + cachep->text[EB_MAX_ALTERNATION_TEXT_LENGTH] = '\0'; + cachep->character_number = character_number; + + succeeded: + LOG(("out: eb_wide_alt_character_text_jis(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_wide_alt_character_text_jis() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the alternation text of the character number `character_number'. + */ +static EB_Error_Code +eb_wide_character_text_latin(EB_Appendix *appendix, int character_number, + char *text) +{ + EB_Error_Code error_code; + int start; + int end; + off_t location; + EB_Alternation_Cache *cache_p; + + LOG(("in: eb_wide_alt_character_text_latin(appendix=%d, \ +character_number=%d)", + (int)appendix->code, character_number)); + + start = appendix->subbook_current->wide_start; + end = appendix->subbook_current->wide_end; + + /* + * Check for `character_number'. Is it in a font? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x01 + || 0xfe < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Calculate the location of alternation data. + */ + location + = (appendix->subbook_current->wide_page - 1) * EB_SIZE_PAGE + + (((character_number >> 8) - (start >> 8)) * 0xfe + + (character_number & 0xff) - (start & 0xff)) + * (EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + + /* + * Check for the cache data. + */ + cache_p = appendix->wide_cache + EB_HASH_ALT_CACHE(character_number); + if (cache_p->character_number == character_number) { + memcpy(text, cache_p->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + goto succeeded; + } + + /* + * Read the alternation data. + */ + if (zio_lseek(&appendix->subbook_current->zio, location, SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_APP; + goto failed; + } + cache_p->character_number = -1; + if (zio_read(&appendix->subbook_current->zio, cache_p->text, + EB_MAX_ALTERNATION_TEXT_LENGTH + 1) + != EB_MAX_ALTERNATION_TEXT_LENGTH + 1) { + error_code = EB_ERR_FAIL_READ_APP; + goto failed; + } + + /* + * Update cache data. + */ + memcpy(text, cache_p->text, EB_MAX_ALTERNATION_TEXT_LENGTH + 1); + cache_p->text[EB_MAX_ALTERNATION_TEXT_LENGTH] = '\0'; + cache_p->character_number = character_number; + + succeeded: + LOG(("out: eb_wide_alt_character_text_latin(text=%s) = %s", + eb_quoted_string(text), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *text = '\0'; + LOG(("out: eb_wide_alt_character_text_latin() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Return next `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_forward_wide_alt_character(EB_Appendix *appendix, int n, + int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) { + return eb_backward_wide_alt_character(appendix, -n, + character_number); + } + + eb_lock(&appendix->lock); + LOG(("in: eb_forward_wide_alt_character(appendix=%d, n=%d, \ +character_number=%d)", + (int)appendix->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (appendix->subbook_current->wide_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + start = appendix->subbook_current->wide_start; + end = appendix->subbook_current->wide_end; + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if (0xfe <= (*character_number & 0xff)) + *character_number += 3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if (0x7e <= (*character_number & 0xff)) + *character_number += 0xa3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } + + LOG(("out: eb_forkward_wide_alt_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_forward_wide_alt_character() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + +/* + * Return previous `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_backward_wide_alt_character(EB_Appendix *appendix, int n, + int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) { + return eb_forward_wide_alt_character(appendix, -n, character_number); + } + + eb_lock(&appendix->lock); + LOG(("in: eb_backward_wide_alt_character(appendix=%d, n=%d, \ +character_number=%d)", + (int)appendix->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (appendix->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_APPSUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (appendix->subbook_current->wide_page == 0) { + error_code = EB_ERR_NO_ALT; + goto failed; + } + + start = appendix->subbook_current->wide_start; + end = appendix->subbook_current->wide_end; + + if (appendix->subbook_current->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x01) + *character_number -= 3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x21) + *character_number -= 0xa3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_TEXT; + goto failed; + } + } + } + + LOG(("out: eb_backward_wide_alt_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&appendix->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_backward_wide_alt_character() = %s", + eb_error_string(error_code))); + eb_unlock(&appendix->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/widealt.lo b/lib/ebu/ebu/widealt.lo new file mode 100644 index 0000000..ff1d7fd --- /dev/null +++ b/lib/ebu/ebu/widealt.lo @@ -0,0 +1,12 @@ +# widealt.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/widealt.o' + +# Name of the non-PIC object +non_pic_object='widealt.o' + diff --git a/lib/ebu/ebu/widefont.c b/lib/ebu/ebu/widefont.c new file mode 100644 index 0000000..5e81188 --- /dev/null +++ b/lib/ebu/ebu/widefont.c @@ -0,0 +1,1100 @@ +/* automatically generated from narwfont.c. */ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "font.h" +#include "build-post.h" + +/* + * Unexported functions. + */ +static EB_Error_Code eb_wide_character_bitmap_jis(EB_Book *book, + int character_number, char *bitmap); +static EB_Error_Code eb_wide_character_bitmap_latin(EB_Book *book, + int character_number, char *bitmap); + + +/* + * Open a font file. + */ +EB_Error_Code +eb_open_wide_font_file(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *wide_font; + char font_path_name[EB_MAX_PATH_LENGTH + 1]; + Zio_Code zio_code; + + LOG(("in: eb_open_wide_font(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + wide_font = subbook->wide_fonts + font_code; + + if (wide_font->font_code == EB_FONT_INVALID) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + if (0 <= zio_file(&wide_font->zio)) + goto succeeded; + + /* + * If the book is EBWING, open the wide font file. + * (In EB books, font data are stored in the `START' file.) + */ + zio_code = ZIO_INVALID; + + if (book->disc_code == EB_DISC_EB) { + if (wide_font->initialized) { + if (zio_mode(&wide_font->zio) != ZIO_INVALID) + zio_code = ZIO_REOPEN; + } else { + zio_code = zio_mode(&subbook->text_zio); + } + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, font_path_name); + + } else { + if (wide_font->initialized) { + if (zio_mode(&wide_font->zio) != ZIO_INVALID) + zio_code = ZIO_REOPEN; + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, wide_font->file_name, + font_path_name); + } else { + eb_canonicalize_file_name(wide_font->file_name); + if (eb_find_file_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, wide_font->file_name, + wide_font->file_name) != EB_SUCCESS) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, wide_font->file_name, + font_path_name); + eb_path_name_zio_code(font_path_name, ZIO_PLAIN, &zio_code); + } + } + + if (zio_code != ZIO_INVALID + && zio_open(&wide_font->zio, font_path_name, zio_code) < 0) { + error_code = EB_ERR_FAIL_OPEN_FONT; + goto failed; + } + + succeeded: + LOG(("out: eb_open_wide_font_file(file=%d) = %s", + zio_file(&wide_font->zio), eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_open_wide_font_file() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read font header. + */ +EB_Error_Code +eb_load_wide_font_header(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *wide_font; + char buffer[16]; + int character_count; + Zio *zio; + + LOG(("in: eb_load_wide_font_header(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + wide_font = subbook->wide_fonts + font_code; + zio = &wide_font->zio; + + if (wide_font->initialized) + goto succeeded; + + /* + * Read information from the text file. + */ + if (zio_lseek(zio, ((off_t) wide_font->page - 1) * EB_SIZE_PAGE, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, buffer, 16) != 16) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + + /* + * If the number of characters (`character_count') is 0, the font + * is unavailable. We return EB_ERR_NO_SUCH_FONT. + */ + character_count = eb_uint2(buffer + 12); + if (character_count == 0) { + zio_close(zio); + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + /* + * Set the information. + */ + wide_font->start = eb_uint2(buffer + 10); + if (book->character_code == EB_CHARCODE_ISO8859_1) { + wide_font->end = wide_font->start + + ((character_count / 0xfe) << 8) + (character_count % 0xfe) - 1; + if (0xfe < (wide_font->end & 0xff)) + wide_font->end += 3; + } else { + wide_font->end = wide_font->start + + ((character_count / 0x5e) << 8) + (character_count % 0x5e) - 1; + if (0x7e < (wide_font->end & 0xff)) + wide_font->end += 0xa3; + } + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + if ((wide_font->start & 0xff) < 0x01 + || 0xfe < (wide_font->start & 0xff) + || wide_font->start < 0x0001 + || 0x1efe < wide_font->end) { + error_code = EB_ERR_UNEXP_FONT; + goto failed; + } + } else { + if ((wide_font->start & 0xff) < 0x21 + || 0x7e < (wide_font->start & 0xff) + || wide_font->start < 0xa121 + || 0xfe7e < wide_font->end) { + error_code = EB_ERR_UNEXP_FONT; + goto failed; + } + } + + succeeded: + LOG(("out: eb_load_wide_font_header()", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_wide_font_header()", eb_error_string(error_code))); + return error_code; +} + + +/* + * Read font glyph data. + */ +EB_Error_Code +eb_load_wide_font_glyphs(EB_Book *book, EB_Font_Code font_code) +{ + EB_Error_Code error_code; + EB_Subbook *subbook; + EB_Font *wide_font; + int character_count; + size_t glyph_size; + size_t total_glyph_size; + Zio *zio; + + LOG(("in: eb_load_wide_font_glyphs(book=%d, font_code=%d)", + (int)book->code, (int)font_code)); + + subbook = book->subbook_current; + wide_font = subbook->wide_fonts + font_code; + zio = &wide_font->zio; + + if (wide_font->glyphs != NULL) + goto succeeded; + + /* + * Calculate size of glyph data (`total_glyph_size'). + * + * Set the number of local defined characters to `character_count'. + * Set the number of character glpyhs in a page to `page_glyph_count'. + * Set size of glyph data to `total_glyph_size'. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1) { + character_count + = ((wide_font->end >> 8) - (wide_font->start >> 8)) * 0xfe + + ((wide_font->end & 0xff) - (wide_font->start & 0xff)) + 1; + } else { + character_count + = ((wide_font->end >> 8) - (wide_font->start >> 8)) * 0x5e + + ((wide_font->end & 0xff) - (wide_font->start & 0xff)) + 1; + } + + eb_wide_font_size2(font_code, &glyph_size); + total_glyph_size + = (character_count / (1024 / glyph_size)) * 1024 + + (character_count % (1024 / glyph_size)) * glyph_size; + + /* + * Allocate memory for glyph data. + */ + wide_font->glyphs = (char *) malloc(total_glyph_size); + if (wide_font->glyphs == NULL) { + error_code = EB_ERR_MEMORY_EXHAUSTED; + goto failed; + } + + /* + * Read glyphs. + */ + if (zio_lseek(zio, (off_t) wide_font->page * EB_SIZE_PAGE, SEEK_SET) + < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, wide_font->glyphs, total_glyph_size) + != total_glyph_size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + + succeeded: + LOG(("out: eb_load_wide_font_glyphs()", eb_error_string(EB_SUCCESS))); + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_load_wide_font_glyphs()", eb_error_string(error_code))); + if (wide_font->glyphs != NULL) { + free(wide_font->glyphs); + wide_font->glyphs = NULL; + } + return error_code; +} + + +/* + * Examine whether the current subbook in `book' has a wide font. + */ +int +eb_have_wide_font(EB_Book *book) +{ + int i; + + eb_lock(&book->lock); + LOG(("in: eb_have_wide_font(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + /* + * If the wide font has already set, the subbook has wide fonts. + */ + if (book->subbook_current->wide_current != NULL) + goto succeeded; + + /* + * Scan the font table. + */ + for (i = 0; i < EB_MAX_FONTS; i++) { + if (book->subbook_current->wide_fonts[i].font_code + != EB_FONT_INVALID) + break; + } + + if (EB_MAX_FONTS <= i) + goto failed; + + succeeded: + LOG(("out: eb_have_wide_font() = %d", 1)); + eb_unlock(&book->lock); + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_wide_font() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Get width of the font `font_code' in the current subbook of `book'. + */ +EB_Error_Code +eb_wide_font_width(EB_Book *book, int *width) +{ + EB_Error_Code error_code; + EB_Font_Code font_code; + + eb_lock(&book->lock); + LOG(("in: eb_wide_font_width(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + /* + * Calculate width. + */ + font_code = book->subbook_current->wide_current->font_code; + error_code = eb_wide_font_width2(font_code, width); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_wide_font_width(width=%d) = %s", (int)*width, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *width = 0; + LOG(("out: eb_wide_font_width() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get width of the font `font_code'. + */ +EB_Error_Code +eb_wide_font_width2(EB_Font_Code font_code, int *width) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_width2(font_code=%d)", (int)font_code)); + + switch (font_code) { + case EB_FONT_16: + *width = EB_WIDTH_WIDE_FONT_16; + break; + case EB_FONT_24: + *width = EB_WIDTH_WIDE_FONT_24; + break; + case EB_FONT_30: + *width = EB_WIDTH_WIDE_FONT_30; + break; + case EB_FONT_48: + *width = EB_WIDTH_WIDE_FONT_48; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_width2(width=%d) = %s", *width, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *width = 0; + LOG(("out: eb_wide_font_width2() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the bitmap size of the font `font_code' in the current subbook + * of `book'. + */ +EB_Error_Code +eb_wide_font_size(EB_Book *book, size_t *size) +{ + EB_Error_Code error_code; + EB_Font_Code font_code; + int width; + int height; + + eb_lock(&book->lock); + LOG(("in: eb_wide_font_size(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + /* + * Calculate size. + */ + font_code = book->subbook_current->wide_current->font_code; + error_code = eb_wide_font_width2(font_code, &width); + if (error_code != EB_SUCCESS) + goto failed; + error_code = eb_font_height2(font_code, &height); + if (error_code != EB_SUCCESS) + goto failed; + *size = (width / 8) * height; + + LOG(("out: eb_wide_font_size(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_size() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get the bitmap size of a character in `font_code' of the current + * subbook. + */ +EB_Error_Code +eb_wide_font_size2(EB_Font_Code font_code, size_t *size) +{ + EB_Error_Code error_code; + + LOG(("in: eb_wide_font_size2(font_code=%d)", (int)font_code)); + + switch (font_code) { + case EB_FONT_16: + *size = EB_SIZE_WIDE_FONT_16; + break; + case EB_FONT_24: + *size = EB_SIZE_WIDE_FONT_24; + break; + case EB_FONT_30: + *size = EB_SIZE_WIDE_FONT_30; + break; + case EB_FONT_48: + *size = EB_SIZE_WIDE_FONT_48; + break; + default: + error_code = EB_ERR_NO_SUCH_FONT; + goto failed; + } + + LOG(("out: eb_wide_font_size2(size=%ld) = %s", (long)*size, + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *size = 0; + LOG(("out: eb_wide_font_size2() = %s", eb_error_string(error_code))); + return error_code; +} + + +/* + * Get the character number of the start of the wide font of the current + * subbook in `book'. + */ +EB_Error_Code +eb_wide_font_start(EB_Book *book, int *start) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_wide_font_start(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + *start = book->subbook_current->wide_current->start; + + LOG(("out: eb_wide_font_start(start=%d) = %s", *start, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_wide_font_start() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get the character number of the end of the wide font of the current + * subbook in `book'. + */ +EB_Error_Code +eb_wide_font_end(EB_Book *book, int *end) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_wide_font_end(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + *end = book->subbook_current->wide_current->end; + + LOG(("out: eb_wide_font_end(end=%d) = %s", *end, + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_wide_font_end() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current wide font of the current subbook in `book'. + */ +EB_Error_Code +eb_wide_font_character_bitmap(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + + eb_lock(&book->lock); + LOG(("in: eb_wide_font_character_bitmap(book=%d, character_number=%d)", + (int)book->code, character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + error_code = eb_wide_character_bitmap_latin(book, character_number, + bitmap); + } else { + error_code = eb_wide_character_bitmap_jis(book, character_number, + bitmap); + } + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_wide_font_character_bitmap() = %s", + eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_wide_font_character_bitmap() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current wide font of the current subbook in `book'. + */ +static EB_Error_Code +eb_wide_character_bitmap_jis(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + EB_Font *wide_current; + int start; + int end; + int character_index; + off_t offset; + size_t size; + Zio *zio; + + LOG(("in: eb_wide_font_character_bitmap_jis(book=%d, \ +character_number=%d)", + (int)book->code, character_number)); + + start = book->subbook_current->wide_current->start; + end = book->subbook_current->wide_current->end; + wide_current = book->subbook_current->wide_current; + + /* + * Check for `character_number'. Is it in a range of bitmaps? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x21 + || 0x7e < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Calculate the size and the location of bitmap data. + */ + error_code = eb_wide_font_size(book, &size); + if (error_code != EB_SUCCESS) + goto failed; + + character_index = ((character_number >> 8) - (start >> 8)) * 0x5e + + ((character_number & 0xff) - (start & 0xff)); + offset + = (character_index / (1024 / size)) * 1024 + + (character_index % (1024 / size)) * size; + + /* + * Read bitmap data. + */ + if (wide_current->glyphs == NULL) { + zio = &wide_current->zio; + + if (zio_lseek(zio, + (off_t) wide_current->page * EB_SIZE_PAGE + offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, bitmap, size) != size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + } else { + memcpy(bitmap, wide_current->glyphs + offset, size); + } + + LOG(("out: eb_wide_font_character_bitmap_jis() = %s", + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_wide_font_character_bitmap_jis() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Get bitmap data of the character with character number `character_number' + * in the current wide font of the current subbook in `book'. + */ +static EB_Error_Code +eb_wide_character_bitmap_latin(EB_Book *book, int character_number, + char *bitmap) +{ + EB_Error_Code error_code; + EB_Font *wide_current; + int start; + int end; + int character_index; + off_t offset; + size_t size; + Zio *zio; + + LOG(("in: eb_wide_font_character_bitmap_latin(book=%d, \ +character_number=%d)", + (int)book->code, character_number)); + + start = book->subbook_current->wide_current->start; + end = book->subbook_current->wide_current->end; + wide_current = book->subbook_current->wide_current; + + /* + * Check for `ch'. Is it in a range of bitmaps? + * This test works correctly even when the font doesn't exist in + * the current subbook because `start' and `end' have set to -1 + * in the case. + */ + if (character_number < start + || end < character_number + || (character_number & 0xff) < 0x01 + || 0xfe < (character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Calculate the size and the location of bitmap data. + */ + error_code = eb_wide_font_size(book, &size); + if (error_code != EB_SUCCESS) + goto failed; + + character_index = ((character_number >> 8) - (start >> 8)) * 0xfe + + ((character_number & 0xff) - (start & 0xff)); + offset + = (character_index / (1024 / size)) * 1024 + + (character_index % (1024 / size)) * size; + + /* + * Read bitmap data. + */ + if (wide_current->glyphs == NULL) { + zio = &wide_current->zio; + + if (zio_lseek(zio, + (off_t) wide_current->page * EB_SIZE_PAGE + offset, + SEEK_SET) < 0) { + error_code = EB_ERR_FAIL_SEEK_FONT; + goto failed; + } + if (zio_read(zio, bitmap, size) != size) { + error_code = EB_ERR_FAIL_READ_FONT; + goto failed; + } + } else { + memcpy(bitmap, wide_current->glyphs + offset, size); + } + + LOG(("out: eb_wide_font_character_bitmap_latin() = %s", + eb_error_string(EB_SUCCESS))); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *bitmap = '\0'; + LOG(("out: eb_wide_font_character_bitmap_latin() = %s", + eb_error_string(error_code))); + return error_code; +} + + +/* + * Return next `n'th character number from `character_number'. + */ +EB_Error_Code +eb_forward_wide_font_character(EB_Book *book, int n, int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) + return eb_backward_wide_font_character(book, -n, character_number); + + eb_lock(&book->lock); + LOG(("in: eb_forward_wide_font_character(book=%d, n=%d, \ +character_number=%d)", + (int)book->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + start = book->subbook_current->wide_current->start; + end = book->subbook_current->wide_current->end; + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if (0xfe <= (*character_number & 0xff)) + *character_number += 3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if (0x7e <= (*character_number & 0xff)) + *character_number += 0xa3; + else + *character_number += 1; + if (end < *character_number) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } + + LOG(("out: eb_forward_wide_font_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_forward_wide_font_character() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + +/* + * Return previous `n'th character number from `*character_number'. + */ +EB_Error_Code +eb_backward_wide_font_character(EB_Book *book, int n, int *character_number) +{ + EB_Error_Code error_code; + int start; + int end; + int i; + + if (n < 0) + return eb_forward_wide_font_character(book, -n, character_number); + + eb_lock(&book->lock); + LOG(("in: eb_backward_wide_font_character(book=%d, n=%d, \ +character_number=%d)", + (int)book->code, n, *character_number)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * The wide font must exist in the current subbook. + */ + if (book->subbook_current->wide_current == NULL) { + error_code = EB_ERR_NO_CUR_FONT; + goto failed; + } + + start = book->subbook_current->wide_current->start; + end = book->subbook_current->wide_current->end; + + if (book->character_code == EB_CHARCODE_ISO8859_1) { + /* + * Check for `*character_number'. (ISO 8859 1) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x01 + || 0xfe < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (ISO 8859 1) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x01) + *character_number -= 3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } else { + /* + * Check for `*character_number'. (JIS X 0208) + */ + if (*character_number < start + || end < *character_number + || (*character_number & 0xff) < 0x21 + || 0x7e < (*character_number & 0xff)) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + + /* + * Get character number. (JIS X 0208) + */ + for (i = 0; i < n; i++) { + if ((*character_number & 0xff) <= 0x21) + *character_number -= 0xa3; + else + *character_number -= 1; + if (*character_number < start) { + error_code = EB_ERR_NO_SUCH_CHAR_BMP; + goto failed; + } + } + } + + LOG(("out: eb_backward_wide_font_character(character_number=%d) = %s", + *character_number, eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + *character_number = -1; + LOG(("out: eb_backward_wide_font_character() = %s", + eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} + + diff --git a/lib/ebu/ebu/widefont.lo b/lib/ebu/ebu/widefont.lo new file mode 100644 index 0000000..caa46d6 --- /dev/null +++ b/lib/ebu/ebu/widefont.lo @@ -0,0 +1,12 @@ +# widefont.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/widefont.o' + +# Name of the non-PIC object +non_pic_object='widefont.o' + diff --git a/lib/ebu/ebu/word.c b/lib/ebu/ebu/word.c new file mode 100644 index 0000000..0e8fd3b --- /dev/null +++ b/lib/ebu/ebu/word.c @@ -0,0 +1,186 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "build-pre.h" +#include "eb.h" +#include "error.h" +#include "build-post.h" + +/* + * Examine whether the current subbook in `book' supports `WORD SEARCH' + * or not. + */ +int +eb_have_word_search(EB_Book *book) +{ + eb_lock(&book->lock); + LOG(("in: eb_have_word_search(book=%d)", (int)book->code)); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) + goto failed; + + if (book->subbook_current->word_alphabet.start_page == 0 + && book->subbook_current->word_asis.start_page == 0 + && book->subbook_current->word_kana.start_page == 0) + goto failed; + + LOG(("out: eb_have_word_search() = %d", 1)); + eb_unlock(&book->lock); + + return 1; + + /* + * An error occurs... + */ + failed: + LOG(("out: eb_have_word_search() = %d", 0)); + eb_unlock(&book->lock); + return 0; +} + + +/* + * Word search. + */ +EB_Error_Code +eb_search_word(EB_Book *book, const char *input_word) +{ + EB_Error_Code error_code; + EB_Word_Code word_code; + EB_Search_Context *context; + + eb_lock(&book->lock); + LOG(("in: eb_search_word(book=%d, input_word=%s)", (int)book->code, + eb_quoted_string(input_word))); + + /* + * Current subbook must have been set. + */ + if (book->subbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + /* + * Initialize search context. + */ + eb_reset_search_contexts(book); + context = book->search_contexts; + context->code = EB_SEARCH_WORD; + + /* + * Make a fixed word and a canonicalized word to search from + * `input_word'. + */ + error_code = eb_set_word(book, input_word, context->word, + context->canonicalized_word, &word_code); + if (error_code != EB_SUCCESS) + goto failed; + + /* + * Get a page number. + */ + switch (word_code) { + case EB_WORD_ALPHABET: + if (book->subbook_current->word_alphabet.start_page != 0) + context->page = book->subbook_current->word_alphabet.start_page; + else if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_KANA: + if (book->subbook_current->word_kana.start_page != 0) + context->page = book->subbook_current->word_kana.start_page; + else if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + case EB_WORD_OTHER: + if (book->subbook_current->word_asis.start_page != 0) + context->page = book->subbook_current->word_asis.start_page; + else { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + break; + + default: + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + /* + * Choose comparison functions. + */ + if (book->character_code == EB_CHARCODE_ISO8859_1 + || book->character_code == EB_CHARCODE_UTF8) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word; + } else if (context->page == book->subbook_current->word_kana.start_page) { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word_kana_single; + context->compare_group = eb_match_word_kana_group; + } else { + context->compare_pre = eb_pre_match_word; + context->compare_single = eb_match_word; + context->compare_group = eb_match_word_kana_group; + } + + /* + * Pre-search. + */ + error_code = eb_presearch_word(book, context); + if (error_code != EB_SUCCESS) + goto failed; + + LOG(("out: eb_search_word() = %s", eb_error_string(EB_SUCCESS))); + eb_unlock(&book->lock); + + return EB_SUCCESS; + + /* + * An error occurs... + */ + failed: + eb_reset_search_contexts(book); + LOG(("out: eb_search_word() = %s", eb_error_string(error_code))); + eb_unlock(&book->lock); + return error_code; +} diff --git a/lib/ebu/ebu/word.lo b/lib/ebu/ebu/word.lo new file mode 100644 index 0000000..dfc3c79 --- /dev/null +++ b/lib/ebu/ebu/word.lo @@ -0,0 +1,12 @@ +# word.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/word.o' + +# Name of the non-PIC object +non_pic_object='word.o' + diff --git a/lib/ebu/ebu/zio.c b/lib/ebu/ebu/zio.c new file mode 100644 index 0000000..c9f630b --- /dev/null +++ b/lib/ebu/ebu/zio.c @@ -0,0 +1,2156 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_PTHREAD +#include +#endif + +#ifdef ENABLE_LIBDEFLATE +#include +#else +#include +#endif + +#include "zio.h" +#ifdef ENABLE_EBNET +#include "ebnet.h" +#endif + +/* + * Flags for open(). + */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +/* + * Mutual exclusion lock of Pthreads. + */ +#ifndef ENABLE_PTHREAD +#define pthread_mutex_lock(m) +#define pthread_mutex_unlock(m) +#endif + +/* + * Debug message handler. + */ +#ifdef EB_BUILD_LIBRARY +extern int eb_log_flag; +extern void eb_log(const char *, ...); +#define LOG(x) do {if (eb_log_flag) eb_log x;} while (0) +#else +#define LOG(x) +#endif + +/* + * Get an unsigned value from an octet stream buffer. + */ +#define zio_uint1(p) (*(const unsigned char *)(p)) + +#define zio_uint2(p) ((*(const unsigned char *)(p) << 8) \ + + (*(const unsigned char *)((p) + 1))) + +#define zio_uint3(p) ((*(const unsigned char *)(p) << 16) \ + + (*(const unsigned char *)((p) + 1) << 8) \ + + (*(const unsigned char *)((p) + 2))) + +#define zio_uint4(p) (((off_t) *(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +#define zio_uint5(p) (((off_t) (*(const unsigned char *)(p)) << 32) \ + + ((off_t) (*(const unsigned char *)((p) + 1)) << 24) \ + + (*(const unsigned char *)((p) + 2) << 16) \ + + (*(const unsigned char *)((p) + 3) << 8) \ + + (*(const unsigned char *)((p) + 4))) + +/* + * Test whether the path is URL with the `ebnet' scheme. + */ +#define is_ebnet_url(p) \ + ( ((p)[0] == 'E' || (p)[0] == 'e') \ + && ((p)[1] == 'B' || (p)[1] == 'b') \ + && ((p)[2] == 'N' || (p)[2] == 'n') \ + && ((p)[3] == 'E' || (p)[3] == 'e') \ + && ((p)[4] == 'T' || (p)[4] == 't') \ + && (p)[5] == ':' && (p)[6] == '/' && (p)[7] == '/') + +/* + * Size of a page (The term `page' means `block' in JIS X 4081). + */ +#define ZIO_SIZE_PAGE 2048 + +/* + * Size of a cache buffer. + * It must be large enough to memory an uncompressed slice. + * + * (In EBZIP and EPWING compressions, the size of uncompressed slice + * is 2048. In S-EBXA compression, the size is 4096.) + */ +#define ZIO_CACHE_BUFFER_SIZE (ZIO_SIZE_PAGE << ZIO_MAX_EBZIP_LEVEL) + +/* + * NULL Zio ID. + */ +#define ZIO_ID_NONE -1 + +/* + * Buffer for caching uncompressed data. + */ +static char *cache_buffer = NULL; + +/* + * Zio ID which caches data in `cache_buffer'. + */ +static int cache_zio_id = ZIO_ID_NONE; + +/* + * Offset of the beginning of the cached data `cache_buffer'. + */ +static off_t cache_location; + +/* + * Zio object counter. + */ +static int zio_counter = 0; + +/* + * Mutex for cache variables. + */ +#ifdef ENABLE_PTHREAD +static pthread_mutex_t zio_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +/* + * Test whether `off_t' represents a large integer. + */ +#define off_t_is_large \ + ((((off_t) 1 << 41) + ((off_t) 1 << 40) + 1) % 9999991 == 7852006) + +/* + * Unexported function. + */ +static int zio_reopen(Zio *zio, const char *file_name); +static int zio_open_plain(Zio *zio, const char *file_name); +static int zio_open_ebzip(Zio *zio, const char *file_name); +static int zio_open_epwing(Zio *zio, const char *file_name); +static int zio_open_epwing6(Zio *zio, const char *file_name); +static int zio_make_epwing_huffman_tree(Zio *zio, int leaf_count); +static ssize_t zio_read_ebzip(Zio *zio, char *buffer, size_t length); +static ssize_t zio_read_epwing(Zio *zio, char *buffer, size_t length); +static ssize_t zio_read_sebxa(Zio *zio, char *buffer, size_t length); +static int zio_unzip_slice_ebzip1(Zio *zio, char *out_buffer, + size_t zipped_slice_size); +inline static int zio_unzip_slice_ebzip1_internal(Zio *zio, + char *out_buffer, size_t zipped_slice_size); +static int zio_unzip_slice_epwing(Zio *zio, char *out_buffer); +static int zio_unzip_slice_epwing6(Zio *zio, char *out_buffer); +static int zio_unzip_slice_sebxa(Zio *zio, char *out_buffer); +static int zio_open_raw(Zio *zio, const char *file_name); +static void zio_close_raw(Zio *zio); +static off_t zio_lseek_raw(Zio *zio, off_t offset, int whence); +static ssize_t zio_read_raw(Zio *zio, void *buffer, size_t length); + + +/* + * Initialize cache buffer. + */ +int +zio_initialize_library(void) +{ + pthread_mutex_lock(&zio_mutex); + LOG(("in: zio_initialize_library()")); + + /* + * Allocate memory for cache buffer. + */ + if (cache_buffer == NULL) { + cache_buffer = (char *) malloc(ZIO_CACHE_BUFFER_SIZE); + if (cache_buffer == NULL) + goto failed; + } + + LOG(("out: zio_initialize_library() = %d", 0)); + pthread_mutex_unlock(&zio_mutex); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_initialize_library() = %d", -1)); + pthread_mutex_unlock(&zio_mutex); + return -1; +} + + +/* + * Clear cache buffer. + */ +void +zio_finalize_library(void) +{ + pthread_mutex_lock(&zio_mutex); + LOG(("in: zio_finalize_library()")); + + if (cache_buffer != NULL) + free(cache_buffer); + cache_buffer = NULL; + cache_zio_id = ZIO_ID_NONE; + + LOG(("out: zio_finalize_library()")); + pthread_mutex_unlock(&zio_mutex); +} + + +/* + * Initialize `zio'. + */ +void +zio_initialize(Zio *zio) +{ + LOG(("in: zio_initialize()")); + + zio->id = -1; + zio->file = -1; + zio->huffman_nodes = NULL; + zio->huffman_root = NULL; + zio->code = ZIO_INVALID; + zio->file_size = 0; + zio->is_ebnet = 0; + + LOG(("out: zio_initialize()")); +} + + +/* + * Finalize `zio'. + */ +void +zio_finalize(Zio *zio) +{ + LOG(("in: zio_finalize(zio=%d)", (int)zio->id)); + + zio_close(zio); + if (zio->huffman_nodes != NULL) + free(zio->huffman_nodes); + + zio->id = -1; + zio->huffman_nodes = NULL; + zio->huffman_root = NULL; + zio->code = ZIO_INVALID; + + LOG(("out: zio_finalize()")); +} + + +/* + * Set S-EBXA compression mode. + */ +int +zio_set_sebxa_mode(Zio *zio, off_t index_location, off_t index_base, + off_t zio_start_location, off_t zio_end_location) +{ + LOG(("in: zio_set_sebxa_mode(zio=%d, index_location=%ld, index_base=%ld, \ +zio_start_location=%ld, zio_end_location=%ld)", + (int)zio->id, (long)index_location, (long)index_base, + (long)zio_start_location, (long)zio_end_location)); + + if (zio->code != ZIO_PLAIN) + goto failed; + + zio->code = ZIO_SEBXA; + zio->index_location = index_location; + zio->index_base = index_base; + zio->zio_start_location = zio_start_location; + zio->zio_end_location = zio_end_location; + zio->file_size = zio_end_location; + + LOG(("out: zio_set_sebxa_mode() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_set_sebxa_mode() = %d", -1)); + return -1; +} + +/* + * Open `file'. + */ +int +zio_open(Zio *zio, const char *file_name, Zio_Code zio_code) +{ + int result; + + LOG(("in: zio_open(zio=%d, file_name=%s, zio_code=%d)", + (int)zio->id, file_name, zio_code)); + + if (0 <= zio->file) { + if (zio_code == ZIO_REOPEN) { + result = 0; + goto succeeded; + } + zio_finalize(zio); + zio_initialize(zio); + } + + switch (zio_code) { + case ZIO_REOPEN: + result = zio_reopen(zio, file_name); + break; + case ZIO_PLAIN: + result = zio_open_plain(zio, file_name); + break; + case ZIO_EBZIP1: + result = zio_open_ebzip(zio, file_name); + break; + case ZIO_EPWING: + result = zio_open_epwing(zio, file_name); + break; + case ZIO_EPWING6: + result = zio_open_epwing6(zio, file_name); + break; + case ZIO_SEBXA: + result = zio_open_plain(zio, file_name); + break; + default: + result = -1; + } + + succeeded: + LOG(("out: zio_open() = %d", result)); + return result; +} + + +/* + * Reopen a file. + */ +static int +zio_reopen(Zio *zio, const char *file_name) +{ + LOG(("in: zio_reopen(zio=%d, file_name=%s)", (int)zio->id, file_name)); + + if (zio->code == ZIO_INVALID) + goto failed; + + if (zio_open_raw(zio, file_name) < 0) { + zio->code = ZIO_INVALID; + goto failed; + } + zio->location = 0; + + LOG(("out: zio_reopen() = %d", zio->file)); + return zio->file; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_reopen() = %d", -1)); + return -1; +} + + +/* + * Open an non-compressed file. + */ +static int +zio_open_plain(Zio *zio, const char *file_name) +{ + LOG(("in: zio_open_plain(zio=%d, file_name=%s)", (int)zio->id, file_name)); + + if (zio_open_raw(zio, file_name) < 0) + goto failed; + + zio->code = ZIO_PLAIN; + zio->slice_size = ZIO_SIZE_PAGE; + zio->file_size = zio_lseek_raw(zio, 0, SEEK_END); + if (zio->file_size < 0 || zio_lseek_raw(zio, 0, SEEK_SET) < 0) + goto failed; + + /* + * Assign ID. + */ + pthread_mutex_lock(&zio_mutex); + zio->id = zio_counter++; + pthread_mutex_unlock(&zio_mutex); + + LOG(("out: zio_open_plain(zio=%d) = %d", (int)zio->id, zio->file)); + return zio->file; + + /* + * An error occurs... + */ + failed: + if (0 <= zio->file) + zio_close_raw(zio); + zio->file = -1; + zio->code = ZIO_INVALID; + + LOG(("out: zio_open_plain() = %d", -1)); + return -1; +} + + +/* + * Open an EBZIP compression file. + */ +static int +zio_open_ebzip(Zio *zio, const char *file_name) +{ + char header[ZIO_SIZE_EBZIP_HEADER]; + int ebzip_mode; + + LOG(("in: zio_open_ebzip(zio=%d, file_name=%s)", (int)zio->id, file_name)); + + /* + * Try to open a `*.ebz' file. + */ + if (zio_open_raw(zio, file_name) < 0) + goto failed; + + /* + * Read header part of the ebzip'ped file. + */ + if (zio_read_raw(zio, header, ZIO_SIZE_EBZIP_HEADER) + != ZIO_SIZE_EBZIP_HEADER) + goto failed; + ebzip_mode = zio_uint1(header + 5) >> 4; + zio->code = ZIO_EBZIP1; + zio->zip_level = zio_uint1(header + 5) & 0x0f; + zio->slice_size = ZIO_SIZE_PAGE << zio->zip_level; + zio->file_size = zio_uint5(header + 9); + zio->crc = zio_uint4(header + 14); + zio->mtime = zio_uint4(header + 18); + zio->location = 0; + + if (zio->file_size < (off_t) 1 << 16) + zio->index_width = 2; + else if (zio->file_size < (off_t) 1 << 24) + zio->index_width = 3; + else if (zio->file_size < (off_t) 1 << 32 || !off_t_is_large) + zio->index_width = 4; + else + zio->index_width = 5; + + /* + * Check zio header information. + */ + if (memcmp(header, "EBZip", 5) != 0 + || ZIO_SIZE_PAGE << ZIO_MAX_EBZIP_LEVEL < zio->slice_size) + goto failed; + + if (off_t_is_large) { + if (ebzip_mode != 1 && ebzip_mode != 2) + goto failed; + } else { + if (ebzip_mode != 1) + goto failed; + } + + /* + * Assign ID. + */ + pthread_mutex_lock(&zio_mutex); + zio->id = zio_counter++; + pthread_mutex_unlock(&zio_mutex); + + LOG(("out: zio_open_ebzip(zio=%d) = %d", (int)zio->id, zio->file)); + return zio->file; + + /* + * An error occurs... + */ + failed: + if (0 <= zio->file) + zio_close_raw(zio); + zio->file = -1; + zio->code = ZIO_INVALID; + LOG(("out: zio_open_ebzip() = %d", -1)); + return -1; +} + + +/* + * The buffer size must be 512 bytes, the number of 8 bit nodes. + */ +#define ZIO_EPWING_BUFFER_SIZE 512 + +/* + * Open an EPWING compression file. + */ +static int +zio_open_epwing(Zio *zio, const char *file_name) +{ + int leaf16_count; + int leaf_count; + char buffer[ZIO_EPWING_BUFFER_SIZE]; + char *buffer_p; + ssize_t read_length; + Zio_Huffman_Node *tail_node_p; + int i; + + LOG(("in: zio_open_epwing(zio=%d, file_name=%s)", (int)zio->id, + file_name)); + + zio->code = ZIO_EPWING; + zio->huffman_nodes = NULL; + + /* + * Open `HONMON2'. + */ + if (zio_open_raw(zio, file_name) < 0) + goto failed; + + /* + * Read a header of `HONMON2' (32 bytes). + * When `frequencies_length' is shorter than 512, we assumes the + * file is broken. + */ + if (zio_read_raw(zio, buffer, 32) != 32) + goto failed; + zio->location = 0; + zio->slice_size = ZIO_SIZE_PAGE; + zio->index_location = zio_uint4(buffer); + zio->index_length = zio_uint4(buffer + 4); + zio->frequencies_location = zio_uint4(buffer + 8); + zio->frequencies_length = zio_uint4(buffer + 12); + leaf16_count = (zio->frequencies_length - (256 * 2)) / 4; + leaf_count = leaf16_count + 256 + 1; + if (zio->index_length < 36 || zio->frequencies_length < 512) + goto failed; + + /* + * Check for the length of an uncompressed file. + * + * If the index of the non-first page in the last index group + * is 0x0000, we assumes the data corresponding with the index + * doesn't exist. + */ + if (zio_lseek_raw(zio, zio->index_location + + ((off_t) zio->index_length - 36) / 36 * 36, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, 36) != 36) + goto failed; + zio->file_size = ((off_t) zio->index_length / 36) * (ZIO_SIZE_PAGE * 16); + for (i = 1, buffer_p = buffer + 4 + 2; i < 16; i++, buffer_p += 2) { + if (zio_uint2(buffer_p) == 0) + break; + } + zio->file_size -= ZIO_SIZE_PAGE * (16 - i); + + /* + * Allocate memory for huffman nodes. + */ + zio->huffman_nodes = (Zio_Huffman_Node *) malloc(sizeof(Zio_Huffman_Node) + * leaf_count * 2); + if (zio->huffman_nodes == NULL) + goto failed; + tail_node_p = zio->huffman_nodes; + + /* + * Make leafs for 16bit character. + */ + read_length = ZIO_EPWING_BUFFER_SIZE - (ZIO_EPWING_BUFFER_SIZE % 4); + if (zio_lseek_raw(zio, zio->frequencies_location, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + + buffer_p = buffer; + for (i = 0; i < leaf16_count; i++) { + if (buffer + read_length <= buffer_p) { + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + buffer_p = buffer; + } + tail_node_p->type = ZIO_HUFFMAN_NODE_LEAF16; + tail_node_p->value = zio_uint2(buffer_p); + tail_node_p->frequency = zio_uint2(buffer_p + 2); + tail_node_p->left = NULL; + tail_node_p->right = NULL; + buffer_p += 4; + tail_node_p++; + } + + /* + * Make leafs for 8bit character. + */ + if (zio_lseek_raw(zio, zio->frequencies_location + leaf16_count * 4, + SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, 512) != 512) + goto failed; + + buffer_p = buffer; + for (i = 0; i < 256; i++) { + tail_node_p->type = ZIO_HUFFMAN_NODE_LEAF8; + tail_node_p->value = i; + tail_node_p->frequency = zio_uint2(buffer_p); + tail_node_p->left = NULL; + tail_node_p->right = NULL; + buffer_p += 2; + tail_node_p++; + } + + /* + * Make a leaf for the end-of-page character. + */ + tail_node_p->type = ZIO_HUFFMAN_NODE_EOF; + tail_node_p->value = 256; + tail_node_p->frequency = 1; + tail_node_p++; + + /* + * Make a huffman tree. + */ + if (zio_make_epwing_huffman_tree(zio, leaf_count) < 0) + goto failed; + + /* + * Assign ID. + */ + pthread_mutex_lock(&zio_mutex); + zio->id = zio_counter++; + pthread_mutex_unlock(&zio_mutex); + + LOG(("out: zio_open_epwing(zio=%d) = %d", (int)zio->id, zio->file)); + return zio->file; + + /* + * An error occurs... + */ + failed: + if (0 <= zio->file) + zio_close_raw(zio); + if (zio->huffman_nodes != NULL) + free(zio->huffman_nodes); + zio->file = -1; + zio->huffman_nodes = NULL; + zio->huffman_root = NULL; + zio->code = ZIO_INVALID; + + LOG(("out: zio_open_epwing() = %d", -1)); + return -1; +} + + +/* + * Open an EPWING compression file. + */ +static int +zio_open_epwing6(Zio *zio, const char *file_name) +{ + int leaf32_count; + int leaf16_count; + int leaf_count; + char buffer[ZIO_EPWING_BUFFER_SIZE]; + char *buffer_p; + ssize_t read_length; + Zio_Huffman_Node *tail_node_p; + int i; + + LOG(("in: zio_open_epwing6(zio=%d, file_name=%s)", (int)zio->id, + file_name)); + + zio->code = ZIO_EPWING6; + zio->huffman_nodes = NULL; + + /* + * Open `HONMON2'. + */ + if (zio_open_raw(zio, file_name) < 0) + goto failed; + + /* + * Read a header of `HONMON2' (48 bytes). + * When `frequencies_length' is shorter than 512, we assumes the + * file is broken. + */ + if (zio_read_raw(zio, buffer, 48) != 48) + goto failed; + zio->location = 0; + zio->slice_size = ZIO_SIZE_PAGE; + zio->index_location = zio_uint4(buffer); + zio->index_length = zio_uint4(buffer + 4); + zio->frequencies_location = zio_uint4(buffer + 8); + zio->frequencies_length = zio_uint4(buffer + 12); + leaf16_count = 0x400; + leaf32_count = (zio->frequencies_length - (leaf16_count * 4) - (256 * 2)) + / 6; + leaf_count = leaf32_count + leaf16_count + 256 + 1; + if (zio->index_length < 36 || zio->frequencies_length < 512) + goto failed; + + /* + * Check for the length of an uncompressed file. + * + * If the index of the non-first page in the last index group + * is 0x0000, we assumes the data corresponding with the index + * doesn't exist. + */ + if (zio_lseek_raw(zio, zio->index_location + + ((off_t) zio->index_length - 36) / 36 * 36, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, 36) != 36) + goto failed; + zio->file_size = ((off_t) zio->index_length / 36) * (ZIO_SIZE_PAGE * 16); + for (i = 1, buffer_p = buffer + 4 + 2; i < 16; i++, buffer_p += 2) { + if (zio_uint2(buffer_p) == 0) + break; + } + zio->file_size -= ZIO_SIZE_PAGE * (16 - i); + + /* + * Allocate memory for huffman nodes. + */ + zio->huffman_nodes = (Zio_Huffman_Node *) malloc(sizeof(Zio_Huffman_Node) + * leaf_count * 2); + if (zio->huffman_nodes == NULL) + goto failed; + tail_node_p = zio->huffman_nodes; + + /* + * Make leafs for 32bit character. + */ + read_length = ZIO_EPWING_BUFFER_SIZE - (ZIO_EPWING_BUFFER_SIZE % 6); + if (zio_lseek_raw(zio, zio->frequencies_location, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + + buffer_p = buffer; + for (i = 0; i < leaf32_count; i++) { + if (buffer + read_length <= buffer_p) { + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + buffer_p = buffer; + } + tail_node_p->type = ZIO_HUFFMAN_NODE_LEAF32; + tail_node_p->value = zio_uint4(buffer_p); + tail_node_p->frequency = zio_uint2(buffer_p + 4); + tail_node_p->left = NULL; + tail_node_p->right = NULL; + buffer_p += 6; + tail_node_p++; + } + + /* + * Make leafs for 16bit character. + */ + read_length = ZIO_EPWING_BUFFER_SIZE - (ZIO_EPWING_BUFFER_SIZE % 4); + if (zio_lseek_raw(zio, zio->frequencies_location + leaf32_count * 6, + SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + + buffer_p = buffer; + for (i = 0; i < leaf16_count; i++) { + if (buffer + read_length <= buffer_p) { + if (zio_read_raw(zio, buffer, read_length) != read_length) + goto failed; + buffer_p = buffer; + } + tail_node_p->type = ZIO_HUFFMAN_NODE_LEAF16; + tail_node_p->value = zio_uint2(buffer_p); + tail_node_p->frequency = zio_uint2(buffer_p + 2); + tail_node_p->left = NULL; + tail_node_p->right = NULL; + buffer_p += 4; + tail_node_p++; + } + + /* + * Make leafs for 8bit character. + */ + if (zio_lseek_raw(zio, zio->frequencies_location + leaf32_count * 6 + + leaf16_count * 4, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, 512) != 512) + goto failed; + + buffer_p = buffer; + for (i = 0; i < 256; i++) { + tail_node_p->type = ZIO_HUFFMAN_NODE_LEAF8; + tail_node_p->value = i; + tail_node_p->frequency = zio_uint2(buffer_p); + tail_node_p->left = NULL; + tail_node_p->right = NULL; + buffer_p += 2; + tail_node_p++; + } + + /* + * Make a leaf for the end-of-page character. + */ + tail_node_p->type = ZIO_HUFFMAN_NODE_EOF; + tail_node_p->value = 256; + tail_node_p->frequency = 1; + tail_node_p++; + + /* + * Make a huffman tree. + */ + if (zio_make_epwing_huffman_tree(zio, leaf_count) < 0) + goto failed; + + /* + * Assign ID. + */ + pthread_mutex_lock(&zio_mutex); + zio->id = zio_counter++; + pthread_mutex_unlock(&zio_mutex); + + LOG(("out: zio_open_epwing6(zio=%d) = %d", (int)zio->id, zio->file)); + return zio->file; + + /* + * An error occurs... + */ + failed: + if (0 <= zio->file) + zio_close_raw(zio); + if (zio->huffman_nodes != NULL) + free(zio->huffman_nodes); + zio->file = -1; + zio->huffman_nodes = NULL; + zio->huffman_root = NULL; + zio->code = ZIO_INVALID; + + LOG(("out: zio_open_epwing6() = %d", -1)); + return -1; +} + + +/* + * Make a huffman tree for decompressing EPWING compression data. + */ +static int +zio_make_epwing_huffman_tree(Zio *zio, int leaf_count) +{ + Zio_Huffman_Node *target_node; + Zio_Huffman_Node *most_node; + Zio_Huffman_Node *node_p; + Zio_Huffman_Node temporary_node; + Zio_Huffman_Node *least_node_p; + Zio_Huffman_Node *tail_node_p; + int i; + int j; + + LOG(("in: zio_make_epwing_huffman_tree(zio=%d, leaf_count=%d)", + (int)zio->id, leaf_count)); + + tail_node_p = zio->huffman_nodes + leaf_count; + + /* + * Sort the leaf nodes in frequency order. + */ + for (i = 0; i < leaf_count - 1; i++) { + target_node = zio->huffman_nodes + i; + most_node = target_node; + node_p = zio->huffman_nodes + i + 1; + + for (j = i + 1; j < leaf_count; j++) { + if (most_node->frequency < node_p->frequency) + most_node = node_p; + node_p++; + } + + temporary_node.type = most_node->type; + temporary_node.value = most_node->value; + temporary_node.frequency = most_node->frequency; + + most_node->type = target_node->type; + most_node->value = target_node->value; + most_node->frequency = target_node->frequency; + + target_node->type = temporary_node.type; + target_node->value = temporary_node.value; + target_node->frequency = temporary_node.frequency; + } + + /* + * Make intermediate nodes of the huffman tree. + * The number of intermediate nodes of the tree is - 1. + */ + for (i = 1; i < leaf_count; i++) { + /* + * Initialize a new intermediate node. + */ + tail_node_p->type = ZIO_HUFFMAN_NODE_INTERMEDIATE; + tail_node_p->left = NULL; + tail_node_p->right = NULL; + + /* + * Find for a least frequent node. + * That node becomes a left child of the new intermediate node. + */ + least_node_p = NULL; + for (node_p = zio->huffman_nodes; node_p < tail_node_p; node_p++) { + if (node_p->frequency == 0) + continue; + if (least_node_p == NULL + || node_p->frequency <= least_node_p->frequency) + least_node_p = node_p; + } + if (least_node_p == NULL) + goto failed; + tail_node_p->left = least_node_p; + tail_node_p->frequency = least_node_p->frequency; + least_node_p->frequency = 0; + + /* + * Find for a next least frequent node. + * That node becomes a right child of the new intermediate node. + */ + least_node_p = NULL; + for (node_p = zio->huffman_nodes; node_p < tail_node_p; node_p++) { + if (node_p->frequency == 0) + continue; + if (least_node_p == NULL + || node_p->frequency <= least_node_p->frequency) + least_node_p = node_p; + } + if (least_node_p == NULL) + goto failed; + tail_node_p->right = least_node_p; + tail_node_p->frequency += least_node_p->frequency; + least_node_p->frequency = 0; + + tail_node_p++; + } + + /* + * Set a root node of the huffman tree. + */ + zio->huffman_root = tail_node_p - 1; + + LOG(("out: zio_make_epwing_huffman_tree() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_make_epwing_huffman_tree() = %d", -1)); + return -1; +} + + +/* + * Close `zio'. + */ +void +zio_close(Zio *zio) +{ + pthread_mutex_lock(&zio_mutex); + LOG(("in: zio_close(zio=%d)", (int)zio->id)); + + /* + * If contents of the file is cached, clear the cache. + */ + if (0 <= zio->file) + zio_close_raw(zio); + zio->file = -1; + + LOG(("out: zio_close()")); + pthread_mutex_unlock(&zio_mutex); +} + + +/* + * Return file descriptor of `zio'. + */ +int +zio_file(Zio *zio) +{ + LOG(("in+out: zio_file(zio=%d) = %d", (int)zio->id, zio->file)); + + return zio->file; +} + + +/* + * Return compression mode of `zio'. + */ +Zio_Code +zio_mode(Zio *zio) +{ + LOG(("in+out: zio_mode(zio=%d) = %d", (int)zio->id, zio->code)); + + return zio->code; +} + + +/* + * Seek `zio'. + */ +off_t +zio_lseek(Zio *zio, off_t location, int whence) +{ + off_t result; + + LOG(("in: zio_lseek(zio=%d, location=%ld, whence=%d)", + (int)zio->id, (long)location, whence)); + + if (zio->file < 0) + goto failed; + + if (zio->code == ZIO_PLAIN) { + /* + * If `zio' is not compressed, simply call lseek(). + */ + result = zio_lseek_raw(zio, location, whence); + } else { + /* + * Calculate new location according with `whence'. + */ + switch (whence) { + case SEEK_SET: + zio->location = location; + break; + case SEEK_CUR: + zio->location = zio->location + location; + break; + case SEEK_END: + zio->location = zio->file_size - location; + break; + default: +#ifdef EINVAL + errno = EINVAL; +#endif + goto failed; + } + + /* + * Adjust location. + */ + if (zio->location < 0) + zio->location = 0; + if (zio->file_size < zio->location) + zio->location = zio->file_size; + + /* + * Update `zio->location'. + * (We don't actually seek the file.) + */ + result = zio->location; + } + + LOG(("out: zio_lseek() = %ld", (long)result)); + return result; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_lseek() = %ld", (long)-1)); + return -1; +} + + +/* + * Read data from `zio' file. + */ +ssize_t +zio_read(Zio *zio, char *buffer, size_t length) +{ + ssize_t read_length; + + pthread_mutex_lock(&zio_mutex); + LOG(("in: zio_read(zio=%d, length=%ld)", (int)zio->id, (long)length)); + + /* + * If the zio `file' is not compressed, call read() and return. + */ + if (zio->file < 0) + goto failed; + + switch (zio->code) { + case ZIO_PLAIN: + read_length = zio_read_raw(zio, buffer, length); + break; + case ZIO_EBZIP1: + read_length = zio_read_ebzip(zio, buffer, length); + break; + case ZIO_EPWING: + case ZIO_EPWING6: + read_length = zio_read_epwing(zio, buffer, length); + break; + case ZIO_SEBXA: + read_length = zio_read_sebxa(zio, buffer, length); + break; + default: + goto failed; + } + + LOG(("out: zio_read() = %ld", (long)read_length)); + pthread_mutex_unlock(&zio_mutex); + + return read_length; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_read() = %ld", (long)-1)); + return -1; +} + + +/* + * Read data from the `zio' file compressed with the ebzip compression + * format. + */ +static ssize_t +zio_read_ebzip(Zio *zio, char *buffer, size_t length) +{ + char temporary_buffer[8]; + ssize_t read_length = 0; + size_t zipped_slice_size; + off_t slice_location; + off_t next_slice_location; + int n; + + LOG(("in: zio_read_ebzip(zio=%d, length=%ld)", (int)zio->id, + (long)length)); + + /* + * Read data. + */ + while (read_length < length) { + if (zio->file_size <= zio->location) + goto succeeded; + + /* + * If data in `cache_buffer' is out of range, read data from + * `zio->file'. + */ + if (cache_zio_id != zio->id + || zio->location < cache_location + || cache_location + zio->slice_size <= zio->location) { + + cache_zio_id = ZIO_ID_NONE; + cache_location = zio->location - (zio->location % zio->slice_size); + + /* + * Get buffer location and size from index table in `zio->file'. + */ + if (zio_lseek_raw(zio, zio->location / zio->slice_size + * zio->index_width + ZIO_SIZE_EBZIP_HEADER, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, temporary_buffer, zio->index_width * 2) + != zio->index_width * 2) + goto failed; + + switch (zio->index_width) { + case 2: + slice_location = zio_uint2(temporary_buffer); + next_slice_location = zio_uint2(temporary_buffer + 2); + break; + case 3: + slice_location = zio_uint3(temporary_buffer); + next_slice_location = zio_uint3(temporary_buffer + 3); + break; + case 4: + slice_location = zio_uint4(temporary_buffer); + next_slice_location = zio_uint4(temporary_buffer + 4); + break; + case 5: + slice_location = zio_uint5(temporary_buffer); + next_slice_location = zio_uint5(temporary_buffer + 5); + break; + default: + goto failed; + } + zipped_slice_size = next_slice_location - slice_location; + + if (next_slice_location <= slice_location + || zio->slice_size < zipped_slice_size) + goto failed; + + /* + * Read a compressed slice from `zio->file' and uncompress it. + * The data is not compressed if its size is equals to + * slice size. + */ + if (zio_lseek_raw(zio, slice_location, SEEK_SET) < 0) + goto failed; + if (zio_unzip_slice_ebzip1(zio, cache_buffer, zipped_slice_size) + < 0) + goto failed; + + cache_zio_id = zio->id; + } + + /* + * Copy data from `cache_buffer' to `buffer'. + */ + n = zio->slice_size - (zio->location % zio->slice_size); + if (length - read_length < n) + n = length - read_length; + if (zio->file_size - zio->location < n) + n = zio->file_size - zio->location; + memcpy(buffer + read_length, + cache_buffer + (zio->location % zio->slice_size), n); + read_length += n; + zio->location += n; + } + + succeeded: + LOG(("out: zio_read_ebzip() = %ld", (long)read_length)); + return read_length; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_read_ebzip() = %ld", (long)-1)); + return -1; +} + + +/* + * Read data from the `zio' file compressed with the EPWING or EPWING V6 + * compression format. + */ +static ssize_t +zio_read_epwing(Zio *zio, char *buffer, size_t length) +{ + char temporary_buffer[36]; + ssize_t read_length = 0; + off_t page_location; + int n; + + LOG(("in: zio_read_epwing(zio=%d, length=%ld)", (int)zio->id, + (long)length)); + + /* + * Read data. + */ + while (read_length < length) { + if (zio->file_size <= zio->location) + goto succeeded; + + /* + * If data in `cache_buffer' is out of range, read data from the zio + * file. + */ + if (cache_zio_id != zio->id + || zio->location < cache_location + || cache_location + zio->slice_size <= zio->location) { + cache_zio_id = ZIO_ID_NONE; + cache_location = zio->location - (zio->location % zio->slice_size); + + /* + * Get page location from index table in `zio->file'. + */ + if (zio_lseek_raw(zio, zio->index_location + + zio->location / (ZIO_SIZE_PAGE * 16) * 36, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, temporary_buffer, 36) != 36) + goto failed; + page_location = zio_uint4(temporary_buffer) + + zio_uint2(temporary_buffer + 4 + + (zio->location / ZIO_SIZE_PAGE % 16) * 2); + + /* + * Read a compressed page from `zio->file' and uncompress it. + */ + if (zio_lseek_raw(zio, page_location, SEEK_SET) < 0) + goto failed; + if (zio->code == ZIO_EPWING) { + if (zio_unzip_slice_epwing(zio, cache_buffer) < 0) + goto failed; + } else { + if (zio_unzip_slice_epwing6(zio, cache_buffer) < 0) + goto failed; + } + + cache_zio_id = zio->id; + } + + /* + * Copy data from `cache_buffer' to `buffer'. + */ + n = ZIO_SIZE_PAGE - (zio->location % ZIO_SIZE_PAGE); + if (length - read_length < n) + n = length - read_length; + if (zio->file_size - zio->location < n) + n = zio->file_size - zio->location; + memcpy(buffer + read_length, + cache_buffer + (zio->location - cache_location), n); + read_length += n; + zio->location += n; + } + + succeeded: + LOG(("out: zio_read_epwing() = %ld", (long)read_length)); + return read_length; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_read_epwing() = %ld", (long)-1)); + return -1; +} + + +#define ZIO_SEBXA_SLICE_LENGTH 4096 + +/* + * Read data from the zio `file' compressed with the S-EBXA compression + * format. + */ +static ssize_t +zio_read_sebxa(Zio *zio, char *buffer, size_t length) +{ + char temporary_buffer[4]; + ssize_t read_length = 0; + off_t slice_location; + ssize_t n; + int slice_index; + + LOG(("in: zio_read_sebxa(zio=%d, length=%ld)", (int)zio->id, + (long)length)); + + /* + * Read data. + */ + while (read_length < length) { + if (zio->file_size <= zio->location) + goto succeeded; + + if (zio->location < zio->zio_start_location) { + /* + * Data is located in front of compressed text. + */ + if (zio->zio_start_location - zio->location < length - read_length) + n = zio->zio_start_location - zio->location; + else + n = length - read_length; + if (zio_lseek_raw(zio, zio->location, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, n) != n) + goto failed; + read_length += n; + + } else if (zio->zio_end_location <= zio->location) { + /* + * Data is located behind compressed text. + */ + if (zio_lseek_raw(zio, zio->location, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, buffer, length - read_length) + != length - read_length) + goto failed; + read_length = length; + + } else { + /* + * Data is located in compressed text. + * + * If data in `cache_buffer' is out of range, read data from + * `file'. + */ + if (cache_zio_id != zio->id + || zio->location < cache_location + || cache_location + ZIO_SEBXA_SLICE_LENGTH <= zio->location) { + + cache_zio_id = ZIO_ID_NONE; + cache_location = zio->location + - (zio->location % ZIO_SEBXA_SLICE_LENGTH); + + /* + * Get buffer location and size. + */ + slice_index = (zio->location - zio->zio_start_location) + / ZIO_SEBXA_SLICE_LENGTH; + if (slice_index == 0) + slice_location = zio->index_base; + else { + if (zio_lseek_raw(zio, ((off_t) slice_index - 1) * 4 + + zio->index_location, SEEK_SET) < 0) + goto failed; + if (zio_read_raw(zio, temporary_buffer, 4) != 4) + goto failed; + slice_location = zio->index_base + + zio_uint4(temporary_buffer); + } + + /* + * Read a compressed slice from `zio->file' and uncompress it. + */ + if (zio_lseek_raw(zio, slice_location, SEEK_SET) < 0) + goto failed; + if (zio_unzip_slice_sebxa(zio, cache_buffer) < 0) + goto failed; + + cache_zio_id = zio->id; + } + + /* + * Copy data from `cache_buffer' to `buffer'. + */ + n = ZIO_SEBXA_SLICE_LENGTH + - (zio->location % ZIO_SEBXA_SLICE_LENGTH); + if (length - read_length < n) + n = length - read_length; + if (zio->file_size - zio->location < n) + n = zio->file_size - zio->location; + memcpy(buffer + read_length, + cache_buffer + (zio->location - cache_location), n); + read_length += n; + zio->location += n; + } + } + + succeeded: + LOG(("out: zio_read_sebxa() = %ld", (long)read_length)); + return read_length; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_read_sebxa() = %ld", (long)-1)); + return -1; +} + + +/* + * Uncompress an ebzip'ped slice. + * + * If it succeeds, 0 is returned. Otherwise, -1 is returned. + */ +static int +zio_unzip_slice_ebzip1(Zio *zio, char *out_buffer, size_t zipped_slice_size) +{ + LOG(("in: zio_unzip_slice_ebzip1(zio=%d, zipped_slice_size=%ld)", + (int)zio->id, (long)zipped_slice_size)); + + if (zio->slice_size == zipped_slice_size) { + /* + * The input slice is not compressed. + * Read the target page in the slice. + */ + if (zio_read_raw(zio, out_buffer, zipped_slice_size) != + zipped_slice_size) + goto failed; + + } else { + /* + * The input slice is compressed. + * Read and uncompress the target page in the slice. + */ + if (zio_unzip_slice_ebzip1_internal + (zio, out_buffer, zipped_slice_size) != 0) + goto failed; + } + + LOG(("out: zio_unzip_slice_ebzip1() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_ebzip1() = %d", -1)); + return -1; +} + +inline static int +zio_unzip_slice_ebzip1_internal +(Zio *zio, char *out_buffer, size_t zipped_slice_size) +{ +#ifdef ENABLE_LIBDEFLATE + char *in_buffer = NULL; + struct libdeflate_decompressor *decompressor = NULL; + enum libdeflate_result result; + + LOG(("in: zio_unzip_slice_ebzip1_internal(zio=%d, zipped_slice_size=%ld)", + (int)zio->id, (long)zipped_slice_size)); + + decompressor = libdeflate_alloc_decompressor(); + if (!decompressor) goto failed; + + in_buffer = malloc(zipped_slice_size); + if (!in_buffer) goto failed; + + if (zio_read_raw(zio, in_buffer, zipped_slice_size) != + zipped_slice_size) + goto failed; + + result = libdeflate_zlib_decompress + (decompressor, in_buffer, zipped_slice_size, out_buffer, + zio->slice_size, NULL); + + if (result != LIBDEFLATE_SUCCESS) goto failed; + + libdeflate_free_decompressor(decompressor); + free (in_buffer); + + LOG(("out: zio_unzip_slice_ebzip1_internal() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_ebzip1_internal() = %d", -1)); + if (!decompressor) libdeflate_free_decompressor(decompressor); + if (!in_buffer) free (in_buffer); + return -1; +#else + char in_buffer[ZIO_SIZE_PAGE]; + z_stream stream; + size_t read_length; + int z_result; + + LOG(("in: zio_unzip_slice_ebzip1_internal(zio=%d, zipped_slice_size=%ld)", + (int)zio->id, (long)zipped_slice_size)); + + stream.zalloc = NULL; + stream.zfree = NULL; + stream.opaque = NULL; + + if (inflateInit(&stream) != Z_OK) + goto failed; + + stream.next_in = (Bytef *) in_buffer; + stream.avail_in = 0; + stream.next_out = (Bytef *) out_buffer; + stream.avail_out = zio->slice_size; + + while (stream.total_out < zio->slice_size) { + if (0 < stream.avail_in) + memmove(in_buffer, stream.next_in, stream.avail_in); + + if (zipped_slice_size - stream.total_in < ZIO_SIZE_PAGE) { + read_length = zipped_slice_size - stream.total_in + - stream.avail_in; + } else { + read_length = ZIO_SIZE_PAGE - stream.avail_in; + } + + if (zio_read_raw(zio, in_buffer + stream.avail_in, + read_length) != read_length) + goto failed; + + stream.next_in = (Bytef *) in_buffer; + stream.avail_in += read_length; + stream.avail_out = zio->slice_size - stream.total_out; + + z_result = inflate(&stream, Z_SYNC_FLUSH); + if (z_result == Z_STREAM_END) { + break; + } else if (z_result != Z_OK && z_result != Z_BUF_ERROR) { + goto failed; + } + } + + inflateEnd(&stream); + + LOG(("out: zio_unzip_slice_ebzip1_internal() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_ebzip1_internal() = %d", -1)); + inflateEnd(&stream); + return -1; +#endif +} + + +/* + * Uncompress an EPWING compressed slice. + * The offset of `zio->file' must points to the beginning of the compressed + * slice. Uncompressed data are put into `out_buffer'. + * + * If it succeeds, 0 is returned. Otherwise, -1 is returned. + */ +static int +zio_unzip_slice_epwing(Zio *zio, char *out_buffer) +{ + Zio_Huffman_Node *node_p; + int bit; + char in_buffer[ZIO_SIZE_PAGE]; + unsigned char *in_buffer_p; + ssize_t in_read_length; + int in_bit_index; + unsigned char *out_buffer_p; + size_t out_length; + + LOG(("in: zio_unzip_slice_epwing(zio=%d)", (int)zio->id)); + + in_buffer_p = (unsigned char *)in_buffer; + in_bit_index = 7; + in_read_length = 0; + out_buffer_p = (unsigned char *)out_buffer; + out_length = 0; + + for (;;) { + /* + * Descend the huffman tree until reached to the leaf node. + */ + node_p = zio->huffman_root; + while (node_p->type == ZIO_HUFFMAN_NODE_INTERMEDIATE) { + + /* + * If no data is left in the input buffer, read next chunk. + */ + if ((unsigned char *)in_buffer + in_read_length <= in_buffer_p) { + in_read_length = zio_read_raw(zio, in_buffer, ZIO_SIZE_PAGE); + if (in_read_length <= 0) + goto failed; + in_buffer_p = (unsigned char *)in_buffer; + } + + /* + * Step to a child. + */ + bit = (*in_buffer_p >> in_bit_index) & 0x01; + + if (bit == 1) + node_p = node_p->left; + else + node_p = node_p->right; + if (node_p == NULL) + goto failed; + + if (0 < in_bit_index) + in_bit_index--; + else { + in_bit_index = 7; + in_buffer_p++; + } + } + + if (node_p->type == ZIO_HUFFMAN_NODE_EOF) { + /* + * Fill the rest of the output buffer with NUL, + * when we meet an EOF mark before decode ZIO_SIZE_PAGE bytes. + */ + if (out_length < ZIO_SIZE_PAGE) { + memset(out_buffer_p, '\0', ZIO_SIZE_PAGE - out_length); + out_length = ZIO_SIZE_PAGE; + } + break; + + } else if (node_p->type == ZIO_HUFFMAN_NODE_LEAF16) { + /* + * The leaf is leaf16, decode 2 bytes character. + */ + if (ZIO_SIZE_PAGE <= out_length) + goto failed; + else if (ZIO_SIZE_PAGE <= out_length + 1) { + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + out_length++; + } else { + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + *out_buffer_p++ = node_p->value & 0xff; + out_length += 2; + } + } else { + /* + * The leaf is leaf8, decode 1 byte character. + */ + if (ZIO_SIZE_PAGE <= out_length) + goto failed; + else { + *out_buffer_p++ = node_p->value; + out_length++; + } + } + } + + LOG(("out: zio_unzip_slice_epwing() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_epwing() = %d", -1)); + return -1; +} + + +/* + * Uncompress an EPWING V6 compressed slice. + * The offset of `zio->file' must points to the beginning of the compressed + * slice. Uncompressed data are put into `out_buffer'. + * + * If it succeeds, 0 is returned. Otherwise, -1 is returned. + */ +static int +zio_unzip_slice_epwing6(Zio *zio, char *out_buffer) +{ + Zio_Huffman_Node *node_p; + int bit; + char in_buffer[ZIO_SIZE_PAGE]; + unsigned char *in_buffer_p; + ssize_t in_read_length; + int in_bit_index; + unsigned char *out_buffer_p; + size_t out_length; + int compression_type; + + LOG(("in: zio_unzip_slice_epwing6(zio=%d)", (int)zio->id)); + + in_buffer_p = (unsigned char *)in_buffer; + in_bit_index = 7; + in_read_length = 0; + out_buffer_p = (unsigned char *)out_buffer; + out_length = 0; + + /* + * Get compression type. + */ + if (zio_read_raw(zio, in_buffer, 1) != 1) + goto failed; + compression_type = zio_uint1(in_buffer); + + /* + * If compression type is not 0, this page is not compressed. + */ + if (compression_type != 0) { + if (zio_read_raw(zio, out_buffer, ZIO_SIZE_PAGE) != ZIO_SIZE_PAGE) + goto failed; + goto succeeded; + } + + while (out_length < ZIO_SIZE_PAGE) { + /* + * Descend the huffman tree until reached to the leaf node. + */ + node_p = zio->huffman_root; + while (node_p->type == ZIO_HUFFMAN_NODE_INTERMEDIATE) { + + /* + * If no data is left in the input buffer, read next chunk. + */ + if ((unsigned char *)in_buffer + in_read_length <= in_buffer_p) { + in_read_length = zio_read_raw(zio, in_buffer, ZIO_SIZE_PAGE); + if (in_read_length <= 0) + goto failed; + in_buffer_p = (unsigned char *)in_buffer; + } + + /* + * Step to a child. + */ + bit = (*in_buffer_p >> in_bit_index) & 0x01; + + if (bit == 1) + node_p = node_p->left; + else + node_p = node_p->right; + if (node_p == NULL) + goto failed; + + if (0 < in_bit_index) + in_bit_index--; + else { + in_bit_index = 7; + in_buffer_p++; + } + } + + if (node_p->type == ZIO_HUFFMAN_NODE_EOF) { + /* + * Fill the rest of the output buffer with NUL, + * when we meet an EOF mark before decode ZIO_SIZE_PAGE bytes. + */ + if (out_length < ZIO_SIZE_PAGE) { + memset(out_buffer_p, '\0', ZIO_SIZE_PAGE - out_length); + out_length = ZIO_SIZE_PAGE; + } + break; + + } else if (node_p->type == ZIO_HUFFMAN_NODE_LEAF32) { + /* + * The leaf is leaf32, decode 4 bytes character. + */ + if (ZIO_SIZE_PAGE <= out_length + 1) { + *out_buffer_p++ = (node_p->value >> 24) & 0xff; + out_length++; + } else if (ZIO_SIZE_PAGE <= out_length + 2) { + *out_buffer_p++ = (node_p->value >> 24) & 0xff; + *out_buffer_p++ = (node_p->value >> 16) & 0xff; + out_length += 2; + } else if (ZIO_SIZE_PAGE <= out_length + 3) { + *out_buffer_p++ = (node_p->value >> 24) & 0xff; + *out_buffer_p++ = (node_p->value >> 16) & 0xff; + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + out_length += 3; + } else { + *out_buffer_p++ = (node_p->value >> 24) & 0xff; + *out_buffer_p++ = (node_p->value >> 16) & 0xff; + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + *out_buffer_p++ = node_p->value & 0xff; + out_length += 4; + } + } else if (node_p->type == ZIO_HUFFMAN_NODE_LEAF16) { + /* + * The leaf is leaf16, decode 2 bytes character. + */ + if (ZIO_SIZE_PAGE <= out_length + 1) { + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + out_length++; + } else { + *out_buffer_p++ = (node_p->value >> 8) & 0xff; + *out_buffer_p++ = node_p->value & 0xff; + out_length += 2; + } + } else { + /* + * The leaf is leaf8, decode 1 byte character. + */ + *out_buffer_p++ = node_p->value; + out_length++; + } + } + + succeeded: + LOG(("out: zio_unzip_slice_epwing6() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_epwing6() = %d", -1)); + return -1; +} + +/* + * Uncompress an S-EBXA compressed slice. + * The offset of `zio->file' must points to the beginning of the compressed + * slice. Uncompressed data are put into `out_buffer'. + * + * If it succeeds, 0 is returned. Otherwise, -1 is returned. + */ +static int +zio_unzip_slice_sebxa(Zio *zio, char *out_buffer) +{ + char in_buffer[ZIO_SEBXA_SLICE_LENGTH]; + unsigned char *in_buffer_p; + ssize_t in_read_rest; + unsigned char *out_buffer_p; + size_t out_length; + int compression_flags[8]; + int copy_offset; + int copy_length; + int i, j; + + LOG(("in: zio_unzip_slice_sebxa(zio=%d)", (int)zio->id)); + + in_buffer_p = (unsigned char *)in_buffer; + in_read_rest = 0; + out_buffer_p = (unsigned char *)out_buffer; + out_length = 0; + + for (;;) { + /* + * If no data is left in the input buffer, read next chunk. + */ + if (in_read_rest <= 0) { + in_read_rest = zio_read_raw(zio, in_buffer, + ZIO_SEBXA_SLICE_LENGTH); + if (in_read_rest <= 0) + goto failed; + in_buffer_p = (unsigned char *)in_buffer; + } + + /* + * The current input byte is recognized as compression flags + * for next 8 chunks. + */ + compression_flags[0] = !(*in_buffer_p & 0x01); + compression_flags[1] = !(*in_buffer_p & 0x02); + compression_flags[2] = !(*in_buffer_p & 0x04); + compression_flags[3] = !(*in_buffer_p & 0x08); + compression_flags[4] = !(*in_buffer_p & 0x10); + compression_flags[5] = !(*in_buffer_p & 0x20); + compression_flags[6] = !(*in_buffer_p & 0x40); + compression_flags[7] = !(*in_buffer_p & 0x80); + in_buffer_p++; + in_read_rest--; + + /* + * Decode 8 chunks. + */ + for (i = 0; i < 8; i++) { + if (compression_flags[i]) { + /* + * This chunk is compressed. + * Copy `copy_length' bytes from `copy_p' to the current + * point. + */ + unsigned char *copy_p; + unsigned char c0, c1; + + if (in_read_rest <= 1) + goto failed; + + /* + * Get 2 bytes from the current input, and recognize + * them as following: + * + * *in_buffer_p *(in_bufer_p + 1) + * bit pattern: [AAAA|BBBB] [CCCC|DDDD] + * + * copy_offset = ([CCCCAAAABBBB] + 18) % 4096 + * copy_length = [DDDD] + 3 + */ + c0 = *(unsigned char *)in_buffer_p; + c1 = *((unsigned char *)in_buffer_p + 1); + copy_offset = (((c1 & 0xf0) << 4) + c0 + 18) + % ZIO_SEBXA_SLICE_LENGTH; + copy_length = (c1 & 0x0f) + 3; + + if (ZIO_SEBXA_SLICE_LENGTH < out_length + copy_length) + copy_length = ZIO_SEBXA_SLICE_LENGTH - out_length; + + copy_p = (unsigned char *)out_buffer + copy_offset; + for (j = 0; j < copy_length; j++) { + if (copy_p < out_buffer_p) + *out_buffer_p++ = *copy_p; + else + *out_buffer_p++ = 0x00; + copy_p++; + if (ZIO_SEBXA_SLICE_LENGTH <= + copy_p - (unsigned char *)out_buffer) + copy_p -= ZIO_SEBXA_SLICE_LENGTH; + } + + in_read_rest -= 2; + in_buffer_p += 2; + out_length += copy_length; + + } else { + /* + * This chunk is not compressed. + * Put the current input byte as a decoded value. + */ + if (in_read_rest <= 0) + goto failed; + in_read_rest -= 1; + *out_buffer_p++ = *in_buffer_p++; + out_length += 1; + } + + /* + * Return if the slice has been uncompressed. + */ + if (ZIO_SEBXA_SLICE_LENGTH <= out_length) + goto succeeded; + } + } + + succeeded: + LOG(("out: zio_unzip_slice_sebxa() = %d", 0)); + return 0; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_unzip_slice_sebxa() = %d", -1)); + return -1; +} + + +/* + * Low-level open function. + * + * If `file_name' is ebnet URL, it calls ebnet_open(). Otherwise it + * calls the open() system call. + * + * Like open(), it returns file descrptor or -1. + */ +static int +zio_open_raw(Zio *zio, const char *file_name) +{ +#ifdef ENABLE_EBNET + if (is_ebnet_url(file_name)) { + zio->is_ebnet = 1; + zio->file = ebnet_open(file_name); + } else { + zio->is_ebnet = 0; + zio->file = open(file_name, O_RDONLY | O_BINARY); + } +#else + zio->file = open(file_name, O_RDONLY | O_BINARY); +#endif + + return zio->file; +} + + +/* + * Low-level close function. + * + * If `zio->file' is socket, it calls ebnet_close(). Otherwise it calls + * the close() system call. + */ +static void +zio_close_raw(Zio *zio) +{ +#ifdef ENABLE_EBNET + if (zio->is_ebnet) + ebnet_close(zio->file); + else + close(zio->file); +#else + close(zio->file); +#endif +} + + +/* + * Low-level seek function. + * + * If `zio->file' is socket, it calls ebnet_close(). Otherwise it calls + * the close() system call. + */ +static off_t +zio_lseek_raw(Zio *zio, off_t offset, int whence) +{ + off_t result; + + if (zio->is_ebnet) { +#ifdef ENABLE_EBNET + result = ebnet_lseek(zio->file, offset, whence); +#else + result = -1; +#endif + } else { + result = lseek(zio->file, offset, whence); + } + + return result; +} + + +/* + * Low-level read function. + * + * If `zio->file' is socket, it calls ebnet_read(). Otherwise it calls + * the read() system call. + */ +static ssize_t +zio_read_raw(Zio *zio, void *buffer, size_t length) +{ + char *buffer_p = buffer; + ssize_t result; + + LOG(("in: zio_read_raw(file=%d, length=%ld)", zio->file, (long)length)); + + if (zio->is_ebnet) { + /* + * Read from a remote server. + */ +#ifdef ENABLE_EBNET + result = ebnet_read(&zio->file, buffer, length); +#else + result = -1; +#endif + } else { + /* + * Read from a local file. + */ + ssize_t rest_length = length; + ssize_t n; + + while (0 < rest_length) { + errno = 0; + n = read(zio->file, buffer_p, rest_length); + if (n < 0) { + if (errno == EINTR) + continue; + goto failed; + } else if (n == 0) + break; + else { + rest_length -= n; + buffer_p += n; + } + } + + result = length - rest_length; + } + + LOG(("out: zio_read_raw() = %ld", (long)result)); + return result; + + /* + * An error occurs... + */ + failed: + LOG(("out: zio_read_raw() = %ld", (long)-1)); + return -1; +} + + diff --git a/lib/ebu/ebu/zio.h b/lib/ebu/ebu/zio.h new file mode 100644 index 0000000..0cb7bbd --- /dev/null +++ b/lib/ebu/ebu/zio.h @@ -0,0 +1,237 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef ZIO_H +#define ZIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/* + * Header size of the ebzip compression file. + */ +#define ZIO_SIZE_EBZIP_HEADER 22 + +/* + * Margin size for ebzip compression buffer. + * (Since compressed data is larger than original in the worst case, + * we must add margin to a compression buffer.) + */ +#define ZIO_SIZE_EBZIP_MARGIN 1024 + +/* + * Maximum ebzio compression level. + */ +#define ZIO_MAX_EBZIP_LEVEL 5 + +/* + * Huffman node types. + */ +#define ZIO_HUFFMAN_NODE_INTERMEDIATE 0 +#define ZIO_HUFFMAN_NODE_EOF 1 +#define ZIO_HUFFMAN_NODE_LEAF8 2 +#define ZIO_HUFFMAN_NODE_LEAF16 3 +#define ZIO_HUFFMAN_NODE_LEAF32 4 + +/* + * Compression type codes. + */ +#define ZIO_PLAIN 0 +#define ZIO_EBZIP1 1 +#define ZIO_EPWING 2 +#define ZIO_EPWING6 3 +#define ZIO_SEBXA 4 +#define ZIO_INVALID -1 +#define ZIO_REOPEN -2 + +/* + * Compression type. + */ +typedef int Zio_Code; + +/* + * A node of static Huffman tree. + */ +typedef struct Zio_Huffman_Node_Struct Zio_Huffman_Node; + +struct Zio_Huffman_Node_Struct { + /* + * node type (ITNERMEDIATE, LEAF8, LEAF16, LEAF32 or EOF). + */ + int type; + + /* + * Value of a leaf node. + */ + unsigned int value; + + /* + * Frequency of a node. + */ + int frequency; + + /* + * Left child. + */ + Zio_Huffman_Node *left; + + /* + * Right child. + */ + Zio_Huffman_Node *right; +}; + +/* + * Compression information of a book. + */ +typedef struct Zio_Struct Zio; + +struct Zio_Struct { + /* + * ID. + */ + int id; + + /* + * Zio type. (PLAIN, EBZIP, EPWING, EPWING6 or SEBXA) + */ + Zio_Code code; + + /* + * File descriptor. + */ + int file; + + /* + * Current location. + */ + off_t location; + + /* + * Size of an uncompressed file. + */ + off_t file_size; + + /* + * Slice size of an EBZIP compressed file. + */ + size_t slice_size; + + /* + * Compression level. (EBZIP compression only) + */ + int zip_level; + + /* + * Length of an index. (EBZIP compression only) + */ + int index_width; + + /* + * Adler-32 check sum of an uncompressed file. (EBZIP compression only) + */ + unsigned int crc; + + /* + * mtime of an uncompressed file. (EBZIP compression only) + */ + time_t mtime; + + /* + * Location of an index table. (EPWING and S-EBXA compression only) + */ + off_t index_location; + + /* + * Length of an index table. (EPWING and S-EBXA compression only) + */ + size_t index_length; + + /* + * Location of a frequency table. (EPWING compression only) + */ + off_t frequencies_location; + + /* + * Length of a frequency table. (EPWING compression only) + */ + size_t frequencies_length; + + /* + * Huffman tree nodes. (EPWING compression only) + */ + Zio_Huffman_Node *huffman_nodes; + + /* + * Root node of a Huffman tree. (EPWING compression only) + */ + Zio_Huffman_Node *huffman_root; + + /* + * Region of compressed pages. (S-EBXA compression only) + */ + off_t zio_start_location; + off_t zio_end_location; + + /* + * Add this value to offset written in index. (S-EBXA compression only) + */ + off_t index_base; + + /* + * ebnet mode flag. + */ + int is_ebnet; +}; + +/* + * Function declarations. + */ +/* zio.c */ +int zio_initialize_library(void); +void zio_finalize_library(void); +void zio_initialize(Zio *zio); +void zio_finalize(Zio *zio); +int zio_set_sebxa_mode(Zio *zio, off_t index_location, off_t index_base, + off_t zio_start_location, off_t zio_end_location); +int zio_open(Zio *zio, const char *file_name, Zio_Code zio_code); +void zio_close(Zio *zio); +int zio_file(Zio *zio); +Zio_Code zio_mode(Zio *zio); +off_t zio_lseek(Zio *zio, off_t offset, int whence); +ssize_t zio_read(Zio *zio, char *buffer, size_t length); + +#ifdef __cplusplus +} +#endif + +#endif /* not ZIO_H */ diff --git a/lib/ebu/ebu/zio.lo b/lib/ebu/ebu/zio.lo new file mode 100644 index 0000000..7789c05 --- /dev/null +++ b/lib/ebu/ebu/zio.lo @@ -0,0 +1,12 @@ +# zio.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/zio.o' + +# Name of the non-PIC object +non_pic_object='zio.o' + diff --git a/lib/ebu/ebzip/.deps/copyfile.Po b/lib/ebu/ebzip/.deps/copyfile.Po new file mode 100644 index 0000000..9953610 --- /dev/null +++ b/lib/ebu/ebzip/.deps/copyfile.Po @@ -0,0 +1,391 @@ +copyfile.o: copyfile.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebzip/.deps/ebzip.Po b/lib/ebu/ebzip/.deps/ebzip.Po new file mode 100644 index 0000000..28dfa63 --- /dev/null +++ b/lib/ebu/ebzip/.deps/ebzip.Po @@ -0,0 +1,391 @@ +ebzip.o: ebzip.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebzip/.deps/ebzip1.Po b/lib/ebu/ebzip/.deps/ebzip1.Po new file mode 100644 index 0000000..a44f763 --- /dev/null +++ b/lib/ebu/ebzip/.deps/ebzip1.Po @@ -0,0 +1,388 @@ +ebzip1.o: ebzip1.c /usr/include/stdc-predef.h ../config.h ebzip.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +../config.h: + +ebzip.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/sebxa.Po b/lib/ebu/ebzip/.deps/sebxa.Po new file mode 100644 index 0000000..b214a48 --- /dev/null +++ b/lib/ebu/ebzip/.deps/sebxa.Po @@ -0,0 +1,388 @@ +sebxa.o: sebxa.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/speedup.Po b/lib/ebu/ebzip/.deps/speedup.Po new file mode 100644 index 0000000..2956a7a --- /dev/null +++ b/lib/ebu/ebzip/.deps/speedup.Po @@ -0,0 +1,388 @@ +speedup.o: speedup.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/unlinkfile.Po b/lib/ebu/ebzip/.deps/unlinkfile.Po new file mode 100644 index 0000000..cdb0e49 --- /dev/null +++ b/lib/ebu/ebzip/.deps/unlinkfile.Po @@ -0,0 +1,388 @@ +unlinkfile.o: unlinkfile.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/unzipbook.Po b/lib/ebu/ebzip/.deps/unzipbook.Po new file mode 100644 index 0000000..b9629cf --- /dev/null +++ b/lib/ebu/ebzip/.deps/unzipbook.Po @@ -0,0 +1,391 @@ +unzipbook.o: unzipbook.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebzip/.deps/unzipfile.Po b/lib/ebu/ebzip/.deps/unzipfile.Po new file mode 100644 index 0000000..1cdc500 --- /dev/null +++ b/lib/ebu/ebzip/.deps/unzipfile.Po @@ -0,0 +1,388 @@ +unzipfile.o: unzipfile.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/zipbook.Po b/lib/ebu/ebzip/.deps/zipbook.Po new file mode 100644 index 0000000..4459b5a --- /dev/null +++ b/lib/ebu/ebzip/.deps/zipbook.Po @@ -0,0 +1,391 @@ +zipbook.o: zipbook.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebzip/.deps/zipfile.Po b/lib/ebu/ebzip/.deps/zipfile.Po new file mode 100644 index 0000000..b85a3ea --- /dev/null +++ b/lib/ebu/ebzip/.deps/zipfile.Po @@ -0,0 +1,388 @@ +zipfile.o: zipfile.c /usr/include/stdc-predef.h ebzip.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.deps/zipinfobook.Po b/lib/ebu/ebzip/.deps/zipinfobook.Po new file mode 100644 index 0000000..254247f --- /dev/null +++ b/lib/ebu/ebzip/.deps/zipinfobook.Po @@ -0,0 +1,391 @@ +zipinfobook.o: zipinfobook.c /usr/include/stdc-predef.h ebzip.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h \ + ../libebutils/ebutils.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: + +../libebutils/ebutils.h: diff --git a/lib/ebu/ebzip/.deps/zipinfofile.Po b/lib/ebu/ebzip/.deps/zipinfofile.Po new file mode 100644 index 0000000..4203bbb --- /dev/null +++ b/lib/ebu/ebzip/.deps/zipinfofile.Po @@ -0,0 +1,388 @@ +zipinfofile.o: zipinfofile.c /usr/include/stdc-predef.h ebzip.h \ + ../config.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h /usr/include/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent.h \ + /usr/include/x86_64-linux-gnu/bits/dirent_ext.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl2.h /usr/include/utime.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h /usr/include/zlib.h /usr/include/zconf.h \ + ../ebu/eb.h ../ebu/defs.h ../ebu/sysdefs.h ../ebu/zio.h \ + /usr/include/time.h /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ../ebu/font.h ../ebu/build-post.h ../ebu/defs.h \ + ../libebutils/getopt.h ../libebutils/getumask.h ../libebutils/makedir.h \ + ../libebutils/samefile.h ../libebutils/strlist.h ../libebutils/yesno.h + +/usr/include/stdc-predef.h: + +ebzip.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/signal.h: + +/usr/include/x86_64-linux-gnu/bits/signum.h: + +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: + +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: + +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/x86_64-linux-gnu/bits/sigaction.h: + +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: + +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: + +/usr/include/x86_64-linux-gnu/sys/ucontext.h: + +/usr/include/x86_64-linux-gnu/bits/sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/bits/sigthread.h: + +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: + +/usr/include/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent.h: + +/usr/include/x86_64-linux-gnu/bits/dirent_ext.h: + +/usr/include/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h: + +/usr/include/x86_64-linux-gnu/bits/fcntl2.h: + +/usr/include/utime.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +/usr/include/zlib.h: + +/usr/include/zconf.h: + +../ebu/eb.h: + +../ebu/defs.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +../ebu/font.h: + +../ebu/build-post.h: + +../ebu/defs.h: + +../libebutils/getopt.h: + +../libebutils/getumask.h: + +../libebutils/makedir.h: + +../libebutils/samefile.h: + +../libebutils/strlist.h: + +../libebutils/yesno.h: diff --git a/lib/ebu/ebzip/.libs/ebuzip b/lib/ebu/ebzip/.libs/ebuzip new file mode 100644 index 0000000..d0a938f Binary files /dev/null and b/lib/ebu/ebzip/.libs/ebuzip differ diff --git a/lib/ebu/ebzip/Makefile b/lib/ebu/ebzip/Makefile new file mode 100644 index 0000000..5a673ea --- /dev/null +++ b/lib/ebu/ebzip/Makefile @@ -0,0 +1,564 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# ebzip/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = ebuzip$(EXEEXT) +subdir = ebzip +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebuzip_OBJECTS = ebzip.$(OBJEXT) ebzip1.$(OBJEXT) \ + copyfile.$(OBJEXT) unzipbook.$(OBJEXT) unzipfile.$(OBJEXT) \ + zipbook.$(OBJEXT) zipfile.$(OBJEXT) zipinfobook.$(OBJEXT) \ + zipinfofile.$(OBJEXT) sebxa.$(OBJEXT) speedup.$(OBJEXT) \ + unlinkfile.$(OBJEXT) +ebuzip_OBJECTS = $(am_ebuzip_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebuzip_SOURCES) +DIST_SOURCES = $(ebuzip_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/ebzip +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/ebzip +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +noinst_HEADERS = ebzip.h +ebuzip_SOURCES = ebzip.c ebzip1.c copyfile.c unzipbook.c unzipfile.c \ + zipbook.c zipfile.c zipinfobook.c zipinfofile.c sebxa.c speedup.c \ + unlinkfile.c + +ebuzip_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuzip_DEPENDENCIES = $(LIBEB) $(LIBEBUTILS) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) $(ZLIBINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebzip/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebzip/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebuzip$(EXEEXT): $(ebuzip_OBJECTS) $(ebuzip_DEPENDENCIES) + @rm -f ebuzip$(EXEEXT) + $(LINK) $(ebuzip_OBJECTS) $(ebuzip_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/copyfile.Po +include ./$(DEPDIR)/ebzip.Po +include ./$(DEPDIR)/ebzip1.Po +include ./$(DEPDIR)/sebxa.Po +include ./$(DEPDIR)/speedup.Po +include ./$(DEPDIR)/unlinkfile.Po +include ./$(DEPDIR)/unzipbook.Po +include ./$(DEPDIR)/unzipfile.Po +include ./$(DEPDIR)/zipbook.Po +include ./$(DEPDIR)/zipfile.Po +include ./$(DEPDIR)/zipinfobook.Po +include ./$(DEPDIR)/zipinfofile.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +.MAKE: install-am install-exec-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-hook + + +install-exec-hook: + rm -f $(DESTDIR)$(bindir)/ebuunzip$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/ebuzipinfo$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) + +uninstall-hook: + rm -f $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebzip/Makefile.am b/lib/ebu/ebzip/Makefile.am new file mode 100644 index 0000000..cc8cd7c --- /dev/null +++ b/lib/ebu/ebzip/Makefile.am @@ -0,0 +1,33 @@ +localedir = $(datadir)/locale + +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a + +bin_PROGRAMS = ebuzip +noinst_HEADERS = ebzip.h + +ebuzip_SOURCES = ebzip.c ebzip1.c copyfile.c unzipbook.c unzipfile.c \ + zipbook.c zipfile.c zipinfobook.c zipinfofile.c sebxa.c speedup.c \ + unlinkfile.c +ebuzip_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuzip_DEPENDENCIES = $(LIBEB) $(LIBEBUTILS) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) $(ZLIBINCS) + +install-exec-hook: + rm -f $(DESTDIR)$(bindir)/ebuunzip$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/ebuzipinfo$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) + +uninstall-hook: + rm -f $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) diff --git a/lib/ebu/ebzip/Makefile.in b/lib/ebu/ebzip/Makefile.in new file mode 100644 index 0000000..792a429 --- /dev/null +++ b/lib/ebu/ebzip/Makefile.in @@ -0,0 +1,564 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ebuzip$(EXEEXT) +subdir = ebzip +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_ebuzip_OBJECTS = ebzip.$(OBJEXT) ebzip1.$(OBJEXT) \ + copyfile.$(OBJEXT) unzipbook.$(OBJEXT) unzipfile.$(OBJEXT) \ + zipbook.$(OBJEXT) zipfile.$(OBJEXT) zipinfobook.$(OBJEXT) \ + zipinfofile.$(OBJEXT) sebxa.$(OBJEXT) speedup.$(OBJEXT) \ + unlinkfile.$(OBJEXT) +ebuzip_OBJECTS = $(am_ebuzip_OBJECTS) +am__DEPENDENCIES_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ebuzip_SOURCES) +DIST_SOURCES = $(ebuzip_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +LIBEB = $(top_builddir)/ebu/libebu.la +LIBEBUTILS = $(top_builddir)/libebutils/libebutils.a +noinst_HEADERS = ebzip.h +ebuzip_SOURCES = ebzip.c ebzip1.c copyfile.c unzipbook.c unzipfile.c \ + zipbook.c zipfile.c zipinfobook.c zipinfofile.c sebxa.c speedup.c \ + unlinkfile.c + +ebuzip_LDADD = $(LIBEBUTILS) $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) $(ICONVLIBS) +ebuzip_DEPENDENCIES = $(LIBEB) $(LIBEBUTILS) $(ZLIBDEPS) $(INTLDEPS) \ + $(ICONVDEPS) + +INCLUDES = -I../libebutils -I$(top_srcdir)/libebutils -I$(top_srcdir) \ + -I../ebu -I$(top_srcdir)/ebu $(INTLINCS) $(ZLIBINCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ebzip/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ebzip/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ebuzip$(EXEEXT): $(ebuzip_OBJECTS) $(ebuzip_DEPENDENCIES) + @rm -f ebuzip$(EXEEXT) + $(LINK) $(ebuzip_OBJECTS) $(ebuzip_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copyfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebzip1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sebxa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speedup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzipbook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzipfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipbook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipinfobook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zipinfofile.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +.MAKE: install-am install-exec-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-hook + + +install-exec-hook: + rm -f $(DESTDIR)$(bindir)/ebuunzip$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/ebuzipinfo$(EXEEXT) + ln $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) \ + || cp $(DESTDIR)$(bindir)/`echo ebuzip|sed '$(transform)'`$(EXEEXT) \ + $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) + +uninstall-hook: + rm -f $(DESTDIR)$(bindir)/`echo ebuunzip|sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/`echo ebuzipinfo|sed '$(transform)'`$(EXEEXT) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/ebzip/copyfile.c b/lib/ebu/ebzip/copyfile.c new file mode 100644 index 0000000..10a4f15 --- /dev/null +++ b/lib/ebu/ebzip/copyfile.c @@ -0,0 +1,399 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" +#include "ebutils.h" + +/* + * File name to be deleted and file to be closed when signal is received. + */ +static const char *trap_file_name = NULL; +static int trap_file = -1; + +/* + * Unexported function. + */ +static void trap(int signal_number); + + +/* + * Copy a file. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_copy_file(const char *out_file_name, const char *in_file_name) +{ + unsigned char buffer[EB_SIZE_PAGE]; + off_t total_length; + struct stat in_status, out_status; + int in_file = -1, out_file = -1; + ssize_t in_length; + int progress_interval; + int total_slices; + struct utimbuf utim; + int i; + + /* + * Output file name information. + */ + if (!ebzip_quiet_flag) { + fprintf(stderr, _("==> copy %s <==\n"), in_file_name); + fprintf(stderr, _("output to %s\n"), out_file_name); + fflush(stderr); + } + + /* + * Check for the input file. + */ + if (stat(in_file_name, &in_status) != 0 || !S_ISREG(in_status.st_mode)) { + fprintf(stderr, _("%s: no such file: %s\n"), invoked_name, + in_file_name); + goto failed; + } + + /* + * Do nothing if the `in_file_name' and `out_file_name' are the same. + */ + if (is_same_file(out_file_name, in_file_name)) { + if (!ebzip_quiet_flag) { + fprintf(stderr, + _("the input and output files are the same, skipped.\n\n")); + fflush(stderr); + } + return 0; + } + + /* + * When test mode, return immediately. + */ + if (ebzip_test_flag) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("completed (%llu / %llu bytes)\n"), + (unsigned long long) in_status.st_size, + (unsigned long long) in_status.st_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("completed (%I64u / %I64u bytes)\n"), + (unsigned __int64) in_status.st_size, + (unsigned __int64) in_status.st_size); +#else + fprintf(stderr, _("completed (%lu / %lu bytes)\n"), + (unsigned long) in_status.st_size, + (unsigned long) in_status.st_size); +#endif + fputc('\n', stderr); + fflush(stderr); + return 0; + } + + /* + * If the file to be output already exists, confirm and unlink it. + */ + if (stat(out_file_name, &out_status) == 0 + && S_ISREG(out_status.st_mode)) { + if (ebzip_overwrite_mode == EBZIP_OVERWRITE_NO) { + if (!ebzip_quiet_flag) { + fputs(_("already exists, skip the file\n\n"), stderr); + fflush(stderr); + } + return 0; + } + if (ebzip_overwrite_mode == EBZIP_OVERWRITE_CONFIRM) { + int y_or_n; + + fprintf(stderr, _("\nthe file already exists: %s\n"), + out_file_name); + y_or_n = query_y_or_n(_("do you wish to overwrite (y or n)? ")); + fputc('\n', stderr); + fflush(stderr); + if (!y_or_n) + return 0; + } + if (unlink(out_file_name) < 0) { + fprintf(stderr, _("%s: failed to unlink the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + + /* + * Open files. + */ + in_file = open(in_file_name, O_RDONLY | O_BINARY); + if (in_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), in_file_name); + goto failed; + } + + trap_file_name = out_file_name; +#ifdef SIGHUP + signal(SIGHUP, trap); +#endif + signal(SIGINT, trap); +#ifdef SIGQUIT + signal(SIGQUIT, trap); +#endif +#ifdef SIGTERM + signal(SIGTERM, trap); +#endif + +#ifdef O_CREAT + out_file = open(out_file_name, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, + 0666 ^ get_umask()); +#else + out_file = creat(out_file_name, 0666 ^ get_umask()); +#endif + if (out_file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + trap_file = out_file; + + /* + * Read data from the input file, compress the data, and then + * write them to the output file. + */ + total_length = 0; + total_slices = (in_status.st_size + EB_SIZE_PAGE - 1) / EB_SIZE_PAGE; + progress_interval = EBZIP_PROGRESS_INTERVAL_FACTOR; + for (i = 0; i < total_slices; i++) { + /* + * Read data from `in_file', and write them to `out_file'. + */ + in_length = read(in_file, buffer, EB_SIZE_PAGE); + if (in_length < 0) { + fprintf(stderr, _("%s: failed to read from the file, %s: %s\n"), + invoked_name, strerror(errno), in_file_name); + goto failed; + } else if (in_length == 0) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } else if (in_length != EB_SIZE_PAGE + && total_length + in_length != in_status.st_size) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } + + /* + * Write decoded data to `out_file'. + */ + if (write(out_file, buffer, in_length) != in_length) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + total_length += in_length; + + /* + * Output status information unless `quiet' mode. + */ + if (!ebzip_quiet_flag && (i + 1) % progress_interval == 0) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%llu / %llu bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned long long) total_length, + (unsigned long long) in_status.st_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%I64u / %I64u bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned __int64) total_length, + (unsigned __int64) in_status.st_size); +#else + fprintf(stderr, _("%4.1f%% done (%lu / %lu bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned long) total_length, + (unsigned long) in_status.st_size); +#endif + fflush(stderr); + } + } + + /* + * Output the result unless quiet mode. + */ + if (!ebzip_quiet_flag) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("completed (%llu / %llu bytes)\n"), + (unsigned long long) total_length, + (unsigned long long) in_status.st_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("completed (%I64u / %I64u bytes)\n"), + (unsigned __int64) total_length, + (unsigned __int64) in_status.st_size); +#else + fprintf(stderr, _("completed (%lu / %lu bytes)\n"), + (unsigned long) total_length, + (unsigned long) in_status.st_size); +#endif + fputc('\n', stderr); + fflush(stderr); + } + + /* + * Close files. + */ + close(in_file); + in_file = -1; + + close(out_file); + out_file = -1; + trap_file = -1; + trap_file_name = NULL; +#ifdef SIGHUP + signal(SIGHUP, SIG_DFL); +#endif + signal(SIGINT, SIG_DFL); +#ifdef SIGQUIT + signal(SIGQUIT, SIG_DFL); +#endif +#ifdef SIGTERM + signal(SIGTERM, SIG_DFL); +#endif + + /* + * Delete an original file unless the keep flag is set. + */ + if (!ebzip_test_flag && !ebzip_keep_flag) + unlink_files_add(in_file_name); + + /* + * Set owner, group, permission, atime and mtime of `out_file'. + * We ignore return values of `chown', `chmod' and `utime'. + */ + utim.actime = in_status.st_atime; + utim.modtime = in_status.st_mtime; + utime(out_file_name, &utim); + + return 0; + + /* + * An error occurs... + */ + failed: + if (0 <= in_file) + close(in_file); + if (0 <= out_file) + close(out_file); + + fputc('\n', stderr); + fflush(stderr); + + return -1; +} + + +/* + * Copy all files in a directory. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_copy_files_in_directory(const char *out_directory_name, + const char *in_directory_name) +{ + struct dirent *entry; + DIR *dir = NULL; + struct stat in_status; + char in_path_name[PATH_MAX + 1]; + char out_path_name[PATH_MAX + 1]; + + /* + * Check for the input directory. + */ + if (stat(in_directory_name, &in_status) != 0 + || !S_ISDIR(in_status.st_mode)) + return 0; + + + /* + * Make the output directory if missing. + */ + if (!ebzip_test_flag + && make_missing_directory(out_directory_name, 0777 ^ get_umask()) + < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_directory_name); + goto failed; + } + + /* + * Open the directory `path'. + */ + dir = opendir(in_directory_name); + if (dir == NULL) { + fprintf(stderr, _("%s: failed to open the directory, %s: %s\n"), + invoked_name, strerror(errno), in_directory_name); + goto failed; + } + + for (;;) { + /* + * Read the directory entry. + */ + entry = readdir(dir); + if (entry == NULL) + break; + + eb_compose_path_name(in_directory_name, entry->d_name, in_path_name); + eb_compose_path_name(out_directory_name, entry->d_name, out_path_name); + + if (stat(in_path_name, &in_status) != 0 + || !S_ISREG(in_status.st_mode)) + continue; + + ebzip_copy_file(out_path_name, in_path_name); + } + + closedir(dir); + return 0; + + /* + * An error occurs... + */ + failed: + if (dir != NULL) + closedir(dir); + return -1; +} + + +/* + * Signal handler. + */ +static void +trap(int signal_number) +{ + if (0 <= trap_file) + close(trap_file); + if (trap_file_name != NULL) + unlink(trap_file_name); + + exit(1); +} diff --git a/lib/ebu/ebzip/ebuzip b/lib/ebu/ebzip/ebuzip new file mode 100644 index 0000000..dfb7899 --- /dev/null +++ b/lib/ebu/ebzip/ebuzip @@ -0,0 +1,210 @@ +#! /bin/bash + +# ebuzip - temporary wrapper script for .libs/ebuzip +# Generated by libtool (GNU libtool) 2.4.6 +# +# The ebuzip program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../ebu/libebu.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "ebuzip:ebuzip:$LINENO: libtool wrapper (GNU libtool) 2.4.6" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "ebuzip:ebuzip:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "ebuzip:ebuzip:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='ebuzip' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/mnt/d/files/projects/ebclient/lib/ebu/ebu/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/lib/ebu/ebzip/ebzip.c b/lib/ebu/ebzip/ebzip.c new file mode 100644 index 0000000..4ee2358 --- /dev/null +++ b/lib/ebu/ebzip/ebzip.c @@ -0,0 +1,615 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" +#include "ebutils.h" + +#if defined(DOS_FILE_PATH) && defined(HAVE_MBSTRING_H) +/* a path may contain double-byte chars in SJIS. */ +#include +#define strchr _mbschr +#define strrchr _mbsrchr +#endif + +/* + * Program name and version. + */ +const char *program_name = "ebzip"; +const char *program_version = VERSION; +const char *invoked_name; + +/* + * Command line options. + */ +static const char *short_options = "fhikl:no:qs:S:tT:uvw:zr:"; +static struct option long_options[] = { + {"force-overwrite", no_argument, NULL, 'f'}, + {"help", no_argument, NULL, 'h'}, + {"information", no_argument, NULL, 'i'}, + {"keep", no_argument, NULL, 'k'}, + {"level", required_argument, NULL, 'l'}, + {"no-overwrite", no_argument, NULL, 'n'}, + {"output-directory", required_argument, NULL, 'o'}, + {"quiet", no_argument, NULL, 'q'}, + {"silent", no_argument, NULL, 'q'}, + {"skip-content", required_argument, NULL, 's'}, + {"subbook", required_argument, NULL, 'S'}, + {"test", no_argument, NULL, 't'}, + {"uncompress", no_argument, NULL, 'u'}, + {"version", no_argument, NULL, 'v'}, + {"overwrite", required_argument, NULL, 'w'}, + {"compress", no_argument, NULL, 'z'}, + {"slice-number", required_argument, NULL, 'r'}, + {NULL, 0, NULL, 0} +}; + +/* + * Zip level. + */ +int ebzip_level = EBZIP_DEFAULT_LEVEL; + +/* + * Keep mode flag. + */ +int ebzip_keep_flag = EBZIP_DEFAULT_KEEP; + +/* + * Quiet mode flag. + */ +int ebzip_quiet_flag = EBZIP_DEFAULT_QUIET; + +/* + * Test mode flag. + */ +int ebzip_test_flag = EBZIP_DEFAULT_TEST; + +/* + * Overwrite mode. + */ +int ebzip_overwrite_mode = EBZIP_DEFAULT_OVERWRITE; + +/* + * Target contents. + */ +int ebzip_skip_flag_font = EBZIP_DEFAULT_SKIP_FONT; +int ebzip_skip_flag_graphic = EBZIP_DEFAULT_SKIP_GRAPHIC; +int ebzip_skip_flag_movie = EBZIP_DEFAULT_SKIP_MOVIE; +int ebzip_skip_flag_sound = EBZIP_DEFAULT_SKIP_SOUND; + +/* + * Number of slices to load at a time. + */ +int ebzip_slice_number = EBZIP_DEFAULT_SLICE_NUMBER; + +/* + * List of files to be unlinked. + */ +String_List unlinking_files; + +/* + * Operation modes. + */ +#define EBZIP_ACTION_ZIP 0 +#define EBZIP_ACTION_UNZIP 1 +#define EBZIP_ACTION_INFO 2 + +static int action_mode = EBZIP_ACTION_ZIP; + +/* + * A list of subbook names to be compressed/uncompressed. + */ +static char +subbook_name_list[EB_MAX_SUBBOOKS][EB_MAX_DIRECTORY_NAME_LENGTH + 1]; +static int subbook_name_count = 0; + +/* + * Unexported functions. + */ +static int parse_zip_level(const char *argument, int *zip_level); +static int parse_slice_number(const char *argument, int *slice_number); +static int parse_skip_content_argument(const char *argument); +static void output_help(void); + + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + char out_top_path[PATH_MAX + 1]; + char book_path[PATH_MAX + 1]; + int ch; + char *last_slash, *last_backslash; + char *invoked_base_name; + + invoked_name = argv[0]; + strcpy(out_top_path, EBZIP_DEFAULT_OUTPUT_DIRECTORY); + + /* + * Initialize locale data. + */ +#ifdef ENABLE_NLS +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain(TEXT_DOMAIN_NAME, LOCALEDIR); + textdomain(TEXT_DOMAIN_NAME); +#endif + + /* + * Determine the default action. + */ + last_slash = strrchr(argv[0], '/'); +#ifndef DOS_FILE_PATH + last_backslash = NULL; +#else + last_backslash = strrchr(argv[0], '\\'); +#endif + + if (last_slash == NULL && last_backslash == NULL) + invoked_base_name = argv[0]; + else if (last_slash == NULL) + invoked_base_name = last_backslash + 1; + else if (last_backslash == NULL) + invoked_base_name = last_slash + 1; + else if (last_slash < last_backslash) + invoked_base_name = last_backslash + 1; + else + invoked_base_name = last_slash + 1; + +#ifndef EXEEXT_EXE + if (strcmp(invoked_base_name, "ebunzip") == 0 + || strcmp(invoked_base_name, "ebuunzip") == 0) + action_mode = EBZIP_ACTION_UNZIP; + else if (strcmp(invoked_base_name, "ebzipinfo") == 0 + || strcmp(invoked_base_name, "ebuzipinfo") == 0) + action_mode = EBZIP_ACTION_INFO; +#else /* EXEEXT_EXE */ + if (strcasecmp(invoked_base_name, "ebunzip") == 0 + || strcasecmp(invoked_base_name, "ebunzip.exe") == 0 + || strcasecmp(invoked_base_name, "ebuunzip") == 0 + || strcasecmp(invoked_base_name, "ebuunzip.exe") == 0) { + action_mode = EBZIP_ACTION_UNZIP; + } else if (strcasecmp(invoked_base_name, "ebzipinfo") == 0 + || strcasecmp(invoked_base_name, "ebzipinfo.exe") == 0 + || strcasecmp(invoked_base_name, "ebuzipinfo") == 0 + || strcasecmp(invoked_base_name, "ebuzipinfo.exe") == 0) { + action_mode = EBZIP_ACTION_INFO; + } +#endif /* EXEEXT_EXE */ + + /* + * Set overwrite mode. + */ + if (!isatty(0)) + ebzip_overwrite_mode = EBZIP_OVERWRITE_NO; + + /* + * Initialize list of files to be unlinked. + */ + + string_list_initialize(&unlinking_files); + + /* + * Initialize EB Library. + */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + goto die; + } + + /* + * Parse command line options. + */ + for (;;) { + ch = getopt_long(argc, argv, short_options, long_options, NULL); + if (ch == -1) + break; + switch (ch) { + case 'f': + /* + * Obsolete option `-f'. Set `force' to the overwrite flag. + */ + ebzip_overwrite_mode = EBZIP_OVERWRITE_FORCE; + break; + + case 'h': + /* + * Option `-h'. Display help message, then exit. + */ + output_help(); + exit(0); + + case 'i': + /* + * Option `-i'. Information mode. + */ + action_mode = EBZIP_ACTION_INFO; + break; + + case 'k': + /* + * Option `-k'. Keep (don't delete) input files. + */ + ebzip_keep_flag = 1; + break; + + case 'l': + /* + * Option `-l'. Specify compression level. + */ + if (parse_zip_level(optarg, &ebzip_level) < 0) + exit(1); + break; + + case 'n': + /* + * Obsolete option `-n'. Set `no' to the overwrite flag. + */ + ebzip_overwrite_mode = EBZIP_OVERWRITE_NO; + break; + + case 'o': + /* + * Option `-o'. Output files under DIRECOTRY. + * The length of the file name + * "/subdir/subsubdir/file.ebz;1" + * must not exceed PATH_MAX. + */ + if (PATH_MAX < strlen(optarg)) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + exit(1); + } + strcpy(out_top_path, optarg); + canonicalize_path(out_top_path); + if (PATH_MAX < strlen(out_top_path) + 1 + + EB_MAX_DIRECTORY_NAME_LENGTH + 1 + + EB_MAX_DIRECTORY_NAME_LENGTH + 1 + + EB_MAX_FILE_NAME_LENGTH) { + fprintf(stderr, _("%s: too long output directory path\n"), + invoked_name); + goto die; + } + break; + + case 'q': + /* + * Option `-q'. Set quiet flag. + */ + ebzip_quiet_flag = 1; + break; + + case 's': + /* + * Option `-s'. Specify content type to be skipped. + */ + if (parse_skip_content_argument(optarg) < 0) + exit(1); + break; + + case 'S': + /* + * Option `-S'. Specify target subbooks. + */ + if (parse_subbook_name_argument(invoked_name, optarg, + subbook_name_list, &subbook_name_count) < 0) + exit(1); + break; + + case 't': + /* + * Option `-t'. Set test mode. + */ + ebzip_test_flag = 1; + break; + + case 'u': + /* + * Option `-u'. Decompression mode. + */ + action_mode = EBZIP_ACTION_UNZIP; + break; + + case 'v': + /* + * Option `-v'. Display version number, then exit. + */ + output_version(program_name, program_version); + exit(0); + + case 'w': + /* + * Option `-w'. Set overwrite mode. + */ + if (strcasecmp(optarg, "confirm") == 0) + ebzip_overwrite_mode = EBZIP_OVERWRITE_CONFIRM; + else if (strcasecmp(optarg, "force") == 0) + ebzip_overwrite_mode = EBZIP_OVERWRITE_FORCE; + else if (strcasecmp(optarg, "no") == 0) + ebzip_overwrite_mode = EBZIP_OVERWRITE_NO; + else { + fprintf(stderr, _("%s: invalid overwrite mode: %s\n"), + invoked_name, optarg); + output_try_help(invoked_name); + goto die; + } + break; + + case 'z': + /* + * Option `-z'. Compression mode. + */ + action_mode = EBZIP_ACTION_ZIP; + break; + + case 'r': + /* + * Option `-r'. Specify a number of slices to load at a time. + */ + if (parse_slice_number(optarg, &ebzip_slice_number) < 0) + exit(1); + break; + + default: + output_try_help(invoked_name); + goto die; + } + } + + /* + * Check the number of rest arguments. + */ + if (1 < argc - optind) { + fprintf(stderr, _("%s: too many arguments\n"), invoked_name); + output_try_help(invoked_name); + goto die; + } + + /* + * Set a book path. + */ + if (argc == optind) + strcpy(book_path, EBZIP_DEFAULT_BOOK_DIRECTORY); + else + strcpy(book_path, argv[optind]); + + if (is_ebnet_url(book_path)) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(EB_ERR_EBNET_UNSUPPORTED)); + goto die; + } + canonicalize_path(book_path); + + /* + * Compress the book. + */ + switch (action_mode) { + case EBZIP_ACTION_ZIP: + if (ebzip_zip_book(out_top_path, book_path, subbook_name_list, + subbook_name_count) < 0) { + goto die; + } + break; + case EBZIP_ACTION_UNZIP: + if (ebzip_unzip_book(out_top_path, book_path, subbook_name_list, + subbook_name_count) < 0) { + goto die; + } + break; + case EBZIP_ACTION_INFO: + if (ebzip_zipinfo_book(book_path, subbook_name_list, + subbook_name_count) < 0) { + goto die; + } + break; + } + + eb_finalize_library(); + unlink_files(); + string_list_finalize(&unlinking_files); + + return 0; + + /* + * A critical error occurs... + */ + die: + eb_finalize_library(); + exit(1); +} + + +/* + * Parse an argument to option `--level (-l)'. + * If the argument is valid form, 0 is returned. + * Otherwise -1 is returned. + */ +static int +parse_zip_level(const char *argument, int *zip_level) +{ + char *end_p; + int level; + + level = (int)strtol(argument, &end_p, 10); + if (!ASCII_ISDIGIT(*argument) || *end_p != '\0' + || level < 0 || ZIO_MAX_EBZIP_LEVEL < level) { + fprintf(stderr, _("%s: invalid compression level `%s'\n"), + invoked_name, argument); + fflush(stderr); + return -1; + } + + *zip_level = level; + + return 0; +} + + +/* + * Parse an argument to option `--slice-number (-r)'. + * If the argument is valid form, 0 is returned. + * Otherwise -1 is returned. + */ +static int +parse_slice_number(const char *argument, int *slice_number) +{ + char *end_p; + int level; + + level = (int)strtol(argument, &end_p, 10); + if (!ASCII_ISDIGIT(*argument) || *end_p != '\0' + || level < 1 || EBZIP_MAX_SLICE_NUMBER < level) { + fprintf(stderr, _("%s: invalid slice number `%s'\n"), + invoked_name, argument); + fflush(stderr); + return -1; + } + + *slice_number = level; + + return 0; +} + + +/* + * Parse an argument to option `--skip-content (-S)'. + * If the argument is valid form, 0 is returned. + * Otherwise -1 is returned. + */ +static int +parse_skip_content_argument(const char *argument) +{ + const char *argument_p = argument; + char name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char *name_p; + int i; + + while (*argument_p != '\0') { + /* + * Take a next element in the argument. + */ + i = 0; + name_p = name; + while (*argument_p != ',' && *argument_p != '\0' + && i < EB_MAX_DIRECTORY_NAME_LENGTH) { + *name_p = ASCII_TOLOWER(*argument_p); + i++; + name_p++; + argument_p++; + } + *name_p = '\0'; + if (*argument_p == ',') + argument_p++; + else if (*argument_p != '\0') { + fprintf(stderr, _("%s: invalid content name `%s'\n"), + invoked_name, name); + fflush(stderr); + return -1; + } + + /* + * If the font name is not found in `font_list', it is added to + * the list. + */ + if (strcasecmp(name, "font") == 0) { + ebzip_skip_flag_font = 1; + } else if (strcasecmp(name, "sound") == 0) { + ebzip_skip_flag_sound = 1; + } else if (strcasecmp(name, "graphic") == 0) { + ebzip_skip_flag_graphic = 1; + } else if (strcasecmp(name, "movie") == 0) { + ebzip_skip_flag_movie = 1; + } else { + fprintf(stderr, _("%s: invalid content name `%s'\n"), + invoked_name, name); + fflush(stderr); + return -1; + } + } + + return 0; +} + + +/* + * Output help message to stdandard out. + */ +static void +output_help(void) +{ + printf(_("Usage: %s [option...] [book-directory]\n"), program_name); + printf(_("Options:\n")); + printf(_(" -f --force-overwrite set overwrite mode to `force'\n")); + printf(_(" (same as `--overwrite force')\n")); + printf(_(" -h --help display this help, then exit\n")); + printf(_(" -i --information list information of compressed files\n")); + printf(_(" -k --keep don't delete original files\n")); + printf(_(" -l INTEGER --level INTEGER\n")); + printf(_(" compression level; 0..%d\n"), + ZIO_MAX_EBZIP_LEVEL); + printf(_(" (default: %d)\n"), + EBZIP_DEFAULT_LEVEL); + printf(_(" -r INTEGER --slice-number INTEGER\n")); + printf(_(" set a number of slices to load at a time; 1..%d\n"), + EBZIP_MAX_SLICE_NUMBER); + printf(_(" (default: %d)\n"), + EBZIP_DEFAULT_SLICE_NUMBER); + printf(_(" -n --no-overwrite set overwrite mode to `no'\n")); + printf(_(" (same as `--overwrite no')\n")); + printf(_(" -o DIRECTORY --output-directory DIRECTORY\n")); + printf(_(" ouput files under DIRECTORY\n")); + printf(_(" (default: %s)\n"), + EBZIP_DEFAULT_OUTPUT_DIRECTORY); + printf(_(" -q --quiet --silence suppress all warnings\n")); + printf(_(" -s TYPE[,TYPE] --skip-content TYPE[,TYPE...]\n")); + printf(_(" skip content; font, graphic, sound or movie\n")); + printf(_(" (default: none is skipped)\n")); + printf(_(" -S SUBBOOK[,SUBBOOK...] --subbook SUBBOOK[,SUBBOOK...]\n")); + printf(_(" target subbook\n")); + printf(_(" (default: all subbooks)\n")); + printf(_(" -t --test only check for input files\n")); + printf(_(" -u --uncompress uncompress files\n")); + printf(_(" -v --version display version number, then exit\n")); + printf(_(" -w MODE --overwrite MODE set overwrite mode of output files;\n")); + printf(_(" confirm, force or no\n")); + printf(_(" (default: confirm)\n")); + printf(_(" -z --compress compress files\n")); + printf(_("\nArgument:\n")); + printf(_(" book-directory top directory of a CD-ROM book\n")); + printf(_(" (default: %s)\n"), + EBZIP_DEFAULT_BOOK_DIRECTORY); + + printf(_("\nDefault action:\n")); + printf(_(" When invoked as `ebuunzip', uncompression is the default action.\n")); + printf(_(" When invoked as `ebuzipinfo', listing information is the default action.\n")); + printf(_(" Otherwise, compression is the default action.\n")); + printf(_("\nReport bugs to %s.\n"), MAILING_ADDRESS); + fflush(stdout); +} diff --git a/lib/ebu/ebzip/ebzip.h b/lib/ebu/ebzip/ebzip.h new file mode 100644 index 0000000..b1a0f97 --- /dev/null +++ b/lib/ebu/ebzip/ebzip.h @@ -0,0 +1,277 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EBZIP_H +#define EBZIP_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +#ifdef ENABLE_LIBDEFLATE +#include +#else +#include +#endif + +#ifndef HAVE_STRCASECMP +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); +#endif + +/* + * O_BINARY flag for open(). + */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* + * stat macros. + */ +#ifndef S_ISREG +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebu/font.h" +#include "ebu/build-post.h" + +#include "getopt.h" +#include "getumask.h" +#include "makedir.h" +#include "samefile.h" +#include "strlist.h" +#include "yesno.h" + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Character type tests and conversions. + */ +#define ASCII_ISDIGIT(c) ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c) || ASCII_ISDIGIT(c)) +#define ASCII_ISXDIGIT(c) \ + (ASCII_ISDIGIT(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f')) +#define ASCII_TOUPPER(c) (('a' <= (c) && (c) <= 'z') ? (c) - 0x20 : (c)) +#define ASCII_TOLOWER(c) (('A' <= (c) && (c) <= 'Z') ? (c) + 0x20 : (c)) + +/* + * File name suffixes. + */ +#define EBZIP_SUFFIX_NONE "" +#define EBZIP_SUFFIX_EBZ ".ebz" +#define EBZIP_SUFFIX_ORG ".org" + +/* + * Defaults input and output directories. + */ +#define EBZIP_DEFAULT_BOOK_DIRECTORY "." +#define EBZIP_DEFAULT_OUTPUT_DIRECTORY "." + +/* + * Information output interval. + */ +#define EBZIP_PROGRESS_INTERVAL_FACTOR 1024 + +/* + * Overwrite modes. + */ +#define EBZIP_OVERWRITE_CONFIRM 0 +#define EBZIP_OVERWRITE_FORCE 1 +#define EBZIP_OVERWRITE_NO 2 + +/* + * Defaults. + */ +#define EBZIP_DEFAULT_LEVEL 0 +#define EBZIP_DEFAULT_KEEP 0 +#define EBZIP_DEFAULT_QUIET 0 +#define EBZIP_DEFAULT_TEST 0 +#define EBZIP_DEFAULT_OVERWRITE EBZIP_OVERWRITE_CONFIRM + +#define EBZIP_DEFAULT_SKIP_FONT 0 +#define EBZIP_DEFAULT_SKIP_GRAPHIC 0 +#define EBZIP_DEFAULT_SKIP_MOVIE 0 +#define EBZIP_DEFAULT_SKIP_SOUND 0 +#define EBZIP_DEFAULT_SLICE_NUMBER 64 +#define EBZIP_MAX_SLICE_NUMBER 10000 + +/* + * Region in HONMON or START file which ebzip doesn't compress. + */ +#define EBZIP_MAX_SPEEDUP_REGION_COUNT 3 + +typedef struct { + int start_page; + int end_page; +} Zip_Speedup_Region; + +typedef struct { + int region_count; + Zip_Speedup_Region regions[EBZIP_MAX_SPEEDUP_REGION_COUNT]; +} Zip_Speedup; + + +/* + * Global variables. + */ +extern const char *program_name; +extern const char *program_version; +extern const char *invoked_name; + +extern int ebzip_level; +extern int ebzip_keep_flag; +extern int ebzip_quiet_flag; +extern int ebzip_test_flag; +extern int ebzip_overwrite_mode; + +extern int ebzip_skip_flag_font; +extern int ebzip_skip_flag_graphic; +extern int ebzip_skip_flag_movie; +extern int ebzip_skip_flag_sound; + +extern int ebzip_slice_number; + +extern String_List unlinking_files; + +/* + * Function declarations. + */ +/* copyfile.c */ +int ebzip_copy_file(const char *out_file_name, const char *in_file_name); +int ebzip_copy_files_in_directory(const char *out_directory_name, + const char *in_directory_name); + +/* ebzip1.c */ +int ebzip1_slice(char *out_buffer, size_t *out_byte_length, char *in_buffer, + size_t in_byte_length); + +/* sebxa.c */ +int rewrite_sebxa_start(const char *file_name, int index_page); +int get_sebxa_indexes(const char *file_name, int index_page, + off_t *index_location, off_t *index_base, off_t *zio_start_location, + off_t *zio_end_location); + +/* unzipbook.c */ +int ebzip_unzip_book(const char *out_top_path, const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count); + +/* unzipfile.c */ +int ebzip_unzip_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code); +int ebzip_unzip_start_file(const char *out_file_name, + const char *in_file_name, Zio_Code in_zio_code, int index_page); + +/* zipbook.c */ +int ebzip_zip_book(const char *out_top_path, const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count); + +/* zipfile.c */ +int ebzip_zip_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, Zip_Speedup *speedup); +int ebzip_zip_start_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, int index_page, Zip_Speedup *speedup); + +/* zipinfobook.c */ +int ebzip_zipinfo_book(const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count); + +/* zipinfofile.c */ +int ebzip_zipinfo_file(const char *in_file_name, Zio_Code in_zio_code); +int ebzip_zipinfo_start_file(const char *in_file_name, Zio_Code in_zio_code, + int index_page); + +/* sppedup.c */ +void ebzip_initialize_zip_speedup(Zip_Speedup *speedup); +void ebzip_finalize_zip_speedup(Zip_Speedup *speedup); +int ebzip_set_zip_speedup(Zip_Speedup *speedup, const char *file_name, + Zio_Code zio_code, int index_page); +int ebzip_is_speedup_slice(Zip_Speedup *speedup, int slice, int zip_level); + +/* unlinkfile.c */ +int unlink_files_add(const char *file_name); +void unlink_files(); + +#endif /* EBZIP_H */ diff --git a/lib/ebu/ebzip/ebzip1.c b/lib/ebu/ebzip/ebzip1.c new file mode 100644 index 0000000..50b2125 --- /dev/null +++ b/lib/ebu/ebzip/ebzip1.c @@ -0,0 +1,93 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "ebzip.h" + +#include +#include + +#include "ebu/eb.h" + +/* + * Compress a slice with the ebzip compression format. + * + * If it succeeds, 0 is returned. Otherwise, -1 is returned. + */ +int +ebzip1_slice(char *out_buffer, size_t *out_byte_length, char *in_buffer, + size_t in_byte_length) +{ +#ifdef ENABLE_LIBDEFLATE + struct libdeflate_compressor *compressor; + size_t result; + + if (!(compressor = libdeflate_alloc_compressor(12))) { + return -1; + } + + result = libdeflate_zlib_compress + (compressor, in_buffer, in_byte_length, out_buffer, in_byte_length); + + *out_byte_length = result ? result : in_byte_length; + libdeflate_free_compressor(compressor); + return 0; +#else + z_stream stream; + + stream.zalloc = Z_NULL; + stream.zfree = Z_NULL; + stream.opaque = Z_NULL; + + if (deflateInit(&stream, ebzip_level > 3 + ? Z_BEST_COMPRESSION : Z_DEFAULT_COMPRESSION) != Z_OK) + return -1; + + stream.next_in = (Bytef *) in_buffer; + stream.avail_in = in_byte_length; + stream.next_out = (Bytef *) out_buffer; + stream.avail_out = in_byte_length; + + if (deflate(&stream, Z_FINISH) != Z_STREAM_END) { + *out_byte_length = in_byte_length; + deflateEnd(&stream); + return 0; + } + + if (deflateEnd(&stream) != Z_OK) + return -1; + + *out_byte_length = stream.total_out; + return 0; +#endif +} + + diff --git a/lib/ebu/ebzip/sebxa.c b/lib/ebu/ebzip/sebxa.c new file mode 100644 index 0000000..e72855b --- /dev/null +++ b/lib/ebu/ebzip/sebxa.c @@ -0,0 +1,279 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +#define zio_uint4(p) ((*(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +/* + * Delete compression information in START file of S-EBXA. + * Return 0 if succeeds, -1 otherwise. + */ +int +rewrite_sebxa_start(const char *file_name, int index_page) +{ + char buffer[EB_SIZE_PAGE]; + int file = -1; + int index_count; + int removed_index_count; + char *index_in_p; + char *index_out_p; + ssize_t done_length; + ssize_t n; + int i; + + if (index_page == 0) + index_page = 1; + + /* + * Output information. + */ + if (!ebzip_quiet_flag) { + fprintf(stderr, _("==> rewrite %s <==\n"), file_name); + fflush(stderr); + } + + /* + * Open the file. + */ + file = open(file_name, O_RDWR | O_BINARY); + if (file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + + /* + * Read index page. + */ + if (lseek(file, ((off_t) index_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + + done_length = 0; + while (done_length < EB_SIZE_PAGE) { + errno = 0; + n = read(file, buffer + done_length, EB_SIZE_PAGE - done_length); + if (n < 0) { + if (errno == EINTR) + continue; + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } else if (n == 0) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, file_name); + goto failed; + } else { + done_length += n; + } + } + + /* + * Remove index 0x21 and 0x22. + * They has comression information. + */ + index_count = *(unsigned char *)(buffer + 1); + removed_index_count = 0; + + index_in_p = buffer + 16; + index_out_p = buffer + 16; + for (i = 0; i < index_count; i++, index_in_p += 16) { + if (*index_in_p == 0x21 || *index_in_p == 0x22) { + removed_index_count++; + } else { + if (index_in_p != index_out_p) + memcpy(index_out_p, index_in_p, 16); + index_out_p += 16; + } + } + for (i = 0; i < removed_index_count; i++, index_out_p += 16) { + memset(index_out_p, 0, 16); + } + + *(unsigned char *)(buffer + 1) = index_count - removed_index_count; + + /* + * Write back the index page. + */ + if (lseek(file, ((off_t) index_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + + done_length = 0; + while (done_length < EB_SIZE_PAGE) { + errno = 0; + n = write(file, buffer + done_length, EB_SIZE_PAGE - done_length); + if (n < 0) { + if (errno == EINTR) + continue; + fprintf(stderr, _("%s: failed to write the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } else { + done_length += n; + } + } + + if (!ebzip_quiet_flag) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("completed (%llu / %llu bytes)\n"), + (unsigned long long) done_length, + (unsigned long long) done_length); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("completed (%I64u / %I64u bytes)\n"), + (unsigned __int64) done_length, + (unsigned __int64) done_length); +#else + fprintf(stderr, _("completed (%lu / %lu bytes)\n"), + (unsigned long) done_length, + (unsigned long) done_length); +#endif + fputc('\n', stderr); + fflush(stderr); + } + + close(file); + return 0; + + failed: + if (0 <= file) + close(file); + fputc('\n', stderr); + return -1; +} + + +/* + * Get compression information (`index_page', `index_location', `index_base', + * `zio_start_location' and `zio_end_location') in START file. + * Return 0 if succeeds, -1 otherwise. + */ +int +get_sebxa_indexes(const char *file_name, int index_page, off_t *index_location, + off_t *index_base, off_t *zio_start_location, off_t *zio_end_location) +{ + char buffer[EB_SIZE_PAGE]; + int file = -1; + int index_count; + char *index_p; + ssize_t done_length; + ssize_t n; + int page; + int page_count; + int i; + + *index_location = 0; + *index_base = 0; + *zio_start_location = 0; + *zio_end_location = 0; + + if (index_page == 0) + index_page = 1; + + /* + * Open the file. + */ + file = open(file_name, O_RDONLY | O_BINARY); + if (file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + + /* + * Read index page. + */ + if (lseek(file, ((off_t) index_page - 1) * EB_SIZE_PAGE, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } + + done_length = 0; + while (done_length < EB_SIZE_PAGE) { + errno = 0; + n = read(file, buffer + done_length, EB_SIZE_PAGE - done_length); + if (n < 0) { + if (errno == EINTR) + continue; + fprintf(stderr, _("%s: failed to read the file, %s: %s\n"), + invoked_name, strerror(errno), file_name); + goto failed; + } else if (n == 0) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, file_name); + goto failed; + } else { + done_length += n; + } + } + + /* + * Get information in index 0x21 and 0x22. + * They has comression information. + */ + index_count = *(unsigned char *)(buffer + 1); + + index_p = buffer + 16; + for (i = 0; i < index_count; i++, index_p += 16) { + page = zio_uint4(index_p + 2); + page_count = zio_uint4(index_p + 6); + + switch (*index_p) { + case 0x00: + *zio_start_location + = ((off_t) page - 1) * EB_SIZE_PAGE; + *zio_end_location + = ((off_t) page + page_count - 1) * EB_SIZE_PAGE - 1; + break; + case 0x21: + *index_base = ((off_t) page - 1) * EB_SIZE_PAGE; + break; + case 0x22: + *index_location = ((off_t) page - 1) * EB_SIZE_PAGE; + break; + } + } + + close(file); + return 0; + + failed: + if (0 <= file) + close(file); + fputc('\n', stderr); + return -1; +} diff --git a/lib/ebu/ebzip/speedup.c b/lib/ebu/ebzip/speedup.c new file mode 100644 index 0000000..d7cb597 --- /dev/null +++ b/lib/ebu/ebzip/speedup.c @@ -0,0 +1,196 @@ +/* -*- C -*- + * Copyright (c) 2004-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +#define zio_uint1(p) (*(const unsigned char *)(p)) + +#define zio_uint4(p) ((*(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +/* + * Initialize `speeedup'. + */ +void +ebzip_initialize_zip_speedup(Zip_Speedup *speedup) +{ + speedup->region_count = 0; +} + + +/* + * Finalize `speeedup'. + */ +void +ebzip_finalize_zip_speedup(Zip_Speedup *speedup) +{ + speedup->region_count = 0; +} + + +/* + * Read HONMON/START file to set `speedup'. + */ +int +ebzip_set_zip_speedup(Zip_Speedup *speedup, const char *file_name, + Zio_Code zio_code, int index_page) +{ + char buffer[EB_SIZE_PAGE]; + char *buffer_p; + int start_page; + Zio zio; + int index_count; + int index_code; + int i; + + zio_initialize(&zio); + + /* + * Open the file and read it's index page. + */ + if (zio_open(&zio, file_name, zio_code) < 0) { + fprintf(stderr, _("%s: failed to open the file: %s\n"), + invoked_name, file_name); + goto failed; + } + if (zio_lseek(&zio, ((off_t) index_page - 1) * EB_SIZE_PAGE, SEEK_SET) + < 0) { + fprintf(stderr, _("%s: failed to read the file: %s\n"), + invoked_name, file_name); + goto failed; + } + if (zio_read(&zio, buffer, EB_SIZE_PAGE) != EB_SIZE_PAGE) { + fprintf(stderr, _("%s: failed to read the file: %s\n"), + invoked_name, file_name); + goto failed; + } + + /* + * Read the index page to get `start_page' location. + */ + index_count = zio_uint1(buffer + 1); + buffer_p = buffer + 16; + for (i = 0; i < index_count; i++) { + index_code = zio_uint1(buffer_p); + if ((0x90 <= index_code && index_code <= 0x92) + || index_code == 0xc6) { + if (EBZIP_MAX_SPEEDUP_REGION_COUNT <= speedup->region_count) + break; + speedup->regions[speedup->region_count].start_page + = zio_uint4(buffer_p + 2); + speedup->region_count++; + } + buffer_p += 16; + } + + /* + * Read `start_page' to get `end_page' location. + */ + for (i = 0; i < speedup->region_count; i++) { + start_page = speedup->regions[i].start_page; + if (zio_lseek(&zio, ((off_t) start_page - 1) * EB_SIZE_PAGE, SEEK_SET) + < 0) { + fprintf(stderr, _("%s: failed to read the file: %s\n"), + invoked_name, file_name); + goto failed; + } + if (zio_read(&zio, buffer, EB_SIZE_PAGE) != EB_SIZE_PAGE) { + fprintf(stderr, _("%s: failed to read the file: %s\n"), + invoked_name, file_name); + goto failed; + } + + speedup->regions[i].end_page = start_page + zio_uint1(buffer + 3) - 1; + } + + zio_close(&zio); + zio_finalize(&zio); + return 0; + + /* + * An error occurs... + */ + failed: + zio_close(&zio); + zio_finalize(&zio); + speedup->region_count = 0; + + return -1; +} + + +/* + * Check if `slice' is lain in/over/across a speedup region. + */ +int +ebzip_is_speedup_slice(Zip_Speedup *speedup, int slice, int ebzip_level) +{ + Zip_Speedup_Region *p; + int start_page; + int end_page; + int i; + + start_page = slice * (1 << ebzip_level) + 1; + end_page = (slice + 1) * (1 << ebzip_level); + + for (i = 0, p = speedup->regions; i < speedup->region_count; i++, p++) { + /* + * speedup region + * +================+ + * o------o + * or o-----------------------o + * + */ + if (start_page <= speedup->regions[i].start_page + && speedup->regions[i].start_page <= end_page) + return 1; + + /* + * speedup region + * +================+ + * o------o + * or o--------------------o + */ + if (start_page <= speedup->regions[i].end_page + && speedup->regions[i].end_page <= end_page) + return 1; + + /* + * speedup region + * +================+ + * o--------o + */ + if (speedup->regions[i].start_page <= start_page + && end_page <= speedup->regions[i].end_page) + return 1; + } + + return 0; +} diff --git a/lib/ebu/ebzip/unlinkfile.c b/lib/ebu/ebzip/unlinkfile.c new file mode 100644 index 0000000..4c983b0 --- /dev/null +++ b/lib/ebu/ebzip/unlinkfile.c @@ -0,0 +1,61 @@ +/* -*- C -*- + * Copyright (c) 2008-2009 Kazuhiro Ito + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +/* + * Add a file to the list of unlinking files. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int unlink_files_add(const char *file_name) +{ + if (string_list_add(&unlinking_files, file_name)) { + if (!ebzip_quiet_flag) { + fprintf(stderr, _("%s: warning: memory exhausted, file %s is not to be unlinked\n"), invoked_name, file_name); + } + return -1; + } + + return 0; +} + +/* + * Unlink files. + */ +void unlink_files() +{ + String_List_Node *p = unlinking_files.head; + + while (p != NULL) { + if (unlink(p->string) < 0 && !ebzip_quiet_flag) { + fprintf(stderr, _("%s: warning: failed to unlink the file: %s\n"), + invoked_name, p->string); + } + p = p->next; + } +} diff --git a/lib/ebu/ebzip/unzipbook.c b/lib/ebu/ebzip/unzipbook.c new file mode 100644 index 0000000..0f33bf6 --- /dev/null +++ b/lib/ebu/ebzip/unzipbook.c @@ -0,0 +1,470 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" +#include "ebutils.h" + +#include "getumask.h" +#include "makedir.h" +#include "strlist.h" + +/* + * Unexported function. + */ +static int ebzip_unzip_book_eb(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count); +static int ebzip_unzip_book_epwing(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count); + + +/* + * Uncompress files in `book' and output them under `out_top_path'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_unzip_book(const char *out_top_path, const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count) +{ + EB_Book book; + EB_Error_Code error_code; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + EB_Subbook_Code subbook_code; + int subbook_count = 0; + int result; + int i; + + eb_initialize_book(&book); + + /* + * Bind a book. + */ + error_code = eb_bind(&book, book_path); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + + /* + * For each targe subbook, convert a subbook-names to a subbook-codes. + * If no subbook is specified by `--subbook'(`-S'), set all subbooks + * as the target. + */ + if (subbook_name_count == 0) { + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + } else { + for (i = 0; i < subbook_name_count; i++) { + error_code = find_subbook(&book, subbook_name_list[i], + &subbook_code); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: unknown subbook name `%s'\n"), + invoked_name, subbook_name_list[i]); + return -1; + } + subbook_list[subbook_count++] = subbook_code; + } + } + + /* + * Uncompress the book. + */ + if (book.disc_code == EB_DISC_EB) { + result = ebzip_unzip_book_eb(&book, out_top_path, book_path, + subbook_list, subbook_count); + } else { + result = ebzip_unzip_book_epwing(&book, out_top_path, book_path, + subbook_list, subbook_count); + } + + eb_finalize_book(&book); + + return result; +} + + +/* + * Internal function for `unzip_book'. + * This is used to compress an EB book. + */ +static int +ebzip_unzip_book_eb(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + String_List string_list; + char in_path_name[PATH_MAX + 1]; + char out_sub_path[PATH_MAX + 1]; + char out_path_name[PATH_MAX + 1]; + char catalog_file_name[EB_MAX_FILE_NAME_LENGTH]; + char language_file_name[EB_MAX_FILE_NAME_LENGTH]; + mode_t out_directory_mode; + Zio_Code in_zio_code; + int i; + + /* + * If `out_top_path' and/or `book_path' represents "/", replace it + * to an empty string. + */ + if (strcmp(out_top_path, "/") == 0) + out_top_path++; + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + out_directory_mode = 0777 ^ get_umask(); + string_list_initialize(&string_list); + + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Uncompress a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + /* + * Make an output directory for the current subbook. + */ + eb_compose_path_name(out_top_path, subbook->directory_name, + out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Uncompress START file. + */ + in_zio_code = zio_mode(&subbook->text_zio); + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, in_path_name); + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->text_file_name, out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_unzip_start_file(out_path_name, in_path_name, + in_zio_code, subbook->index_page) < 0) + goto failed; + } + + if (!ebzip_test_flag + && rewrite_sebxa_start(out_path_name, subbook->index_page) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + /* + * Uncompress a language file. + */ + if (eb_find_file_name(book->path, "language", language_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, language_file_name, in_path_name); + eb_compose_path_name(out_top_path, language_file_name, out_path_name); + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + if (ebzip_unzip_file(out_path_name, in_path_name, in_zio_code) < 0) + goto failed; + } + + /* + * Copy CATALOG file. + */ + if (eb_find_file_name(book->path, "catalog", catalog_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalog_file_name, in_path_name); + eb_compose_path_name(out_top_path, catalog_file_name, out_path_name); + if (ebzip_copy_file(out_path_name, in_path_name) < 0) + goto failed; + } + + string_list_finalize(&string_list); + return 0; + + /* + * An error occurs... + */ + failed: + string_list_finalize(&string_list); + return -1; +} + + +/* + * Internal function for `unzip_book'. + * This is used to compress an EPWING book. + */ +static int +ebzip_unzip_book_epwing(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + EB_Font *font; + String_List string_list; + char in_path_name[PATH_MAX + 1]; + char out_sub_path[PATH_MAX + 1]; + char out_path_name[PATH_MAX + 1]; + char catalogs_file_name[EB_MAX_FILE_NAME_LENGTH]; + mode_t out_directory_mode; + Zio_Code in_zio_code; + int i, j; + + /* + * If `out_top_path' and/or `book_path' represents "/", replace it + * to an empty string. + */ + if (strcmp(out_top_path, "/") == 0) + out_top_path++; + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + out_directory_mode = 0777 ^ get_umask(); + string_list_initialize(&string_list); + + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Uncompress a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + /* + * Make an output directory for the current subbook. + */ + eb_compose_path_name(out_top_path, subbook->directory_name, + out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Make `data' sub directory for the current subbook. + */ + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->data_directory_name, out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Uncompress HONMON/HONMON2 file. + */ + in_zio_code = zio_mode(&subbook->text_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + out_path_name); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (strncasecmp(subbook->text_file_name, "honmon2", 7) == 0) + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_ORG); + else + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + if (ebzip_unzip_file(out_path_name, in_path_name, in_zio_code) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + /* + * Uncompress HONMONS file. + */ + in_zio_code = zio_mode(&subbook->sound_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + + if (!ebzip_skip_flag_sound + && in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_unzip_file(out_path_name, in_path_name, in_zio_code) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + /* + * Uncompress HONMONG file. + */ + in_zio_code = zio_mode(&subbook->graphic_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + + if (!ebzip_skip_flag_graphic + && in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_unzip_file(out_path_name, in_path_name, in_zio_code) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + /* + * Make `gaiji' sub directory for the current subbook. + */ + if (!ebzip_skip_flag_font) { + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) + < 0) { + fprintf(stderr, + _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Uncompress narrow font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->narrow_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_unzip_file(out_path_name, in_path_name, + in_zio_code) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + } + + /* + * Uncompress wide font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->wide_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, + font->file_name, in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_NONE); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_unzip_file(out_path_name, in_path_name, + in_zio_code) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + } + } + + /* + * Copy movie files. + */ + if (!ebzip_skip_flag_movie) { + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->movie_directory_name, in_path_name); + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->movie_directory_name, out_path_name); + if (ebzip_copy_files_in_directory(out_path_name, in_path_name) < 0) + goto failed; + } + } + + /* + * Copy CATALOGS file. + */ + if (eb_find_file_name(book->path, "catalogs", catalogs_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalogs_file_name, in_path_name); + eb_compose_path_name(out_top_path, catalogs_file_name, out_path_name); + if (ebzip_copy_file(out_path_name, in_path_name) < 0) + goto failed; + } + + string_list_finalize(&string_list); + return 0; + + /* + * An error occurs... + */ + failed: + string_list_finalize(&string_list); + return -1; +} diff --git a/lib/ebu/ebzip/unzipfile.c b/lib/ebu/ebzip/unzipfile.c new file mode 100644 index 0000000..22f9819 --- /dev/null +++ b/lib/ebu/ebzip/unzipfile.c @@ -0,0 +1,439 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +#include "getumask.h" +#include "makedir.h" +#include "samefile.h" +#include "yesno.h" + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * File name to be deleted and file to be closed when signal is received. + */ +static const char *trap_file_name = NULL; +static int trap_file = -1; + +/* + * Unexported function. + */ +static int ebzip_unzip_file_internal(const char *out_file_name, + const char *in_file_name, Zio_Code in_zio_code, int index_page); +static void trap(int signal_number); + + +/* + * Uncompress a file `in_file_name'. + * For START file, use ebzip_unzip_start_file() instead. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_unzip_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code) +{ + return ebzip_unzip_file_internal(out_file_name, in_file_name, + in_zio_code, 0); +} + +/* + * Uncompress START file `in_file_name'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_unzip_start_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, int index_page) +{ + return ebzip_unzip_file_internal(out_file_name, in_file_name, + in_zio_code, index_page); +} + +/* + * Internal function for ebzip_unzip_file() and ebzip_unzip_sebxa_start(). + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +static int +ebzip_unzip_file_internal(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, int index_page) +{ + Zio in_zio; + unsigned char *buffer = NULL; + off_t total_length; + int out_file = -1; + ssize_t length; + struct stat in_status, out_status; + unsigned int crc = 1; + int progress_interval; + int total_slices; + int i; + + zio_initialize(&in_zio); + + /* + * Simply copy a file, when an input file is not compressed. + */ + if (in_zio_code == ZIO_PLAIN) + return ebzip_copy_file(out_file_name, in_file_name); + + /* + * Output file name information. + */ + if (!ebzip_quiet_flag) { + fprintf(stderr, _("==> uncompress %s <==\n"), in_file_name); + fprintf(stderr, _("output to %s\n"), out_file_name); + fflush(stderr); + } + + /* + * Get status of the input file. + */ + if (stat(in_file_name, &in_status) < 0 || !S_ISREG(in_status.st_mode)) { + fprintf(stderr, _("%s: no such file: %s\n"), invoked_name, + in_file_name); + goto failed; + } + + /* + * Do nothing if the `in_file_name' and `out_file_name' are the same. + */ + if (is_same_file(out_file_name, in_file_name)) { + if (!ebzip_quiet_flag) { + fprintf(stderr, + _("the input and output files are the same, skipped.\n\n")); + fflush(stderr); + } + return 0; + } + + /* + * Allocate memories for in/out buffers. + */ + buffer = (unsigned char *)malloc(EB_SIZE_PAGE << ZIO_MAX_EBZIP_LEVEL); + if (buffer == NULL) { + fprintf(stderr, _("%s: memory exhausted\n"), invoked_name); + goto failed; + } + + /* + * If the file `out_file_name' already exists, confirm and unlink it. + */ + if (!ebzip_test_flag + && stat(out_file_name, &out_status) == 0 + && S_ISREG(out_status.st_mode)) { + if (ebzip_overwrite_mode == EBZIP_OVERWRITE_NO) { + if (!ebzip_quiet_flag) { + fputs(_("already exists, skip the file\n\n"), stderr); + fflush(stderr); + } + return 0; + } else if (ebzip_overwrite_mode == EBZIP_OVERWRITE_CONFIRM) { + int y_or_n; + + fprintf(stderr, _("\nthe file already exists: %s\n"), + out_file_name); + y_or_n = query_y_or_n(_("do you wish to overwrite (y or n)? ")); + fputc('\n', stderr); + fflush(stderr); + if (!y_or_n) + return 0; + } + if (unlink(out_file_name) < 0) { + fprintf(stderr, _("%s: failed to unlink the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + + /* + * Open files. + */ + if (zio_open(&in_zio, in_file_name, in_zio_code) < 0) { + fprintf(stderr, _("%s: failed to open the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } + if (in_zio_code == ZIO_SEBXA) { + off_t index_location; + off_t index_base; + off_t zio_start_location; + off_t zio_end_location; + + if (get_sebxa_indexes(in_file_name, index_page, &index_location, + &index_base, &zio_start_location, &zio_end_location) < 0) { + goto failed; + } + zio_set_sebxa_mode(&in_zio, index_location, index_base, + zio_start_location, zio_end_location); + } + + if (!ebzip_test_flag) { + trap_file_name = out_file_name; +#ifdef SIGHUP + signal(SIGHUP, trap); +#endif + signal(SIGINT, trap); +#ifdef SIGQUIT + signal(SIGQUIT, trap); +#endif +#ifdef SIGTERM + signal(SIGTERM, trap); +#endif + +#ifdef O_CREAT + out_file = open(out_file_name, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, + 0666 ^ get_umask()); +#else + out_file = creat(out_file_name, 0666 ^ get_umask()); +#endif + if (out_file < 0) { + fprintf(stderr, _("%s: failed to open the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + trap_file = out_file; + } + + /* + * Read a slice from the input file, uncompress it if required, + * and then write it to the output file. + */ + total_length = 0; + total_slices = (in_zio.file_size + in_zio.slice_size - 1) + / in_zio.slice_size; + progress_interval = EBZIP_PROGRESS_INTERVAL_FACTOR; + if (((total_slices + 999) / 1000) > progress_interval) + progress_interval = ((total_slices + 999) / 1000); + + for (i = 0; i < total_slices; i++) { + /* + * Read a slice. + */ + if (zio_lseek(&in_zio, total_length, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } + length = zio_read(&in_zio, (char *)buffer, in_zio.slice_size); + if (length < 0) { + fprintf(stderr, _("%s: failed to read from the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } else if (length == 0) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } else if (length != in_zio.slice_size + && total_length + length != in_zio.file_size) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } + + /* + * Update CRC. (Calculate adler32 again.) + */ + if (in_zio.code == ZIO_EBZIP1) { +#ifdef ENABLE_LIBDEFLATE + crc = libdeflate_adler32((uint32_t)crc, buffer, (size_t)length); +#else + crc = adler32((uLong)crc, (Bytef *)buffer, (uInt)length); +#endif + } + + /* + * Write the slice to `out_file'. + */ + if (!ebzip_test_flag) { + if (write(out_file, buffer, length) != length) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + } + total_length += length; + + /* + * Output status information unless `quiet' mode. + */ + if (!ebzip_quiet_flag && (i + 1) % progress_interval == 0) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%llu / %llu bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned long long) total_length, + (unsigned long long) in_zio.file_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%I64u / %I64u bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned __int64) total_length, + (unsigned __int64) in_zio.file_size); +#else + fprintf(stderr, _("%4.1f%% done (%lu / %lu bytes)\n"), + (double) (i + 1) * 100.0 / (double) total_slices, + (unsigned long) total_length, + (unsigned long) in_zio.file_size); +#endif + fflush(stderr); + } + } + + /* + * Output the result unless quiet mode. + */ + if (!ebzip_quiet_flag) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("completed (%llu / %llu bytes)\n"), + (unsigned long long) in_zio.file_size, + (unsigned long long) in_zio.file_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("completed (%I64u / %I64u bytes)\n"), + (unsigned __int64) in_zio.file_size, + (unsigned __int64) in_zio.file_size); +#else + fprintf(stderr, _("%lu -> %lu bytes\n\n"), + (unsigned long) in_status.st_size, + (unsigned long) total_length); +#endif + fflush(stderr); + } + + /* + * Close files. + */ + zio_close(&in_zio); + zio_finalize(&in_zio); + + if (!ebzip_test_flag) { + close(out_file); + out_file = -1; + trap_file = -1; + trap_file_name = NULL; +#ifdef SIGHUP + signal(SIGHUP, SIG_DFL); +#endif + signal(SIGINT, SIG_DFL); +#ifdef SIGQUIT + signal(SIGQUIT, SIG_DFL); +#endif +#ifdef SIGTERM + signal(SIGTERM, SIG_DFL); +#endif + } + + /* + * Check for CRC. + */ + if (in_zio.code == ZIO_EBZIP1 && in_zio.crc != crc) { + fprintf(stderr, _("%s: CRC error: %s\n"), invoked_name, out_file_name); + goto failed; + } + + /* + * Delete an original file unless the keep flag is set. + */ + if (!ebzip_test_flag && !ebzip_keep_flag) + unlink_files_add(in_file_name); + + /* + * Set owner, group, permission, atime and mtime of `out_file'. + * We ignore return values of `chown', `chmod' and `utime'. + */ + if (!ebzip_test_flag) { + struct utimbuf utim; + + utim.actime = in_status.st_atime; + utim.modtime = in_status.st_mtime; + utime(out_file_name, &utim); + } + + /* + * Dispose memories. + */ + free(buffer); + + return 0; + + /* + * An error occurs... + */ + failed: + if (buffer != NULL) + free(buffer); + + zio_close(&in_zio); + zio_finalize(&in_zio); + + if (0 <= out_file) { + close(out_file); + trap_file = -1; + trap_file_name = NULL; +#ifdef SIGHUP + signal(SIGHUP, SIG_DFL); +#endif + signal(SIGINT, SIG_DFL); +#ifdef SIGQUIT + signal(SIGQUIT, SIG_DFL); +#endif +#ifdef SIGTERM + signal(SIGTERM, SIG_DFL); +#endif + } + + fputc('\n', stderr); + fflush(stderr); + + return -1; +} + + +/* + * Signal handler. + */ +static void +trap(int signal_number) +{ + if (0 <= trap_file) + close(trap_file); + if (trap_file_name != NULL) + unlink(trap_file_name); + + exit(1); +} diff --git a/lib/ebu/ebzip/zipbook.c b/lib/ebu/ebzip/zipbook.c new file mode 100644 index 0000000..90cd6c9 --- /dev/null +++ b/lib/ebu/ebzip/zipbook.c @@ -0,0 +1,478 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" +#include "ebutils.h" + +#include "getumask.h" +#include "makedir.h" +#include "strlist.h" + +/* + * Unexported function. + */ +static int ebzip_zip_book_eb(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count); +static int ebzip_zip_book_epwing(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count); + + +/* + * Compress files in `book' and output them under `out_top_path'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zip_book(const char *out_top_path, const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count) +{ + EB_Book book; + EB_Error_Code error_code; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + EB_Subbook_Code subbook_code; + int subbook_count; + int result; + int i; + + eb_initialize_book(&book); + + /* + * Bind a book. + */ + error_code = eb_bind(&book, book_path); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + + /* + * For each targe subbook, convert a subbook-names to a subbook-codes. + * If no subbook is specified by `--subbook'(`-S'), set all subbooks + * as the target. + */ + if (subbook_name_count == 0) { + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + } else { + subbook_count = 0; + for (i = 0; i < subbook_name_count; i++) { + error_code = find_subbook(&book, subbook_name_list[i], + &subbook_code); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: unknown subbook name `%s'\n"), + invoked_name, subbook_name_list[i]); + return -1; + } + subbook_list[subbook_count++] = subbook_code; + } + } + + /* + * Compress the book. + */ + if (book.disc_code == EB_DISC_EB) { + result = ebzip_zip_book_eb(&book, out_top_path, book_path, + subbook_list, subbook_count); + } else { + result = ebzip_zip_book_epwing(&book, out_top_path, book_path, + subbook_list, subbook_count); + } + + eb_finalize_book(&book); + + return result; +} + + +/* + * Internal function for `zip_book'. + * This is used to compress an EB book. + */ +static int +ebzip_zip_book_eb(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + String_List string_list; + char in_path_name[PATH_MAX + 1]; + char out_sub_path[PATH_MAX + 1]; + char out_path_name[PATH_MAX + 1]; + char catalog_file_name[EB_MAX_FILE_NAME_LENGTH]; + char language_file_name[EB_MAX_FILE_NAME_LENGTH]; + mode_t out_directory_mode; + Zip_Speedup speedup; + Zio_Code in_zio_code; + int i; + + /* + * If `out_top_path' and/or `book_path' represents "/", replace it + * to an empty string. + */ + if (strcmp(out_top_path, "/") == 0) + out_top_path++; + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + out_directory_mode = 0777 ^ get_umask(); + string_list_initialize(&string_list); + + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Compress a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + /* + * Make an output directory for the current subbook. + */ + eb_compose_path_name(out_top_path, subbook->directory_name, + out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Compress START file. + */ + in_zio_code = zio_mode(&subbook->text_zio); + + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, in_path_name); + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->text_file_name, out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + ebzip_initialize_zip_speedup(&speedup); + if (ebzip_set_zip_speedup(&speedup, in_path_name, in_zio_code, + subbook->index_page) < 0) + goto failed; + if (ebzip_zip_start_file(out_path_name, in_path_name, in_zio_code, + subbook->index_page, &speedup) < 0) + goto failed; + ebzip_finalize_zip_speedup(&speedup); + string_list_add(&string_list, in_path_name); + } + } + + /* + * Compress a language file. + */ + if (eb_find_file_name(book->path, "language", language_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, language_file_name, in_path_name); + eb_compose_path_name(out_top_path, language_file_name, out_path_name); + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + if (ebzip_zip_file(out_path_name, in_path_name, in_zio_code, NULL) < 0) + goto failed; + } + + /* + * Copy CATALOG file. + */ + if (eb_find_file_name(book->path, "catalog", catalog_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalog_file_name, in_path_name); + eb_compose_path_name(out_top_path, catalog_file_name, out_path_name); + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + if (ebzip_copy_file(out_path_name, in_path_name) < 0) + goto failed; + } + + string_list_finalize(&string_list); + return 0; + + /* + * An error occurs... + */ + failed: + string_list_finalize(&string_list); + return -1; +} + + +/* + * Internal function for `zip_book'. + * This is used to compress an EPWING book. + */ +static int +ebzip_zip_book_epwing(EB_Book *book, const char *out_top_path, + const char *book_path, EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + EB_Font *font; + String_List string_list; + char in_path_name[PATH_MAX + 1]; + char out_sub_path[PATH_MAX + 1]; + char out_path_name[PATH_MAX + 1]; + char catalogs_file_name[EB_MAX_FILE_NAME_LENGTH]; + mode_t out_directory_mode; + Zip_Speedup speedup; + Zio_Code in_zio_code; + int i, j; + + /* + * If `out_top_path' and/or `book_path' represents "/", replace it + * to an empty string. + */ + if (strcmp(out_top_path, "/") == 0) + out_top_path++; + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + out_directory_mode = 0777 ^ get_umask(); + string_list_initialize(&string_list); + + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Compress a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + /* + * Make an output directory for the current subbook. + */ + eb_compose_path_name(out_top_path, subbook->directory_name, + out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Make `data' sub directory for the current subbook. + */ + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->data_directory_name, out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) < 0) { + fprintf(stderr, _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + /* + * Compress HONMON/HONMON2 file. + */ + in_zio_code = zio_mode(&subbook->text_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + ebzip_initialize_zip_speedup(&speedup); + if (ebzip_set_zip_speedup(&speedup, in_path_name, in_zio_code, + subbook->index_page) < 0) + goto failed; + if (ebzip_zip_file(out_path_name, in_path_name, in_zio_code, + &speedup) < 0) + goto failed; + ebzip_finalize_zip_speedup(&speedup); + string_list_add(&string_list, in_path_name); + } + + /* + * Compress HONMONS file. + */ + in_zio_code = zio_mode(&subbook->sound_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + + if (!ebzip_skip_flag_sound + && in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_zip_file(out_path_name, in_path_name, in_zio_code, + NULL) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + /* + * Copy HONMONG file. + */ + in_zio_code = zio_mode(&subbook->graphic_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + out_path_name); + + if (!ebzip_skip_flag_graphic + && in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_copy_file(out_path_name, in_path_name) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + + if (!ebzip_skip_flag_font) { + /* + * Make `gaiji' sub directory for the current subbook. + */ + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, out_sub_path); + if (!ebzip_test_flag + && make_missing_directory(out_sub_path, out_directory_mode) + < 0) { + fprintf(stderr, + _("%s: failed to create a directory, %s: %s\n"), + invoked_name, strerror(errno), out_sub_path); + goto failed; + } + + /* + * Compress narrow font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->narrow_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_zip_file(out_path_name, in_path_name, + in_zio_code, NULL) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + } + + /* + * Compress wide font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->wide_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + in_path_name); + eb_compose_path_name3(out_top_path, subbook->directory_name, + subbook->gaiji_directory_name, font->file_name, + out_path_name); + eb_fix_path_name_suffix(out_path_name, EBZIP_SUFFIX_EBZ); + + if (in_zio_code != ZIO_INVALID + && !string_list_find(&string_list, in_path_name)) { + if (ebzip_zip_file(out_path_name, in_path_name, + in_zio_code, NULL) < 0) + goto failed; + string_list_add(&string_list, in_path_name); + } + } + } + + /* + * Copy movie files. + */ + if (!ebzip_skip_flag_movie) { + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->movie_directory_name, in_path_name); + eb_compose_path_name2(out_top_path, subbook->directory_name, + subbook->movie_directory_name, out_path_name); + if (ebzip_copy_files_in_directory(out_path_name, in_path_name) < 0) + goto failed; + } + } + + /* + * Copy CATALOGS file. + */ + if (eb_find_file_name(book->path, "catalogs", catalogs_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalogs_file_name, in_path_name); + eb_compose_path_name(out_top_path, catalogs_file_name, out_path_name); + if (ebzip_copy_file(out_path_name, in_path_name) < 0) + goto failed; + } + + string_list_finalize(&string_list); + return 0; + + /* + * An error occurs... + */ + failed: + string_list_finalize(&string_list); + return -1; +} diff --git a/lib/ebu/ebzip/zipfile.c b/lib/ebu/ebzip/zipfile.c new file mode 100644 index 0000000..5524b9b --- /dev/null +++ b/lib/ebu/ebzip/zipfile.c @@ -0,0 +1,699 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +#include "getumask.h" +#include "makedir.h" +#include "samefile.h" +#include "yesno.h" + +/* + * File name to be deleted and file to be closed when signal is received. + */ +static const char *trap_file_name = NULL; +static int trap_file = -1; + +/* + * Unexported function. + */ +static int ebzip_zip_file_internal(const char *out_file_name, + const char *in_file_name, Zio_Code in_zio_code, int index_page, + Zip_Speedup *speedup); +static void trap(int signal_number); + + +/* + * Ccompress a file `in_file_name'. + * For START file, use ebzip_zip_start_file() instead. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zip_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, Zip_Speedup *speedup) +{ + return ebzip_zip_file_internal(out_file_name, in_file_name, + in_zio_code, 0, speedup); +} + +/* + * Compress TART file `in_file_name'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zip_start_file(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, int index_page, Zip_Speedup *speedup) +{ + return ebzip_zip_file_internal(out_file_name, in_file_name, + in_zio_code, index_page, speedup); +} + +/* + * Internal function for zip_unzip_file() and ebzip_zip_sebxa_start(). + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +static int +ebzip_zip_file_internal(const char *out_file_name, const char *in_file_name, + Zio_Code in_zio_code, int index_page, Zip_Speedup *speedup) +{ + Zio in_zio, out_zio; + unsigned char *buffer, *in_buffer, *out_buffer; + off_t in_total_length, out_total_length; + ssize_t in_length; + size_t *out_length; + struct stat in_status, out_status; + off_t *slice_location; + off_t next_location; + size_t index_length; + int progress_interval; + int total_slices; + int i, j, k; + int failed = 0; + int slice_size = EB_SIZE_PAGE << ebzip_level; + + zio_initialize(&in_zio); + zio_initialize(&out_zio); + + /* + * Output information. + */ + if (!ebzip_quiet_flag) { + fprintf(stderr, _("==> compress %s <==\n"), in_file_name); + fprintf(stderr, _("output to %s\n"), out_file_name); + fflush(stderr); + } + + /* + * Get status of the input file. + */ + if (stat(in_file_name, &in_status) < 0 || !S_ISREG(in_status.st_mode)) { + fprintf(stderr, _("%s: no such file: %s\n"), invoked_name, + in_file_name); + goto failed; + } + + /* + * Do nothing if the `in_file_name' and `out_file_name' are the same. + */ + if (is_same_file(out_file_name, in_file_name)) { + if (!ebzip_quiet_flag) { + fprintf(stderr, + _("the input and output files are the same, skipped.\n\n")); + fflush(stderr); + } + return 0; + } + + /* + * Allocate memories for in/out buffers. + */ + buffer = (unsigned char *)malloc((slice_size * 2 + ZIO_SIZE_EBZIP_MARGIN + + sizeof(off_t) + sizeof(size_t)) * ebzip_slice_number); + if (!buffer) { + fprintf(stderr, _("%s: memory exhausted\n"), invoked_name); + goto failed; + } + + out_length = (size_t *)buffer; + slice_location = (off_t *)buffer + sizeof(size_t) * ebzip_slice_number; + in_buffer = buffer + (sizeof(size_t) + sizeof(off_t)) * ebzip_slice_number; + out_buffer = in_buffer + slice_size * ebzip_slice_number; + + /* + * If the file `out_file_name' already exists, confirm and unlink it. + */ + if (!ebzip_test_flag + && stat(out_file_name, &out_status) == 0 + && S_ISREG(out_status.st_mode)) { + if (ebzip_overwrite_mode == EBZIP_OVERWRITE_NO) { + if (!ebzip_quiet_flag) { + fputs(_("already exists, skip the file\n\n"), stderr); + fflush(stderr); + } + return 0; + } else if (ebzip_overwrite_mode == EBZIP_OVERWRITE_CONFIRM) { + int y_or_n; + + fprintf(stderr, _("\nthe file already exists: %s\n"), + out_file_name); + y_or_n = query_y_or_n(_("do you wish to overwrite (y or n)? ")); + fputc('\n', stderr); + fflush(stderr); + if (!y_or_n) + return 0; + } + if (unlink(out_file_name) < 0) { + fprintf(stderr, _("%s: failed to unlink the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + + /* + * Open files. + */ + if (zio_open(&in_zio, in_file_name, in_zio_code) < 0) { + fprintf(stderr, _("%s: failed to open the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } + if (in_zio_code == ZIO_SEBXA) { + off_t index_location; + off_t index_base; + off_t zio_start_location; + off_t zio_end_location; + + if (get_sebxa_indexes(in_file_name, index_page, &index_location, + &index_base, &zio_start_location, &zio_end_location) < 0) { + goto failed; + } + zio_set_sebxa_mode(&in_zio, index_location, index_base, + zio_start_location, zio_end_location); + } + + if (!ebzip_test_flag) { + trap_file_name = out_file_name; +#ifdef SIGHUP + signal(SIGHUP, trap); +#endif + signal(SIGINT, trap); +#ifdef SIGQUIT + signal(SIGQUIT, trap); +#endif +#ifdef SIGTERM + signal(SIGTERM, trap); +#endif + +#ifdef O_CREAT + out_zio.file = open(out_file_name, + O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666 ^ get_umask()); +#else + out_zio.file = creat(out_file_name, 0666 ^ get_umask()); +#endif + if (out_zio.file < 0) { + fprintf(stderr, _("%s: failed to open the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + trap_file = out_zio.file; + } + + /* + * Initialize `zip'. + */ + out_zio.code = ZIO_EBZIP1; + out_zio.slice_size = slice_size; + out_zio.file_size = in_zio.file_size; + out_zio.crc = 1; + out_zio.mtime = in_status.st_mtime; + + if (out_zio.file_size < (off_t) 1 << 16) + out_zio.index_width = 2; + else if (out_zio.file_size < (off_t) 1 << 24) + out_zio.index_width = 3; + else if (out_zio.file_size < (off_t) 1 << 32 || !off_t_is_large) + out_zio.index_width = 4; + else + out_zio.index_width = 5; + + /* + * Fill header and index part with `\0'. + * + * Original File: + * +-----------------+-----------------+-....-+-------+ + * | slice 1 | slice 2 | |slice N| [EOF] + * | | | | | + * +-----------------+-----------------+-....-+-------+ + * slice_size slice_size odds + * <-------------------- file size -------------------> + * + * Compressed file: + * +------+---------+...+---------+---------+----------+...+- + * |Header|index for| |index for|index for|compressed| | + * | | slice 1 | | slice N | EOF | slice 1 | | + * +------+---------+...+---------+---------+----------+...+- + * index index index + * width width width + * <--------- index_length ---------> + * + * total_slices = N = (file_size + slice_size - 1) / slice_size + * index_length = (N + 1) * index_width + */ + total_slices = (out_zio.file_size + slice_size - 1) / slice_size; + index_length = (total_slices + 1) * out_zio.index_width; + memset(out_buffer, '\0', slice_size); + + if (!ebzip_test_flag) { + for (i = index_length + ZIO_SIZE_EBZIP_HEADER; + slice_size <= i; i -= slice_size) { + if (write(out_zio.file, out_buffer, slice_size) != slice_size) { + fprintf(stderr, _("%s: failed to write to the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + if (0 < i) { + if (write(out_zio.file, out_buffer, i) != i) { + fprintf(stderr, _("%s: failed to write to the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + } + + /* + * Read a slice from the input file, compress it, and then + * write it to the output file. + */ + in_total_length = 0; + out_total_length = 0; + progress_interval = EBZIP_PROGRESS_INTERVAL_FACTOR >> ebzip_level; + if (((total_slices + 999) / 1000) > progress_interval) + progress_interval = ((total_slices + 999) / 1000); + + for (i = 0; i < total_slices; i += j) { + j = (i + ebzip_slice_number) < total_slices ? + ebzip_slice_number : total_slices - i; + + for (k = 0; k < j; k++) { + /* + * Read a slice from the original file. + */ + if (zio_lseek(&in_zio, in_total_length, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } + in_length = zio_read(&in_zio, (char *)(in_buffer + k * slice_size), + slice_size); + if (in_length < 0) { + fprintf(stderr, _("%s: failed to read from the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } else if (in_length == 0) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } else if (in_length != slice_size + && in_total_length + in_length != out_zio.file_size) { + fprintf(stderr, _("%s: unexpected EOF: %s\n"), + invoked_name, in_file_name); + goto failed; + } + + /* + * Update CRC. (Calculate adler32 again.) + */ +#ifdef ENABLE_LIBDEFLATE + out_zio.crc = libdeflate_adler32 + ((uint32_t)out_zio.crc, in_buffer + k * slice_size, + (size_t)in_length); +#else + out_zio.crc = adler32((uLong)out_zio.crc, + (Bytef *)(in_buffer + k * slice_size), (uInt)in_length); +#endif + + /* + * If this is last slice and its length is shorter than + * `slice_size', fill `\0'. + */ + if (in_length < slice_size) { + memset(in_buffer + k * slice_size + in_length, '\0', + slice_size - in_length); + in_length = slice_size; + } + in_total_length += in_length; + } + +#pragma omp parallel for + for (k = 0; k < j; k++) { + if (!failed) { + /* + * Compress the slice. + */ + if (speedup != NULL + && ebzip_is_speedup_slice(speedup, i + k, ebzip_level)) { + out_length[k] = slice_size; + } else if (ebzip1_slice + ((char *)(out_buffer + + k * (slice_size + ZIO_SIZE_EBZIP_MARGIN)), + &out_length[k], + (char *)(in_buffer + k * slice_size), + slice_size) < 0) { + fprintf(stderr, _("%s: memory exhausted\n"), invoked_name); + failed = 1; + } + if (slice_size <= out_length[k]) { + memcpy(out_buffer + + k * (slice_size + ZIO_SIZE_EBZIP_MARGIN), + in_buffer + k * slice_size, slice_size); + out_length[k] = slice_size; + } + } + } + if (failed) goto failed; + + for (k = 0; k < j; k++) { + /* + * Write the slice to the zip file. + * If the length of the zipped slice is not shorter than + * original, write orignal slice. + */ + if (!ebzip_test_flag) { + slice_location[k] = lseek(out_zio.file, 0, SEEK_END); + if (slice_location[k] < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + if (write(out_zio.file, out_buffer + + k * (slice_size + ZIO_SIZE_EBZIP_MARGIN), + out_length[k]) != out_length[k]) { + fprintf(stderr, _("%s: failed to write to the file: %s\n"), + invoked_name, out_file_name); + goto failed; + } + } + } + + for (k = 0; k < j; k++) { + /* + * Write an index for the slice. + */ + switch (out_zio.index_width) { + case 2: + out_buffer[ 2 * k] = (slice_location[k] >> 8) & 0xff; + out_buffer[1 + 2 * k] = slice_location[k] & 0xff; + break; + case 3: + out_buffer[ 3 * k] = (slice_location[k] >> 16) & 0xff; + out_buffer[1 + 3 * k] = (slice_location[k] >> 8) & 0xff; + out_buffer[2 + 3 * k] = slice_location[k] & 0xff; + break; + case 4: + out_buffer[ 4 * k] = (slice_location[k] >> 24) & 0xff; + out_buffer[1 + 4 * k] = (slice_location[k] >> 16) & 0xff; + out_buffer[2 + 4 * k] = (slice_location[k] >> 8) & 0xff; + out_buffer[3 + 4 * k] = slice_location[k] & 0xff; + break; + case 5: + out_buffer[ 5 * k] = (slice_location[k] >> 32) & 0xff; + out_buffer[1 + 5 * k] = (slice_location[k] >> 24) & 0xff; + out_buffer[2 + 5 * k] = (slice_location[k] >> 16) & 0xff; + out_buffer[3 + 5 * k] = (slice_location[k] >> 8) & 0xff; + out_buffer[4 + 5 * k] = slice_location[k] & 0xff; + break; + } + out_total_length += out_length[k] + out_zio.index_width; + } + + next_location = slice_location[j - 1] + out_length[j - 1]; + switch (out_zio.index_width) { + case 2: + out_buffer[ 2 * j] = (next_location >> 8) & 0xff; + out_buffer[1 + 2 * j] = next_location & 0xff; + break; + case 3: + out_buffer[ 3 * j] = (next_location >> 16) & 0xff; + out_buffer[1 + 3 * j] = (next_location >> 8) & 0xff; + out_buffer[2 + 3 * j] = next_location & 0xff; + break; + case 4: + out_buffer[ 4 * j] = (next_location >> 24) & 0xff; + out_buffer[1 + 4 * j] = (next_location >> 16) & 0xff; + out_buffer[2 + 4 * j] = (next_location >> 8) & 0xff; + out_buffer[3 + 4 * j] = next_location & 0xff; + break; + case 5: + out_buffer[ 5 * j] = (next_location >> 32) & 0xff; + out_buffer[1 + 5 * j] = (next_location >> 24) & 0xff; + out_buffer[2 + 5 * j] = (next_location >> 16) & 0xff; + out_buffer[3 + 5 * j] = (next_location >> 8) & 0xff; + out_buffer[4 + 5 * j] = next_location & 0xff; + break; + } + + if (!ebzip_test_flag) { + if (lseek(out_zio.file, + ZIO_SIZE_EBZIP_HEADER + (off_t) i * out_zio.index_width, + SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + if (write(out_zio.file, out_buffer, out_zio.index_width * (j + 1)) + != out_zio.index_width * (j + 1)) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + } + + /* + * Output status information unless `quiet' mode. + */ + if (!ebzip_quiet_flag + && (j >= progress_interval + || (i + j) / progress_interval > i / progress_interval)) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%llu / %llu bytes)\n"), + (double) (i + k + 1) * 100.0 / (double) total_slices, + (unsigned long long) in_total_length, + (unsigned long long) in_zio.file_size); +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("%4.1f%% done (%I64u / %I64u bytes)\n"), + (double) (i + k + 1) * 100.0 / (double) total_slices, + (unsigned __int64) in_total_length, + (unsigned __int64) in_zio.file_size); +#else + fprintf(stderr, _("%4.1f%% done (%lu / %lu bytes)\n"), + (double) (i + k + 1) * 100.0 / (double) total_slices, + (unsigned long) in_total_length, + (unsigned long) in_zio.file_size); +#endif + fflush(stderr); + } + } + + /* + * Write a header part (22 bytes): + * magic-id 5 bytes ( 0 ... 4) + * zip-mode 4/8 bytes ( 5) + * slice_size 4/8 bytes ( 5) + * (reserved) 4 bytes ( 6 ... 9) + * file_size 4 bytes (10 ... 13) + * crc 4 bytes (14 ... 17) + * mtime 4 bytes (18 ... 21) + */ + memcpy(out_buffer, "EBZip", 5); + + if (out_zio.file_size < (off_t) 1 << 32 || !off_t_is_large) + out_buffer[5] = (1 << 4) + (ebzip_level & 0x0f); + else + out_buffer[5] = (2 << 4) + (ebzip_level & 0x0f); + out_buffer[ 6] = 0; + out_buffer[ 7] = 0; + out_buffer[ 8] = 0; + out_buffer[ 9] = (out_zio.file_size >> 32) & 0xff; + out_buffer[10] = (out_zio.file_size >> 24) & 0xff; + out_buffer[11] = (out_zio.file_size >> 16) & 0xff; + out_buffer[12] = (out_zio.file_size >> 8) & 0xff; + out_buffer[13] = out_zio.file_size & 0xff; + out_buffer[14] = (out_zio.crc >> 24) & 0xff; + out_buffer[15] = (out_zio.crc >> 16) & 0xff; + out_buffer[16] = (out_zio.crc >> 8) & 0xff; + out_buffer[17] = out_zio.crc & 0xff; + out_buffer[18] = (out_zio.mtime >> 24) & 0xff; + out_buffer[19] = (out_zio.mtime >> 16) & 0xff; + out_buffer[20] = (out_zio.mtime >> 8) & 0xff; + out_buffer[21] = out_zio.mtime & 0xff; + + if (!ebzip_test_flag) { + if (lseek(out_zio.file, 0, SEEK_SET) < 0) { + fprintf(stderr, _("%s: failed to seek the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + if (write(out_zio.file, out_buffer, ZIO_SIZE_EBZIP_HEADER) + != ZIO_SIZE_EBZIP_HEADER) { + fprintf(stderr, _("%s: failed to write to the file, %s: %s\n"), + invoked_name, strerror(errno), out_file_name); + goto failed; + } + } + + /* + * Output the result information unless quiet mode. + */ + out_total_length += ZIO_SIZE_EBZIP_HEADER + out_zio.index_width; + + if (!ebzip_quiet_flag) { +#if defined(PRINTF_LL_MODIFIER) + fprintf(stderr, _("completed (%llu / %llu bytes)\n"), + (unsigned long long) in_zio.file_size, + (unsigned long long) in_zio.file_size); + if (in_total_length != 0) { + fprintf(stderr, _("%llu -> %llu bytes (%4.1f%%)\n\n"), + (unsigned long long) in_zio.file_size, + (unsigned long long) out_total_length, + (double) out_total_length * 100.0 + / (double) in_zio.file_size); + } else { + fprintf(stderr, _("%llu -> %llu bytes\n\n"), + (unsigned long long) in_zio.file_size, + (unsigned long long) out_total_length); + } +#elif defined(PRINTF_I64_MODIFIER) + fprintf(stderr, _("completed (%I64u / %I64u bytes)\n"), + (unsigned __int64) in_zio.file_size, + (unsigned __int64) in_zio.file_size); + if (in_total_length != 0) { + fprintf(stderr, _("%I64u -> %I64u bytes (%4.1f%%)\n\n"), + (unsigned __int64) in_zio.file_size, + (unsigned __int64) out_total_length, + (double) out_total_length * 100.0 / (double) in_zio.file_size); + } else { + fprintf(stderr, _("%I64u -> %I64u bytes\n\n"), + (unsigned __int64) in_zio.file_size, + (unsigned __int64) out_total_length); + } +#else + fprintf(stderr, _("completed (%lu / %lu bytes)\n"), + (unsigned long) in_zio.file_size, + (unsigned long) in_zio.file_size); + if (in_total_length != 0) { + fprintf(stderr, _("%lu -> %lu bytes (%4.1f%%)\n\n"), + (unsigned long) in_zio.file_size, + (unsigned long) out_total_length, + (double) out_total_length * 100.0 / (double) in_zio.file_size); + } else { + fprintf(stderr, _("%lu -> %lu bytes\n\n"), + (unsigned long) in_zio.file_size, + (unsigned long) out_total_length); + } +#endif + fflush(stderr); + } + + /* + * Close files. + */ + zio_close(&in_zio); + zio_finalize(&in_zio); + + if (!ebzip_test_flag) { + close(out_zio.file); + out_zio.file = -1; + zio_finalize(&out_zio); + trap_file = -1; + trap_file_name = NULL; +#ifdef SIGHUP + signal(SIGHUP, SIG_DFL); +#endif + signal(SIGINT, SIG_DFL); +#ifdef SIGQUIT + signal(SIGQUIT, SIG_DFL); +#endif +#ifdef SIGTERM + signal(SIGTERM, SIG_DFL); +#endif + } + + /* + * Delete an original file unless the keep flag is set. + */ + if (!ebzip_test_flag && !ebzip_keep_flag) + unlink_files_add(in_file_name); + + /* + * Set owner, group, permission, atime and utime of `out_zio.file'. + * We ignore return values of `chown', `chmod' and `utime'. + */ + if (!ebzip_test_flag) { + struct utimbuf utim; + + utim.actime = in_status.st_atime; + utim.modtime = in_status.st_mtime; + utime(out_file_name, &utim); + } + + /* + * Dispose memories. + */ + free(buffer); + + return 0; + + /* + * An error occurs... + */ + failed: + if (buffer) + free(buffer); + + zio_close(&in_zio); + zio_finalize(&in_zio); + + if (0 <= out_zio.file) { + close(out_zio.file); + out_zio.file = -1; + zio_finalize(&out_zio); + trap_file = -1; + trap_file_name = NULL; +#ifdef SIGHUP + signal(SIGHUP, SIG_DFL); +#endif + signal(SIGINT, SIG_DFL); +#ifdef SIGQUIT + signal(SIGQUIT, SIG_DFL); +#endif +#ifdef SIGTERM + signal(SIGTERM, SIG_DFL); +#endif + } + + fputc('\n', stderr); + fflush(stderr); + + return -1; +} + + +/* + * Signal handler. + */ +static void +trap(int signal_number) +{ + if (0 <= trap_file) + close(trap_file); + if (trap_file_name != NULL) + unlink(trap_file_name); + + exit(1); +} diff --git a/lib/ebu/ebzip/zipinfobook.c b/lib/ebu/ebzip/zipinfobook.c new file mode 100644 index 0000000..64c3971 --- /dev/null +++ b/lib/ebu/ebzip/zipinfobook.c @@ -0,0 +1,340 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" +#include "ebutils.h" + +/* + * Unexported functions. + */ +static int ebzip_zipinfo_book_eb(EB_Book *book, const char *book_path, + EB_Subbook_Code *subbook_list, int subbook_count); +static int ebzip_zipinfo_book_epwing(EB_Book *book, const char *book_path, + EB_Subbook_Code *subbook_list, int subbook_count); + + +/* + * Hints of language file names in a book. + */ +#define EB_HINT_INDEX_LANGUAGE 0 +#define EB_HINT_INDEX_LANGUAGE_EBZ 1 + +/* + * List compressed book information. + * If is succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zipinfo_book(const char *book_path, + char subbook_name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], + int subbook_name_count) +{ + EB_Book book; + EB_Error_Code error_code; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + EB_Subbook_Code subbook_code; + int subbook_count = 0; + int result; + int i; + + eb_initialize_book(&book); + + /* + * Bind a book. + */ + error_code = eb_bind(&book, book_path); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + + /* + * For each targe subbook, convert a subbook-names to a subbook-codes. + * If no subbook is specified by `--subbook'(`-S'), set all subbooks + * as the target. + */ + if (subbook_name_count == 0) { + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + fflush(stderr); + return -1; + } + } else { + for (i = 0; i < subbook_name_count; i++) { + error_code = find_subbook(&book, *(subbook_name_list + i), + &subbook_code); + if (error_code != EB_SUCCESS) { + fprintf(stderr, _("%s: unknown subbook name `%s'\n"), + invoked_name, subbook_name_list[i]); + return -1; + } + subbook_list[subbook_count++] = subbook_code; + } + } + + /* + * List compressed book information. + */ + if (book.disc_code == EB_DISC_EB) { + result = ebzip_zipinfo_book_eb(&book, book_path, subbook_list, + subbook_count); + } else { + result = ebzip_zipinfo_book_epwing(&book, book_path, subbook_list, + subbook_count); + } + + eb_finalize_book(&book); + + return result; +} + + +/* + * Internal function for `zipinfo_book'. + * This is used to list files in an EB book. + */ +static int +ebzip_zipinfo_book_eb(EB_Book *book, const char *book_path, + EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + char in_path_name[PATH_MAX + 1]; + char catalog_file_name[EB_MAX_FILE_NAME_LENGTH]; + char language_file_name[EB_MAX_FILE_NAME_LENGTH]; + Zio_Code in_zio_code; + int i; + + /* + * If `book_path' represents "/", replace it to an empty string. + */ + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Inspect a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + in_zio_code = zio_mode(&subbook->text_zio); + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->text_file_name, in_path_name); + + if (in_zio_code != ZIO_INVALID) { + ebzip_zipinfo_start_file(in_path_name, in_zio_code, + subbook->index_page); + } + } + + /* + * Inspect a language file. + */ + if (eb_find_file_name(book->path, "language", language_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, language_file_name, in_path_name); + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + ebzip_zipinfo_file(in_path_name, in_zio_code); + } + + /* + * Inspect CATALOG file. + */ + if (eb_find_file_name(book->path, "catalog", catalog_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalog_file_name, in_path_name); + ebzip_zipinfo_file(in_path_name, ZIO_PLAIN); + } + + return 0; +} + + +/* + * Internal function for `zipinfo_book'. + * This is used to list files in an EPWING book. + */ +static int +ebzip_zipinfo_book_epwing(EB_Book *book, const char *book_path, + EB_Subbook_Code *subbook_list, int subbook_count) +{ + EB_Subbook *subbook; + EB_Error_Code error_code; + EB_Font *font; + char in_path_name[PATH_MAX + 1]; + char in_movie_path_name[PATH_MAX + 1]; + char catalogs_file_name[EB_MAX_FILE_NAME_LENGTH]; + Zio_Code in_zio_code; + DIR *dir; + int i, j; + + /* + * If `book_path' represents "/", replace it to an empty string. + */ + if (strcmp(book_path, "/") == 0) + book_path++; + + /* + * Initialize variables. + */ + error_code = eb_load_all_subbooks(book); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: %s\n", invoked_name, + eb_error_message(error_code)); + } + + /* + * Inspect a book. + */ + for (i = 0; i < subbook_count; i++) { + subbook = book->subbooks + subbook_list[i]; + + /* + * Inspect HONMON/HONMON2 file. + */ + in_zio_code = zio_mode(&subbook->text_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->text_file_name, + in_path_name); + if (in_zio_code != ZIO_INVALID) + ebzip_zipinfo_file(in_path_name, in_zio_code); + + /* + * Inspect HONMONS file. + */ + in_zio_code = zio_mode(&subbook->sound_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->sound_file_name, + in_path_name); + if (!ebzip_skip_flag_sound + && in_zio_code != ZIO_INVALID + && strncasecmp(subbook->sound_file_name, "honmons", 7) == 0) + ebzip_zipinfo_file(in_path_name, in_zio_code); + + /* + * Inspect HONMONG file. + */ + in_zio_code = zio_mode(&subbook->graphic_zio); + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->data_directory_name, subbook->graphic_file_name, + in_path_name); + if (!ebzip_skip_flag_graphic + && in_zio_code != ZIO_INVALID + && strncasecmp(subbook->graphic_file_name, "honmong", 7) == 0) + ebzip_zipinfo_file(in_path_name, in_zio_code); + + if (!ebzip_skip_flag_font) { + /* + * Inspect narrow font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->narrow_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + + if (in_zio_code != ZIO_INVALID) { + eb_compose_path_name3(book->path, + subbook->directory_name, subbook->gaiji_directory_name, + font->file_name, in_path_name); + ebzip_zipinfo_file(in_path_name, in_zio_code); + } + } + + /* + * Inspect wide font files. + */ + for (j = 0; j < EB_MAX_FONTS; j++) { + font = subbook->wide_fonts + j; + if (font->font_code == EB_FONT_INVALID) + continue; + + in_zio_code = zio_mode(&font->zio); + + if (in_zio_code != ZIO_INVALID) { + eb_compose_path_name3(book->path, + subbook->directory_name, subbook->gaiji_directory_name, + font->file_name, in_path_name); + ebzip_zipinfo_file(in_path_name, in_zio_code); + } + } + } + + /* + * Inspect movie files. + */ + if (!ebzip_skip_flag_movie) { + eb_compose_path_name2(book->path, subbook->directory_name, + subbook->movie_directory_name, in_movie_path_name); + dir = opendir(in_movie_path_name); + if (dir == NULL) + continue; + for (;;) { + struct dirent *entry; + struct stat st; + + entry = readdir(dir); + if (entry == NULL) + break; + eb_compose_path_name3(book->path, subbook->directory_name, + subbook->movie_directory_name, entry->d_name, + in_path_name); + if (stat(in_path_name, &st) < 0 || !S_ISREG(st.st_mode)) + continue; + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + ebzip_zipinfo_file(in_path_name, in_zio_code); + } + closedir(dir); + } + } + + /* + * Inspect CATALOGS file. + */ + if (eb_find_file_name(book->path, "catalogs", catalogs_file_name) + == EB_SUCCESS) { + eb_compose_path_name(book->path, catalogs_file_name, in_path_name); + eb_path_name_zio_code(in_path_name, ZIO_PLAIN, &in_zio_code); + ebzip_zipinfo_file(in_path_name, in_zio_code); + } + + return 0; +} diff --git a/lib/ebu/ebzip/zipinfofile.c b/lib/ebu/ebzip/zipinfofile.c new file mode 100644 index 0000000..741dede --- /dev/null +++ b/lib/ebu/ebzip/zipinfofile.c @@ -0,0 +1,185 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#include "ebzip.h" + +#include "samefile.h" +#include "yesno.h" + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Unexported functions. + */ +static int ebzip_zipinfo_file_internal(const char *in_file_name, + Zio_Code in_zio_code, int index_page); + + +/* + * Output status of a file `in_file_name'. + * For START file, use ebzip_zipinfo_start_file() instead. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zipinfo_file(const char *in_file_name, Zio_Code in_zio_code) +{ + return ebzip_zipinfo_file_internal(in_file_name, in_zio_code, 0); +} + +/* + * Output status of START file `in_file_name'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +int +ebzip_zipinfo_start_file(const char *in_file_name, Zio_Code in_zio_code, + int index_page) +{ + return ebzip_zipinfo_file_internal(in_file_name, in_zio_code, index_page); +} + +/* + * Output status of a file `file_name'. + * If it succeeds, 0 is returned. Otherwise -1 is returned. + */ +static int +ebzip_zipinfo_file_internal(const char *in_file_name, Zio_Code in_zio_code, + int index_page) +{ + Zio in_zio; + int in_file = -1; + struct stat in_status; + + /* + * Output file name information. + */ + printf("==> %s <==\n", in_file_name); + fflush(stdout); + + /* + * Open the file. + */ + zio_initialize(&in_zio); + if (stat(in_file_name, &in_status) == 0 && S_ISREG(in_status.st_mode)) + in_file = zio_open(&in_zio, in_file_name, in_zio_code); + + if (in_file < 0) { + fprintf(stderr, _("%s: failed to open the file: %s\n"), + invoked_name, in_file_name); + goto failed; + } + if (in_zio_code == ZIO_SEBXA) { + off_t index_location; + off_t index_base; + off_t zio_start_location; + off_t zio_end_location; + + if (get_sebxa_indexes(in_file_name, index_page, &index_location, + &index_base, &zio_start_location, &zio_end_location) < 0) { + goto failed; + } + zio_set_sebxa_mode(&in_zio, index_location, index_base, + zio_start_location, zio_end_location); + } + + /* + * Close the file. + */ + zio_close(&in_zio); + + /* + * Output information. + */ + if (in_zio.code == ZIO_PLAIN) { +#if defined(PRINTF_LL_MODIFIER) + printf(_("%llu bytes (not compressed)\n"), + (unsigned long long) in_status.st_size); +#elif defined(PRINTF_I64_MODIFIER) + printf(_("%I64u bytes (not compressed)\n"), + (unsigned __int64) in_status.st_size); +#else + printf(_("%lu bytes (not compressed)\n"), + (unsigned long) in_status.st_size); +#endif + } else { +#if defined(PRINTF_LL_MODIFIER) + printf(_("%llu -> %llu bytes "), + (unsigned long long) in_zio.file_size, + (unsigned long long) in_status.st_size); +#elif defined(PRINTF_I64_MODIFIER) + printf(_("%I64u -> %I64u bytes "), + (unsigned __int64) in_zio.file_size, + (unsigned __int64) in_status.st_size); +#else + printf(_("%lu -> %lu bytes "), + (unsigned long) in_zio.file_size, + (unsigned long) in_status.st_size); +#endif + if (in_zio.file_size == 0) + fputs(_("(empty original file, "), stdout); + else { + printf("(%4.1f%%, ", (double)in_status.st_size * 100.0 + / (double)in_zio.file_size); + } + if (in_zio.code == ZIO_EBZIP1) + printf(_("ebzip level %d compression)\n"), in_zio.zip_level); + else if (in_zio.code == ZIO_SEBXA) + printf(_("S-EBXA compression)\n")); + else + printf(_("EPWING compression)\n")); + } + + fputc('\n', stdout); + fflush(stdout); + + return 0; + + /* + * An error occurs... + */ + failed: + if (0 <= in_file) + close(in_file); + + fputc('\n', stderr); + fflush(stderr); + + return -1; +} diff --git a/lib/ebu/install-sh b/lib/ebu/install-sh new file mode 100644 index 0000000..6781b98 --- /dev/null +++ b/lib/ebu/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/libebutils/.deps/ebutils.Po b/lib/ebu/libebutils/.deps/ebutils.Po new file mode 100644 index 0000000..d3dc48a --- /dev/null +++ b/lib/ebu/libebutils/.deps/ebutils.Po @@ -0,0 +1,214 @@ +ebutils.o: ebutils.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/libintl.h ../ebu/eb.h ../ebu/defs.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h ../ebu/sysdefs.h \ + ../ebu/zio.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + ../ebu/error.h ebutils.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/libintl.h: + +../ebu/eb.h: + +../ebu/defs.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +../ebu/sysdefs.h: + +../ebu/zio.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h: + +../ebu/error.h: + +ebutils.h: diff --git a/lib/ebu/libebutils/.deps/getopt.Po b/lib/ebu/libebutils/.deps/getopt.Po new file mode 100644 index 0000000..67a2d86 --- /dev/null +++ b/lib/ebu/libebutils/.deps/getopt.Po @@ -0,0 +1,195 @@ +getopt.o: getopt.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + getopt.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +getopt.h: diff --git a/lib/ebu/libebutils/.deps/getumask.Po b/lib/ebu/libebutils/.deps/getumask.Po new file mode 100644 index 0000000..0c5f53a --- /dev/null +++ b/lib/ebu/libebutils/.deps/getumask.Po @@ -0,0 +1,134 @@ +getumask.o: getumask.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: + +/usr/include/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/posix_opt.h: + +/usr/include/x86_64-linux-gnu/bits/environments.h: + +/usr/include/x86_64-linux-gnu/bits/confname.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_posix.h: + +/usr/include/x86_64-linux-gnu/bits/getopt_core.h: + +/usr/include/x86_64-linux-gnu/bits/unistd.h: + +/usr/include/x86_64-linux-gnu/bits/unistd_ext.h: diff --git a/lib/ebu/libebutils/.deps/makedir.Po b/lib/ebu/libebutils/.deps/makedir.Po new file mode 100644 index 0000000..1d23b5f --- /dev/null +++ b/lib/ebu/libebutils/.deps/makedir.Po @@ -0,0 +1,150 @@ +makedir.o: makedir.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: diff --git a/lib/ebu/libebutils/.deps/puts_eucjp.Po b/lib/ebu/libebutils/.deps/puts_eucjp.Po new file mode 100644 index 0000000..48c5400 --- /dev/null +++ b/lib/ebu/libebutils/.deps/puts_eucjp.Po @@ -0,0 +1,212 @@ +puts_eucjp.o: puts_eucjp.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/iconv.h \ + /usr/include/langinfo.h /usr/include/nl_types.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/errno.h: + +/usr/include/x86_64-linux-gnu/bits/errno.h: + +/usr/include/linux/errno.h: + +/usr/include/x86_64-linux-gnu/asm/errno.h: + +/usr/include/asm-generic/errno.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/iconv.h: + +/usr/include/langinfo.h: + +/usr/include/nl_types.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: diff --git a/lib/ebu/libebutils/.deps/samefile.Po b/lib/ebu/libebutils/.deps/samefile.Po new file mode 100644 index 0000000..47f2621 --- /dev/null +++ b/lib/ebu/libebutils/.deps/samefile.Po @@ -0,0 +1,150 @@ +samefile.o: samefile.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: diff --git a/lib/ebu/libebutils/.deps/strcasecmp.Po b/lib/ebu/libebutils/.deps/strcasecmp.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/libebutils/.deps/strcasecmp.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/libebutils/.deps/strlist.Po b/lib/ebu/libebutils/.deps/strlist.Po new file mode 100644 index 0000000..3038f05 --- /dev/null +++ b/lib/ebu/libebutils/.deps/strlist.Po @@ -0,0 +1,188 @@ +strlist.o: strlist.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h strlist.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/bits/floatn.h: + +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: + +strlist.h: diff --git a/lib/ebu/libebutils/.deps/yesno.Po b/lib/ebu/libebutils/.deps/yesno.Po new file mode 100644 index 0000000..0bac896 --- /dev/null +++ b/lib/ebu/libebutils/.deps/yesno.Po @@ -0,0 +1,161 @@ +yesno.o: yesno.c /usr/include/stdc-predef.h ../config.h \ + /usr/include/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h \ + /usr/include/x86_64-linux-gnu/bits/strings_fortified.h \ + /usr/include/x86_64-linux-gnu/bits/string_fortified.h + +/usr/include/stdc-predef.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/bits/long-double.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h: + +/usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/timesize.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/time64.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/bits/types/clock_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/timer_t.h: + +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endianness.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/uintn-identity.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: + +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/strings.h: + +/usr/include/x86_64-linux-gnu/bits/strings_fortified.h: + +/usr/include/x86_64-linux-gnu/bits/string_fortified.h: diff --git a/lib/ebu/libebutils/Makefile b/lib/ebu/libebutils/Makefile new file mode 100644 index 0000000..10cd65b --- /dev/null +++ b/lib/ebu/libebutils/Makefile @@ -0,0 +1,525 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# libebutils/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = libebutils +DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in strcasecmp.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libebutils_a_AR = $(AR) $(ARFLAGS) +libebutils_a_DEPENDENCIES = +am_libebutils_a_OBJECTS = ebutils.$(OBJEXT) getopt.$(OBJEXT) \ + getumask.$(OBJEXT) makedir.$(OBJEXT) puts_eucjp.$(OBJEXT) \ + samefile.$(OBJEXT) strlist.$(OBJEXT) yesno.$(OBJEXT) +libebutils_a_OBJECTS = $(am_libebutils_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libebutils_a_SOURCES) +DIST_SOURCES = $(libebutils_a_SOURCES) +HEADERS = $(dist_noinst_HEADERS) $(nodist_noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/libebutils +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/libebutils +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +noinst_LIBRARIES = libebutils.a +libebutils_a_SOURCES = ebutils.c getopt.c getumask.c makedir.c puts_eucjp.c \ + samefile.c strlist.c yesno.c + +libebutils_a_LIBADD = +dist_noinst_HEADERS = getopt.h getumask.h makedir.h samefile.h strlist.h \ + yesno.h + +nodist_noinst_HEADERS = ebutils.h +EXTRA_DIST = getopt_long.pl ebutils.h.in +CLEANFILES = stamp-ebutils-h ebutils.h +BUILT_SOURCES = ebutils.h +INCLUDES = -I$(top_srcdir) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libebutils/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libebutils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libebutils.a: $(libebutils_a_OBJECTS) $(libebutils_a_DEPENDENCIES) + -rm -f libebutils.a + $(libebutils_a_AR) libebutils.a $(libebutils_a_OBJECTS) $(libebutils_a_LIBADD) + $(RANLIB) libebutils.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include $(DEPDIR)/strcasecmp.Po +include ./$(DEPDIR)/ebutils.Po +include ./$(DEPDIR)/getopt.Po +include ./$(DEPDIR)/getumask.Po +include ./$(DEPDIR)/makedir.Po +include ./$(DEPDIR)/puts_eucjp.Po +include ./$(DEPDIR)/samefile.Po +include ./$(DEPDIR)/strlist.Po +include ./$(DEPDIR)/yesno.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +ebutils.h: stamp-ebutils-h +stamp-ebutils-h: ebutils.h.in Makefile + rm -f ebutils.h.tmp + echo '/* automatically generated from ebutils.h.in. */' \ + > ebutils.h.tmp + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/ebutils.h.in >> ebutils.h.tmp + $(top_srcdir)/move-if-change ebutils.h.tmp ebutils.h + @echo timestamp > stamp-ebutils-h +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/libebutils/Makefile.am b/lib/ebu/libebutils/Makefile.am new file mode 100644 index 0000000..9d0791f --- /dev/null +++ b/lib/ebu/libebutils/Makefile.am @@ -0,0 +1,24 @@ +noinst_LIBRARIES = libebutils.a +libebutils_a_SOURCES = ebutils.c getopt.c getumask.c makedir.c puts_eucjp.c \ + samefile.c strlist.c yesno.c +libebutils_a_LIBADD = @LIBOBJS@ + +dist_noinst_HEADERS = getopt.h getumask.h makedir.h samefile.h strlist.h \ + yesno.h +nodist_noinst_HEADERS = ebutils.h + +EXTRA_DIST = getopt_long.pl ebutils.h.in +CLEANFILES = stamp-ebutils-h ebutils.h +BUILT_SOURCES = ebutils.h + +INCLUDES = -I$(top_srcdir) @INTLINCS@ @ICONVINCS@ + +ebutils.h: stamp-ebutils-h +stamp-ebutils-h: ebutils.h.in Makefile + rm -f ebutils.h.tmp + echo '/* automatically generated from ebutils.h.in. */' \ + > ebutils.h.tmp + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/ebutils.h.in >> ebutils.h.tmp + $(top_srcdir)/move-if-change ebutils.h.tmp ebutils.h + @echo timestamp > stamp-ebutils-h diff --git a/lib/ebu/libebutils/Makefile.in b/lib/ebu/libebutils/Makefile.in new file mode 100644 index 0000000..cdc2af3 --- /dev/null +++ b/lib/ebu/libebutils/Makefile.in @@ -0,0 +1,525 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libebutils +DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in strcasecmp.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libebutils_a_AR = $(AR) $(ARFLAGS) +libebutils_a_DEPENDENCIES = @LIBOBJS@ +am_libebutils_a_OBJECTS = ebutils.$(OBJEXT) getopt.$(OBJEXT) \ + getumask.$(OBJEXT) makedir.$(OBJEXT) puts_eucjp.$(OBJEXT) \ + samefile.$(OBJEXT) strlist.$(OBJEXT) yesno.$(OBJEXT) +libebutils_a_OBJECTS = $(am_libebutils_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libebutils_a_SOURCES) +DIST_SOURCES = $(libebutils_a_SOURCES) +HEADERS = $(dist_noinst_HEADERS) $(nodist_noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libebutils.a +libebutils_a_SOURCES = ebutils.c getopt.c getumask.c makedir.c puts_eucjp.c \ + samefile.c strlist.c yesno.c + +libebutils_a_LIBADD = @LIBOBJS@ +dist_noinst_HEADERS = getopt.h getumask.h makedir.h samefile.h strlist.h \ + yesno.h + +nodist_noinst_HEADERS = ebutils.h +EXTRA_DIST = getopt_long.pl ebutils.h.in +CLEANFILES = stamp-ebutils-h ebutils.h +BUILT_SOURCES = ebutils.h +INCLUDES = -I$(top_srcdir) @INTLINCS@ @ICONVINCS@ +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libebutils/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libebutils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libebutils.a: $(libebutils_a_OBJECTS) $(libebutils_a_DEPENDENCIES) + -rm -f libebutils.a + $(libebutils_a_AR) libebutils.a $(libebutils_a_OBJECTS) $(libebutils_a_LIBADD) + $(RANLIB) libebutils.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebutils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getumask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makedir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/puts_eucjp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/samefile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +ebutils.h: stamp-ebutils-h +stamp-ebutils-h: ebutils.h.in Makefile + rm -f ebutils.h.tmp + echo '/* automatically generated from ebutils.h.in. */' \ + > ebutils.h.tmp + sed -e 's;\@localedir\@;$(localedir);' \ + $(srcdir)/ebutils.h.in >> ebutils.h.tmp + $(top_srcdir)/move-if-change ebutils.h.tmp ebutils.h + @echo timestamp > stamp-ebutils-h +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/libebutils/ebutils.c b/lib/ebu/libebutils/ebutils.c new file mode 100644 index 0000000..ccea17a --- /dev/null +++ b/lib/ebu/libebutils/ebutils.c @@ -0,0 +1,353 @@ +/* -*- C -*- + * Copyright (c) 1997-2006 Motoyuki Kasahara + * Copyright (c) 2008-2013 Kazuhiro Ito + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#ifdef ENABLE_NLS +#ifdef HAVE_LOCALE_H +#include +#endif +#include +#endif + +#ifndef HAVE_STRCASECMP +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); +#endif + +/* + * The maximum length of path name. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +#include "ebu/eb.h" +#include "ebu/error.h" +#include "ebutils.h" + +/* + * Test whether `off_t' represents a large integer. + */ +#define off_t_is_large \ + ((((off_t) 1 << 41) + ((off_t) 1 << 40) + 1) % 9999991 == 7852006) + +/* + * Tricks for gettext. + */ +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define _(string) (string) +#define N_(string) (string) +#endif + +/* + * Character type tests and conversions. + */ +#define ASCII_ISDIGIT(c) ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c) || ASCII_ISDIGIT(c)) +#define ASCII_ISXDIGIT(c) \ + (ASCII_ISDIGIT(c) || ('A' <= (c) && (c) <= 'F') || ('a' <= (c) && (c) <= 'f')) +#define ASCII_TOUPPER(c) (('a' <= (c) && (c) <= 'z') ? (c) - 0x20 : (c)) +#define ASCII_TOLOWER(c) (('A' <= (c) && (c) <= 'Z') ? (c) + 0x20 : (c)) + +#if defined(DOS_FILE_PATH) && defined(HAVE_MBSTRING_H) +/* path may contain double-byte chars in SJIS. */ +#include +#define strchr _mbschr +#define strrchr _mbsrchr +#endif + +/* + * Output ``try ...'' message to standard error. + */ +void +output_try_help(const char *invoked_name) +{ + fprintf(stderr, _("try `%s --help' for more information\n"), invoked_name); + fflush(stderr); +} + + +/* + * Output version number to stdandard out. + */ +void +output_version(const char *program_name, const char *program_version) +{ + int tmp = 0; + + printf("%s (EB Library with UTF-8 support) version %s\n", program_name, program_version); + printf("Features:"); + if off_t_is_large { + printf(" LARGEFILE"); + tmp = 1; + } +#ifdef ENABLE_PTHREAD + if (tmp) + printf(", "); + else + printf(" "); + printf("PTHREAD"); + tmp = 1; +#endif +#ifdef ENABLE_EBNET + if (tmp) + printf(", "); + else + printf(" "); + printf("EBNET"); + tmp = 1; +#endif +#ifdef ENABLE_IPV6 + if (tmp) + printf(", "); + else + printf(" "); + printf("IPV6"); + tmp = 1; +#endif +#ifdef ENABLE_WINSOCK2 + if (tmp) + printf(", "); + else + printf(" "); + printf("WINSOCK2"); + tmp = 1; +#endif +#ifdef ENABLE_NLS + if (tmp) + printf(", "); + else + printf(" "); + printf("NLS"); + tmp = 1; +#endif +#ifdef ENABLE_LIBDEFLATE + if (tmp) + printf(", "); + else + printf(" "); + printf("LIBDEFLATE"); + tmp = 1; +#endif + printf("\n"); + printf("Copyright (c) 1997-2006 Motoyuki Kasahara\n"); + printf("Copyright (c) 2008-2019 Kazuhiro Ito\n"); + fflush(stdout); +} + + +/* + * Parse an argument to option `--subbook (-S)'. + * If the argument is valid form, 0 is returned. + * Otherwise -1 is returned. + */ +int +parse_subbook_name_argument(const char *invoked_name, const char *argument, + char name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], int *name_count) +{ + const char *argument_p = argument; + char name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + char *name_p; + int i; + + while (*argument_p != '\0') { + /* + * Check current `name_count'. + */ + if (EB_MAX_SUBBOOKS <= *name_count) { + fprintf(stderr, _("%s: too many subbooks\n"), invoked_name); + fflush(stderr); + return -1; + } + + /* + * Take a next element in the argument. + */ + i = 0; + name_p = name; + while (*argument_p != ',' && *argument_p != '\0' + && i < EB_MAX_DIRECTORY_NAME_LENGTH) { + *name_p = ASCII_TOLOWER(*argument_p); + i++; + name_p++; + argument_p++; + } + *name_p = '\0'; + if (*argument_p == ',') + argument_p++; + else if (*argument_p != '\0') { + fprintf(stderr, _("%s: invalid subbook name `%s...'\n"), + invoked_name, name); + fflush(stderr); + return -1; + } + + /* + * If the subbook name is not found in the subbook name list, + * it is added to the list. + */ + for (i = 0; i < *name_count; i++) { + if (strcmp(name, name_list[i]) == 0) + break; + } + if (*name_count <= i) { + strcpy(name_list[i], name); + (*name_count)++; + } + } + + return 0; +} + + +/* + * Find a subbook-code of the subbook whose directory name is `directory'. + * When no sub-book is matched', EB_ERR_NO_SUCH_SUB is returned. + */ +EB_Subbook_Code +find_subbook(EB_Book *book, const char *directory, + EB_Subbook_Code *subbook_code) +{ + EB_Error_Code error_code; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + char directory2[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; + int subbook_count; + int i; + + /* + * Find the subbook in the current book. + */ + error_code = eb_subbook_list(book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + *subbook_code = EB_SUBBOOK_INVALID; + return EB_ERR_NO_SUCH_SUB; + } + for (i = 0; i < subbook_count; i++) { + error_code = eb_subbook_directory2(book, subbook_list[i], directory2); + if (error_code != EB_SUCCESS) + continue; + if (strcasecmp(directory, directory2) == 0) { + *subbook_code = subbook_list[i]; + return EB_SUCCESS; + } + } + + *subbook_code = EB_SUBBOOK_INVALID; + return EB_ERR_NO_SUCH_SUB; +} + + +#ifndef DOS_FILE_PATH + +/* + * Canonicalize `path' (UNIX version). + * It eliminaes `/' at the tail of `path' unless `path' is not "/". + */ +void +canonicalize_path(char *path) +{ + char *last_slash; + + last_slash = strrchr(path, '/'); + if (last_slash == NULL || *(last_slash + 1) != '\0') + return; + + if (last_slash != path) + *last_slash = '\0'; +} + +#else /* DOS_FILE_PATH */ + +/* + * Canonicalize `path' (DOS version). + * It eliminaes `\' at the tail of `path' unless `path' is not "X:\". + */ +void +canonicalize_path(char *path) +{ + char *slash; + char *last_backslash; + + /* + * Replace `/' with `\\'. + */ + slash = path; + for (;;) { + slash = strchr(slash, '/'); + if (slash == NULL) + break; + *slash++ = '\\'; + } + + last_backslash = strrchr(path, '\\'); + if (last_backslash == NULL || *(last_backslash + 1) != '\0') + return; + + /* + * Eliminate `\' in the tail of the path. + */ + if (ASCII_ISALPHA(*path) && *(path + 1) == ':') { + if (last_backslash != path + 2) + *last_backslash = '\0'; + } else if (*path == '\\' && *(path + 1) == '\\') { + if (last_backslash != path + 1) + *last_backslash = '\0'; + } else if (*path == '\\') { + if (last_backslash != path) + *last_backslash = '\0'; + } else { + *last_backslash = '\0'; + } +} + +#endif /* DOS_FILE_PATH */ + diff --git a/lib/ebu/libebutils/ebutils.h b/lib/ebu/libebutils/ebutils.h new file mode 100644 index 0000000..4ad40ac --- /dev/null +++ b/lib/ebu/libebutils/ebutils.h @@ -0,0 +1,69 @@ +/* automatically generated from ebutils.h.in. */ +/* -*- C -*- + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EBUTILS_H +#define EBUTILS_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "ebu/eb.h" + +/* + * Text domain name for message catalog. + */ +#define TEXT_DOMAIN_NAME "ebuutils" + +/* + * Path to the locale directory. + */ +#ifndef WIN32 +#define LOCALEDIR "/usr/local/share/locale" +#else +#define LOCALEDIR localedir() +#endif + +/* + * Function declarations. + */ +/* ebutils.c */ +void output_try_help(const char *invoked_name); +void output_version(const char *program_name, const char *program_version); +int parse_subbook_name_argument(const char *invoked_name, const char *argument, + char name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], int *name_count); +EB_Subbook_Code find_subbook(EB_Book *book, const char *directory, + EB_Subbook_Code *subbook_code); +void canonicalize_path(char *path); + +/* puts_eucjp.c */ +int fputs_eucjp_to_locale(const char *string, FILE *stream); +int puts_eucjp_to_locale(const char *string); + +#endif /* not EBUTILS_H */ diff --git a/lib/ebu/libebutils/ebutils.h.in b/lib/ebu/libebutils/ebutils.h.in new file mode 100644 index 0000000..9bb8d93 --- /dev/null +++ b/lib/ebu/libebutils/ebutils.h.in @@ -0,0 +1,68 @@ +/* -*- C -*- + * Copyright (c) 2000-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef EBUTILS_H +#define EBUTILS_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "ebu/eb.h" + +/* + * Text domain name for message catalog. + */ +#define TEXT_DOMAIN_NAME "ebuutils" + +/* + * Path to the locale directory. + */ +#ifndef WIN32 +#define LOCALEDIR "@localedir@" +#else +#define LOCALEDIR localedir() +#endif + +/* + * Function declarations. + */ +/* ebutils.c */ +void output_try_help(const char *invoked_name); +void output_version(const char *program_name, const char *program_version); +int parse_subbook_name_argument(const char *invoked_name, const char *argument, + char name_list[][EB_MAX_DIRECTORY_NAME_LENGTH + 1], int *name_count); +EB_Subbook_Code find_subbook(EB_Book *book, const char *directory, + EB_Subbook_Code *subbook_code); +void canonicalize_path(char *path); + +/* puts_eucjp.c */ +int fputs_eucjp_to_locale(const char *string, FILE *stream); +int puts_eucjp_to_locale(const char *string); + +#endif /* not EBUTILS_H */ diff --git a/lib/ebu/libebutils/getopt.c b/lib/ebu/libebutils/getopt.c new file mode 100644 index 0000000..785574a --- /dev/null +++ b/lib/ebu/libebutils/getopt.c @@ -0,0 +1,480 @@ +/* $NetBSD: getopt_long.c,v 1.11.2.1 2001/10/08 20:21:09 nathanw Exp $ */ + +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#include +#endif + +#ifdef ENABLE_NLS +#define _(string) gettext(string) +#ifdef gettext_noop +#define N_(string) gettext_noop(string) +#else +#define N_(string) (string) +#endif +#else +#define gettext(string) (string) +#define _(string) (string) +#define N_(string) (string) +#endif + +#include + +#ifdef REPLACE_GETOPT +int opterr = 1; /* if error message should be printed */ +int optind = 1; /* index into parent argv vector */ +int optopt = '?'; /* character checked for validity */ +char *optarg; /* argument associated with option */ +#endif + +#define IGNORE_FIRST (*options == '-' || *options == '+') +#define PRINT_ERROR ((opterr) && ((*options != ':') \ + || (IGNORE_FIRST && options[1] != ':'))) +#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) +/* XXX: GNU ignores PC if *options == '-' */ +#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') + +/* return values */ +#define BADCH (int)'?' +#define BADARG ((IGNORE_FIRST && options[1] == ':') \ + || (*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +#define EMSG "" + +extern char *getenv(); + +static int getopt_internal(int nargc, char * const *nargv, + const char *options); +static int gcd(int a, int b); +static void permute_args(int nonopt_start, int nonopt_end, int opt_end, + char * const *nargv); + +static char *place = EMSG; /* option letter processing */ + +static int nonopt_start = -1; /* first non option argument (for permute) */ +static int nonopt_end = -1; /* first option after non options (for permute) */ + +/* Error messages */ +static const char *recargchar + = N_("%s: option requires an argument -- %c\n"); +static const char *recargstring + = N_("%s: option `%.*s' requires an argument\n"); +static const char *ambig + = N_("%s: option `--%.*s' is ambiguous\n"); +static const char *noarg + = N_("%s: option `--%.*s' doesn't allow an argument\n"); +static const char *illopt + = N_("%s: illegal option -- %c\n"); +static const char *invopt + = N_("%s: invalid option -- %c\n"); +static const char *unrec + = N_("%s: unrecognized option `--%.*s'\n"); + + +/* + * Compute the greatest common divisor of a and b. + */ +static int +gcd(int a, int b) +{ + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return b; +} + +/* + * Exchange the block from nonopt_start to nonopt_end with the block + * from nonopt_end to opt_end (keeping the same order of arguments + * in each block). + */ +static void +permute_args(int nonopt_start, int nonopt_end, int opt_end, + char * const *nargv) +{ + int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; + char *swap; + + /* + * compute lengths of blocks and number and size of cycles + */ + nnonopts = nonopt_end - nonopt_start; + nopts = opt_end - nonopt_end; + ncycle = gcd(nnonopts, nopts); + cyclelen = (opt_end - nonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = nonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= nonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + /* LINTED const cast */ + ((char **) nargv)[pos] = nargv[cstart]; + /* LINTED const cast */ + ((char **)nargv)[cstart] = swap; + } + } +} + +/* + * getopt_internal -- + * Parse argc/argv argument vector. Called by user level routines. + * Returns -2 if -- is found (can be long option or end of options marker). + */ +static int +getopt_internal(int nargc, char * const *nargv, const char *options) +{ + char *oli; /* option letter list index */ + int optchar; + + optarg = NULL; + + /* + * XXX Some programs (like rsyncd) expect to be able to + * XXX re-initialize optind to 0 and have getopt_long(3) + * XXX properly function again. Work around this braindamage. + */ + if (optind == 0) + optind = 1; + +start: + if (!*place) { /* update scanning pointer */ + if (optind >= nargc) { /* end of argument vector */ + place = EMSG; + if (nonopt_end != -1) { + /* do permutation, if we have to */ + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + /* + * If we skipped non-options, set optind + * to the first of them. + */ + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((*(place = nargv[optind]) != '-') + || (place[1] == '\0')) { /* found non-option */ + place = EMSG; + if (IN_ORDER) { + /* + * GNU extension: + * return non-option as argument to option 1 + */ + optarg = nargv[optind++]; + return INORDER; + } + if (!PERMUTE) { + /* + * if no permutation wanted, stop parsing + * at first non-option + */ + return -1; + } + /* do permutation */ + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + /* process next argument */ + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + if (place[1] && *++place == '-') { /* found "--" */ + place++; + return -2; + } + } + if ((optchar = (int)*place++) == (int)':' || + (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) { + /* option letter unknown or ':' */ + if (!*place) + ++optind; + if (PRINT_ERROR) { + if (IS_POSIXLY_CORRECT) + fprintf(stderr, gettext(illopt), nargv[0], + optchar); + else + fprintf(stderr, gettext(invopt), nargv[0], + optchar); + } + optopt = optchar; + return BADCH; + } + if (optchar == 'W' && oli[1] == ';') { /* -W long-option */ + /* XXX: what if no long options provided (called by getopt)? */ + if (*place) + return -2; + + if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + fprintf(stderr, gettext(recargchar), nargv[0], + optchar); + optopt = optchar; + return BADARG; + } else /* white space */ + place = nargv[optind]; + /* + * Handle -W arg the same as --arg (which causes getopt to + * stop parsing). + */ + return -2; + } + if (*++oli != ':') { /* doesn't take argument */ + if (!*place) + ++optind; + } else { /* takes (optional) argument */ + optarg = NULL; + if (*place) /* no white space */ + optarg = place; + /* XXX: disable test for :: if PC? (GNU doesn't) */ + else if (oli[1] != ':') { /* arg not optional */ + if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + fprintf(stderr, gettext(recargchar), + nargv[0], optchar); + optopt = optchar; + return BADARG; + } else + optarg = nargv[optind]; + } + place = EMSG; + ++optind; + } + /* dump back option letter */ + return optchar; +} + +#ifdef REPLACE_GETOPT +/* + * getopt -- + * Parse argc/argv argument vector. + * + * [eventually this will replace the real getopt] + */ +int +getopt(int nargc, char * const *nargv, const char *options) +{ + int retval; + + if ((retval = getopt_internal(nargc, nargv, options)) == -2) { + ++optind; + /* + * We found an option (--), so if we skipped non-options, + * we have to permute. + */ + if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, optind, + nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + retval = -1; + } + return retval; +} +#endif + +/* + * getopt_long -- + * Parse argc/argv argument vector. + */ +int +getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) +{ + int retval; + + if ((retval = getopt_internal(nargc, nargv, options)) == -2) { + char *current_argv, *has_equal; + size_t current_argv_len; + int i, match; + + current_argv = place; + match = -1; + + optind++; + place = EMSG; + + if (*current_argv == '\0') { /* found "--" */ + /* + * We found an option (--), so if we skipped + * non-options, we have to permute. + */ + if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((has_equal = strchr(current_argv, '=')) != NULL) { + /* argument found (--option=arg) */ + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + /* find matching long option */ + if (strncmp(current_argv, long_options[i].name, + current_argv_len)) + continue; + + if (strlen(long_options[i].name) == + (unsigned)current_argv_len) { + /* exact match */ + match = i; + break; + } + if (match == -1) /* partial match */ + match = i; + else { + /* ambiguous abbreviation */ + if (PRINT_ERROR) + fprintf(stderr, gettext(ambig), + nargv[0], (int)current_argv_len, + current_argv); + optopt = 0; + return BADCH; + } + } + if (match != -1) { /* option found */ + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) + fprintf(stderr, + gettext(noarg), nargv[0], + strlen(long_options[match].name), + long_options[match].name); + /* + * XXX: GNU sets optopt to val regardless of + * flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + return BADARG; + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + /* + * optional argument doesn't use + * next nargv + */ + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + /* + * Missing argument; leading ':' + * indicates no error should be generated + */ + if (PRINT_ERROR) + fprintf(stderr, gettext(recargstring), + nargv[0], (int)current_argv_len, + current_argv); + /* + * XXX: GNU sets optopt to val regardless + * of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return BADARG; + } + } else { /* unknown option */ + if (PRINT_ERROR) + fprintf(stderr, gettext(unrec), nargv[0], + (int)current_argv_len,current_argv); + optopt = 0; + return BADCH; + } + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + retval = 0; + } else + retval = long_options[match].val; + if (idx) + *idx = match; + } + return retval; +} diff --git a/lib/ebu/libebutils/getopt.h b/lib/ebu/libebutils/getopt.h new file mode 100644 index 0000000..688fb93 --- /dev/null +++ b/lib/ebu/libebutils/getopt.h @@ -0,0 +1,85 @@ +/* $NetBSD: getopt.h,v 1.3 2000/04/02 22:03:29 christos Exp $ */ + +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#ifndef GETOPT_H +#define GETOPT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* + * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions + */ +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +extern int opterr; +extern int optind; +extern int optopt; +extern char *optarg; + +struct option { + /* name of long option */ + const char *name; + /* + * one of no_argument, required_argument, and optional_argument: + * whether option takes an argument + */ + int has_arg; + /* if not NULL, set *flag to val when option found */ + int *flag; + /* if flag not NULL, value to set *flag to; else return value */ + int val; +}; + +int getopt_long (int, char * const *, const char *, + const struct option *, int *); + +#ifdef __cplusplus +} +#endif + +#endif /* !_GETOPT_H_ */ diff --git a/lib/ebu/libebutils/getopt_long.pl b/lib/ebu/libebutils/getopt_long.pl new file mode 100644 index 0000000..270012b --- /dev/null +++ b/lib/ebu/libebutils/getopt_long.pl @@ -0,0 +1,362 @@ +# -*- Perl -*- +# Copyright (c) 1997-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + +# +# This program is a Perl package running on Perl 4.036 or later. +# The package provides routines to process command line options like +# as GNU getopt_long(). +# +# Version: +# 2.0 +# +# Interface: +# +# &getopt_initialize(LIST) +# Set a list of command line options and initialize internal data +# for &getopt_long. +# You must call the routine before calling &getopt_long. +# Format of each element in the LIST is: +# +# `CANONICAL-OPTION-NAME [ALIAS-OPTION-NAME...] ARGUMENT-FLAG' +# +# CANONICAL-OPTION-NAME, ALIAS-OPTION-NAME and ARGUMENT-FLAG fields +# are separated by spaces or tabs. +# +# CANONICAL-OPTION-NAME and ALIAS-OPTION-NAME must be either a single +# character option including preceding `-' (e.g. `-v'), or a long +# name option including preceding `--' (e.g. `--version'). Whether +# CANONICAL-OPTION-NAME is single character option or long name +# option is not significant. +# +# ARGUMENT-FLAG must be `no-argument', `required-argument' or +# `optional-argument'. If it is set to `required-argument', the +# option always takes an argument. If set to `optional-argument', +# an argument to the option is optional. +# +# You can put a special element `+' or `-' at the first element in +# LIST. See `Details about Option Processing:' for details. +# If succeeded to initialize, 1 is returned. Otherwise 0 is +# returned. +# +# &getopt_long +# Get a option name, and if exists, its argument of the leftmost +# option in @ARGV. +# +# An option name and its argument are returned as a list with two +# elements; the first element is CANONICAL-OPTION-NAME of the option, +# and second is its argument. +# Upon return, the option and its argument are removed from @ARGV. +# When you have already got all options in @ARGV, an empty list is +# returned. In this case, only non-option elements are left in +# @ARGV. +# +# When an error occurs, an error message is output to standard +# error, and the option name in a returned list is set to `?'. +# +# Example: +# +# &getopt_intialize('--help -h no-argument', '--version -v no-argument') +# || die; +# +# while (($name, $arg) = &getopt_long) { +# die "For help, type \`$0 --help\'\n" if ($name eq '?'); +# $opts{$name} = $arg; +# } +# +# Details about Option Processing: +# +# * There are three processing modes: +# 1. PERMUTE +# It permutes the contents of ARGV as it scans, so that all the +# non-option ARGV-elements are at the end. This mode is default. +# 2. REQUIRE_ORDER +# It stops option processing when the first non-option is seen. +# This mode is chosen if the environment variable POSIXLY_CORRECT +# is defined, or the first element in the option list is `+'. +# 3. RETURN_IN_ORDER +# It describes each non-option ARGV-element as if it were the +# argument of an option with an empty name. +# This mode is chosen if the first element in the option list is +# `-'. +# +# * An argument starting with `-' and not exactly `-', is a single +# character option. +# If the option takes an argument, it must be specified at just +# behind the option name (e.g. `-f/tmp/file'), or at the next +# ARGV-element of the option name (e.g. `-f /tmp/file'). +# If the option doesn't have an argument, other single character +# options can be followed within an ARGV-element. For example, +# `-l -g -d' is identical to `-lgd'. +# +# * An argument starting with `--' and not exactly `--', is a long +# name option. +# If the option has an argument, it can be specified at behind the +# option name preceded by `=' (e.g. `--option=argument'), or at the +# next ARGV-element of the option name (e.g. `--option argument'). +# Long name options can be abbreviated as long as the abbreviation +# is unique. +# +# * The special argument `--' forces an end of option processing. +# + +{ + package getopt_long; + + $initflag = 0; + $REQUIRE_ORDER = 0; + $PERMUTE = 1; + $RETURN_IN_ORDER = 2; +} + + +# +# Initialize the internal data. +# +sub getopt_initialize { + local(@fields); + local($name, $flag, $canon); + local($_); + + # + # Determine odering. + # + if ($_[$[] eq '+') { + $getopt_long'ordering = $getopt_long'REQUIRE_ORDER; + shift(@_); + } elsif ($_[$[] eq '-') { + $getopt_long'ordering = $getopt_long'RETURN_IN_ORDER; + shift(@_); + } elsif (defined($ENV{'POSIXLY_CORRECT'})) { + $getopt_long'ordering = $getopt_long'REQUIRE_ORDER; + } else { + $getopt_long'ordering = $getopt_long'PERMUTE; + } + + # + # Parse an option list. + # + %getopt_long'optnames = (); + %getopt_long'argflags = (); + + foreach (@_) { + @fields = split(/[ \t]+/, $_); + if (@fields < 2) { + warn "$0: (getopt_initialize) too few fields \`$arg\'\n"; + return 0; + } + $flag = pop(@fields); + if ($flag ne 'no-argument' && $flag ne 'required-argument' + && $flag ne 'optional-argument') { + warn "$0: (getopt_initialize) invalid argument flag \`$flag\'\n"; + return 0; + } + + $canon = ''; + foreach $name (@fields) { + if ($name !~ /^-([^-]|-.+)$/) { + warn "$0: (getopt_initialize) invalid option name \`$name\'\n"; + return 0; + } elsif (defined($getopt_long'optnames{$name})) { + warn "$0: (getopt_initialize) redefined option \`$name\'\n"; + return 0; + } + $canon = $name if ($canon eq ''); + $getopt_long'optnames{$name} = $canon; + $getopt_long'argflags{$name} = $flag; + } + } + + $getopt_long'endflag = 0; + $getopt_long'shortrest = ''; + @getopt_long'nonopts = (); + + $getopt_long'initflag = 1; +} + + +# +# When it comes to the end of options, restore PERMUTEd non-option +# arguments to @ARGV. +# +sub getopt_end { + $getopt_long'endflag = 1; + unshift(@ARGV, @getopt_long'nonopts); +} + + +# +# Scan elements of @ARGV for getting an option. +# +sub getopt_long { + local($name, $arg) = ('', 1); + local($patt, $key, $ambig, $ch); + local($_); + + &getopt_initialize(@_) if (!$getopt_long'initflag); + return () if ($getopt_long'endflag); + + # + # Take the next argument from @ARGV. + # + if ($getopt_long'shortrest ne '') { + $_ = '-'.$getopt_long'shortrest; + } elsif (@ARGV == 0) { + &getopt_end; + return (); + } elsif ($getopt_long'ordering == $getopt_long'REQUIRE_ORDER) { + $_ = shift(@ARGV); + if (!/^-./) { + push(@getopt_long'nonopts, $_); + &getopt_end; + return (); + } + } elsif ($getopt_long'ordering == $getopt_long'PERMUTE) { + for (;;) { + if (@ARGV == 0) { + &getopt_end; + return (); + } + $_ = shift(@ARGV); + last if (/^-./); + push(@getopt_long'nonopts, $_); + } + } else { # RETURN_IN_ORDER + $_ = shift(@ARGV); + } + + # + # Check for the special option `--'. + # + if ($_ eq '--' && $getopt_long'shortrest eq '') { + # + # `--' indicates the end of the option list. + # + &getopt_end; + return (); + } + + # + # Check for long and short options. + # + if (/^(--[^=]+)/ && $getopt_long'shortrest eq '') { + # + # Long style option, which start with `--'. + # Abbreviations for option names are allowed as long as + # they are unique. + # + $patt = $1; + if (defined($getopt_long'optnames{$patt})) { + $name = $patt; + } else { + $ambig = 0; + foreach $key (keys(%getopt_long'optnames)) { + if (index($key, $patt) == 0) { + if ($name eq '') { + $name = $key; + } else { + $ambig = 1; + } + } + } + if ($ambig) { + warn "$0: option \`$_\' is ambiguous\n"; + return ('?', ''); + } + if ($name eq '') { + warn "$0: unrecognized option \`$_\'\n"; + return ('?', ''); + } + } + + if ($getopt_long'argflags{$name} eq 'required-argument') { + if (/=(.*)$/) { + $arg = $1; + } elsif (0 < @ARGV) { + $arg = shift(@ARGV); + } else { + warn "$0: option \`$_\' requires an argument\n"; + return ('?', ''); + } + } elsif ($getopt_long'argflags{$name} eq 'optional-argument') { + if (/=(.*)$/) { + $arg = $1; + } elsif (0 < @ARGV && $ARGV[$[] !~ /^-./) { + $arg = shift(@ARGV); + } else { + $arg = ''; + } + } elsif (/=(.*)$/) { + warn "$0: option \`$name\' doesn't allow an argument\n"; + return ('?', ''); + } + } elsif (/^(-(.))(.*)/) { + # + # Short style option, which start with `-' (not `--'). + # + ($name, $ch, $getopt_long'shortrest) = ($1, $2, $3); + + if (defined($getopt_long'optnames{$name})) { + if ($getopt_long'argflags{$name} eq 'required-argument') { + if ($getopt_long'shortrest ne '') { + $arg = $getopt_long'shortrest; + $getopt_long'shortrest = ''; + } elsif (0 < @ARGV) { + $arg = shift(@ARGV); + } else { + # 1003.2 specifies the format of this message. + warn "$0: option requires an argument -- $ch\n"; + return ('?', ''); + } + } elsif ($getopt_long'argflags{$name} eq 'optional-argument') { + if ($getopt_long'shortrest ne '') { + $arg = $getopt_long'shortrest; + $getopt_long'shortrest = ''; + } elsif (0 < @ARGV && $ARGV[$[] !~ /^-./) { + $arg = shift(@ARGV); + } else { + $arg = ''; + } + } + } elsif (defined($ENV{'POSIXLY_CORRECT'})) { + # 1003.2 specifies the format of this message. + warn "$0: illegal option -- $ch\n"; + return ('?', ''); + } else { + warn "$0: invalid option -- $ch\n"; + return ('?', ''); + } + } else { + # + # Only RETURN_IN_ORDER falled into here. + # + $arg = $_; + } + + return ($getopt_long'optnames{$name}, $arg); +} + +1; diff --git a/lib/ebu/libebutils/getumask.c b/lib/ebu/libebutils/getumask.c new file mode 100644 index 0000000..45e95a7 --- /dev/null +++ b/lib/ebu/libebutils/getumask.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * This program requires the following Autoconf macros: + * AC_TYPE_MODE_T + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +/* + * Get the current umask. + */ +mode_t +get_umask(void) +{ + mode_t current_umask; + + current_umask = umask((mode_t)022); + umask(current_umask); + + return current_umask; +} diff --git a/lib/ebu/libebutils/getumask.h b/lib/ebu/libebutils/getumask.h new file mode 100644 index 0000000..1f3d013 --- /dev/null +++ b/lib/ebu/libebutils/getumask.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef GETUMASK_H +#define GETUMASK_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* + * Function declarations. + */ +mode_t get_umask(void); + +#endif /* not GETUMASK_H */ diff --git a/lib/ebu/libebutils/libebutils.a b/lib/ebu/libebutils/libebutils.a new file mode 100644 index 0000000..55a8abb Binary files /dev/null and b/lib/ebu/libebutils/libebutils.a differ diff --git a/lib/ebu/libebutils/makedir.c b/lib/ebu/libebutils/makedir.c new file mode 100644 index 0000000..84dd0e4 --- /dev/null +++ b/lib/ebu/libebutils/makedir.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * This program requires the following Autoconf macros: + * AC_TYPE_MODE_T + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#ifdef HAVE_DIRECT_H +#include +#endif + +#ifndef S_ISREG +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +/* + * Make a directory if the directory doesn't exist. + * + * If making the directory is succeeded or the directory has already + * created, 0 is returned. Otherwise -1 is returned. + */ +int +make_missing_directory(const char *path, mode_t mode) +{ + struct stat status; + + if (stat(path, &status) == 0 && S_ISDIR(status.st_mode)) + return 0; + +#if (!defined(WIN32) && !defined(WIN64)) + if (mkdir(path, mode) < 0) + return -1; +#else + if (mkdir(path) < 0) + return -1; +#endif + + return 0; +} diff --git a/lib/ebu/libebutils/makedir.h b/lib/ebu/libebutils/makedir.h new file mode 100644 index 0000000..8eb3a15 --- /dev/null +++ b/lib/ebu/libebutils/makedir.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef MAKEDIR_H +#define MAKEDIR_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* + * Function declarations. + */ +int make_missing_directory(const char *, mode_t); + +#endif /* not MAKEDIR_H */ diff --git a/lib/ebu/libebutils/puts_eucjp.c b/lib/ebu/libebutils/puts_eucjp.c new file mode 100644 index 0000000..eab6b0e --- /dev/null +++ b/lib/ebu/libebutils/puts_eucjp.c @@ -0,0 +1,155 @@ +/* -*- C -*- + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +#ifdef HAVE_ICONV_H +#include +#endif + +#if defined(HAVE_LIBCHARSET_H) +#include +#elif defined(HAVE_LANGINFO_H) +#include +#endif + +/* + * Convert `string' from EUC-JP to the current locale encoding, and + * then write it to `stream'. + */ +int +fputs_eucjp_to_locale(const char *string, FILE *stream) +{ +#if defined(HAVE_ICONV_OPEN) || defined(HAVE_LIBICONV_OPEN) + size_t string_length; + const char *locale_encoding; + char *buffer = NULL; + size_t buffer_size; + iconv_t cd = (iconv_t)-1; + const char *in_p; + char *out_p; + size_t in_left; + size_t out_left; + int fputs_result; + + string_length = strlen(string); + +#if defined(HAVE_LOCALE_CHARSET) + locale_encoding = locale_charset(); +#elif defined(HAVE_NL_LANGINFO) && defined(CODESET) + locale_encoding = nl_langinfo(CODESET); +#else + locale_encoding = NULL; +#endif + if (locale_encoding == NULL) + goto failed; + cd = iconv_open(locale_encoding, "eucJP"); + if (cd == (iconv_t)-1) + cd = iconv_open(locale_encoding, "EUC-JP"); + if (cd == (iconv_t)-1) + goto failed; + + buffer_size = (string_length + 1) * 2; + + for (;;) { + buffer = malloc(buffer_size); + if (buffer == NULL) + goto failed; + + in_p = string; + in_left = string_length + 1; + out_p = buffer; + out_left = buffer_size; + + if (iconv(cd, (char **)&in_p, &in_left, &out_p, &out_left) != -1) + break; + if (errno == E2BIG) { + /* + * Reset initial state. + * To avoid a bug of iconv() on Solaris 2.6, we set `in_left', + * `out_p' and `out_left' to non-NULL values. + */ + in_left = 0; + out_p = buffer; + out_left = 0; + iconv(cd, NULL, &in_left, &out_p, &out_left); + + free(buffer); + buffer = NULL; + buffer_size += string_length + 1; + + continue; + } else { + goto failed; + } + } + + iconv_close(cd); + fputs_result = fputs(buffer, stream); + free(buffer); + + return fputs_result; + + /* + * An error occurs... + */ + failed: + if (cd != (iconv_t)-1) + iconv_close(cd); + if (buffer != NULL) + free(buffer); + return fputs(string, stream); + +#else /* not (HAVE_ICONV_OPEN || HAVE_LIBICONV_OPEN) */ + return fputs(string, stream); +#endif /* HAVE_ICONV_OPEN || HAVE_LIBICONV_OPEN */ +} + + +/* + * Convert `string' from EUC-JP to the current locale encoding, and + * then write it and a newline to `stdout'. + */ +int +puts_eucjp_to_locale(const char *string) +{ + if (fputs_eucjp_to_locale(string, stdout) == EOF) + return EOF; + if (fputs_eucjp_to_locale("\n", stdout) == EOF) + return EOF; + + return 0; +} diff --git a/lib/ebu/libebutils/samefile.c b/lib/ebu/libebutils/samefile.c new file mode 100644 index 0000000..c61d449 --- /dev/null +++ b/lib/ebu/libebutils/samefile.c @@ -0,0 +1,67 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +/* + * If the files `file_name1' and `file_name2' are identical (i.e. the are + * written on a same device and a same i-node is assigned to them), 1 is + * returned. Otherwise, 0 is returned. + */ +int +is_same_file(const char *file_name1, const char *file_name2) +{ + struct stat st1, st2; + + if (stat(file_name1, &st1) != 0 || stat(file_name2, &st2) != 0) + return 0; + +#ifndef DOS_FILE_PATH + if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino) + return 0; + +#else /* DOS_FILE_PATH */ + /* Can't rely on st_ino and st_dev, use other fields: */ + if (st1.st_mode != st2.st_mode + || st1.st_uid != st2.st_uid + || st1.st_gid != st2.st_gid + || st1.st_size != st2.st_size + || st1.st_atime != st2.st_atime + || st1.st_mtime != st2.st_mtime + || st1.st_ctime != st2.st_ctime) + return 0; +#endif /* DOS_FILE_PATH */ + + return 1; +} diff --git a/lib/ebu/libebutils/samefile.h b/lib/ebu/libebutils/samefile.h new file mode 100644 index 0000000..5cc6963 --- /dev/null +++ b/lib/ebu/libebutils/samefile.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef SAMEFILE_H +#define SAMEFILE_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* + * Function declarations. + */ +int is_same_file(const char *, const char *); + +#endif /* not SAMEFILE_H */ diff --git a/lib/ebu/libebutils/stamp-ebutils-h b/lib/ebu/libebutils/stamp-ebutils-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/lib/ebu/libebutils/stamp-ebutils-h @@ -0,0 +1 @@ +timestamp diff --git a/lib/ebu/libebutils/strcasecmp.c b/lib/ebu/libebutils/strcasecmp.c new file mode 100644 index 0000000..fc80f62 --- /dev/null +++ b/lib/ebu/libebutils/strcasecmp.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1997-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* + * Compare strings. + * Cases in the strings are insensitive. + */ +int +strcasecmp(const char *string1, const char *string2) +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + int c1, c2; + + while (*string1_p != '\0') { + if ('a' <= *string1_p && *string1_p <= 'z') + c1 = *string1_p - ('a' - 'A'); + else + c1 = *string1_p; + + if ('a' <= *string2_p && *string2_p <= 'z') + c2 = *string2_p - ('a' - 'A'); + else + c2 = *string2_p; + + if (c1 != c2) + return c1 - c2; + + string1_p++; + string2_p++; + } + + return -(*string2_p); +} + + +/* + * Compare strings within `n' characters. + * Cases in the strings are insensitive. + */ +int +strncasecmp(const char *string1, const char *string2, size_t n) +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + size_t i = n; + int c1, c2; + + if (i <= 0) + return 0; + + while (*string1_p != '\0') { + if ('a' <= *string1_p && *string1_p <= 'z') + c1 = *string1_p - ('a' - 'A'); + else + c1 = *string1_p; + + if ('a' <= *string2_p && *string2_p <= 'z') + c2 = *string2_p - ('a' - 'A'); + else + c2 = *string2_p; + + if (c1 != c2) + return c1 - c2; + + string1_p++; + string2_p++; + i--; + if (i <= 0) + return 0; + } + + return -(*string2_p); +} diff --git a/lib/ebu/libebutils/strlist.c b/lib/ebu/libebutils/strlist.c new file mode 100644 index 0000000..cc19b0e --- /dev/null +++ b/lib/ebu/libebutils/strlist.c @@ -0,0 +1,194 @@ +/* -*- C -*- + * Copyright (c) 2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include "strlist.h" + +/* + * Unexported functions. + */ +static String_List_Node * +string_list_find_node(String_List *list, const char *string); + + +/* + * Initialize `list'. + */ +void +string_list_initialize(String_List *list) +{ + list->node_count = 0; + list->head = NULL; + list->tail = NULL; +} + + +/* + * Finalize `list'. + */ +void +string_list_finalize(String_List *list) +{ + string_list_delete_all(list); +} + + +/* + * Add `string' to `list'. + * If `list' has already had `string', it doesn't do anything. + */ +int +string_list_add(String_List *list, const char *string) +{ + String_List_Node *new_node; + + if (string_list_find_node(list, string) != NULL) + return 0; + + new_node = (String_List_Node *)malloc(sizeof(String_List_Node)); + if (new_node == NULL) + return -1; + + new_node->string = (char *)malloc(strlen(string) + 1); + if (new_node->string == NULL) { + free(new_node); + return -1; + } + strcpy(new_node->string, string); + + if (list->node_count == 0) { + new_node->back = NULL; + list->head = new_node; + } else { + new_node->back = list->tail; + list->tail->next = new_node; + } + + new_node->next = NULL; + list->tail = new_node; + list->node_count++; + + return 0; +} + + +/* + * Delete `string' from `list'. + * The function doesn't complain if `list' doesn't have `string'. + */ +void +string_list_delete(String_List *list, const char *string) +{ + String_List_Node *p; + + p = string_list_find_node(list, string); + if (p == NULL) + return; + + if (p->next != NULL) + p->next->back = p->back; + if (p->back != NULL) + p->back->next = p->next; + free(p->string); + free(p); + + list->node_count--; + if (list->node_count == 0) { + list->head = NULL; + list->tail = NULL; + } +} + + +/* + * Delete all strings in `list'. + */ +void +string_list_delete_all(String_List *list) +{ + String_List_Node *p = list->head; + String_List_Node *next_p; + + while (p != NULL) { + next_p = p->next; + free(p->string); + free(p); + p = next_p; + } + + list->node_count = 0; + list->head = NULL; + list->tail = NULL; +} + + +/* + * Return true if `list' has `string'. + */ +int +string_list_find(String_List *list, const char *string) +{ + return (string_list_find_node(list, string) != NULL); +} + + +/* + * Count the number of strings in `list'. + */ +int +string_list_count_node(String_List *list) +{ + return list->node_count; +} + + +/* + * Return a pointer to the node with `string' in `list'. + * Return NULL if `list' doesn't have `string'. + */ +static String_List_Node * +string_list_find_node(String_List *list, const char *string) +{ + String_List_Node *p; + + for (p = list->head; p != NULL; p = p->next) { + if (strcmp(string, p->string) == 0) + return p; + } + + return NULL; +} + + diff --git a/lib/ebu/libebutils/strlist.h b/lib/ebu/libebutils/strlist.h new file mode 100644 index 0000000..48fac94 --- /dev/null +++ b/lib/ebu/libebutils/strlist.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef STRLIST_H +#define STRLIST_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* + * Type definitions. + */ +typedef struct String_List_Struct String_List; +typedef struct String_List_Node_Struct String_List_Node; + +struct String_List_Struct { + int node_count; + String_List_Node *head; + String_List_Node *tail; +}; + + +struct String_List_Node_Struct { + char *string; + String_List_Node *next; + String_List_Node *back; +}; + + +/* + * Function declarations. + */ +void +string_list_initialize(String_List *list); + +void +string_list_finalize(String_List *list); + +int +string_list_add(String_List *list, const char *string); + +void +string_list_delete(String_List *list, const char *string); + +void +string_list_delete_all(String_List *list); + +int +string_list_find(String_List *list, const char *string); + +int +string_list_count_node(String_List *list); + +#endif /* not STRLIST_H */ diff --git a/lib/ebu/libebutils/yesno.c b/lib/ebu/libebutils/yesno.c new file mode 100644 index 0000000..cf41184 --- /dev/null +++ b/lib/ebu/libebutils/yesno.c @@ -0,0 +1,86 @@ +/* -*- C -*- + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#define YESNO_RESPONSE_SIZE 80 + +/* + * Get y/n response to `message'. + * If `y' is selected, 1 is returned. Otherwise 0 is returned. + */ +int +query_y_or_n(const char *message) +{ + char response[YESNO_RESPONSE_SIZE]; + char *head, *tail; + + for (;;) { + /* + * Output `message' to standard error. + */ + fputs(message, stderr); + fflush(stderr); + + /* + * Get a line from standard in. + */ + if (fgets(response, YESNO_RESPONSE_SIZE, stdin) == NULL) + return 0; + if (strchr(response, '\n') == NULL) + continue; + + /* + * Delete spaces and tabs in the beginning and end of the + * line. + */ + for (head = response; *head == ' ' || *head == '\t'; head++) + ; + for (tail = head + strlen(head) - 1; + head <= tail && (*tail == ' ' || *tail == '\t' || *tail == '\n'); + tail--) + *tail = '\0'; + + /* + * Return if the line is `y' or `n'. + */ + if ((*head == 'Y' || *head == 'y') && *(head + 1) == '\0') + return 1; + if ((*head == 'N' || *head == 'n') && *(head + 1) == '\0') + return 0; + } + + /* not reached */ + return 0; +} diff --git a/lib/ebu/libebutils/yesno.h b/lib/ebu/libebutils/yesno.h new file mode 100644 index 0000000..14d12b3 --- /dev/null +++ b/lib/ebu/libebutils/yesno.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +#ifndef YESNO_H +#define YESNO_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* + * Function declarations. + */ +int query_y_or_n(const char *); + +#endif /* not YESNO_H */ diff --git a/lib/ebu/libtool b/lib/ebu/libtool new file mode 100644 index 0000000..7675e1d --- /dev/null +++ b/lib/ebu/libtool @@ -0,0 +1,11648 @@ +#! /bin/bash +# Generated automatically by config.status (ebu) 4.5-20200413 +# Libtool was configured on host sagan-panda: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# The names of the tagged configurations supported by this script. +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: ${LT_SYS_LIBRARY_PATH=""} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=2.4.6 +macro_revision=2.4.6 + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# What type of objects to build. +pic_mode=default + +# Whether or not to optimize for fast installation. +fast_install=needless + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec= + +# Shell to use when invoking shell scripts. +SHELL="/bin/bash" + +# An echo program that protects backslashes. +ECHO="printf %s\\n" + +# The PATH separator for the build system. +PATH_SEPARATOR=":" + +# The host system. +host_alias= +host=x86_64-unknown-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=x86_64-unknown-linux-gnu +build_os=linux-gnu + +# A sed program that does not truncate output. +SED="/usr/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP="/usr/bin/grep" + +# An ERE matcher. +EGREP="/usr/bin/grep -E" + +# A literal string matcher. +FGREP="/usr/bin/grep -F" + +# A BSD- or MS-compatible name lister. +NM="/usr/bin/nm -B" + +# Whether we need soft or hard links. +LN_S="ln -s" + +# What is the maximum length of a command? +max_cmd_len=1572864 + +# Object file suffix (normally "o"). +objext=o + +# Executable file suffix (normally ""). +exeext= + +# whether the shell understands "unset". +lt_unset=unset + +# turn spaces into newlines. +SP2NL="tr \\040 \\012" + +# turn newlines into spaces. +NL2SP="tr \\015\\012 \\040\\040" + +# convert $build file names to $host format. +to_host_file_cmd=func_convert_file_noop + +# convert $build files to toolchain format. +to_tool_file_cmd=func_convert_file_noop + +# An object symbol dumper. +OBJDUMP="objdump" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd="\$MAGIC_CMD" + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob="" + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob="no" + +# DLL creation program. +DLLTOOL="false" + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd="printf %s\\n" + +# The archiver. +AR="ar" + +# Flags to create an archive. +AR_FLAGS="cru" + +# How to feed a file listing to the archiver. +archiver_list_spec="@" + +# A symbol stripping program. +STRIP="strip" + +# Commands used to install an old-style archive. +RANLIB="ranlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" +old_postuninstall_cmds="" + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=no + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2 -fopenmp" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import="" + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address="sed -n -e 's/^: \\(.*\\) .*\$/ {\"\\1\", (void *) 0},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/ {\"\\1\", (void *) \\&\\1},/p'" + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\(.*\\) .*\$/ {\"\\1\", (void *) 0},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(lib.*\\)\$/ {\"\\1\", (void *) \\&\\1},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/ {\"lib\\1\", (void *) \\&\\1},/p'" + +# The name lister interface. +nm_interface="BSD nm" + +# Specify filename containing input files for $NM. +nm_file_list_spec="@" + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot= + +# Command to truncate a binary pipe. +lt_truncate_bin="/usr/bin/dd bs=4096 count=1" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=file + +# Must we lock files when doing compilation? +need_locks="no" + +# Manifest tool. +MANIFEST_TOOL=":" + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL="" + +# Tool to change global to local symbols on Mac OS X. +NMEDIT="" + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO="" + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL="" + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64="" + +# Old archive suffix (normally "a"). +libext=a + +# Shared library suffix (normally ".so"). +shrext_cmds=".so" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Do we need the "lib" prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Library versioning type. +version_type=linux + +# Shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# Shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=yes + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec="\$libname\$release\$shared_ext\$versuffix \$libname\$release\$shared_ext\$major \$libname\$shared_ext" + +# The coded name of the library, if different from the real name. +soname_spec="\$libname\$release\$shared_ext\$major" + +# Permission mode override for installation of shared libraries. +install_override_mode="" + +# Command to use after installation of a shared archive. +postinstall_cmds="" + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval="" + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Compile-time system search path for libraries. +sys_lib_search_path_spec="/usr/lib/gcc/x86_64-linux-gnu/9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib " + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /lib32 /usr/lib32 /libx32 /usr/libx32 " + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path="" + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" + +# A language specific compiler. +CC="gcc" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\$wl--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\$wl--whole-archive\$convenience \$wl--no-whole-archive" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \$wl-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \$wl-soname \$wl\$soname \$wl-version-script \$wl\$output_objdir/\$libname.ver -o \$lib" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="" +module_expsym_cmds="" + +# Whether we are building with GNU ld or not. +with_gnu_ld="yes" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="\$wl-rpath \$wl\$libdir" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting $shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=no + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Commands necessary for finishing linking programs. +postlink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# ### END LIBTOOL CONFIG + + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +#! /bin/sh +## DO NOT EDIT - This file generated from /usr/src/ports/libtool/libtool-2.4.6-6.x86_64/src/libtool-2.4.6/build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.6 +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -fopenacc|-fopenmp|-ftree-parallelize-loops=*|-fcilkplus|-fgnu-tm| \ + -ffast-math|-funsafe-math-optimizations|-fvtable-verify*| \ + -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/lib/ebu/ltmain.sh b/lib/ebu/ltmain.sh new file mode 100644 index 0000000..9b0947d --- /dev/null +++ b/lib/ebu/ltmain.sh @@ -0,0 +1,11150 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from /usr/src/ports/libtool/libtool-2.4.6-6.x86_64/src/libtool-2.4.6/build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.6 +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -fopenacc|-fopenmp|-ftree-parallelize-loops=*|-fcilkplus|-fgnu-tm| \ + -ffast-math|-funsafe-math-optimizations|-fvtable-verify*| \ + -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/lib/ebu/m4/Makefile b/lib/ebu/m4/Makefile new file mode 100644 index 0000000..0659ce4 --- /dev/null +++ b/lib/ebu/m4/Makefile @@ -0,0 +1,414 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# m4/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = m4 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(m4datadir)" +m4dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(m4data_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/m4 +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/m4 +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +m4datadir = $(datadir)/aclocal +m4data_DATA = ebu.m4 +EXTRA_DIST = ebu.m4 gettext.m4 in6addr.m4 sockaddrin6.m4 sockinttypes.m4 \ + lcmessage.m4 libtool.m4 + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu m4/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ + $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(m4datadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-m4dataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-m4dataDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-m4dataDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-m4dataDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/m4/Makefile.am b/lib/ebu/m4/Makefile.am new file mode 100644 index 0000000..88e58cf --- /dev/null +++ b/lib/ebu/m4/Makefile.am @@ -0,0 +1,5 @@ +m4datadir = $(datadir)/aclocal +m4data_DATA = ebu.m4 + +EXTRA_DIST = ebu.m4 gettext.m4 in6addr.m4 sockaddrin6.m4 sockinttypes.m4 \ + lcmessage.m4 libtool.m4 diff --git a/lib/ebu/m4/Makefile.in b/lib/ebu/m4/Makefile.in new file mode 100644 index 0000000..320a94f --- /dev/null +++ b/lib/ebu/m4/Makefile.in @@ -0,0 +1,414 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = m4 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(m4datadir)" +m4dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(m4data_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +m4datadir = $(datadir)/aclocal +m4data_DATA = ebu.m4 +EXTRA_DIST = ebu.m4 gettext.m4 in6addr.m4 sockaddrin6.m4 sockinttypes.m4 \ + lcmessage.m4 libtool.m4 + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu m4/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \ + $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(m4datadir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(m4datadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-m4dataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-m4dataDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-m4dataDATA install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-m4dataDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/m4/ebu.m4 b/lib/ebu/m4/ebu.m4 new file mode 100644 index 0000000..1f11ebc --- /dev/null +++ b/lib/ebu/m4/ebu.m4 @@ -0,0 +1,138 @@ +dnl * +dnl * Make ready to link EB Library with UTF-8 support. +dnl * +dnl * Copyright (c) 2000-2006 Motoyuki Kasahara +dnl * Copyright (c) 2011 Kazuhiro Ito +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +AC_DEFUN([eb_LIB_EBU], +[dnl +dnl * +dnl * --enable-ebu option +dnl * +AC_ARG_ENABLE(ebu, + AC_HELP_STRING([--enable-ebu], [Build with EB Library with UTF-8 support [[auto]]]), + ENABLE_EBU=$enableval, ENABLE_EBU=auto) + +if test $ENABLE_EBU != no; then + dnl * + dnl * Requirements. + dnl * + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + AC_REQUIRE([AC_TYPE_OFF_T]) + AC_REQUIRE([AC_TYPE_SIZE_T]) + + AC_CHECK_HEADERS(limits.h) + AC_CHECK_TYPE(ssize_t, int) + + dnl * + dnl * --with-ebu-conf option. + dnl * + AC_ARG_WITH(ebu-conf, + AC_HELP_STRING([--with-ebu-conf=FILE], + [ebu.conf file is FILE [[SYSCONFDIR/ebu.conf]]]), + [ebuconf="${withval}"], [ebuconf=$sysconfdir/ebu.conf]) + if test X$prefix = XNONE; then + PREFIX=$ac_default_prefix + else + PREFIX=$prefix + fi + ebuconf=`echo X$ebuconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ + -e 's;\$(prefix);'"$PREFIX;g"` + + dnl * + dnl * Read ebu.conf + dnl * + AC_MSG_CHECKING(for ebu.conf) + AC_MSG_RESULT($ebuconf) + if test -f ${ebuconf}; then + . ${ebuconf} + else + if test $ENABLE_EBU = yes; then + AC_MSG_ERROR($ebuconf not found) + else + ENABLE_NLS=no + fi + fi +fi + +if test $ENABLE_EBU != no; then + if test X$EBCONF_ENABLE_PTHREAD = Xyes; then + AC_DEFINE(EBCONF_ENABLE_PTHREAD, 1, + [Define if EB Library supports pthread.]) + fi + if test X$EBCONF_ENABLE_NLS = Xyes; then + AC_DEFINE(EBCONF_ENABLE_NLS, 1, + [Define if EB Library supports native language.]) + fi + if test X$EBCONF_ENABLE_EBNET = Xyes; then + AC_DEFINE(EBCONF_ENABLE_EBNET, 1, + [Define if EB Library supports remote access.]) + fi + + AC_SUBST(EBCONF_EBINCS) + AC_SUBST(EBCONF_EBLIBS) + AC_SUBST(EBCONF_ZLIBINCS) + AC_SUBST(EBCONF_ZLIBLIBS) + AC_SUBST(EBCONF_PTHREAD_CPPFLAGS) + AC_SUBST(EBCONF_PTHREAD_CFLAGS) + AC_SUBST(EBCONF_PTHREAD_LDFLAGS) + AC_SUBST(EBCONF_INTLINCS) + AC_SUBST(EBCONF_INTLLIBS) + + dnl * + dnl * Check for EB Library with UTF-8 support. + dnl * + AC_MSG_CHECKING(for EB Library with UTF-8 support) + save_CPPFLAGS=$CPPFLAGS + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" + CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" + LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" + LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" + AC_TRY_LINK([#include ], + [eb_initialize_library(); return 0;], + try_eb=yes, try_eb=no) + CPPFLAGS=$save_CPPFLAGS + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + AC_MSG_RESULT($try_eb) + if test ${try_eb} != yes; then + if test $ENABLE_EBU = yes; then + AC_MSG_ERROR(EB Library with UTF-8 support not available) + else + ENABLE_EBU=no + fi + else + AC_DEFINE(ENABLE_EBU, 1, [Define if EB library with UTF-8 support is requested]) + fi +fi +]) diff --git a/lib/ebu/m4/gettext.m4 b/lib/ebu/m4/gettext.m4 new file mode 100644 index 0000000..24efdc7 --- /dev/null +++ b/lib/ebu/m4/gettext.m4 @@ -0,0 +1,295 @@ +dnl * +dnl * Copyright (c) 2004-2006 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +AC_DEFUN([eb_GNU_GETTEXT], [dnl + INTLINCS= + INTLDEPS= + INTLLIBS= + + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + + AC_CHECK_HEADERS([locale.h nl_types.h]) + AC_CHECK_FUNCS([setlocale]) + + AM_LC_MESSAGES + + dnl * + dnl * --enable-nls option + dnl * + AC_ARG_ENABLE(nls, + AC_HELP_STRING([--enable-nls], [Native Language Support [[yes]]]), + ENABLE_NLS=$enableval, ENABLE_NLS=auto) + + dnl * + dnl * --with-gettext-includes option + dnl * + AC_ARG_WITH(gettext-includes, + AC_HELP_STRING([--with-gettext-includes=DIR], + [gettext include files are in DIR]), + [gettext_includes="-I${withval}"], [gettext_includes='']) + + dnl * + dnl * --with-gettext-libraries option + dnl * + AC_ARG_WITH(gettext-libraries, + AC_HELP_STRING([--with-gettext-libraries=DIR], + [gettext library files are in DIR]), + [gettext_libraries="-L${withval}"], [gettext_libraries='']) + + dnl * + dnl * --with-iconv-includes option + dnl * + AC_ARG_WITH(iconv-includes, + AC_HELP_STRING([--with-iconv-includes=DIR], + [iconv include files are in DIR]), + [iconv_includes="-I${withval}"], [iconv_includes='']) + + dnl * + dnl * --with-iconv-libraries option + dnl * + AC_ARG_WITH(iconv-libraries, + AC_HELP_STRING([--with-iconv-libraries=DIR], + [iconv library files are in DIR]), + [iconv_libraries="-L${withval}"], [iconv_libraries='']) + + dnl * + dnl * Check iconv(), iconv.h and -liconv. + dnl * + ICONVINCS= + ICONVLIBS= + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$save_CPPFLAGS $iconv_includes" + LIBS="$save_LIBS $iconv_libraries" + AC_CHECK_LIB(iconv, iconv_open, + [ICONVLIBS="$iconv_libraries -liconv"; LIBS="$LIBS -liconv"], + AC_CHECK_LIB(iconv, libiconv_open, + [ICONVLIBS="$iconv_libraries -liconv"; LIBS="$LIBS -liconv"])) + AC_CHECK_FUNCS(iconv_open libiconv_open locale_charset) + AC_CHECK_HEADERS(iconv.h libcharset.h) + if test $ac_cv_func_iconv_open != no; then + ICONVINCS="$iconv_includes" + fi + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + AC_SUBST(ICONVINCS) + AC_SUBST(ICONVLIBS) + + dnl * + dnl * Check gettext(). + dnl * + INTLINCS= + INTLLIBS= + try_nls=no + + AC_MSG_CHECKING([for NLS support]) + + if test $ENABLE_NLS != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + + dnl * + dnl * Test 1: Try to link both libintl and libiconv. + dnl * + CPPFLAGS="$save_CPPFLAGS $gettext_includes" + LIBS="$save_LIBS $gettext_libraries -lintl $iconv_libraries -liconv" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} +])], + try_nls=yes, try_nls=no) + + if test "$try_nls" = yes; then + INTLINCS="$gettext_includes" + INTLLIBS="$gettext_libraries -lintl $iconv_libraries -liconv" + fi + + dnl * + dnl * Test 2: Try to link libintl. + dnl * + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS $gettext_includes" + LIBS="$save_LIBS $gettext_libraries -lintl" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} +])], + try_nls=yes, try_nls=no) + + if test "$try_nls" = yes; then + INTLINCS="$gettext_includes" + INTLLIBS="$gettext_libraries -lintl" + fi + fi + + dnl * + dnl * Test 3: Try to link libiconv. + dnl * + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS $iconv_libraries -liconv" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} +])], + try_nls=yes, try_nls=no) + + if test "$try_nls" = yes; then + INTLINCS= + INTLLIBS="$iconv_libraries -liconv" + fi + fi + + dnl * + dnl * Test 4: Try to link libc only. + dnl * + if test "$try_nls" = no; then + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_NLS +#undef ENABLE_NLS +#endif +#define ENABLE_NLS 1 +#ifdef HAVE_LOCALE_H +#include +#endif +#include + +int +main() +{ +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + bindtextdomain("gttest", ".locale"); + textdomain("gttest"); + gettext("foo"); + return 0; +} +])], + try_nls=yes, try_nls=no) + + if test "$try_nls" = yes; then + INTLINCS= + INTLLIBS= + fi + fi + + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + fi + + if test $ENABLE_NLS = auto; then + ENABLE_NLS=$try_nls + fi + + AC_MSG_RESULT($try_nls) + + if test $ENABLE_NLS = yes; then + if test $try_nls = no; then + AC_MSG_ERROR(gettext not available) + fi + fi + + AC_SUBST(ENABLE_NLS) + AC_SUBST(INTLINCS) + AC_SUBST(INTLLIBS) + localedir='$(datadir)/locale' + AC_SUBST(localedir) + if test $ENABLE_NLS = yes; then + AC_DEFINE(ENABLE_NLS, 1, [Define if NLS is requested]) + fi + + dnl * + dnl * Check msgfmt and xgettext commands. + dnl * + AC_PATH_PROGS(MSGFMT, gmsgfmt msgfmt, :) + AC_PATH_PROGS(XGETTEXT, gxgettext xgettext, :) + MSGMERGE=msgmerge + AC_SUBST(MSGMERGE) +]) diff --git a/lib/ebu/m4/in6addr.m4 b/lib/ebu/m4/in6addr.m4 new file mode 100644 index 0000000..d4170fc --- /dev/null +++ b/lib/ebu/m4/in6addr.m4 @@ -0,0 +1,111 @@ +dnl * +dnl * Copyright (c) 2001-2006 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE +dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +dnl * THE POSSIBILITY OF SUCH DAMAGE. +dnl * + +dnl * +dnl * Check for struct in6_addr +dnl * +AC_DEFUN([AC_STRUCT_IN6_ADDR], +[AC_CACHE_CHECK(for struct in6_addr, ac_cv_struct_in6_addr, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct in6_addr address; +])], [ac_cv_struct_in6_addr=yes], [ac_cv_struct_in6_addr=no])]) +if test "$ac_cv_struct_in6_addr" = yes; then + AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1, +[Define to 1 if defines `struct in6_addr']) +fi]) + +dnl * +dnl * Check for in6addr_any. +dnl * +AC_DEFUN([AC_DECL_IN6ADDR_ANY], +[AC_REQUIRE([AC_STRUCT_IN6_ADDR]) +if test $ac_cv_struct_in6_addr = no; then + ac_cv_decl_in6addr_any=no +else + AC_CACHE_CHECK(for in6addr_any declaration in netinet/in.h or ws2tcpip.h, + ac_cv_decl_in6addr_any, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif + +void +testfunc() +{ + unsigned char *address; + address = (char *)&in6addr_any; +} +])], [ac_cv_decl_in6addr_any=yes], [ac_cv_decl_in6addr_any=no])]) + if test "$ac_cv_decl_in6addr_any" = yes; then + AC_DEFINE(IN6ADDR_ANY_DECLARED, 1, +[Define to 1 if `in6addr_any' is declared by ]) + fi +fi]) + +dnl * +dnl * Check for in6addr_loopback. +dnl * +AC_DEFUN([AC_DECL_IN6ADDR_LOOPBACK], +[AC_REQUIRE([AC_STRUCT_IN6_ADDR]) +if test $ac_cv_struct_in6_addr = no; then + ac_cv_decl_in6addr_loopback=no +else + AC_CACHE_CHECK(for in6addr_loopback declaration in netinet/in.h or ws2tcpip.h, + ac_cv_decl_in6addr_loopback, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif + +int +testfunc() +{ + unsigned char *address; + address = (char *)&in6addr_loopback; +} +])], [ac_cv_decl_in6addr_loopback=yes], [ac_cv_decl_in6addr_loopback=no])]) + if test "$ac_cv_decl_in6addr_loopback" = yes; then + AC_DEFINE(IN6ADDR_LOOPBACK_DECLARED, 1, +[Define to 1 if `in6addr_loopback' is declared by ]) + fi +fi]) diff --git a/lib/ebu/m4/largefile.m4 b/lib/ebu/m4/largefile.m4 new file mode 100644 index 0000000..a0dd034 --- /dev/null +++ b/lib/ebu/m4/largefile.m4 @@ -0,0 +1,63 @@ +dnl * +dnl * Copyright (c) 2009 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +dnl * +dnl * Check for large file support. +dnl * +AC_DEFUN([eb_SYS_LARGEFILE], [dnl +AC_REQUIRE([AC_SYS_LARGEFILE]) +AC_CACHE_CHECK([for ll modifier of printf], ac_cv_func_printf_ll, +[AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include + int main() { + char buffer[[128]]; + sprintf(buffer, "%llx", (unsigned long long) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } +])], [ac_cv_func_printf_ll=yes], [ac_cv_func_printf_ll=no])]) +AC_CACHE_CHECK([for I64 modifier of printf], ac_cv_func_printf_i64, +[AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include + int main() { + char buffer[[128]]; + sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } +])], [ac_cv_func_printf_i64=yes], [ac_cv_func_printf_i64=no])]) +if test "$ac_cv_func_printf_ll" = yes; then + AC_DEFINE(PRINTF_LL_MODIFIER, 1, +[Define to `1' if printf() recognizes "ll" modifier for long long]) +fi +if test "$ac_cv_func_printf_i64" = yes; then + AC_DEFINE(PRINTF_I64_MODIFIER, 1, +[Define to `1' if printf() recognizes "I64" modifier for __int64]) +fi]) diff --git a/lib/ebu/m4/lcmessage.m4 b/lib/ebu/m4/lcmessage.m4 new file mode 100644 index 0000000..9da65fc --- /dev/null +++ b/lib/ebu/m4/lcmessage.m4 @@ -0,0 +1,27 @@ +# Check whether LC_MESSAGES is available in . +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN([AM_LC_MESSAGES], + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +int +main() +{ + return LC_MESSAGES; +} +])], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define to 1 if you have the `LC_MESSAGES' locale category]) + fi + fi]) diff --git a/lib/ebu/m4/libtool.m4 b/lib/ebu/m4/libtool.m4 new file mode 100644 index 0000000..a3bc337 --- /dev/null +++ b/lib/ebu/m4/libtool.m4 @@ -0,0 +1,8369 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +]) + +# serial 58 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + +# _LT_CC_BASENAME(CC) +# ------------------- +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. +m4_defun([_LT_CC_BASENAME], +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from 'configure', and 'config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain=$ac_aux_dir/ltmain.sh +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the 'libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags='_LT_TAGS'dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# '#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test 0 = "$lt_write_fail" && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +'$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test 0 != $[#] +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try '$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try '$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +_LT_COPYING +_LT_LIBTOOL_TAGS + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS=$save_LDFLAGS + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + m4_if([$1], [CXX], +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case $ECHO in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and where our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test yes = "[$]$2"; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +]) + +if test yes = "[$]$2"; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n "$lt_cv_sys_max_cmd_len"; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes = "$cross_compiling"; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen=shl_load], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen=dlopen], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then + + # We can hardcode non-existent directories. + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program that can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac]) +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program that can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test no = "$withval" || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi]) +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM=-lm) + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64, which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test yes = "$GCC"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + osf3*) + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting $shlibpath_var if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC=$CC +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report what library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC=$lt_save_CC +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_caught_CXX_error"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test yes = "$GXX"; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='$wl' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GXX"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require '-G' NOT '-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test yes != "$_lt_caught_CXX_error" + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || + test x-R = "$p"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test no = "$pre_test_object_deps_done"; then + case $prev in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)=$prev$p + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test no = "$pre_test_object_deps_done"; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)=$p + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)=$p + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_F77"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_FC"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code=$lt_simple_compile_test_code + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f "$lt_ac_sed" && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test 10 -lt "$lt_ac_count" && break + lt_ac_count=`expr $lt_ac_count + 1` + if test "$lt_ac_count" -gt "$lt_ac_max"; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine what file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/lib/ebu/m4/ltoptions.m4 b/lib/ebu/m4/ltoptions.m4 new file mode 100644 index 0000000..94b0829 --- /dev/null +++ b/lib/ebu/m4/ltoptions.m4 @@ -0,0 +1,437 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 8 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option '$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' +# LT_INIT options. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/lib/ebu/m4/ltsugar.m4 b/lib/ebu/m4/ltsugar.m4 new file mode 100644 index 0000000..48bc934 --- /dev/null +++ b/lib/ebu/m4/ltsugar.m4 @@ -0,0 +1,124 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59, which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/lib/ebu/m4/ltversion.m4 b/lib/ebu/m4/ltversion.m4 new file mode 100644 index 0000000..fa04b52 --- /dev/null +++ b/lib/ebu/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 4179 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.6' +macro_revision='2.4.6' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/lib/ebu/m4/lt~obsolete.m4 b/lib/ebu/m4/lt~obsolete.m4 new file mode 100644 index 0000000..c6b26f8 --- /dev/null +++ b/lib/ebu/m4/lt~obsolete.m4 @@ -0,0 +1,99 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/lib/ebu/m4/sockaddrin6.m4 b/lib/ebu/m4/sockaddrin6.m4 new file mode 100644 index 0000000..eab7f80 --- /dev/null +++ b/lib/ebu/m4/sockaddrin6.m4 @@ -0,0 +1,68 @@ +dnl * +dnl * Copyright (c) 2001-2006 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE +dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +dnl * THE POSSIBILITY OF SUCH DAMAGE. +dnl * + +dnl * +dnl * Check for struct sockaddr_in6 +dnl * +AC_DEFUN([AC_STRUCT_SOCKADDR_IN6], +[AC_CACHE_CHECK(for struct sockaddr_in6, ac_cv_struct_sockaddr_in6, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct sockaddr_in6 address; +])], [ac_cv_struct_sockaddr_in6=yes], [ac_cv_struct_sockaddr_in6=no])]) +if test "$ac_cv_struct_sockaddr_in6" = yes; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1, +[Define to 1 if defines `struct sockaddr_in6']) +fi]) + +dnl * +dnl * Check for struct sockaddr_storage +dnl * +AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], +[AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_struct_sockaddr_storage, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +struct sockaddr_storage address; +])], [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])]) +if test "$ac_cv_struct_sockaddr_storage" = yes; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, +[Define to 1 if defines `struct sockaddr_storage']) +fi]) + diff --git a/lib/ebu/m4/sockinttypes.m4 b/lib/ebu/m4/sockinttypes.m4 new file mode 100644 index 0000000..c396b34 --- /dev/null +++ b/lib/ebu/m4/sockinttypes.m4 @@ -0,0 +1,198 @@ +dnl * +dnl * Copyright (c) 2001-2006 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE +dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +dnl * THE POSSIBILITY OF SUCH DAMAGE. +dnl * + +dnl * +dnl * Check for socklen_t. +dnl * +AC_DEFUN([AC_TYPE_SOCKLEN_T], +[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#endif +socklen_t socklen; +])], [ac_cv_type_socklen_t=yes], [ac_cv_type_socklen_t=no])]) +if test "$ac_cv_type_socklen_t" != yes; then + AC_DEFINE(socklen_t, int, +[Define to `int' if or does not define.]) +fi]) + +dnl * +dnl * Check for in_port_t. +dnl * +AC_DEFUN([AC_TYPE_IN_PORT_T], +[AC_CACHE_CHECK([for in_port_t], ac_cv_type_in_port_t, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#include +#endif +in_port_t in_port; +])], [ac_cv_type_in_port_t=yes], [ac_cv_type_in_port_t=no])]) +if test "$ac_cv_type_in_port_t" != yes; then + ac_cv_sin_port_size=unknown + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(long)) ? 0 : 1; + } + ])], [ac_cv_sin_port_size=long]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(int)) ? 0 : 1; + } + ])], [ac_cv_sin_port_size=int]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(short)) ? 0 : 1; + } + ])], [ac_cv_sin_port_size=short]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #include + #endif + int main() { + struct sockaddr_in addr; + return (sizeof(addr.sin_port) == sizeof(char)) ? 0 : 1; + } + ])], [ac_cv_sin_port_size=char]) + if test "$ac_cv_sin_port_size" = unknown; then + AC_MSG_ERROR([Failed to get size of sin_port in struct sockaddr_in.]) + fi + AC_DEFINE_UNQUOTED(in_port_t, unsigned $ac_cv_sin_port_size, +[Define to `unsigned char', `unsigned short', `unsigned int' or +`unsigned long' according with size of `sin_port' in `struct sockaddr_in', +if , or does not define +`in_port_t'.]) +fi]) + +dnl * +dnl * Check for sa_family_t. +dnl * +AC_DEFUN([AC_TYPE_SA_FAMILY_T], +[AC_CACHE_CHECK([for sa_family_t], ac_cv_type_sa_family_t, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +#ifdef ENABLE_WINSOCK2 +#include +#else +#include +#endif +sa_family_t sa_family; +])], [ac_cv_type_sa_family_t=yes], [ac_cv_type_sa_family_t=no])]) +if test "$ac_cv_type_sa_family_t" != yes; then + ac_cv_sa_family_size=unknown + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(long)) ? 0 : 1; + } + ])], [ac_cv_sa_family_size=long]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(int)) ? 0 : 1; + } + ])], [ac_cv_sa_family_size=int]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(short)) ? 0 : 1; + } + ])], [ac_cv_sa_family_size=short]) + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #ifdef ENABLE_WINSOCK2 + #include + #else + #include + #endif + int main() { + struct sockaddr addr; + return (sizeof(addr.sa_family) == sizeof(char)) ? 0 : 1; + } + ])], [ac_cv_sa_family_size=char]) + if test "$ac_cv_sa_family_size" = unknown; then + AC_MSG_ERROR([Failed to get size of sa_family in struct sockaddr.]) + fi + AC_DEFINE_UNQUOTED(sa_family_t, unsigned $ac_cv_sa_family_size, +[Define to `unsigned char', `unsigned short', `unsigned int' or +`unsigned long' according with size of `sa_family' in `struct sockaddr', +if or does not define `sa_family_t'.]) +fi]) diff --git a/lib/ebu/misc/ebdump b/lib/ebu/misc/ebdump new file mode 100644 index 0000000..bcf5ce6 --- /dev/null +++ b/lib/ebu/misc/ebdump @@ -0,0 +1,79 @@ +#! /usr/bin/perl +# +# Copyright (c) 2004-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +# +# Parse command line arguments. +# +die "usage: $0 file page[:offset]\n" if (@ARGV != 2); + +$file = $ARGV[0]; +if ($ARGV[1] =~ /^([0-9a-fA-F]+)$/) { + $offset = (hex($1) - 1) * 2048; +} elsif ($ARGV[1] =~ /^([0-9a-fA-F]+):([0-9a-fA-F]+)$/) { + $offset = (hex($1) - 1) * 2048 + hex($2); +} else { + die "$0: invalid offset\n"; +} +die "$0: invalid offset\n" if ($offset < 0); + +# +# Open a file. +# +open(FILE, $file) || die "$0: failed to open the file, $!: $file.\n"; +seek(FILE, $offset, 0) || die "$0: failed to seek the file, $!: $file.\n"; + +# +# Read the file. +# +$count = 0; +while ($count < 2048) { + last if (read(FILE, $buf, 16) != 16); + @data = unpack("C16", $buf); + printf '%04x:%03x ', $offset / 2048 + 1, $offset % 2048; + for ($i = $0; $i < 16; $i += 2) { + printf('%02x%02x', $data[$i], $data[$i + 1]); + } + print ' '; + for ($i = $0; $i < 16; $i += 2) { + if (0x21 <= $data[$i] && $data[$i] <= 0x7e + && 0x21 <= $data[$i + 1] && $data[$i + 1] <= 0x7e) { + printf('[%c%c]', $data[$i] | 0x80, $data[$i + 1] | 0x80); + } else { + printf('%02x%02x', $data[$i], $data[$i + 1]); + } + } + print "\n"; + $offset += 16; + $count += 16; +} + +# +# Close the file. +# +close(FILE); diff --git a/lib/ebu/misc/ebfixlog b/lib/ebu/misc/ebfixlog new file mode 100644 index 0000000..494b530 --- /dev/null +++ b/lib/ebu/misc/ebfixlog @@ -0,0 +1,47 @@ +#! /usr/bin/perl +# +# Copyright (c) 2004-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +use Getopt::Std; +getopts('zn') or die "Usage: $0 [-z|-n] [file...]\n"; +$opt_z = 1 if (defined($opt_n)); # `-n' implies `-z'. + +$indent = 0; + +while (<>) { + chomp; + if (/^\[EB\] (.*)$/) { + $message = $1; + next if (!$opt_z && $message =~ /^\S+: zio_/); + next if (!$opt_n && $message =~ /^\S+: ebnet_/); + $indent-- if ($message =~ /^out: /); + $_ = '[EB] ' . (' ' x ($indent * 2)) . $message; + $indent++ if ($message =~ /^in: /); + } + print $_, "\n"; +} diff --git a/lib/ebu/missing b/lib/ebu/missing new file mode 100644 index 0000000..ac3d51c --- /dev/null +++ b/lib/ebu/missing @@ -0,0 +1,378 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/move-if-change b/lib/ebu/move-if-change new file mode 100644 index 0000000..dae150f --- /dev/null +++ b/lib/ebu/move-if-change @@ -0,0 +1,49 @@ +#! /bin/sh +# +# Copyright (c) 2004-2006 Motoyuki Kasahara +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. +# + +NEW_FILE=$1 +TARGET_FILE=$2 + +if [ ! -r $NEW_FILE ]; then + echo "$0: cannot read $NEW_FILE" 1>&2 + exit 1 +fi + +if [ ! -r $TARGET_FILE ]; then + mv -f $NEW_FILE $TARGET_FILE +else + if cmp $NEW_FILE $TARGET_FILE > /dev/null 2>&1; then + echo "$0: $TARGET_FILE is unchanged" 1>&2 + rm -f $NEW_FILE + else + mv -f $NEW_FILE $TARGET_FILE + fi +fi + +exit 0 diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/AUTHORS b/lib/ebu/others/eblook-1.6.1+media-20200414/AUTHORS new file mode 100644 index 0000000..65940f7 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/AUTHORS @@ -0,0 +1,10 @@ +Keisuke Nishida wrote eblook.c and eblook.texi. + +Keisuke MORI compiled eblook on the Cygwin environment. + +Satomi modified for EB-3. + +Kazuhiko modified for EB-3. + +Takashi Nemoto wrote codeconv.c and +codeconv.h. diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/COPYING b/lib/ebu/others/eblook-1.6.1+media-20200414/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/ChangeLog b/lib/ebu/others/eblook-1.6.1+media-20200414/ChangeLog new file mode 100644 index 0000000..17616e4 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/ChangeLog @@ -0,0 +1,1050 @@ +2020-04-14 Kazuhiro Ito + + Update autotools. + + * VERSION: Removed. Version information is written into + configure.ac. + + * Makefile.am (EXTRA_DIST): Remove VERSION. + +2020-04-14 Kazuhiro Ito + + Support color chart. `color' command is available if linked with + EB Library with UTF-8 support 4.5 or later. + + * eblook.c (command_color): New function. + (command_table, text_hooks, , hook_tags): Support color chart when + available. + +2015-07-24 Kazuhiro Ito + + * eblook.c (search_pattern, insert_prev_next): Fix the bug that + very long heading's tail is not displayed. + +2015-03-01 Kazuhiro Ito + + * eblook.c (main): Fix the case that HOME environment variable is + not defined on non-DOS system. Fix buffer overrun with very long + HOME directory. + Cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715857 + +2014-11-16 Kazuhiro Ito + + * getopt.c: Include string.h. + +2014-11-16 Kazuhiro Ito + + * configure.ac: Fix the case building out of source directory. + +2014-11-16 Kazuhiro Ito + + * eblook.c (main): Remove unneeded check for history file name. + +2014-11-15 Kazuhiro Ito + + * bmp_in.c (deflate_rgb24): Fix array length of buf variable. + +2014-11-15 Kazuhiro Ito + + * eblook.c (search_wild_match_pattern): Renamed from + seach_wild_match_pattern. + (eblook_hit_list_wild): Adjusted. + +2014-11-15 Kazuhiro Ito + + * eblook.c (main, fileman_completion): Remove old style readline + usage. + Cf. https://trac.macports.org/ticket/45690 + +2013-09-19 Kazuhiro Ito + + * eblook.c (command_book): Recognize ebnet URL when DOS_FILE_PATH + is defined. + Cf. https://github.com/lookup2/lookup2/issues/12#issuecomment-24679109 + +2011-08-01 Kazuhiro Ito + + Support EB Library with UTF-8 support 20110801 and later. + * configure.ac: Use eb_LIB_EBU macro. + + * bmp2ppm.c: Include libebu header when available. + + * bmp_in.c: Likewise. + + * eblook.c: Likewise. + + * Makefile.am (SUBDIRS): Removed. + + * m4/Makefile.am: Removed. + + * m4/ebu.m4: New file. + +2010-10-27 Kazuhiro Ito + + * eblook.c (command_content): Fix the case when eb_backward_text + or following eb_tell_text failed after loop. + +2010-08-18 Kazuhiro Ito + + * eblook.c (process_child, show_candidate): Fix arguemnt type + mismatch in MULTI_DEBUG part. + +2010-08-16 Kazuhiro Ito + + * codeconv.c (euc_to_current, current_to_euc): Refined. + Initialize conversion descriptor when error occured instead of + before using it. + +2010-08-14 Kazuhiro Ito + + * eblook.c: Check if EB_HOOK_EBXAC_GAIJI is defined. + +2010-08-14 Kazuhiro Ito + + * eblook.c (main): Do not check book's character code. + +2010-08-14 Kazuhiro Ito + + * codeconv.c (current_to_euc, euc_to_current): Do not preserve + next data to write when buffer is overfilled. Initialize + conversion descriptor before using it. + +2010-08-14 Kazuhiro Ito + + * eblook.c (eblook_hit_list_wild, command_mpeg_path) + (eblook_search_wild): Add some casts. + + * codeconv.h (xfgets): Change the type of second argument from int + to size_t + + * codeconv.c (xfgets): Likewise. + + * eblook.c (read_command): Likewise. + +2010-05-15 Kazuhiro Ito + + * eblook.c (text_hooks, heading_hooks): Support EB_HOOK_GB2312, + EB_HOOK_EBXAC_GAIJI, EB_HOOK_BEGIN_UNICODE and EB_HOOK_END_UNICODE + if available. + (hook_gb2312, hook_ebxac_gaiji): New functions. + (hook_tags): Support EB_HOOK_BEGIN_UNICODE and EB_HOOK_END_UNICODE + if available. + (command_content): When entry begins with '-', display backward + content. + +2010-02-18 Kazuhiro Ito + + * eblook.c (parse_command_line): Fix wrong use of strcpy(). + Cf. http://d.hatena.ne.jp/toshiharu_z/20091114/1258209867 + +2009-07-09 Kazuhiro Ito + + * bmp_in.c (deflate_rgb24): Fix bug in decoder. + +2009-05-27 Kazuhiro Ito + + * codeconv.c (xputs2): Do not call convert_nbsp. + (convert_nbsp): Removed. + + * eblook.c (hook_iso8859_1): Convert NO-BREAK SPACE to SPACE. + +2009-04-11 Kazuhiro Ito + + * eblook.c (command_info): Support JIS X 4081 UTF-8 extension. + +2009-02-25 Kazuhiro Ito + + * eblook.c (hook_decoration): Support character modification + descriptors. + (text_hooks, heading_hooks): Add entries for + EB_HOOK_BEGIN_DECORATION and EB_HOOK_END_DECORATION. + +2009-02-19 Kazuhiro Ito + + * eblook.c (hook_font, hook_decoration, hook_stopcode, hook_img) + (hook_tags): Return result of eb_write_text_string. + +2009-02-18 Kazuhiro Ito + + * eblook.c (default_pager): Define only when pager feature is + enabled. + (default_escape_text): New constant. + (escape_text): New variable. + (main): Set internal variable "escape-text" in + initializing. Update escape_text according to the value of + "escape-text". + (hook_iso8859_1): New function. + (hook_euc_to_ascii): Escape text when needed. + (text_hooks, heading_hooks): Add entry for EB_HOOK_ISO8859_1. + +2009-02-13 Kazuhiro Ito + + * Makefile.am (EXTRA_DIST): Add README.org + + * README.org: Renamed from README. + * README: New file. + +2009-02-07 Kazuhiro Ito + + * eblook.c (command_bmp, command_jpeg, command_wav) + (command_mpeg): Call fopen with mode "wb". Do not call setmode. + + * bmp2ppm.c (command_bmp2ppm, command_bmp2tiff): Ditto. + +2009-02-06 Kazuhiro Ito + + * configure.ac (AC_PREREQ, eb_SYS_LARGEFILE): Added. + (AC_PROG_MAKE_SET, AC_HEADER_STDC, AC_HEADER_STAT, AC_C_CONST) + (AC_TYPE_OFF_T, AC_FUNC_MEMCMP, AC_REPLACE_FUNCS) + (AC_HEADER_TIME): Removed. + (AM_INIT_AUTOMAKE): Remove arguments. + (AC_CHECK_HEADERS): Remove checks for stdlib.h, string.h, unistd.h + and ctype.h. + (AC_CHECK_FUNCS): Remove checks for memcpy, strchr, strerror and + strtol. + (AC_FUNC_ALLOCA): Added. + (AC_CONFIG_FILES): Remove rules for dos/Makefile and dos/config.h, + and Add rule for m4/Makefile. + + * bmp2ppm.c, bmp_in.c, codeconv.c, codeconv.h, eblook.c, getopt.c: + * getopt.h, getopt1.c, strcasecmp.c: Assume + POSIX.1-1990 systems and requires ANSI C89 compiler. + + * memcmp.c, memset.c, strdup.c, dos/*: Removed. + + * win32.c: + + * Makefile.am (eblook_SOURCES): Add win32.c. + (EXTRA_DIST): Remove memset.c and win32.c. + (SUBDIRS): Remove dos and add m4. + + * m4/Makefile.am, m4/Makeifle.in: New files. + + * m4/largefile.m4, m4/eb4.m4: Import from EB Library 4.4. + + * m4/libtool.m4, m4/m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4: + * m4/ltversion.m4, m4/lt~obsolete.m4, ltmain.sh, config.guess: + * config.sub: Import from libtool-2.2.6. + +2009-02-03 Kazuhiro Ito + + * configure.ac: Change default encoding to SHIFT-JIS on MinGW. + +2008-01-16 Kazuhiro Ito + + * eblook.c (command_mpeg_path): New function. + (command_table): Add entry for it. + +2007-08-06 Kazuhiro Ito + + * eblook.c (text_hooks): Add entry for EB_HOOK_SET_INDENT. + (hook_decoration): Support hook code of EB_HOOK_SET_INDENT. + +2007-06-01 Kazuhiro Ito + + * eblook.c (main): New option --non-interactive (-i). + (short_options, long_options, show_help): Ditto. + (interactive_mode): Change initial value. + (show_version): Update copyright notice. + +2007-03-04 Kazuhiro Ito + + * eblook.c (EB_INDEX_STYLE_CONVERT): New constant. Originally + defined in EB Library. + (search_wild_convert_pattern): Remove spaces in pattern. Convert + lower cases to upper as required. + +2007-02-03 Kazuhiro Ito + + * eblook.c (uint1, uint2, uint 4): New macros. + (eblook_wild_pattern, eblook_wild_page, eblook_wild_count): New + variables. + (eblook_search_wild, eblook_hit_list_wild, eblook_have_wild_search) + (search_wild_insert_euc_char, search_wild_convert_pattern) + (seach_wild_match_pattern): New functions. + (command_subinfo, parse_entry_id, search_pattern): Support + searching with wild card. + +2007-02-03 Kazuhiro Ito + + * eblook.c (command_pbm, command_xbm, process_child) + (show_candidate): Fix argument type mismatch. + +2007-01-28 Kazuhiro Ito + + * eblook.c (command_book): Finalize appendix when appendix is not + specified. + +2007-01-20 Kazuhiro Ito + + * eblook.c (search_pattern): In deciding method, search-method is + checked prior to auto judgment. Support cross search. + (eblook_search_cross): New function. + +2006-12-12 Kazuhiro Ito + + * eblook.c (show_prev_next_flag): New variable. + (insert_content): Don't show references to previous and next + articles when show_prev_next_flag is equal to 0. + (hook_img): Set show_prev_next_flag to 0 when called with + EB_HOOK_END_IMAGE_PAGE hook. + (hook_tags): Ditto when called with EB_HOOK_GRAPHIC_REFERENCE hook. + +2006-12-07 Kazuhiro Ito + + * bmp_in.c (LoadBMP): (Almost) rewritten. Support 4bit RLE + compression and do not refer header information for a file size. + (deflate_rle4, deflate_rle8, deflate_rgb1, deflate_rgb4) + (deflate_rgb8, deflate_rgb24, init_bmp_buf) + (read_bytes_from_bmp_buf, seek_bytes_bmp_buf): New functions. + These are called from LoadBMP function. + (read_data_from_eb): Return byte count when function read data + partially. + (get_word, read_dword_from_eb): Removed. + +2006-12-04 Kazuhiro Ito + + * eblook.c (command_table[]): Add commands for graphic menu. + (text_hooks[]): Add hooks for image map and clickable area. + (command_image_menu): New function. + (hook_tags): Handle image map and clickable area. + +2006-07-25 Kazuhiro Ito + + * eblook.c (hook_img): Set inline tag for inline images. + +2006-07-12 Kazuhiro Ito + + * VERSION: Change to 1.6.1+media-yyyymmdd. + * eblook.c (excute_command): Fix typo in error string. + +2006-06-27 Hideyuki SHIRAI + + * eblook.c (command_table[]): Add commands for movie. + (text_hooks[]): Add hooks for movie. + (command_mpeg): New function. + (hook_img): Handle movie hooks. + +2006-04-12 Kazuhiro Ito + + * eblook.c (main): Recognize ebnet URL when DOS_FILE_PATH is defined. + +2005-11-19 Kazuhiro Ito + + * eblook.c: Add WAVE sound support. + +2004-06-18 Kazuhiko + + * bmp2ppm.c, eblook.c : no longer use EB_P() + +2004-02-13 Kazuhiko + + * Version 1.6 released. + +2003-06-30 Takashi NEMOTO + + * eblook.c (insert_dump): initialize outFP by default value + +2002-12-08 NEMOTO Takashi + + * codeconv.c: convert from ISO8859-1 NBSP(0xa0) to SPACE(0x20) + +2002-11-19 NEMOTO Takashi + + * eblook.c : use $HOME/eblookrc instead of $HOME/.eblookrc in DOS mode + change variable "pager" default to "off" + don't decorate search result + add '-a' option to "show" command (display internal val.) + bugfix : search history and + revise pager support + +2002-11-18 NEMOTO Takashi + * configure.ac : Search eb.conf at additional path "/etc" + Check readline library when --with-readline is used + + + Merge from eblook-1_6devel-branch +------------------------------------------ +2002-11-17 NEMOTO Takashi + + * eblook.c (search pattern): bugfix:search without argument() + * eblook.c (parse_entry_id): remove duplicate entry in parse_entry_id + * eblook.c (insert_dump): add pager support + +2002-11-16 NEMOTO Takashi + + * eblook.c (hook_img): Check definition of EB_HOOK_ inline image + +2002-11-15 NEMOTO Takashi + + * configure.ac: revise libreadline detection + * eblook.c (search_pattern): bug fix (search command) + ===== TODO: bugfix - search without argument () ==== + ===== TODO: bugfix - remove duplicate entry in parse_entry_id ==== + +2002-11-02 NEMOTO Takashi + + * eblook.texi : Add documents (Compile, Install) + * eblook.c : support eb_forward/backward_text + +--------------------------------------------- + +2002-11-16 Satomi + + * eblook.c: Fix #ifdef condition for HAVE_SET_MODE. + * bmp2ppm.c: Ditto. + +2002-11-15 Satomi + + * eblook.c (command_bmp): Encode filename in SJIS if + DOS_FILE_PATH is defined. + + * eblook.c (command_jpeg): Encode filename in SJIS if + DOS_FILE_PATH is defined. Do not close the file handle + if not opened yet, to avoid fatal error on VC++ debug build. + +2002-11-15 Satomi + + * eblook.c (hook_img): Use EB_HOOK_BEGIN_IN_COLOR_xxx only if + defined. + +2002-11-09 NEMOTO Takashi + + * eblook.c (hook_img): add inline image support + +2002-11-04 Satomi + + * eblook.c (show-version): Modify copyright year. + * bmp2ppm.c: Include and if WIN32 or + HAVE_SETMODE is defined. + +2002-10-26 NEMOTO Takashi + + * eblook.c (main): cleanup configure.ac + +2002-10-25 NEMOTO Takashi + + * eblook.c (insert_content): Disable pager when called from lookup + +2002-10-23 NEMOTO Takashi + + * eblook.c (read_command): treat last line of .eblookrc + +2002-10-22 NEMOTO Takashi + + * eblook.c : disable readline library when invoked from lookup + * eblook.c : allow comment in .eblookrc + ('#' or ';' at the begining of line) + +2002-10-20 NEMOTO Takashi + + * configure.ac: remove AC_CYGWIN, AC_MINGW32 + +---- +Merging eblook-interactive-branch to head: + + Tag "HEAD" + + 2002-10-26 NEMOTO Takashi + * dos/*, eblook.c : merge support for dos, os/2 (watcom C) + + Tag "eblook-1_6devel-merge2" + 2002-10-21 NEMOTO Takashi + + * eblook.c : + remove redundant entries from hit list + replace part of "WIN32" with "DOS_FILE_PATH" + support inline image + support multiple subbook in same directory + + Tag "eblook-1_6devel-merge1" + + 2002-10-20 NEMOTO Takashi + * bmp2ppm.c, bmp_in.c : fix type conversion + * bmp2ppm.c : bugfix (.ppm write error) + + Tag "eblook-1_6devel-merge0" +---- +2002-10-08 NEMOTO Takashi + + * eblook.c (main): bugfix (win32 : bind appendix file) + +2002-09-21 Satomi + + * eblook.c, bmp2ppm.c: use setmode() to disable newline coversion + when saving a binary file on Win32. set HAVE_SETMODE to 1 to + enable this routine on other platforms than Win32. + +2002-05-23 NEMOTO Takashi + + * Makefile.am (EXTRA_DIST): Add win32.c + +2002-04-25 NEMOTO Takashi + + * eblook.c: Merge readline, pager related codes written by jsawa + new variable "pager" + * configure.ac : new option "--with-pager", "--with-readline" + * codeconv.[ch] (current_to_euc) : remove static + +2002-03-26 Kazuhiko + + * configure.ac: Renamed from configure.in. Merge acconfig.h. + * acconfig.h: Removed. + +2002-03-17 NEMOTO Takashi + + * eblook.c : new variable "decorate-mode" ("on" or "true", default:off) + +2002-03-13 Satomi + + * bmp_in.c: avoid definition conflict with on Win32. + +2002-01-08 NEMOTO Takashi + + * eblook.c : change EB_HOOK_ macro names (as those of eb-3.2beta1) + +2002-01-06 NEMOTO Takashi + + * eblook.c : support narrow kana. + new variable "use-narrow-kana" ("true" or others) + +2001-12-28 NEMOTO Takashi + + * eblook.c : add decoration (emphasis, bold, etc.) code + +2001-12-09 NEMOTO Takashi + + * bmp_in.c: bugfix (24bit bmp) + * eblook.c: remove debug message + +2001-12-08 NEMOTO Takashi + + * bmp2ppm.c, bmp_in.c, eblook.c: Revise error check + +2001-12-07 NEMOTO Takashi + + * bmp2ppm.c, bmp_in.c, eblook.c: Add error check (graphics decode) + +2001-11-30 Kazuhiko + + * eblook.c (hook_img): Remove '\n' from '' tag. + +2001-11-29 NEMOTO Takashi + + * bmp_in.c: Add new file. BMP file decoder. + * bmp2ppm.c: Remove bmp decoder + +2001-11-28 Kazuhiko + + * eblook.c (hook_img): Revise output tag. + +2001-11-28 NEMOTO Takashi + + * bmp2ppm.c (command_bmp2tiff): Add new functions for TIFF + +2001-11-27 NEMOTO Takashi + + * eblook.c (insert_dump): Fix 1 byte lacking problem. + (main): Remove locale_init("SJIS") under _WIN32 condition + +2001-11-23 NEMOTO Takashi + + * eblook.c (text_hooks[]): Add EB_HOOK_STOP_CODE for eb-3.2. + * codeconv.h, codeconv.c: Fix variable argument functions + * codeconv.c: Add Watcom C compiler specific code + * codeconv.c, codeconv.h: Bug fix (without iconv case) + Bug fix (size_t)-1 > 0 when iconv returns error + * codeconv.h, codeconv.c, configure.in: + Check existence of sys/types.h, isatty, and so on. + * configure.in: bug-fix: FALLBACK_ENCODING on HP-UX + * configure.in: Change default FALLBACK_ENCODING on CYGWIN + +2001-11-18 YAMAGATA + + * eblook.c (command_xbm, command_pbm): New commands to extract + monochrome image in text format. Type "xbm page:offset width + height" or "pbm page:offset width height". pbm is almost for the + debugging purpose. + (hook_img): New EB hook function to handle image tag, Currently + supports only 0x1f44/0x1f64 pair. + +2001-09-04 Satomi + + * eblook.c (main, command_book): Fix Win32 path manipulation. + (main): Set default locale to SJIS on Win32 when kanji-code is set + to AUTO. + + * win32.c: Remove extra 0x0D codes (sorry for large diff). + +2001-08-31 Kazuhiko + + * Version 1.5 released. + +2001-07-31 Kazuhiko + + * eblook.c (hook_stopcode): Use EB_SUCCESS and EB_ERR_STOP_CODE + for a return value (contributed by yamagata@nwgpc.kek.jp). + +2001-07-12 Kazuhiko + + * Version 1.5pre2 released. + +2001-07-11 Kazuhiko + + * eblook.c (show_version): Revise copyright notice. + + * eblook.texi: Revise document. + +2001-07-09 Kazuhiko + + * eblook.texi (How To Get): Revise information. + +2001-07-08 Kazuhiko + + * Version 1.5pre1 released. + + * eblook.texi: Add description about keyword search and multiple + search. + + * eblook.c: Fix typo in command_table[]. + +2001-07-04 NEMOTO Takashi + + * eblook.c: Define ENABLE_PTHREAD when EBCONF_ENABLE_PTHREAD is + defined. + +2001-06-29 Kazuhiko + + * eblook.c (can_menu_narrow_char): Revise for eb-3.0 (contributed + by yamagata@nwgpc.kek.jp). + (can_menu_wide_char): Ditto. + +2001-06-20 Satomi + + * win32.c: include "config.h" when HAVE_CONFIG_H is defined. + (dos_fix_path): assume characters as unsigend. + +2001-06-20 Satomi + + * eblook.c: (main, command_book): convert SJIS path to EUC + before printing (on Win32). + (command_book): do not report appendix when not bound. + convert '/'s in a path to '\\'s before passing to eb library + (on Win32). + (show_candidate_level): declare as void to avoid a compiler + warning. + + * codeconv.c: (locale_init): do not refer to cur_to_euc and + euc_to_cur when HAVE_ICONV is not defined. + (current_to_euc, euc_to_current): bug fix when reading the + input string. Support single-byte kana in SJIS conversion. + + * win32.c: new file for Win32. + +2001-06-17 Kazuhiko + + * eblook.texi (Overview): Add description about keyword search. + +2001-04-09 Kazuhiko + + * eblook.c: Implement 'label' command (contributed by + yamagata@nwgpc.kek.jp). + (command_label): New function. + (show_entry_candidate): New function. + (show_label): New function. + +2001-04-09 NEMOTO Takashi + + * codeconv.c : Add ISO-2022-JP Alias support (JIS, ...) + +2001-04-08 NEMOTO Takashi + + * codeconv.c : reset iconv conversion state after code conversion + * Fix incorrect ChangeLog + +2001-04-08 Kazuhiko + + * eblook.texi: Change contact information etc. + + * eblook.c (main): New option --encoding (-e). Ignore case in + matching kanji-code option name. + + * README: Modify required version of eb library. + + * configure.in: Modified for merged codeconv.c. + + * memcmp.c: New file. + * strcasecmp.c: New file. + * strdup.c: New file. + + * eblook.c (eblook_read): Remove. + (eblook_write): Remove. + (jis2euc): Remove. + (sjis2euc): Remove. + (write_euc2jis): Remove. + (write_euc2sjis): Remove. + +2001-04-04 NEMOTO Takashi + + * configure.in : HP-UX treatment (default=Shift-JIS) + * codeconv.c : update comments, + remove FALLBACK_ENCODING definition + +2001-04-02 NEMOTO Takashi + + * codeconv.c: fix locale treatment (in the case + that locale is not japanese, such as C, en_US and so on..). + simplify initialize routine + +2001-02-28 Takashi NEMOTO + + * codeconv.c: fix typos, remove temporary comments + +2001-02-25 NEMOTO Takashi + + * codeconv.c : fix initialization sequence + +2001-02-23 NEMOTO Takashi + + * codeconv.c : remove outjstr, getjstr functions + rewrite initialize function (locale_init) + new current_to_euc, euc_to_current functions + rewrite xputs2 using euc_to_current function + new xfgets function using current_to_euc + +2001-02-13 Kazuhiko + + * eblook.c (command_subinfo): Disable 'graphic' search that is + removed in eb-3.0alpha4. + +2001-02-12 Satomi + + * eblook.c: Use KANJICODE enum type, declared in codeconv.h. + * eblook.c: Avoid compiler warnings. + +2001-02-12 Satomi + + * codeconv.h: Add KANJICODE enum type. + * codeconv.c (xputs2): Refer to kanji_code external variable when + HAVE_ICONV is not defined. + +2001-01-26 Kazuhiko + + * codeconv.h: Never define pseudo function as real function. + +2001-01-24 NEMOTO Takashi + + * configure.in : fallback-charset => fallback-encoding + * codeconv.c : FALLBACK_CODESET => FALLBACK_ENCODING + * acconfig.h : FALLBACK_CHARSET => FALLBACK_ENCODING, + add #undef SMALL_STACK + +2001-01-23 Takashi NEMOTO + + * codeconv.c (locale_init) : Revert FALLBACK_CHARSET code + +2001-01-23 Takashi NEMOTO + + * configure.in, acconfig.h, codeconv.c: + rename from DEFAULT_CHARSET to FALLBACK_CHARSET + * codeconv.c (locale_init, xputs2, getjstr): Add error check code. + (xputs2): fix memory leak + +2001-01-21 Kazuhiko + + * codeconv.h: Never define pseudo function as real function. + + * eblook.c: New Macro MAX_DUMP_SIZE . + (main): New variable max-dump. + (command_dump): New function. + (insert_dump): New function. + +2001-01-10 NEMOTO Takashi + + * codeconv.c (xputs): Put newline after string. + +2001-01-08 Kazuhiko + + * codeconv.c (xputs2): Allocate memory for output buffer + dynamically. Return not 0 but EOF on error. + (xfgets): Allocate memory for temporary buffer same as 2nd + argument. + +2001-01-06 Kazuhiko + + * configure.in: Support iconv. + + * eblook.c (read_command): Use xfgets instead of fgets. + + * codeconv.h: New file. + * codeconv.c: New file. + +2001-01-03 Kazuhiko + + * eblook.c (text_hooks[]) Add EB_HOOK_BEGIN_CANDIDATE and + EB_HOOK_END_CANDIDATE_GROUP'. + (hook_tags): Add cases of EB_HOOK_BEGIN_CANDIDATE and + EB_HOOK_END_CANDIDATE_GROUP'. + +2000-12-20 Kazuhiko + + * eblook.c (search_pattern): Check return value of eb_seek_text, + eb_read_heading and eb_read_text. Terminate result of + eb_read_heading and eb_read_text. + (show_candidate): Change function type from void to int. + +2000-12-19 Kazuhiko + + * eblook.c (text_hooks[]): Remove EB_HOOK_{BEGIN,END}_MENU. + Temporary remove EB_HOOK_{BEGIN,END}_{PICTURE,SOUND}. + (multi_candidate_hooks[]): Ditto. + (hook_newline): Remove. Use eb_hook_newline instead of it. + (hook_font): Revise for eb-3.0alpha3. + +2000-12-12 Kazuhiko + + * Makefile.am (eblook_LDADD): Add @LIBOBJS@. + +2000-10-25 Motoyuki Kasahara + + * eblook.c: Beaufify code. + +2000-10-20 Kazuhiko + + * memset.c: New file. + + * configure.in: Add 'AC_REPLACE_FUNCS(memset)'. + + * Makefile.am (EXTRA_DIST): Add 'memset.c'. + +2000-10-20 Rei + + * eblook.c (eblook_search_keyword): Regress to rev.1.17 (sorry). + +2000-10-19 Rei + + * eblook.c (command_info, parse_dict_id): Minor change for better + error handling. + (search_pattern): Restore the 2nd argument of eb_seek_text() call, + which had been accidentally changed. + (process_child): Add return value (0) to avoid compiler warning. + (show_candidates_level): Declare as void function to avoid compiler + warning. + (can_menu_begin, can_menu_end, show_candidates_level): Use memset() + instead of bzero(). + +2000-10-18 Kazuhiko + + * eblook.c (search_pattern): Support keyword search (by + yamagata@nwgpc.kek.jp). + (eblook_search_keyword): New function. + (command_info): Fix a bug (thanks to yamagata@nwgpc.kek.jp and + Motoyuki Kasahara). + (search_pattern): Support multiple search (by yamagata@nwgpc.kek.jp) + (eblook_search_multi): New function. + +2000-10-11 Kazuhiko + + * README: Revise for EB-3. + + * configure.in: Revise for EB-3 (thanks to Motoyuki Kasahara). + + * acinclude.m4: Remove file. + + * eblook.texi: Change character code from JIS to EUC. + +2000-10-10 Kazuhiko + + * eblook.c: More revise for EB-3. + + * Makefile.am (MAINTAINERCLEANFILES): Remove config.h.in. + +2000-08-18 Rei + + * eblook.c: Modify for eb-3.0alpha1. + +2000-02-25 Keisuke Nishida + + * eblook.c (main): Set kanji-code only when the book is written + in Japanese. + +1999-12-14 Keisuke Nishida + + * Makefile.am (MAINTAINERCLEANFILES): Remove generated files. + +1999-12-08 Keisuke Nishida + + * Version 1.3 released. + +1999-11-16 Eiji-usagi-MATSUmoto + + * eblook.c: suppress duplicated hit contents. + (imported from ndtpd by Motoyuki Kasahara ) + +1999-07-31 Kazuhiro Ito + + * eblook.c (insert_content): insert a newline securely. + (created by Keisuke Nishida ) + +1999-04-27 Keisuke Mori + + * VERSION: New file. + + * configure.in: Get the version number from VERSION file. + --with-ming32 option has been eliminated since it's too much + system dependent on Cygwin. + + * eblook.c (sjis2euc): a bug fixed in handling 0x9f as the second + byte of SJIS. Error checking for an input string has been + improved. + +1999-04-27 Motoyuki Kasahara + + * eblook.c (main): Add a feature to use GNU getopt_long. + getopt.h, getopt.c and getopt1.c have been added for this. + +1999-02-10 NISHIDA Keisuke + + * Version 1.2 released. + + * eblook.c (show_version): Refer the variable `version'. + (main): Set the variable `version' with the version of EB library. + +1999-02-06 NISHIDA Keisuke + + * Use autoconf-2.13 and automake-1.4. + * configure.in: Define the macros for the win32 emvironments. + (Thanks to Keisuke Mori!) + + * acinclude.m4: New file with macro `EB_CONFIG'. + * configure.in: Use `EB_CONFIG'. + * Makefile.am: Updated. + + * INSTALL: Japanized. + + * eblook.c (main): Set book and appendix after loading init file. + (kanji_code, default_code): New variables. + (eblook_read, eblook_write, jis2euc, sjis2euc, + write_euc2jis, write_euc2sjis): New functions. + (main): Set kanji code. + (read_command): Use `eblook_read'. + (command_list, command_subinfo, search_pattern, insert_content): + Use `eblook_write'. + +1998-12-22 NISHIDA Keisuke + + * eblook.c: Include instead of . + +1998-12-07 NISHIDA Keisuke + + * Version 1.1 released. + + * eb: Excluded. + * eblook.c: Rewriten. + * configure.in, Makefile.am: Rewriten. + * README: Updated. + +1998-10-17 NISHIDA Keisuke + + * Version 1.0 released. + + * eblook.texi: Updated for eblook 1.0. + + * eblook.c (command_copyright): New command. + +1998-09-03 NISHIDA Keisuke + + * eblook.c (main): Initialize hookset first. + +1998-08-01 NISHIDA Keisuke + + * Version 1.0b0 released. + + * configure.in: Fixed some probrems. + * configure.in, Makefile.am: Check and use zlib if it already exists. + (Thanks to Motoyuki Kasahara!) + + * eb: Updated to eb-2.1beta1. + +1998-06-12 NISHIDA Keisuke + + * Version 0.9.1 released. + + * README: Updated for eblook 0.9. + + * eb: Updated to eb-2.0.1. + + * eblook.c (hook_stopcode): New function. + +1998-06-10 NISHIDA Keisuke + + * Version 0.9 released. + + * eb: Updated to eb-2.0. + +1998-05-17 NISHIDA Keisuke + + * eblook.c: Now we load an init file "~/.eblookrc" before all. + +1998-05-16 NISHIDA Keisuke + + * eblook.c (hook_narrow_font, hook_wide_font): Modify the format + of gaiji tags again. Now we use same tags with NDTPD 2.x. + (text_hooks): Fixed hook name for narrow charactors. + +1998-05-10 NISHIDA Keisuke + + * configure.in: Modified to use libtool. + * eb: Updated to eb-2.0beta1. + +1998-05-01 NISHIDA Keisuke + + * eblook.c: Fixed incorrect uses of `EB_P' macro. + (main, internal_set_appendix): Fixed to initialize appendix before + bindings. + +1998-03-29 NISHIDA Keisuke + + * eblook.c: Rename variable `last_search_method' to + `last_search_function'. + (eblook_search_string): Deleted. + (search_pattern, parse_entry_id): Updated. + (command_search): Fixed. + + * eblook.c (hook_narrow_font, hook_wide_font): Modify the format + of gaiji tags. + + * eblook.c: Updated for eb-2.x. + * eb: Updated to eb-2.0beta0. + +1998-03-27 NISHIDA Keisuke + + * eblook.c (insert_font_list): New function. + (command_font): Updated. + (insert_dicinfo): Modified not to display the font ranges. + +1998-03/26 NISHIDA Keisuke + + * eblook.c (hook_begin_reference, hook_end_reference): New hooks + to insert references. + +1998-03-20 NISHIDA Keisuke + + * Version 0.8.2 released. + + * eb: Updated to eb-1.0.6. + +1998-03-09 NISHIDA Keisuke + + * Version 0.8.1 released. + +1998-03-08 NISHIDA Keisuke + + * eblook.texi: Now we don't use version.texi. + + * eblook.c (salist_set): Fixed a missing loop break. + +1998-02-22 NISHIDA Keisuke + + * Version 0.8 released. + diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/INSTALL b/lib/ebu/others/eblook-1.6.1+media-20200414/INSTALL new file mode 100644 index 0000000..8865734 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/INSTALL @@ -0,0 +1,368 @@ +Installation Instructions +************************* + + Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software +Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell command './configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the 'README' file for +instructions specific to this package. Some packages provide this +'INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package. +It may also create one or more '.h' files containing system-dependent +definitions. Finally, it creates a shell script 'config.status' that +you can run in the future to recreate the current configuration, and a +file 'config.log' containing compiler output (useful mainly for +debugging 'configure'). + + It can also use an optional file (typically called 'config.cache' and +enabled with '--cache-file=config.cache' or simply '-C') that saves the +results of its tests to speed up reconfiguring. Caching is disabled by +default to prevent problems with accidental use of stale cache files. + + If you need to do unusual things to compile the package, please try +to figure out how 'configure' could check whether to do them, and mail +diffs or instructions to the address given in the 'README' so they can +be considered for the next release. If you are using the cache, and at +some point 'config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file 'configure.ac' (or 'configure.in') is used to create +'configure' by a program called 'autoconf'. You need 'configure.ac' if +you want to change it or regenerate 'configure' using a newer version of +'autoconf'. + + The simplest way to compile this package is: + + 1. 'cd' to the directory containing the package's source code and type + './configure' to configure the package for your system. + + Running 'configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type 'make' to compile the package. + + 3. Optionally, type 'make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type 'make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the 'make install' phase executed with root + privileges. + + 5. Optionally, type 'make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior 'make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing 'make clean'. To also remove the + files that 'configure' created (so you can compile the package for + a different kind of computer), type 'make distclean'. There is + also a 'make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type 'make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide 'make + distcheck', which can by used by developers to test that all other + targets like 'make install' and 'make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the 'configure' script does not know about. Run './configure --help' +for details on some of the pertinent environment variables. + + You can give 'configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here is +an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU 'make'. 'cd' to the +directory where you want the object files and executables to go and run +the 'configure' script. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. This is known +as a "VPATH" build. + + With a non-GNU 'make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use 'make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple '-arch' options to the +compiler but only a single '-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the 'lipo' tool if you have problems. + +Installation Names +================== + + By default, 'make install' installs the package's commands under +'/usr/local/bin', include files under '/usr/local/include', etc. You +can specify an installation prefix other than '/usr/local' by giving +'configure' the option '--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option '--exec-prefix=PREFIX' to 'configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like '--bindir=DIR' to specify different values for particular +kinds of files. Run 'configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the default +for these options is expressed in terms of '${prefix}', so that +specifying just '--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to 'configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +'make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, 'make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +'${prefix}'. Any directories that were specified during 'configure', +but not in terms of '${prefix}', must each be overridden at install time +for the entire installation to be relocated. The approach of makefile +variable overrides for each directory variable is required by the GNU +Coding Standards, and ideally causes no recompilation. However, some +platforms have known limitations with the semantics of shared libraries +that end up requiring recompilation when using this method, particularly +noticeable in packages that use GNU Libtool. + + The second method involves providing the 'DESTDIR' variable. For +example, 'make install DESTDIR=/alternate/directory' will prepend +'/alternate/directory' before all installation names. The approach of +'DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of '${prefix}' +at 'configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving 'configure' the +option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. + + Some packages pay attention to '--enable-FEATURE' options to +'configure', where FEATURE indicates an optional part of the package. +They may also pay attention to '--with-PACKAGE' options, where PACKAGE +is something like 'gnu-as' or 'x' (for the X Window System). The +'README' should mention any '--enable-' and '--with-' options that the +package recognizes. + + For packages that use the X Window System, 'configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the 'configure' options '--x-includes=DIR' and +'--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of 'make' will be. For these packages, running './configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with 'make V=1'; while running './configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with 'make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC +is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX 'make' updates targets which have the same time stamps as their +prerequisites, which makes it generally unusable when shipped generated +files such as 'configure' are involved. Use GNU 'make' instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its '' header file. The option '-nodtk' can be used as a +workaround. If GNU CC is not installed, it is therefore recommended to +try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put '/usr/ucb' early in your 'PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in '/usr/bin'. So, if you need '/usr/ucb' +in your 'PATH', put it _after_ '/usr/bin'. + + On Haiku, software installed for all users goes in '/boot/common', +not '/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features 'configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, 'configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +'--build=TYPE' option. TYPE can either be a short name for the system +type, such as 'sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file 'config.sub' for the possible values of each field. If +'config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option '--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with '--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for 'configure' scripts to share, +you can create a site shell script called 'config.site' that gives +default values for variables like 'CC', 'cache_file', and 'prefix'. +'configure' looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: not all 'configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to 'configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the 'configure' command line, using 'VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified 'gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an +Autoconf limitation. Until the limitation is lifted, you can use this +workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +'configure' Invocation +====================== + + 'configure' recognizes the following options to control how it +operates. + +'--help' +'-h' + Print a summary of all of the options to 'configure', and exit. + +'--help=short' +'--help=recursive' + Print a summary of the options unique to this package's + 'configure', and exit. The 'short' variant lists options used only + in the top level, while the 'recursive' variant lists options also + present in any nested packages. + +'--version' +'-V' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + +'--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally 'config.cache'. FILE defaults to '/dev/null' to + disable caching. + +'--config-cache' +'-C' + Alias for '--cache-file=config.cache'. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to '/dev/null' (any error + messages will still be shown). + +'--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: for + more details, including other options available for fine-tuning the + installation locations. + +'--no-create' +'-n' + Run the configure checks, but stop before creating any output + files. + +'configure' also accepts some other, not widely useful, options. Run +'configure --help' for more details. diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.am b/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.am new file mode 100644 index 0000000..ee66eb8 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.am @@ -0,0 +1,13 @@ +ACLOCAL_AMFLAGS = -I m4 + +bin_PROGRAMS = eblook +info_TEXINFOS = eblook.texi + +eblook_SOURCES = eblook.c codeconv.c getopt.c getopt1.c bmp2ppm.c bmp_in.c \ + win32.c +eblook_LDADD = @LIBOBJS@ +noinst_HEADERS = getopt.h codeconv.h + +EXTRA_DIST = README.org +# MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in stamp-h.in \ +# configure missing mkinstalldirs install-sh texinfo.tex diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.in b/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.in new file mode 100644 index 0000000..b93e0bb --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/Makefile.in @@ -0,0 +1,1165 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = eblook$(EXEEXT) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 $(top_srcdir)/m4/ebu.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(noinst_HEADERS) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" +PROGRAMS = $(bin_PROGRAMS) +am_eblook_OBJECTS = eblook.$(OBJEXT) codeconv.$(OBJEXT) \ + getopt.$(OBJEXT) getopt1.$(OBJEXT) bmp2ppm.$(OBJEXT) \ + bmp_in.$(OBJEXT) win32.$(OBJEXT) +eblook_OBJECTS = $(am_eblook_OBJECTS) +eblook_DEPENDENCIES = @LIBOBJS@ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(eblook_SOURCES) +DIST_SOURCES = $(eblook_SOURCES) +AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) +am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) +am__v_DVIPS_0 = @echo " DVIPS " $@; +am__v_DVIPS_1 = +AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) +am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) +am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; +am__v_MAKEINFO_1 = +AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) +am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) +am__v_INFOHTML_0 = @echo " INFOHTML" $@; +am__v_INFOHTML_1 = +AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) +am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) +am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; +am__v_TEXI2DVI_1 = +AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) +am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) +am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; +am__v_TEXI2PDF_1 = +AM_V_texinfo = $(am__v_texinfo_@AM_V@) +am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) +am__v_texinfo_0 = -q +am__v_texinfo_1 = +AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) +am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) +am__v_texidevnull_0 = > /dev/null +am__v_texidevnull_1 = +INFO_DEPS = $(srcdir)/eblook.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = eblook.dvi +PDFS = eblook.pdf +PSS = eblook.ps +HTMLS = eblook.html +TEXINFOS = eblook.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ + COPYING ChangeLog INSTALL NEWS README compile config.guess \ + config.sub depcomp install-sh ltmain.sh missing mkinstalldirs \ + strcasecmp.c strdup.c texinfo.tex +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ +EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ +EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +info_TEXINFOS = eblook.texi +eblook_SOURCES = eblook.c codeconv.c getopt.c getopt1.c bmp2ppm.c bmp_in.c \ + win32.c + +eblook_LDADD = @LIBOBJS@ +noinst_HEADERS = getopt.h codeconv.h +EXTRA_DIST = README.org +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .dvi .html .info .lo .o .obj .pdf .ps .texi +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +eblook$(EXEEXT): $(eblook_OBJECTS) $(eblook_DEPENDENCIES) $(EXTRA_eblook_DEPENDENCIES) + @rm -f eblook$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eblook_OBJECTS) $(eblook_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp2ppm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp_in.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codeconv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eblook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +.texi.info: + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ + $< + +.texi.pdf: + $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ + $< + +.texi.html: + $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) + $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@ && mv $(@:.html=.htp) $@; \ + else \ + rm -rf $(@:.html=.htp); exit 1; \ + fi +$(srcdir)/eblook.info: eblook.texi +eblook.dvi: eblook.texi +eblook.pdf: eblook.texi +eblook.html: eblook.texi +.dvi.ps: + $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) $(AM_V_texinfo) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf eblook.t2d eblook.t2p + +clean-aminfo: + -test -z "eblook.dvi eblook.pdf eblook.ps eblook.html" \ + || rm -rf eblook.dvi eblook.pdf eblook.ps eblook.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(HEADERS) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-aminfo clean-binPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + d2=$$d$$p; \ + if test -d "$$d2"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d2"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ + fi; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done + @$(POST_INSTALL) + @if $(am__can_run_installinfo); then \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-binPROGRAMS uninstall-dvi-am uninstall-html-am \ + uninstall-info-am uninstall-pdf-am uninstall-ps-am + +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ + clean-aminfo clean-binPROGRAMS clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-info dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dvi-am \ + uninstall-html-am uninstall-info-am uninstall-pdf-am \ + uninstall-ps-am + +.PRECIOUS: Makefile + +# MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in stamp-h.in \ +# configure missing mkinstalldirs install-sh texinfo.tex + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/NEWS b/lib/ebu/others/eblook-1.6.1+media-20200414/NEWS new file mode 100644 index 0000000..3f108c4 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/NEWS @@ -0,0 +1,128 @@ +* Changes in eblook 1.6.1 + +** EB $B%i%$%V%i%j(B 4.1 $B$KBP1~!#(B + +* Changes in eblook 1.6 + +** EB $B%i%$%V%i%j(B 4.0 $B$K0\9T!#(B + +** pbm xbm bmp bmp2ppm bmp2tiff jpg jpeg $B%3%^%s%I$NDI2C!#(B + + +* Changes in eblook 1.5.1 + +** EB $B%i%$%V%i%j(B 3.2.1 $B$KBP1~!#(B + +** $B$$$/$D$+$N%P%0%U%#%/%9!#(B + + +* Changes in eblook 1.5 + +** EB $B%i%$%V%i%j(B 3.0 $B$K0\9T!#(BEB $B%i%$%V%i%j(B 2.x $B$H$OHs8_49!#(B + +** $B%m%1!<%k$KBP1~$7$?F~=PNO$N%5%]!<%H!#(B + +** $B>e5-$KH<$J$$!"(Bconfigure $B%*%W%7%g%s$rJQ99!#(B +--with-eb-conf $B$G(B eb.conf $B$N>l=j$r;XDj$9$k!#%G%U%)%k%H$G$O(B +/usr/local/etc/eb.conf $B$HA[Dj$9$k!#(B--with-eb-includes $B$H(B +-with-eb-libraries $B$OGQ;_!#$^$?!"(B--with-fallback-encoding $B$G(B +$B<+F0G'<1<:GT;~$N(B encoding $B$r;XDj$9$k!#(B + +** eblook $B$N8=:_$N%[!<%`%Z!<%8$OH$N$3$H!#(B + +** $B$$$/$D$+$N%P%0%U%#%/%9!#(B + + +* Changes in eblook 1.2 + +** configure $B$K%*%W%7%g%s(B --with-zlib-{includes,libraries} $B$rDI2C!#(B + +** Windows $B$N(B mingw32 $B4D6-$G$N%3%s%Q%$%k$r%5%]!<%H!#(B +configure $B$K%*%W%7%g%s(B --with-mingw32 $B$r;XDj$9$k!#(B +$B$^$?!"%G%U%)%k%H$NJ8;z%3!<%I$r(B SJIS $B$K$7$?!#(B + +** `set' $B=PMh$k%*%W%7%g%s(B `kanji-code' $B$rDI2C!#(B +$BF~=PNO$NJ8;z%3!<%I$r7hDj$9$k!#(B`JIS', `SJIS', `EUC' $B$N$$$:$l$+$r@_Dj2DG=!#(B + +** $B%P!<%8%g%s$N=PNO$K(B EB $B%i%$%V%i%j$N%P!<%8%g%s>pJs$rDI2C!#(B + +** $B@\e5-$KH<$J$$!"(Bconfigure $B$K%*%W%7%g%s$rDI2C!#(B +--with-eb-includes $B$H(B -with-eb-libraries $B$K$h$j!"(BEB $B%i%$%V%i%j$N$"$k(B +$B%G%#%l%/%H%j$r;XDj$9$k!#%G%U%)%k%H$G$O(B /usr/local $B0J2<$K$"$k$HA[Dj$9$k!#(B + +** $B?7$7$$%3%^%s%I(B `book'$B!#(B +$B:#8e!"<-=q%G%#%l%/%H%j$O$3$N%3%^%s%I$K$h$j;XDj$9$k!#$3$l$K$h$j!"(B +"set dict ..." $B$J$I$K$h$k<-=q;XDj$OL58z$H$J$C$?!#(B + +** $B$$$/$D$+$N%3%^%s%I$N;EMM$r8+D>$7$?!#(B +$B>\$7$/$O%^%K%e%"%k$r;2>H$N$3$H!#(B + + +* Changes in eblook 1.0 + +** $B?7$7$$%3%^%s%I(B `copyright'$B!#(B +$B<-=q$NCx:n8">pJs$r=PNO$9$k!#(B + +** EB Library $B$r(B 2.1 $B$K%"%C%W%G!<%H$7$?!#(B + + +* Changes in eblook 1.0b0 + +** EB Library $B$r(B 2.1beta1 $B$K%"%C%W%G!<%H$7$?!#(B + +$B$3$l$K$h$j!"<-=q$r05=L$7$FMxMQ=PMh$k$h$&$K$J$C$?!#>\$7$/$O!"(Beb $B%5%V(B +$B%G%#%l%/%H%j$KImB0$N%I%-%e%a%s%H(B($BFC$K(B ebzip-ja.info)$B$r;2>H!#(B + +* Changes in eblook 0.9 + +** $B=i4|2=%U%!%$%k(B "~/.eblookrc" $B$r%m!<%I$9$k$h$&$K$7$?!#(B +$B%U%!%$%k$K5-=R$5$l$?%3%^%s%I$,5/F0D>8e$K $B$H$7$?!#%j%U%!%l%s%9$N%?%0$N7A<0$r(B +... $B$H$7$?!#(B + +** $B%3%^%s%I(B `dicinfo' $B$G!"30;z$NHO0O$r=PNO$7$J$/$J$C$?!#(B +$BBe$o$j$K!"%3%^%s%I(B `font' $B$r0z?t$J$7$G + +eblook 1.6.1 (*1) $B$N2~B$HG$G$9!#(B +$BJQ99E@Ey$K$D$$$F$N>\:Y$OG[I[%Z!<%8$r;2>H$7$F2<$5$$!#(B +eblook 1.6.1 $B$N(B README $B%U%!%$%k$O(B README.org $B$K$"$j$^$9!#(B + +*1 http://openlab.jp/edict/lookup/eblook/ diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/README.org b/lib/ebu/others/eblook-1.6.1+media-20200414/README.org new file mode 100644 index 0000000..cc00a04 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/README.org @@ -0,0 +1,56 @@ +eblook $B$O!"(BEB $B%i%$%V%i%j$rMQ$$$?BPOC7?$NEE;R<-=q8!:w%3%^%s%I$G$9!#4JC1$J(B +$B@_Dj$H%3%^%s%I$K$h$j(B EPWING ($B8_49(B) $B=q@R$,MxMQ=PMh$^$9!#(B + +How To Install ========================================================= + +eblook $B$r%3%s%Q%$%k$9$k$K$O!"$"$i$+$8$a3^864pG7;a:n$N<-=q8!:w%i%$%V%i%j(B +EB $B$r%$%s%9%H!<%k$7$F$*$/I,MW$,$"$j$^$9!#(BEB $B%i%$%V%i%j$O$l(B EB $B%i%$%V(B +$B%i%j$N@_Dj%U%!%$%k$r;XDj=PMh$^$9!#%G%U%)%k%H$G$Ol9g!"0J2<$NNc$K<($9$h$&$K!"(BCC $B4D6-JQ?t$G(B +Mingw32 $B4D6-MQ$N%3%s%Q%$%i$rL@<(E*$K;XDj$7$F(B configure $B$re$G$O%G%U%)%k%H$NJ8;z%3!<%I$O(B SJIS $B$K$J$j$^$9!#(B + + % CC="gcc -mno-cygwin" ./configure + +$B:G8e$K!"\$7$/$O!"ImB0$N%U%!%$%k(B INSTALL $B$r;2>H$7$F2<$5$$!#(B + +How To Use ============================================================= + +eblook $B$rMxMQ$9$k$K$O!"<-=q$N$"$k%G%#%l%/%H%j$r0z?t$K(B eblook $B$r%7%'%k$+(B +$B$i5/F0$7$F2<$5$$!#(Beblook $B$,BPOCE*$K5/F0$5$l$^$9!#(B + + % eblook /cdrom + eblook> + +`list' $B$G<-=q$N0lMw!"(B`select' $B$G<-=q$NA*Br!"(B`search' $B$GMQ8l$N8!:w!"(B +`content' $B$GFbMF$NI=<(!"(B`help' $B$G%3%^%s%I$N0lMw!"(B`quit' $B$G=*N;$G$9!#(B +$B>\$7$/$O!"ImB0$N%I%-%e%a%s%H$r;2>H$7$F2<$5$$!#(B + +How To Get ============================================================= + +eblook $B$O(B Ring Server $B$N%*!<%W%s%i%\$G3+H/$5$l$F$$$^$9!#(B + + http://openlab.ring.gr.jp/edict/eblook/ + +eblook $B$K4X$9$k>pJs8r49$O!"(Bedict $B$d(B NDTPD $B$N%a!<%j%s%0%j%9%H$K$F9T$o$l(B +$B$F$$$^$9!#(B + + edict ML: http://openlab.ring.gr.jp/edict/ + NDTPD ML: http://www.sra.co.jp/people/m-kasahr/ndtpd/ml-ja.html + +eblook $B$O(B edict $B3+H/%A!<%`(B (edict@ring.gr.jp) $B$K$h$j4IM}$5$l$F$$$^$9!#(B +eblook $B$K4X$9$kLd$$9g$o$;$O$3$A$i$^$G$*4j$$$7$^$9!#(B diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/aclocal.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/aclocal.m4 new file mode 100644 index 0000000..e08283c --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/aclocal.m4 @@ -0,0 +1,1160 @@ +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/eb4.m4]) +m4_include([m4/ebu.m4]) +m4_include([m4/largefile.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/bmp2ppm.c b/lib/ebu/others/eblook-1.6.1+media-20200414/bmp2ppm.c new file mode 100644 index 0000000..562a03e --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/bmp2ppm.c @@ -0,0 +1,372 @@ +/* -*- mode: C; c-basic-offset: 4; -*- */ +/* bmp2ppm.c - part of eblook, interactive EB interface command + * + * Copyright (C) 2001 Yamagata, T. Nemoto. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_EBU +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#endif + +extern EB_Book current_book; + +int parse_entry_id (char *code,EB_Position *pos); + +extern unsigned char *LoadBMP (int *w, int *h); + +void command_bmp2tiff (int argc, char *argv[]); +void command_bmp2ppm (int argc, char *argv[]); +static int tiff_put_word (FILE *fp, unsigned short w); +static int tiff_put_dword (FILE *fp, unsigned long dw); +/* static int tifftag_write_byte (FILE *fp, int id, unsigned char ch); */ +static int tifftag_write_word (FILE *fp, int id, unsigned short val); +static int tifftag_write_dword (FILE *fp, int id, unsigned long val); +static int tifftag_write_words (FILE *fp, int id, unsigned char *buf, + int *bp, int base, int count, + const unsigned short *val); +static int tifftag_write_string (FILE *fp, int id, unsigned char *buf, + int *bp, int base, const char *val); + + + +void +command_bmp2ppm(argc, argv) + int argc; + char *argv[]; +{ + EB_Error_Code error_code; + EB_Position pos; + int w, h; + FILE *fp; + unsigned char *p; + const char *ppm_error = NULL; + + if (argc != 3) { + ppm_error = "parameter error"; + goto ppm_fail2; + } + if (parse_entry_id(argv[1], &pos) == 0) { + ppm_error = "entry address error"; + goto ppm_fail2; + } + + error_code = eb_set_binary_color_graphic(¤t_book, &pos); + if (error_code != EB_SUCCESS) { + ppm_error = "data read error"; + goto ppm_fail2; + } + p = LoadBMP(&w, &h); + if (p == NULL) { + ppm_error = "bmp decode error"; + goto ppm_fail2; + } + + fp = fopen(argv[2], "wb"); + if (fp == NULL) { + ppm_error = "output file open error"; + goto ppm_fail3; + } + + if (fprintf(fp, "P6\n%d %d\n255\n", w, h) != 0 && + 1 == fwrite(p, 3*w*h, 1, fp)) { + fclose(fp); + free(p); + printf("OK\n"); + return; + } + ppm_error = "file write error"; +/* ppm_fail: */ + fclose(fp); + unlink(argv[2]); + ppm_fail3: + free(p); + ppm_fail2: + if (ppm_error == NULL) + printf("NG\n"); + else + printf("NG: bmp2ppm : %s\n", ppm_error); +} + +#if 0 +static int +tiff_put_byte(fp, ch) + FILE *fp; + unsigned char ch; +{ + return putc(255 & ch, fp); +} +#endif + +static int +tiff_put_word(fp, w) + FILE *fp; + unsigned short w; +{ + if (EOF == putc(255 & (w >> 8), fp)) + return EOF; + return putc(255 & w, fp); +} + +static int +tiff_put_dword(fp, dw) + FILE *fp; + unsigned long dw; +{ + if (EOF == tiff_put_word(fp, 0xffff & (dw >> 16))) + return EOF; + return tiff_put_word(fp, 0xffff & dw); +} + +#if 0 +static int +tifftag_write_byte(fp, id, ch) + FILE *fp; + int id; + unsigned char ch; +{ + if (EOF == tiff_put_word(fp, id)) + return EOF; + if (EOF == tiff_put_word(fp, 1)) /* TIFF_BYTE */ + return EOF; + if (EOF == tiff_put_dword(fp, 1)) /* length */ + return EOF; + if (EOF == tiff_put_byte(fp, ch)) + return EOF; + if (EOF == tiff_put_byte(fp, 0)) /* padding 1/3 */ + return EOF; + return tiff_put_word(fp, 0); /* padding 2/3 */ +} +#endif + +static int +tifftag_write_word(fp, id, val) + FILE *fp; + int id; + unsigned short val; +{ + if (EOF == tiff_put_word(fp, id)) + return EOF; + if (EOF == tiff_put_word(fp, 3)) /* TIFF_SHORT */ + return EOF; + if (EOF == tiff_put_dword(fp, 1)) /* length */ + return EOF; + if (EOF == tiff_put_word(fp, val)) + return EOF; + return tiff_put_word(fp, 0); /* padding */ +} + +static int +tifftag_write_dword(fp, id, val) + FILE *fp; + int id; + unsigned long val; +{ + if (EOF == tiff_put_word(fp, id)) + return EOF; + if (EOF == tiff_put_word(fp, 4)) /* TIFF_LONG */ + return EOF; + if (EOF == tiff_put_dword(fp, 1)) /* length */ + return EOF; + return tiff_put_dword(fp, val); +} + +static int +tifftag_write_words(fp, id, buf, bp, base, count, val) + FILE *fp; + int id; + unsigned char *buf; + int *bp; + int base; + int count; + const unsigned short *val; +{ + if (EOF == tiff_put_word(fp, id)) + return EOF; + if (EOF == tiff_put_word(fp, 3)) /* TIFF_SHORT */ + return EOF; + if (EOF == tiff_put_dword(fp, count)) /* length */ + return EOF; + if (EOF == tiff_put_dword(fp, base+*bp)) + return EOF; + while(count > 0) { + buf[(*bp)++] = 255 & (*val >> 8); + buf[(*bp)++] = 255 & *val; + val++; + count--; + } + return 1; +} + +static int +tifftag_write_string(fp, id, buf, bp, base, val) + FILE *fp; + int id; + unsigned char *buf; + int *bp; + int base; + const char *val; +{ + int count; + count = strlen(val) + 1; + if (EOF == tiff_put_word(fp, id)) + return EOF; + if (EOF == tiff_put_word(fp, 2)) /* TIFF_ASCII */ + return EOF; + if (EOF == tiff_put_dword(fp, count)) /* length */ + return EOF; + if (EOF == tiff_put_dword(fp, base+*bp)) + return EOF; + memcpy(buf+*bp, val, count); + *bp += count; + return 1; +} + +void +command_bmp2tiff(argc, argv) + int argc; + char *argv[]; +{ + unsigned char binary_data[EB_SIZE_PAGE]; + int binary_data_pointer; + EB_Error_Code error_code; + EB_Position pos; + unsigned int end, base; + int w, h; + FILE *fp; + unsigned char *p; + const unsigned short dep[3] = {8, 8, 8}; + int n_tags; + const char *tiff_error = NULL; + + if (argc != 3) { + tiff_error = "parameter error"; + goto tiff_fail3; + } + + binary_data_pointer = 0; + if (parse_entry_id(argv[1], &pos) == 0) { + tiff_error = "entry address error"; + goto tiff_fail3; + } + + error_code = eb_set_binary_color_graphic(¤t_book, &pos); + if (error_code != EB_SUCCESS) { + tiff_error = "bmp read error"; + goto tiff_fail3; + } + + p = LoadBMP(&w, &h); + if (p == NULL) { + tiff_error = "bmp decode error"; + goto tiff_fail3; + } + + fp = fopen(argv[2], "wb"); + if (fp == NULL) { + tiff_error = "output file open error"; + goto tiff_fail2; + } + + end = w*h*3+8; /* Bitmap Size + TIFF Header Size */ + + /* Write Header */ + n_tags = 11; + base = end + 12 * n_tags + 6; /* end of TIFF directory */ + /* TIFF magic number (big endian) / TIFF version 4.2 */ + if (fwrite("\x4d\x4d\x00\x2a",1,4,fp) != 4 || + /* TIFF directory offset */ + tiff_put_dword(fp, (unsigned long) end) == EOF || + + /* Write Bitmap */ + 3*w*h != fwrite(p, 1, 3*w*h, fp) || + + /* Write Information */ + /* TIFF directory count */ + tiff_put_word(fp, n_tags) == EOF || + /* TIFFTAG_IMAGEWIDTH */ + tifftag_write_word(fp, 256, w) == EOF || + /* TIFFTAG_IMAGELENGTH */ + tifftag_write_word(fp, 257, h) == EOF || + /* TIFFTAG_BITSPARSAMPLE */ + tifftag_write_words(fp, 258, binary_data, &binary_data_pointer, + base, 3, dep) == EOF || + /* TIFFTAG_COMPRESSION */ + tifftag_write_word(fp, 259, 1) == EOF || + /* TIFFTAG_PHOTOMETRIC */ + tifftag_write_word(fp, 262, 2) == EOF || + /* TIFFTAG_IMAGEDESCRIPTION */ + tifftag_write_string(fp, 270, binary_data, &binary_data_pointer, base, + "eblook temporary data. Don't copy this file!") == EOF || + /* TIFFTAG_STRIPOFFSET */ + tifftag_write_dword(fp, 273, 8) == EOF || + /* TIFFTAG_ORIENTATION */ + tifftag_write_word(fp, 274, 1) == EOF || + /* TIFFTAG_SAMPLESPARPIXEL */ + tifftag_write_dword(fp, 277, 3) == EOF || + /* TIFFTAG_STRIPBYTECOUNTS */ + tifftag_write_dword(fp, 279,3*w*h) == EOF || + /* TIFFTAG_SOFTWARE */ + tifftag_write_string(fp, 305, binary_data, &binary_data_pointer, + base, PACKAGE " " VERSION) == EOF || + /* TIFF directory end */ + tiff_put_dword(fp, 0) == EOF || + fwrite(binary_data,1,binary_data_pointer,fp) != binary_data_pointer + ) { + tiff_error = "output file write error"; + goto tiff_fail; + } + fclose(fp); + free(p); + printf("OK\n"); + return; + + tiff_fail: + fclose(fp); + unlink(argv[2]); + tiff_fail2: + free(p); + tiff_fail3: + if (tiff_error == NULL) + printf("NG\n"); + else + printf("NG: bmp2tiff: %s\n",tiff_error); + return; +} diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/bmp_in.c b/lib/ebu/others/eblook-1.6.1+media-20200414/bmp_in.c new file mode 100644 index 0000000..26d4538 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/bmp_in.c @@ -0,0 +1,636 @@ +/* -*- mode: C; c-basic-offset: 4; -*- */ + +/* bmp_in.c - part of eblook, interactive EB interface command + * + * Decoder for Windows BMP format without compression + * + * Copyright (C) 2001 T. Nemoto. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +/* #define DEBUG */ +/* #define BMPTEST */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +#ifdef ENABLE_EBU +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#endif + +extern EB_Book current_book; + +#ifndef BI_BITFIELDS +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 +#endif /* not BI_BITFIELDS */ + +static ssize_t read_data_from_eb(unsigned char *buf, int len); +static unsigned long get_dword(unsigned char *p); + +void deflate_rle4 (unsigned char *output, unsigned char *palette, int width, int height, int dir); +void deflate_rle8 (unsigned char *output, unsigned char *palette, int width, int height, int dir); +void deflate_rgb4 (unsigned char *output, unsigned char *palette, int width, int height, int dir); +void deflate_rgb8 (unsigned char *output, unsigned char *palette, int width, int height, int dir); +void deflate_rgb1 (unsigned char *output, unsigned char *palette, int width, int height, int dir); +void deflate_rgb24 (unsigned char *output, unsigned char *palette, int width, int height, int dir); + + +#define BMP_BUF_SIZE 2048 +static unsigned char bmp_buf [BMP_BUF_SIZE]; +static int bmp_buf_max_count = 0, bmp_buf_cur_count = 0; + +void init_bmp_buf () +{ + bmp_buf_max_count = read_data_from_eb(bmp_buf, BMP_BUF_SIZE); + bmp_buf_cur_count = 0; +} + +ssize_t read_bytes_from_bmp_buf (dest, count) + unsigned char *dest; + ssize_t count; +{ + ssize_t send; + send = 0; + + while (send < count) { + if (bmp_buf_cur_count >= bmp_buf_max_count) { + if (bmp_buf_max_count == BMP_BUF_SIZE) { + bmp_buf_max_count = read_data_from_eb(bmp_buf, BMP_BUF_SIZE); + if (bmp_buf_max_count <= 0) + return send; + bmp_buf_cur_count = 0; + } else + return send; + } + + *(dest+send) = bmp_buf[bmp_buf_cur_count]; + send++; + bmp_buf_cur_count++; + } + return send; +} + +ssize_t seek_bytes_bmp_buf (count) + ssize_t count; +{ + ssize_t seeked; + seeked = 0; + + while (seeked < count) { + if (bmp_buf_cur_count >= bmp_buf_max_count) { + if (bmp_buf_max_count == BMP_BUF_SIZE) { + bmp_buf_max_count = read_data_from_eb(bmp_buf, BMP_BUF_SIZE); + if (bmp_buf_max_count <= 0) + return seeked; + bmp_buf_cur_count = 0; + } else + return seeked; + } + + if ((count - seeked) < (bmp_buf_max_count - bmp_buf_cur_count)) { + bmp_buf_cur_count += (count - seeked); + seeked = count; + } else { + seeked += bmp_buf_max_count - bmp_buf_cur_count; + bmp_buf_cur_count = bmp_buf_max_count; + } + } + return seeked; +} + +static ssize_t read_data_from_eb(buf, len) + unsigned char *buf; + int len; +{ + ssize_t read_length; + ssize_t count = 0; + while(len>0) { + if (eb_read_binary(¤t_book, len, (char *)(buf + count), &read_length) + != EB_SUCCESS) + return -1; + if (read_length == 0) + return count; + len -= read_length; + count += read_length; + } + return count; +} + +static unsigned long get_dword(p) + unsigned char *p; +{ + unsigned char *buf; + buf = (unsigned char *) p; + return (((unsigned long)(buf[3]))<<24) + + (((unsigned long)(buf[2]))<<16) + + (((unsigned long)(buf[1]))<<8) + + (unsigned long)buf[0]; +} + +unsigned char * +LoadBMP(w,h) + int *w; + int *h; +{ + unsigned char buf [14 + 124], palette[4 * 256]; + int depth; + unsigned long header_size, palette_size, image_offset; + int width, height, dir, i, n_pal; + unsigned char *output = NULL; + + init_bmp_buf (); + /*Check BMP magic number and header size.*/ + if ((read_bytes_from_bmp_buf (buf, 14 + 20) != 14 + 20) || + buf[0] != 'B' || buf[1] != 'M') { + fprintf(stderr,"Not BMP format.\n"); + goto failed; + } + + header_size = get_dword(buf + 14); + image_offset = get_dword(buf + 10); + + /*Check header type.*/ + switch (header_size) { + case 40: /*INFO header*/ + case 52: + case 60: + case 96: /*V4 header*/ + case 108: + case 112: + case 120: + case 124: /*V5 header*/ + break; + case 12: /*CORE header*/ + default: + goto err_header; + } + + if (read_bytes_from_bmp_buf (buf + 14 + 20, header_size - 20) != header_size - 20) + goto err_data_end; + if (image_offset > (14 + header_size)) + image_offset -= (14 + header_size); + else + image_offset = 0; + + *w = (int) get_dword (buf + 14 + 4); + *h = (int) get_dword (buf + 14 + 8); + if (*h < 0) { + *h = -*h; + dir = 1; + } else + dir = -1; + width = *w; + height = *h; + + output = malloc(width * height * 3); + if (output == NULL) + goto err_memory; + + depth = buf[14 + 14]; + /*Check bitcount.*/ + switch (depth) { + case 1: + case 4: + case 8: + /*Check and set palette.*/ + if (image_offset >= 4) + n_pal = (((image_offset / 4) - 1) & 0xff) + 1; + else { + n_pal = get_dword (buf+14+32); + if (n_pal != 0) + n_pal = ((n_pal - 1) & 0xff) + 1; + else + n_pal = 1 << depth; + } + + if (read_bytes_from_bmp_buf (palette, 4 * n_pal) != 4 * n_pal) + goto err_data_end; + if (image_offset > 4 * n_pal) + image_offset -= 4 * n_pal; + else + image_offset = 0; + break; + case 24: + break; + case 16: + case 32: + default: + goto err_depth; + } + + if (image_offset > 0) + if (seek_bytes_bmp_buf(image_offset) != image_offset) + goto err_data_end; + + /*Check compression type*/ + switch(buf[14 + 16]) { + case BI_RGB: + switch(depth) { + case 1: + deflate_rgb1 (output, palette, width, height, dir); + break; + case 4: + deflate_rgb4 (output, palette, width, height, dir); + break; + case 8: + deflate_rgb8 (output, palette, width, height, dir); + break; + case 24: + deflate_rgb24 (output, palette, width, height, dir); + break; + default: + goto err_depth; + } + break; + case BI_RLE8: + deflate_rle8 (output, palette, width, height, dir); + break; + case BI_RLE4: + deflate_rle4 (output, palette, width, height, dir); + break; + case BI_BITFIELDS: + default: + goto err_compression; + } + return output; + + err_compression: + fprintf(stderr,"Unsupported compression code.\n"); + goto failed; + err_depth: + fprintf(stderr,"Unsupported bitcount.\n"); + goto failed; + err_header: + fprintf(stderr,"Unsupported header format.\n"); + goto failed; + err_memory: + fprintf(stderr,"Memory error.\n"); + goto failed; + err_data_end: + fprintf(stderr,"Unexpected data end. \n"); + goto failed; + failed: + if (output != NULL) + free (output); + return NULL; +} + +void deflate_rle4 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, y0, l_length, i, col[2]; + unsigned char buf[2 + 256]; + + x = 0; + if (dir > 0) + y = 0; + else + y = height -1; + + do { + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + switch(buf[0]) { + case 0: + switch (buf[1]) { + case 0: + x = 0; + y += dir; + + if (y < 0 || y >= height) + goto check_eob; + break; + case 1: + goto rle4_end; + case 2: + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + x += buf[0]; + y += buf[1] * dir; + + if (y < 0 || y >= height) + goto check_eob; + break; + default: + if (x + buf[1] > width) + goto illegal; + l_length = (buf[1]+1) / 2; + l_length += l_length % 2; + if (read_bytes_from_bmp_buf (buf+2, l_length) != l_length) + goto failed; + for(i=0; i < buf[1]; i++) { + if ((i % 2) == 0) { + col[0] = (buf[i/2 + 2] & 0xf0) >> 4; + } else { + col[0] = buf[i/2 + 2] & 0x0f; + } + output[(x+y*width)*3 + 0]=palette[col[0]*4 + 2]; + output[(x+y*width)*3 + 1]=palette[col[0]*4 + 1]; + output[(x+y*width)*3 + 2]=palette[col[0]*4 + 0]; + x++; + } + } + break; + default: + if (x + buf[0] > width) + goto illegal; + col[0] = (buf[1] & 0xf0) >> 4; + col[1] = buf[1] & 0x0f; + for(i=0; i < buf[0]; i++) { + output[(x+y*width)*3 + 0]=palette[col[i % 2]*4 + 2]; + output[(x+y*width)*3 + 1]=palette[col[i % 2]*4 + 1]; + output[(x+y*width)*3 + 2]=palette[col[i % 2]*4 + 0]; + x++; + } + + } + } while (1); + + failed: + fprintf(stderr,"(RLE4)Unexpected data end.\n"); + return; + illegal: + fprintf(stderr,"(RLE4)Reached illegal point.\n"); + return; + check_eob: + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + if (buf[0] != 0 || buf[1] != 1) + goto illegal; + rle4_end: + return; +} + + + +void deflate_rle8 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, l_length, i; + unsigned char buf[2 + 256]; + + x = 0; + if (dir > 0) + y = 0; + else + y = height - 1; + do { + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + switch(buf[0]) { + case 0: + switch (buf[1]) { + case 0: + x = 0; + y += dir; + + if (y < 0 || y >=height) + goto check_eob; + break; + case 1: + goto rle8_end; + case 2: + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + x += buf[0]; + y += buf[1] * dir; + + if (y < 0 || y >= height) + goto check_eob; + break; + default: + if (x + buf[1] > width) + goto illegal; + l_length = buf[1] + (buf[1] & 1); + if (read_bytes_from_bmp_buf (buf+2, l_length) != l_length) + goto failed; + for(i=0; i < buf[1]; i++) { + output[(x+y*width)*3 + 0]=palette[buf[i + 2]*4 + 2]; + output[(x+y*width)*3 + 1]=palette[buf[i + 2]*4 + 1]; + output[(x+y*width)*3 + 2]=palette[buf[i + 2]*4 + 0]; + x++; + } + } + break; + default: + if (x + buf[0] > width) + goto illegal; + for(i=0; i < buf[0]; i++) { + output[(x+y*width)*3 + 0]=palette[buf[1]*4 + 2]; + output[(x+y*width)*3 + 1]=palette[buf[1]*4 + 1]; + output[(x+y*width)*3 + 2]=palette[buf[1]*4 + 0]; + x++; + } + + } + } while (1); + + failed: + fprintf(stderr,"(RLE8)Unexpected data end.\n"); + return; + illegal: + fprintf(stderr,"(RLE8)Reached illegal point.\n"); + return; + check_eob: + if (read_bytes_from_bmp_buf (buf, 2) != 2) + goto failed; + if (buf[0] != 0 || buf[1] != 1) + goto illegal; + rle8_end: + return; +} + +void deflate_rgb8 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, y0, skipbytes, col; + unsigned char buf[1]; + + if (dir > 0) + y = 0; + else + y = height - 1; + + skipbytes = (4 - (width % 4)) % 4; + for (y0 = 0; y0 < height; y0++, y += dir) { + for (x = 0; x < width; x++) { + if (read_bytes_from_bmp_buf (buf, 1) != 1) + goto failed; + col = buf[0]; + output[(x+y*width)*3 + 0]=palette[col*4 + 2]; + output[(x+y*width)*3 + 1]=palette[col*4 + 1]; + output[(x+y*width)*3 + 2]=palette[col*4 + 0]; + } + if (skipbytes != 0) { + if (seek_bytes_bmp_buf (skipbytes) != skipbytes) + goto failed; + } + } + return; + failed: + fprintf(stderr,"(RGB8)Unexpected data end.\n"); + return; +} + +void deflate_rgb4 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, y0, skipbytes, col; + unsigned char buf[1]; + + if (dir > 0) + y = 0; + else + y = height - 1; + + skipbytes = (4 - (((width + 1) / 2) % 4)) % 4; + for (y0 = 0; y0 < height; y0++, y += dir) { + for (x = 0; x < width; x++) { + if ((x % 2) == 0) { + if (read_bytes_from_bmp_buf (buf, 1) != 1) + goto failed; + col = (buf[0] & 0xf0) >> 4; + } else + col = buf[0] & 0x0f; + output[(x+y*width)*3 + 0]=palette[col*4 + 2]; + output[(x+y*width)*3 + 1]=palette[col*4 + 1]; + output[(x+y*width)*3 + 2]=palette[col*4 + 0]; + } + if (skipbytes != 0) + if (seek_bytes_bmp_buf(skipbytes) != skipbytes) + goto failed; + } + return; + failed: + fprintf(stderr,"(RGB4)Unexpected data end.\n"); + return; +} + + +void deflate_rgb1 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, y0, skipbytes, col; + unsigned char buf[1]; + + if (dir > 0) + y = 0; + else + y = height - 1; + + skipbytes = (4 - (((width + 7) / 8) % 4)) % 4; + for (y0 = 0; y0 < height; y0++, y+=dir) { + for (x = 0; x < width; x++) { + if ((x % 8) == 0) + if (read_bytes_from_bmp_buf (buf, 1) != 1) + goto failed; + col = (buf[0] & (0x80 >> (x % 8))) >> (7- (x % 8)); + output[(x+y*width)*3 + 0]=palette[col*4 + 2]; + output[(x+y*width)*3 + 1]=palette[col*4 + 1]; + output[(x+y*width)*3 + 2]=palette[col*4 + 0]; + } + + if (skipbytes != 0) { + if (seek_bytes_bmp_buf (skipbytes) != skipbytes) + goto failed; + } + } + + return; + failed: + fprintf(stderr,"(RGB1)Unexpected data end.\n"); + return; +} + + +void deflate_rgb24 (output, palette, width, height, dir) + unsigned char *output; + unsigned char *palette; + int width; + int height; + int dir; +{ + int x, y, y0, skipbytes, col; + unsigned char buf[3]; + + if (dir > 0) + y = 0; + else + y = height - 1; + + skipbytes = (4 - ((width * 3) % 4)) % 4; + for (y0 = 0; y0 < height; y0++, y += dir) { + for (x = 0; x < width; x++) { + if (read_bytes_from_bmp_buf (buf, 3) != 3) + goto failed; + output[(x+y*width)*3 + 0]=buf[2]; + output[(x+y*width)*3 + 1]=buf[1]; + output[(x+y*width)*3 + 2]=buf[0]; + } + + if (skipbytes != 0) { + if (seek_bytes_bmp_buf(skipbytes) != skipbytes) + goto failed; + } + } + return; + failed: + fprintf(stderr,"(RGB24)Unexpected data end.\n"); + return; +} diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.c b/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.c new file mode 100644 index 0000000..49ade98 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.c @@ -0,0 +1,804 @@ +/* + * codeconv.c + * Copyright(c) 2001 Takashi NEMOTO + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Written by Takashi Nemoto (tnemoto@mvi.biglobe.ne.jp). + * Modified by Kazuhiko + * Modified by Satomi + * + */ + +/* #define DEBUG_CODECONV */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "codeconv.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_LOCALE_H +# include +#endif + +#ifdef HAVE_ICONV_H +# include +#endif + +#ifdef HAVE_LANGINFO_H +#include +#endif + +#ifdef HAVE_ALLOCA_H +#include +#endif + +#ifdef HAVE_ICONV +static iconv_t cur_to_euc = (iconv_t)-1; +static iconv_t euc_to_cur = (iconv_t)-1; +static const char *eucjp_code_name = NULL; +#endif + +/* Return code <0: error, -2: Output Buffer Overflow */ +size_t current_to_euc PROTO((char **current, size_t *in_len, + char **euc, size_t *out_len)); +static size_t euc_to_current PROTO((char **euc, size_t *in_len, + char **current, size_t *out_len)); + + +enum CONV_MODE {IO_AUTO, IO_ICONV, IO_SJIS, IO_EUC} conv_mode; + +static enum CONV_MODE detect_conv_mode PROTO((const char *encoding)); + + + + +#define TMP_SIZE 10240 + +static int xputs_raw PROTO((const char *str, int len, FILE *fp)); +static int xputs2 PROTO((const char *str, int len, FILE *fp)); + +static const char *euc_jp_names[] = { + "eucJP", "EUC-JP", "eucjp", "euc-jp", "EUCJP", "ujis", "UJIS", + "euc", "EUC", NULL +}; + +static const char *shift_jis_names[] = { + "SHIFT-JIS", "SHIFT_JIS", "SJIS", "CSSHIFTJIS", "SHIFTJIS", NULL +}; + +#ifdef HAVE_ICONV +static const char *iso_2022_jp_names[] = { + "ISO-2022-JP-3", "ISO-2022-JP-2", "ISO-2022-JP", + "CSISO2022JP", "CSISO2022JP2", "CSISO2022JP3", + "ISO-2022", "ISO2022", "ISO2022JP", "ISO2022-JP", "JIS", NULL +}; + +static const char *japanese_names[] = { + "ja", "japanese", NULL +}; +#endif + +static int match_str(str,str_list) + const char *str; + const char **str_list; +{ + const char **ptr; + for(ptr=str_list;*ptr!=NULL;ptr++) { + if (strcasecmp(str,*ptr)==0) return 1; + } + return 0; +} + +/* + + Ѵؿ + + + 1. encoding ꤵƤ顢ޤꤵ줿 encoding  + 1a. ޤ ꤵ줿 encoding EUC/SJIS ɤȽ => IO_EUC / IO_SJIS + 1b. ʤ iconv ѴǤ encoding Ƚ => IO_ICONV + ʲƱ͡ + + 2. ˽Ѥߤä ǽλ + + 3. ʤ locale μߤ + 3a. nl_langinfo(CODESET) encoding Фߤ롣 + 3b. LC_CTYPE encoding Фߤ롣 + 2e. LC_CTYPE Ⱦ(.ʹ) encoding Фߤ롣 + + 3. FALLBACK_ENCODING  + + 4. EUC_JP + + ˤʤ + SJIS locale ̾ ja/japanese ξ + iconv ͭ => EUC_JP iconv ̾ϡ + iconv ̵ => 4. EUC_JP ʡ + locale C Ȥ en_US ä顩 => FALLBACK 롣 + gettext бξ׼ľ + + */ + +#ifdef HAVE_ICONV + +static int +setup_eucjp_code_name() +{ + const char **enc; + iconv_t ic; + if (eucjp_code_name == NULL) { + for (enc = euc_jp_names; *enc != NULL; enc++) { + ic = iconv_open(*enc, *enc); + if (ic != (iconv_t)-1) { + eucjp_code_name = *enc; + iconv_close(ic); + break; + } + } + if (eucjp_code_name == NULL) { + /* EUC-JP ˼ - ۣ "ja" "japanese"  */ + for (enc = japanese_names; *enc != NULL; enc++) { + ic = iconv_open(*enc,*enc); + if (ic != (iconv_t)-1) { + eucjp_code_name = *enc; + iconv_close(ic); + break; + } + } + } + } + return eucjp_code_name != NULL; +} + +/* Current locale codeset ܸ줬뤫 + Ԥʤ 0, ʤ 1 ֤ */ + +static int +iconv_test(ctoe, etoc) + iconv_t ctoe, etoc; +{ + /* ʸ "¸" */ +#define TEST_STRING "\xBC\xC2\xB8\xB3" +#define TEST_LENGTH 50 + char test1_0[TEST_LENGTH],test2_0[TEST_LENGTH],test3_0[TEST_LENGTH]; + char *test1,*test2,*test3; + size_t ilen,olen; + + if (ctoe == (iconv_t)-1 || etoc == (iconv_t)-1) + return 0; + strcpy(test1_0,TEST_STRING); + test1=test1_0; + test2=test2_0; + test3=test3_0; + ilen=strlen(TEST_STRING); + olen=TEST_LENGTH; + + /* euc-jp => current code Ѵƥ */ + if (iconv(etoc,&test1,&ilen,&test2,&olen) == ((size_t)-1)) + return 0; + if (iconv(etoc,NULL,&ilen,&test2,&olen) == ((size_t)-1)) + return 0; + + /* current code 뤫 */ + test2=test2_0; + ilen=TEST_LENGTH-olen; + olen=TEST_LENGTH; + if (iconv(ctoe,&test2,&ilen,&test3,&olen) == ((size_t)-1)) + return 0; + if (iconv(ctoe,NULL,&ilen,&test3,&olen) == ((size_t)-1)) + return 0; + + if (strncmp(test1_0,test3_0,strlen(test1_0)) != 0) + return 0; + + return 1; +} + +static int +iconv_setup(current_code_name) + const char *current_code_name; +{ + iconv_t ctoe,etoc; + static int disable_iconv = 0; + + if (disable_iconv) + return 0; + if (eucjp_code_name == NULL) { + if (! setup_eucjp_code_name()) { + disable_iconv = 1; + return 0; + } + } + + if (current_code_name == NULL || eucjp_code_name == NULL) + return 0; + + ctoe = iconv_open(eucjp_code_name, current_code_name); + etoc = iconv_open(current_code_name, eucjp_code_name); + + + if (iconv_test(ctoe, etoc)) { + /* ޤä ꤹ */ + if (cur_to_euc != (iconv_t) -1) + iconv_close(cur_to_euc); + if (euc_to_cur != (iconv_t) -1) + iconv_close(euc_to_cur); + cur_to_euc=ctoe; + euc_to_cur=etoc; + return 1; + } else { + if (ctoe != (iconv_t)-1) + iconv_close(ctoe); + if (etoc != (iconv_t)-1) + iconv_close(etoc); + return 0; + } +} +#endif + +enum CONV_MODE detect_conv_mode(encoding) + const char *encoding; +{ + if (encoding == NULL) return IO_AUTO; + if (match_str(encoding,euc_jp_names)) return IO_EUC; + if (match_str(encoding,shift_jis_names)) return IO_SJIS; +#ifdef HAVE_ICONV + if (match_str(encoding,iso_2022_jp_names)) { + const char **enc; + for(enc = iso_2022_jp_names;*enc != NULL; enc++){ + if (iconv_setup(*enc)) + return IO_ICONV; + } + } else if (iconv_setup(encoding)) { + return IO_ICONV; + } +#endif + return IO_AUTO; +} + +size_t +locale_init(encoding) + const char *encoding; +{ + static int initialized = 0; +#ifdef HAVE_SETLOCALE + static char *locale_name = NULL; + static char *current_code_name = NULL; +#endif + enum CONV_MODE cm_temp; + +#ifdef HAVE_SETLOCALE + locale_name = setlocale(LC_CTYPE, ""); +#endif + + /* 1. encoding ˤ + ͭ encoding ꤵаͤ */ + cm_temp = detect_conv_mode(encoding); + if (cm_temp != IO_AUTO) { + conv_mode = cm_temp; + goto init_finish; + } + + /* Ǥ ѤߤǤ Τޤ޵ */ + if (initialized != 0 && + (conv_mode != IO_ICONV +#ifdef HAVE_ICONV + || (cur_to_euc != (iconv_t)-1 && euc_to_cur != (iconv_t)-1) +#endif + )) + return CODECONV_OK; + initialized = 0; + conv_mode = IO_AUTO; + +#ifdef HAVE_SETLOCALE + /* 2. current_locale ߤ */ +#if defined(HAVE_NL_LANGINFO) && defined(CODESET) + /* 2a/2b. nl_langinfo(CODESET) μλ */ + current_code_name=nl_langinfo(CODESET); + conv_mode=detect_conv_mode(current_code_name); + if (conv_mode != IO_AUTO) + goto init_finish; +#endif + /* 2c/2d. locale LC_CTYPE ΤΤγǧ */ + conv_mode=detect_conv_mode(locale_name); + if (conv_mode != IO_AUTO) + goto init_finish; + + /* 2e/2f. locale LC_CTYPE Ⱦγǧ */ + if (locale_name != NULL) { + char *try2; + locale_name = strdup(locale_name); + if (locale_name == NULL) + return CODECONV_ERROR; + try2 = strtok(locale_name, ".@"); + if (try2 != NULL) + try2 = strtok(NULL, ".@"); + if (try2 != NULL) { + conv_mode = detect_conv_mode(try2); + if (conv_mode != IO_AUTO) goto init_finish; + } + } +#endif /* HAVE_SETLOCALE */ + + /* 3a/3b. Ǥʤ FALLBACK */ +#ifdef FALLBACK_ENCODING + conv_mode = detect_conv_mode(FALLBACK_ENCODING); +#endif + + /* 4. EUC_JP */ + if (conv_mode == IO_AUTO) conv_mode = IO_EUC; + + init_finish: + initialized = 1; + return CODECONV_OK; +} + +static int +xputs_raw(str, len, fp) + const char *str; + int len; + FILE *fp; +{ + int outlen = 0; + int len1 = len; + int wlen; + + while (outlen < len) { + wlen = fwrite(str, 1, len1, fp); + if (wlen == 0) + break; + outlen += wlen; + len1 -= wlen; + str += wlen; + } + return outlen; +} + +static int +xputs2(str, len, fp) + const char *str; + int len; + FILE *fp; +{ + char *buf1p, *buf1p0; + char *buf2p, *buf2p0; + size_t len1, len2; + size_t outlen; + int ret_code; + size_t status; + + /* The maximum size of output is 4 times larger than input. */ + outlen = len * 4; + + len1 = len; + len2 = outlen; +#ifdef HAVE_ALLOCA + buf1p = buf1p0 = alloca(len1); +#else + buf1p = buf1p0 = malloc(len1); +#endif + if (buf1p == NULL) + return EOF; +#ifdef HAVE_ALLOCA + buf2p = buf2p0 = alloca(len2); +#else + buf2p = buf2p0 = malloc(len2); +#endif + if (buf2p == NULL) { + free(buf1p0); + return EOF; + } + memcpy(buf1p, str, len); + status=euc_to_current(&buf1p, &len1, &buf2p, &len2); + if (status == CODECONV_BUFFER_OVERFLOW) { /* ΰ */ + buf1p = buf1p0; + len1 = len; + outlen *= 3; + len2 = outlen; +#ifdef HAVE_ALLOCA + buf2p = buf2p0 = alloca(outlen); +#else + free(buf2p0); + buf2p = buf2p0 = malloc(outlen); +#endif + if (buf2p == NULL){ + free(buf1p0); + return EOF; + } + status=euc_to_current(&buf1p, &len1, &buf2p, &len2); + } + if (status == CODECONV_ERROR || status == CODECONV_BUFFER_OVERFLOW) { + /* Conversion Error Τޤ޽ */ +#ifndef HAVE_ALLOCA + free(buf1p0); + free(buf2p0); +#endif + return xputs_raw(str, len, fp); + } +#ifndef HAVE_ALLOCA + free(buf1p0); +#endif + ret_code = xputs_raw(buf2p0, outlen - len2, fp); +#ifndef HAVE_ALLOCA + free(buf2p0); +#endif + return ret_code; +} + +int +xfputs(str, fp) + const char *str; + FILE* fp; +{ + return xputs2(str, strlen(str), fp); +} + +int +xputs(str) + const char *str; +{ + int len; + len=xfputs(str, stdout); + if (len<0) return EOF; + putchar('\n'); + return len+1; +} + +int +xvfprintf(fp, fmt, ap) + FILE *fp; + const char *fmt; + va_list ap; +{ + char buf1[TMP_SIZE]; + int len; +#ifdef HAVE_VSNPRINTF + len = vsnprintf(buf1, TMP_SIZE - 1, fmt, ap); + buf1[TMP_SIZE - 1]=0; +#else + len = vsprintf(buf1, fmt, ap); +#endif + return xputs2(buf1, len, fp); +} + +/* USE_STDARG_H is defined in codeconv.h */ +#ifdef USE_STDARG_H +int +xfprintf(FILE *fp, const char *fmt, ...) +#else +int +xfprintf(fp, fmt, va_alist) + FILE *fp; + const char *fmt; + va_dcl +#endif +{ + int len; + va_list ap; +#ifdef USE_STDARG_H + va_start(ap, fmt); +#else + va_start(ap); +#endif + len = xvfprintf(fp, fmt, ap); + va_end(ap); + return len; +} + +int +#ifdef USE_STDARG_H +xprintf(const char *fmt, ...) +#else +xprintf(fmt, va_alist) + const char *fmt; + va_dcl +#endif +{ + int len; + va_list ap; +#ifdef USE_STDARG_H + va_start(ap, fmt); +#else + va_start(ap); +#endif + len = xvfprintf(stdout, fmt, ap); + va_end(ap); + return len; +} + +char * +xfgets(str, size, fp) + char *str; + size_t size; + FILE *fp; +{ + char *ibuf, *ibuf0; + size_t ilen; + size_t status; + char *str0; + size_t size0; + + str0 = str; + size0 = size; + + /* The maximum size of input is 4 times larger than size. */ + ilen = size * 4; +#ifdef HAVE_ALLOCA + ibuf0 = ibuf = alloca(ilen+1); +#else + ibuf0 = ibuf = malloc(ilen+1); +#endif + if (ibuf == NULL) + return NULL; + + if (fgets(ibuf, ilen, fp) == NULL) { +#ifndef HAVE_ALLOCA + free(ibuf); +#endif + return NULL; + } + ibuf[ilen]=0; + ilen=strlen(ibuf); + + status = current_to_euc(&ibuf,&ilen,&str,&size); + str0[size0-size]=0; +#ifndef HAVE_ALLOCA + free(ibuf0); +#endif + if (status != CODECONV_ERROR) return str0; + return NULL; +} + +/* ================================================================== */ + +char* +jis_to_euc(euc, jis, len) + char *euc; + const char *jis; + int len; +{ + const char *jis_end; + char *q; + jis_end = jis + len; + /* Remove white space at tail of string */ + while (jis_end >= jis + 2 && + ((jis_end[-1] == '\0' && jis_end[-2] == '\0') || + (jis_end[-1] == 0x21 && jis_end[-2] == 0x21))) + jis_end -= 2; + q = euc; + while (jis < jis_end) + *q++ = (*jis++ | 0x80); + *q = '\0'; + return (char *)euc; +} + +char* +euc_to_jis(jis, euc, len) + char *jis; + const char *euc; + int len; +{ + const char *euc_end; + char *q; + euc_end = euc + len; + /* Remove white space at tail of string */ + while (euc_end >= euc + 2 && + ((euc_end[-1] == '\0' && euc_end[-2] == '\0') || + (euc_end[-1] == 0x21 && euc_end[-2] == 0x21))) + euc_end -= 2; + q = jis; + while (euc < euc_end) + *q++ = (*euc++ & 0x7f); + *q = '\0'; + return (char *)jis; +} + +size_t current_to_euc (in_buf,in_len,out_buf,out_len) + char **in_buf, **out_buf; + size_t *in_len,*out_len; +{ + int c1, c2; + size_t count = 0; + +#ifdef HAVE_ICONV + if (conv_mode == IO_ICONV) { + size_t ret; + if (cur_to_euc == (iconv_t) -1) + return CODECONV_ERROR; + ret = iconv(cur_to_euc,in_buf,in_len,out_buf,out_len); + if (ret != ((size_t)-1)) + ret = iconv(cur_to_euc, NULL, in_len, out_buf, out_len); + if (ret == ((size_t)-1)) { + iconv(cur_to_euc,NULL,NULL,NULL,NULL); +#ifdef E2BIG + if (errno == E2BIG) + return CODECONV_BUFFER_OVERFLOW; + else +#endif /* E2BIG */ + return CODECONV_ERROR; + } + return ret; + } +#endif /* HAVE_ICONV */ + + if (conv_mode == IO_SJIS) { + while(*in_len>0) { + if (*out_len<=0) break; + c1 = *((*in_buf)++) & 0xff; + (*in_len)--; + if (c1 < 0x80) { /* ASCII ʸ */ + (*out_len)--; + count++; + *((*out_buf)++)=c1; + continue; + } else if ((c1 < 0x81 || c1 > 0x9f) && (c1 < 0xe0 || c1 > 0xef)) { + /* Ⱦѥ */ + if (0xa1 <= c1 && c1 <= 0xdf) { + c2 = c1 - 0x80; + c1 = 0x8e; + } else { + return -1; + } + } else { + c2 = *((*in_buf)++) & 0xff; + (*in_len)--; + if (c1 > 0x9f) + c1 -= 0x40; + c1 += c1; + if (c2 <= 0x9e) { + c1 -= 0xe1; + if (c2 >= 0x80) + c2 -= 1; + c2 -= 0x1f; + } else { + c1 -= 0xe0; + c2 -= 0x7e; + } + c2 |= 0x80; + } + *((*out_buf)++) = c1 | 0x80; + (*out_len)--; + count++; + if (*out_len <= 0) + return CODECONV_BUFFER_OVERFLOW; + *((*out_buf)++) = c2; + (*out_len)--; + count++; + } + if (*in_len == 0) return count; + if (*out_len == 0) return CODECONV_BUFFER_OVERFLOW; + return CODECONV_ERROR; + } else { /* IO_EUC */ + if (*out_len < *in_len) { + memcpy(*out_buf,*in_buf,*out_len); + count = *out_len; + (*out_buf) += *out_len; + (*in_buf) += *out_len; + (*in_len) -= *out_len; + *out_len = 0; + return CODECONV_BUFFER_OVERFLOW; + } else { + memcpy(*out_buf,*in_buf,*in_len); + count = *in_len; + (*out_buf)+=*in_len; + (*in_buf)+=*in_len; + (*out_len)-=*in_len; + *in_len=0; + return count; + } + } + return CODECONV_ERROR; /* Never */ +} + +size_t euc_to_current (in_buf,in_len,out_buf,out_len) + char **in_buf, **out_buf; + size_t *in_len,*out_len; +{ + int c1, c2; + size_t count = 0; + +#ifdef HAVE_ICONV + if (conv_mode == IO_ICONV) { + size_t ret; + if (euc_to_cur == (iconv_t) -1) + return CODECONV_ERROR; + ret = iconv(euc_to_cur,in_buf,in_len,out_buf,out_len); + if (ret != ((size_t)-1)) + ret = iconv(euc_to_cur,NULL,in_len,out_buf,out_len); + if (ret == ((size_t)-1)) { + iconv(euc_to_cur,NULL,NULL,NULL,NULL); +#ifdef E2BIG + if (errno == E2BIG) + return CODECONV_BUFFER_OVERFLOW; + else +#endif /* E2BIG */ + return CODECONV_ERROR; + } + return ret; + } +#endif /* HAVE_ICONV */ + + if (conv_mode == IO_SJIS) { + while(*in_len>0) { + if (*out_len<=0) break; + c1 = *((*in_buf)++) & 0xff; + (*in_len)--; + if ((c1 & 0x80) == 0) { + *((*out_buf)++) = c1; + (*out_len)--; + count++; + continue; + } + if (0x8e == c1) { + *((*out_buf)++) = *((*in_buf)++) | 0x80; + (*in_len)--; + (*out_len)--; + count++; + continue; + } + c1 &= 0x7f; + c2 = *((*in_buf)++) & 0x7f; + (*in_len)--; + if (c1 & 0x01) { + c2 += 0x1f; + if (c2 > 0x7e) + c2++; + } else { + c2 += 0x7e; + } + c1 = (c1 + 0xe1) >> 1; + if (c1 > 0x9f) + c1 += 0x40; + *((*out_buf)++) = c1; + (*out_len)--; + count++; + if (*out_len <= 0) + return CODECONV_BUFFER_OVERFLOW; + *((*out_buf)++) = c2; + (*out_len)--; + count++; + } + if (*in_len == 0) return count; + if (*out_len == 0) return CODECONV_BUFFER_OVERFLOW; + return CODECONV_ERROR; + } else { /* IO_EUC */ + if (*out_len < *in_len) { + /* There are no needs to convert partially. Because caller + never refer to partially converted string and other + parameters. */ + memcpy(*out_buf,*in_buf,*out_len); + count = *out_len; + (*out_buf)+=*out_len; + (*in_buf)+=*out_len; + (*in_len)-=*out_len; + *out_len=0; + return CODECONV_BUFFER_OVERFLOW; + } else { + memcpy(*out_buf,*in_buf,*in_len); + count = *in_len; + (*out_buf)+=*in_len; + (*in_buf)+=*in_len; + (*out_len)-=*in_len; + *in_len=0; + return count; + } + } + return CODECONV_ERROR; /* Never */ +} + diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.h b/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.h new file mode 100644 index 0000000..91553bd --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/codeconv.h @@ -0,0 +1,55 @@ +/* + * codeconv.h - header file for code conversion + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Written by Takashi Nemoto (tnemoto@mvi.biglobe.ne.jp). + * Modified by Kazuhiko + * Modified by Satomi + */ + +#ifndef __CODECONV_H__ +#define __CODECONV_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#define USE_STDARG_H + +#define CODECONV_BUFFER_OVERFLOW ((size_t) -2) +#define CODECONV_ERROR ((size_t) -1) +#define CODECONV_OK ((size_t) 0) + +#ifndef PROTO +#if defined(__STDC__) +#define PROTO(p) p +#else +#define PROTO(p) () +#endif +#endif /* PROTO */ + +extern size_t locale_init PROTO((const char *encoding)); +extern int xvfprintf PROTO((FILE *fp, const char *fmt, va_list ap)); +extern int xfprintf PROTO((FILE *fp, const char *fmt, ...)); +extern int xprintf PROTO((const char *fmt, ...)); +extern int xfputs PROTO((const char *str, FILE *fp)); +extern int xputs PROTO((const char *str)); +extern char *xfgets PROTO((char *str, size_t size, FILE *fp)); + +extern char *euc_to_jis PROTO((char *jis, const char *euc, int len)); +extern char *jis_to_euc PROTO((char *euc, const char *jis, int len)); +extern size_t current_to_euc PROTO((char **current, size_t *in_len, + char **euc, size_t *out_len)); + +#endif diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/compile b/lib/ebu/others/eblook-1.6.1+media-20200414/compile new file mode 100644 index 0000000..2ab71e4 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/compile @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2016-01-11.22; # UTC + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/config.guess b/lib/ebu/others/eblook-1.6.1+media-20200414/config.guess new file mode 100644 index 0000000..4cd9454 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/config.guess @@ -0,0 +1,1658 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2019 Free Software Foundation, Inc. + +timestamp='2019-04-28' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2019 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/config.h.in b/lib/ebu/others/eblook-1.6.1+media-20200414/config.h.in new file mode 100644 index 0000000..8a2ac39 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/config.h.in @@ -0,0 +1,167 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define if EB Library supports remote access. */ +#undef EBCONF_ENABLE_EBNET + +/* Define if EB Library supports native language. */ +#undef EBCONF_ENABLE_NLS + +/* Define if EB Library supports pthread. */ +#undef EBCONF_ENABLE_PTHREAD + +/* Define if EB library with UTF-8 support is requested */ +#undef ENABLE_EBU + +/* definition for Default Char Set */ +#undef FALLBACK_ENCODING + +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `iconv' function. */ +#undef HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#undef HAVE_ICONV_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `isatty' function. */ +#undef HAVE_ISATTY + +/* Define to 1 if you have the header file. */ +#undef HAVE_LANGINFO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `nl_langinfo' function. */ +#undef HAVE_NL_LANGINFO + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to `1' if printf() recognizes "I64" modifier for __int64 */ +#undef PRINTF_I64_MODIFIER + +/* Define to `1' if printf() recognizes "ll" modifier for long long */ +#undef PRINTF_LL_MODIFIER + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* with pager option */ +#undef USE_PAGER + +/* with GNU readline library */ +#undef USE_READLINE + +/* Version number of package */ +#undef VERSION + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `long int' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `int' if does not define. */ +#undef ssize_t diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/config.sub b/lib/ebu/others/eblook-1.6.1+media-20200414/config.sub new file mode 100644 index 0000000..f53af5a --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/config.sub @@ -0,0 +1,1798 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2019 Free Software Foundation, Inc. + +timestamp='2019-01-05' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2019 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $os in + irix*) + ;; + *) + os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x$os != x ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + qnx*) + case $cpu in + x86 | i*86) + ;; + *) + os=nto-$os + ;; + esac + ;; + hiux*) + os=hiuxwe2 + ;; + nto-qnx*) + ;; + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + nsk*) + os=nsk + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + # This must come after sysvr4. + sysv*) + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + zvmoe) + os=zvmoe + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac + ;; + nacl*) + ;; + ios) + ;; + none) + ;; + *-eabi) + ;; + *) + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $cpu-$vendor in + score-*) + os=elf + ;; + spu-*) + os=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + os=linux + ;; + arm*-semi) + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff + ;; + tic6x-*) + os=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os=aout + ;; + mep-*) + os=elf + ;; + mips*-cisco) + os=elf + ;; + mips*-*) + os=elf + ;; + or32-*) + os=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os=coff + ;; + *-*bug) + os=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $os in + riscix*) + vendor=acorn + ;; + sunos*) + vendor=sun + ;; + cnk*|-aix*) + vendor=ibm + ;; + beos*) + vendor=be + ;; + hpux*) + vendor=hp + ;; + mpeix*) + vendor=hp + ;; + hiux*) + vendor=hitachi + ;; + unos*) + vendor=crds + ;; + dgux*) + vendor=dg + ;; + luna*) + vendor=omron + ;; + genix*) + vendor=ns + ;; + clix*) + vendor=intergraph + ;; + mvs* | opened*) + vendor=ibm + ;; + os400*) + vendor=ibm + ;; + ptx*) + vendor=sequent + ;; + tpf*) + vendor=ibm + ;; + vxsim* | vxworks* | windiss*) + vendor=wrs + ;; + aux*) + vendor=apple + ;; + hms*) + vendor=hitachi + ;; + mpw* | macos*) + vendor=apple + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + vendor=atari + ;; + vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/configure b/lib/ebu/others/eblook-1.6.1+media-20200414/configure new file mode 100644 index 0000000..39c0ef1 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/configure @@ -0,0 +1,15305 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for eblook 1.6.1+media-20200414. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='eblook' +PACKAGE_TARNAME='eblook' +PACKAGE_VERSION='1.6.1+media-20200414' +PACKAGE_STRING='eblook 1.6.1+media-20200414' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="eblook.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +EBCONF_INTLLIBS +EBCONF_INTLINCS +EBCONF_PTHREAD_LDFLAGS +EBCONF_PTHREAD_CFLAGS +EBCONF_PTHREAD_CPPFLAGS +EBCONF_ZLIBLIBS +EBCONF_ZLIBINCS +EBCONF_EBLIBS +EBCONF_EBINCS +LIBOBJS +ALLOCA +CPP +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_largefile +with_fallback_encoding +with_readline +with_pager +enable_ebu +with_ebu_conf +with_eb_conf +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +LT_SYS_LIBRARY_PATH +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures eblook 1.6.1+media-20200414 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/eblook] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of eblook 1.6.1+media-20200414:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --enable-ebu Build with EB Library with UTF-8 support [[auto]] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). + --with-fallback-encoding=encoding (default="EUC-JP" ("SHIFT-JIS" on HP-UX, + Cygwin and MinGW systems)) + --with-readline compile with gnu readline library + --with-pager compile with pager option + --with-ebu-conf=FILE ebu.conf file is FILE [[SYSCONFDIR/ebu.conf]] + --with-eb-conf=FILE eb.conf file is FILE [[SYSCONFDIR/eb.conf]] + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +eblook configure 1.6.1+media-20200414 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by eblook $as_me 1.6.1+media-20200414, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_config_headers="$ac_config_headers config.h" + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.15' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='eblook' + VERSION='1.6.1+media-20200414' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n "$lt_cv_sys_max_cmd_len"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + pic_mode=default +fi + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + export_dynamic_flag_spec='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + + + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen=shl_load +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen=dlopen +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report what library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + + +for ac_header in langinfo.h locale.h iconv.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ll modifier of printf" >&5 +$as_echo_n "checking for ll modifier of printf... " >&6; } +if ${ac_cv_func_printf_ll+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + int main() { + char buffer[128]; + sprintf(buffer, "%llx", (unsigned long long) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_printf_ll=yes +else + ac_cv_func_printf_ll=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_printf_ll" >&5 +$as_echo "$ac_cv_func_printf_ll" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for I64 modifier of printf" >&5 +$as_echo_n "checking for I64 modifier of printf... " >&6; } +if ${ac_cv_func_printf_i64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + int main() { + char buffer[128]; + sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_printf_i64=yes +else + ac_cv_func_printf_i64=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_printf_i64" >&5 +$as_echo "$ac_cv_func_printf_i64" >&6; } +if test "$ac_cv_func_printf_ll" = yes; then + +$as_echo "#define PRINTF_LL_MODIFIER 1" >>confdefs.h + +fi +if test "$ac_cv_func_printf_i64" = yes; then + +$as_echo "#define PRINTF_I64_MODIFIER 1" >>confdefs.h + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + +for ac_func in iconv nl_langinfo setlocale vsnprintf isatty +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes; then : + $as_echo "#define HAVE_STRDUP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; +esac + +fi + + + + + + +TARGET=${target} + +case "$target" in + *-*-hpux*) default_fallback="SHIFT-JIS" ;; + *-*-cygwin*) default_fallback="SHIFT-JIS" ;; + *-*-mingw32*) default_fallback="SHIFT-JIS" ;; + *) default_fallback="EUC-JP" ;; +esac + +# Check whether --with-fallback-encoding was given. +if test "${with_fallback_encoding+set}" = set; then : + withval=$with_fallback_encoding; cat >>confdefs.h <<_ACEOF +#define FALLBACK_ENCODING "${fallback_encoding}" +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define FALLBACK_ENCODING "${default_fallback}" +_ACEOF + +fi + + + +# Check whether --with-readline was given. +if test "${with_readline+set}" = set; then : + withval=$with_readline; + tcap="" + for termlib in ncurses curses termcap terminfo termlib; do + as_ac_Lib=`$as_echo "ac_cv_lib_$termlib''_tputs" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -l$termlib" >&5 +$as_echo_n "checking for tputs in -l$termlib... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$termlib $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); +int +main () +{ +return tputs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + tcap="-l$termlib" + break + +fi + + termlib="no" + done + if test ! "$termlib" = "no" ; then + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_readline_h" = xyes; then : + +$as_echo "#define USE_READLINE 1" >>confdefs.h + LIBS="$LIBS -lreadline -l$termlib" +fi + + + fi + +fi + + + +# Check whether --with-pager was given. +if test "${with_pager+set}" = set; then : + withval=$with_pager; +$as_echo "#define USE_PAGER 1" >>confdefs.h + +fi + + +save_sysconfdir=$sysconfdir + if test ! -f $sysconfdir/eb.conf; then + if test -f /etc/eb.conf ; then + sysconfdir=/etc + fi + fi +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +# Check whether --enable-ebu was given. +if test "${enable_ebu+set}" = set; then : + enableval=$enable_ebu; ENABLE_EBU=$enableval +else + ENABLE_EBU=auto +fi + + +if test $ENABLE_EBU != no; then + + + + + + for ac_header in limits.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIMITS_H 1 +_ACEOF + +fi + +done + + ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + + + +# Check whether --with-ebu-conf was given. +if test "${with_ebu_conf+set}" = set; then : + withval=$with_ebu_conf; ebuconf="${withval}" +else + ebuconf=$sysconfdir/ebu.conf +fi + + if test X$prefix = XNONE; then + PREFIX=$ac_default_prefix + else + PREFIX=$prefix + fi + ebuconf=`echo X$ebuconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ + -e 's;\$(prefix);'"$PREFIX;g"` + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ebu.conf" >&5 +$as_echo_n "checking for ebu.conf... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ebuconf" >&5 +$as_echo "$ebuconf" >&6; } + if test -f ${ebuconf}; then + . ${ebuconf} + else + if test $ENABLE_EBU = yes; then + as_fn_error $? "$ebuconf not found" "$LINENO" 5 + else + ENABLE_NLS=no + fi + fi +fi + +if test $ENABLE_EBU != no; then + if test X$EBCONF_ENABLE_PTHREAD = Xyes; then + +$as_echo "#define EBCONF_ENABLE_PTHREAD 1" >>confdefs.h + + fi + if test X$EBCONF_ENABLE_NLS = Xyes; then + +$as_echo "#define EBCONF_ENABLE_NLS 1" >>confdefs.h + + fi + if test X$EBCONF_ENABLE_EBNET = Xyes; then + +$as_echo "#define EBCONF_ENABLE_EBNET 1" >>confdefs.h + + fi + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EB Library with UTF-8 support" >&5 +$as_echo_n "checking for EB Library with UTF-8 support... " >&6; } + save_CPPFLAGS=$CPPFLAGS + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" + CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" + LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" + LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +eb_initialize_library(); return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_eb=yes +else + try_eb=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_eb" >&5 +$as_echo "$try_eb" >&6; } + if test ${try_eb} != yes; then + if test $ENABLE_EBU = yes; then + as_fn_error $? "EB Library with UTF-8 support not available" "$LINENO" 5 + else + ENABLE_EBU=no + fi + else + +$as_echo "#define ENABLE_EBU 1" >>confdefs.h + + fi +fi + +if test $ENABLE_EBU = no; then + + + + + +for ac_header in limits.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIMITS_H 1 +_ACEOF + +fi + +done + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + + + +# Check whether --with-eb-conf was given. +if test "${with_eb_conf+set}" = set; then : + withval=$with_eb_conf; ebconf="${withval}" +else + ebconf=$sysconfdir/eb.conf +fi + +if test X$prefix = XNONE; then + PREFIX=$ac_default_prefix +else + PREFIX=$prefix +fi +ebconf=`echo X$ebconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ + -e 's;\$(prefix);'"$PREFIX;g"` + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eb.conf" >&5 +$as_echo_n "checking for eb.conf... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ebconf" >&5 +$as_echo "$ebconf" >&6; } +if test -f ${ebconf}; then + . ${ebconf} +else + as_fn_error $? "$ebconf not found" "$LINENO" 5 +fi + +if test X$EBCONF_ENABLE_PTHREAD = Xyes; then + +$as_echo "#define EBCONF_ENABLE_PTHREAD 1" >>confdefs.h + +fi +if test X$EBCONF_ENABLE_NLS = Xyes; then + +$as_echo "#define EBCONF_ENABLE_NLS 1" >>confdefs.h + +fi +if test X$EBCONF_ENABLE_EBNET = Xyes; then + +$as_echo "#define EBCONF_ENABLE_EBNET 1" >>confdefs.h + +fi + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EB Library" >&5 +$as_echo_n "checking for EB Library... " >&6; } +save_CPPFLAGS=$CPPFLAGS +save_CFLAGS=$CFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" +CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" +LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" +LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +eb_initialize_library(); return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + try_eb=yes +else + try_eb=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CPPFLAGS=$save_CPPFLAGS +CFLAGS=$save_CFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_eb" >&5 +$as_echo "$try_eb" >&6; } +if test ${try_eb} != yes; then + as_fn_error $? "EB Library not available" "$LINENO" 5 +fi + +fi +sysconfdir=$sysconfdir +CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" +CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" +LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" +LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by eblook $as_me 1.6.1+media-20200414, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +eblook config.status 1.6.1+media-20200414 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' + +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# The names of the tagged configurations supported by this script. +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain=$ac_aux_dir/ltmain.sh + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/configure.ac b/lib/ebu/others/eblook-1.6.1+media-20200414/configure.ac new file mode 100644 index 0000000..8207376 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/configure.ac @@ -0,0 +1,103 @@ +dnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.63) +AC_INIT(eblook, 1.6.1+media-20200414) +AC_CONFIG_SRCDIR([eblook.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE +AH_TEMPLATE([FALLBACK_ENCODING],[definition for Default Char Set]) +AC_CONFIG_MACRO_DIRS([m4]) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LIBTOOL +AC_PROG_LN_S + +dnl Checks for libraries. + +dnl Checks for header files. +AC_CHECK_HEADERS(langinfo.h locale.h iconv.h) +dnl AC_CHECK_HEADERS(langinfo.h locale.h iconv.h sys/types.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T + +dnl * +dnl * large file support. +dnl * +eb_SYS_LARGEFILE + +dnl Checks for library functions. +AC_FUNC_ALLOCA +AC_CHECK_FUNCS(iconv nl_langinfo setlocale vsnprintf isatty) +AC_REPLACE_FUNCS(strcasecmp strdup) + +dnl * +dnl * System services +dnl * +AC_EXEEXT +AC_OBJEXT + +TARGET=${target} + +dnl * Default Charset +case "$target" in + *-*-hpux*) default_fallback="SHIFT-JIS" ;; + *-*-cygwin*) default_fallback="SHIFT-JIS" ;; + *-*-mingw32*) default_fallback="SHIFT-JIS" ;; + *) default_fallback="EUC-JP" ;; +esac +AC_ARG_WITH(fallback-encoding, + [ --with-fallback-encoding[=encoding] (default="EUC-JP" ("SHIFT-JIS" on HP-UX, + Cygwin and MinGW systems))], + [AC_DEFINE_UNQUOTED(FALLBACK_ENCODING,"${fallback_encoding}")], + [AC_DEFINE_UNQUOTED(FALLBACK_ENCODING,"${default_fallback}")]) + +dnl * +dnl * --with-readline option. +dnl * +AC_ARG_WITH(readline, +[ --with-readline compile with gnu readline library],[ + tcap="" + for termlib in ncurses curses termcap terminfo termlib; do + AC_CHECK_LIB($termlib, tputs, + [tcap="-l$termlib"] + break + ) + termlib="no" + done + if test ! "$termlib" = "no" ; then + AC_CHECK_HEADER(readline/readline.h,[AC_DEFINE(USE_READLINE, 1, [with GNU readline library]) LIBS="$LIBS -lreadline -l$termlib"],) + fi +], ) + +dnl * +dnl * --with-pager option. +dnl * +AC_ARG_WITH(pager, +[ --with-pager compile with pager option], +AC_DEFINE(USE_PAGER, 1, [with pager option]), ) + +dnl EB_CONFIG +save_sysconfdir=$sysconfdir +dnl for linux +[ if test ! -f $sysconfdir/eb.conf; then + if test -f /etc/eb.conf ; then + sysconfdir=/etc + fi + fi ] +eb_LIB_EBU +if test $ENABLE_EBU = no; then + eb_LIB_EB4 +fi +sysconfdir=$sysconfdir +CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" +CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" +LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" +LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/depcomp b/lib/ebu/others/eblook-1.6.1+media-20200414/depcomp new file mode 100644 index 0000000..b39f98f --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2016-01-11.22; # UTC + +# Copyright (C) 1999-2017 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.c b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.c new file mode 100644 index 0000000..f2e49a3 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.c @@ -0,0 +1,4473 @@ +/* -*- mode:C; c-basic-offset:2; -*- */ + +/* eblook.c - interactive EB interface command + * + * Copyright (C) 1997,1998,1999 Keisuke Nishida + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#if defined(WIN32) && !defined(DOS_FILE_PATH) +#define DOS_FILE_PATH 1 +#endif + +#include +#include +#include +#include +#include + +#ifdef HAVE_CTYPE_H +#include +#endif + +#ifdef USE_READLINE +#include +#include +#endif + +#include "getopt.h" +#include "codeconv.h" + +#ifdef EBCONF_ENABLE_PTHREAD +#define ENABLE_PTHREAD +#endif + +#ifdef ENABLE_EBU +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#endif + +#ifndef BUFSIZ +#define BUFSIZ 1024 +#endif + +/* + * maximum path length, same as in eb source files. + */ +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else /* not MAXPATHLEN */ +#define PATH_MAX 1024 +#endif /* not MAXPATHLEN */ +#endif /* not PATH_MAX */ + +#define MAX_HIT_SIZE 256 +#define MAX_TEXT_SIZE 8192 +#define MAX_DUMP_SIZE 2048 + +#if defined(__DOS__) || defined(MSDOS) +/* DOS only. not for Win32, OS/2 */ +#define USER_INIT_FILE "~/eblookrc" +#else /* UNIX, Windows, OS/2, etc. */ +#define USER_INIT_FILE "~/.eblookrc" +#endif + +#ifdef USE_READLINE +#if defined(__DOS__) || defined(MSDOS) +char HIST_FILE[] = "~/eblkhist.txt"; +#else +char HIST_FILE[] = "~/.eblook_history"; +#endif +#define MAX_INPUT_HISTORY 128 +#endif + + +/* + * String A-list + */ +typedef struct _StringAlist { + char *key; + char *value; + struct _StringAlist *next; +} StringAlist; + +/* + * Internal functions + */ +#ifdef USE_PAGER +FILE *popen_pager (void); +int pclose_pager (FILE *); +#endif + +char *read_command (char *, size_t, FILE *); +int excute_command (char *); +int parse_command_line (char *, char *[]); +#ifdef USE_READLINE +char *read_command2 (char *, size_t, const char *); +char *stripwhite (char *); +char *command_generator (char *, int); +char **fileman_completion (char *,int,int); +#endif + +void command_book (int, char *[]); +void command_info (int, char *[]); +void command_list (int, char *[]); +void command_select (int, char *[]); +void command_subinfo (int, char *[]); +void command_copyright (int, char *[]); +void command_menu (int, char *[]); +void command_image_menu (int, char *[]); +void command_search (int, char *[]); +void command_content (int, char *[]); +void command_dump (int, char *[]); +void command_font (int, char *[]); +void command_show (int, char *[]); +void command_set (int, char *[]); +void command_unset (int, char *[]); +void command_xbm (int, char *[]); +void command_pbm (int, char *[]); +void command_bmp2ppm (int, char *[]); +void command_bmp2tiff (int, char *[]); +void command_jpeg (int, char *[]); +void command_bmp (int, char *[]); +void command_wav (int, char *[]); +void command_mpeg (int, char *[]); +void command_mpeg_path (int, char *[]); +void command_color (int, char *[]); +void command_help (int, char *[]); + +void command_candidate (int, char *[]); +void command_label (int, char *[]); + +void show_entry_candidate ( EB_Book *, int, int ); +void show_label (EB_Book *, int); + +int check_book (); +int check_subbook (); + +int internal_set_font (EB_Book *, char *); +int parse_dict_id (char *, EB_Book *); +int parse_entry_id (char *, EB_Position *); + +int search_pattern (EB_Book *, EB_Appendix *, char *, int, int); +int hitcomp (const void *a, const void *b); +int insert_content (EB_Book *, EB_Appendix *, EB_Position *, int, int); +int insert_dump (EB_Book *, EB_Appendix *, EB_Position *, int); +int insert_font (EB_Book *, const char *); +int insert_font_list (EB_Book *); + +EB_Error_Code hook_font (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#ifdef EB_HOOK_GB2312 +EB_Error_Code hook_gb2312 (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#endif +#ifdef EB_HOOK_EBXAC_GAIJI +EB_Error_Code hook_ebxac_gaiji (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#endif +EB_Error_Code hook_stopcode (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code hook_tags (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code hook_img (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code hook_decoration (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code hook_euc_to_ascii (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code hook_iso8859_1 (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); + +EB_Error_Code can_menu_narrow_char (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code can_menu_wide_char (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#ifdef EB_HOOK_GB2312 +EB_Error_Code can_menu_gb2312 (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#endif +EB_Error_Code can_menu_gaiji (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); + +#if 0 +EB_Error_Code can_menu_begin (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +EB_Error_Code can_menu_end (EB_Book *, EB_Appendix *, void *, EB_Hook_Code, int, const unsigned int *); +#endif + +void show_version (void); +void show_help (void); +void show_try_help (void); +void set_error_message (EB_Error_Code); +void unset_error_message (); + +int search_wild_match_pattern(char *key, char *pattern); + +StringAlist *salist_set (StringAlist *, const char *, const char *); +char *salist_ref (StringAlist *, const char *); + +EB_Error_Code eblook_search_keyword (EB_Book *, const char *); +#ifdef EB_MAX_CROSS_ENTRIES +EB_Error_Code eblook_search_cross (EB_Book *, const char *); +#endif +EB_Error_Code eblook_search_multi (EB_Book *, const char *); +static void output_multi_information (EB_Book *); + +int eblook_have_wild_search(EB_Book *book); +EB_Error_Code eblook_search_wild(EB_Book *book, const char *pattern); +EB_Error_Code eblook_hit_list_wild (EB_Book *book, int max_hit_count, EB_Hit *hit_list, int *hit_count); +int search_wild_convert_pattern (unsigned char *query, const unsigned char *pattern, int buff_length); + + +#define variable_set(key, value) \ + variable_alist = salist_set (variable_alist, key, value) +#define variable_ref(key) \ + salist_ref (variable_alist, key) + +#ifdef DOS_FILE_PATH /* in win32.c */ +size_t euc_to_sjis(const char *, char *, size_t); +size_t sjis_to_euc(const char *, char *, size_t); +void dos_fix_path(char *, int); +#endif /* DOS_FILE_PATH */ + +#define uint1(p) (*(const unsigned char *)(p)) + +#define uint2(p) ((*(const unsigned char *)(p) << 8) \ + + (*(const unsigned char *)((p) + 1))) + +#define uint4(p) ((*(const unsigned char *)(p) << 24) \ + + (*(const unsigned char *)((p) + 1) << 16) \ + + (*(const unsigned char *)((p) + 2) << 8) \ + + (*(const unsigned char *)((p) + 3))) + +/* + * Constants + */ +#define DECORATE_OFF 0 +#define DECORATE_ON 1 + +const char *program_name = PACKAGE; +const char *program_version = VERSION; +const char *default_prompt = "eblook> "; +const char *default_method = "glob"; +const char *default_use_narrow_kana = "false"; +const char *default_decorate_mode = "off"; +const char *default_escape_text = "false"; +#ifdef USE_PAGER +const char *default_pager = "off"; +#endif + +/* From EB Library */ +#define EB_INDEX_STYLE_CONVERT 0 + +/* + * Internal variables + */ +const char *invoked_name; + +EB_Book current_book; +EB_Appendix current_appendix; + +EB_Hookset text_hookset, heading_hookset; +StringAlist *variable_alist = NULL; +int last_search_begin = 0; +int last_search_length = 0; +int (*last_search_function) (EB_Book *, const char *) = NULL; +int use_narrow_kana = 0; +int decorate_mode = 0; +int escape_text = 0; +int interactive_mode = 1; +int show_prev_next_flag = 0; + +unsigned char eblook_wild_pattern[EB_MAX_WORD_LENGTH * 2 + 1]; +int eblook_wild_page = 0; +unsigned char eblook_wild_count = 0; + +/* + * Interactive command table + */ +struct command_table_t { + const char *name; + const char *option_string; + void (*func) (int, char *[]); + const char *help; +}; + +struct command_table_t *find_command (); +struct command_table_t command_table[] = { + {"book", "[directory [appendix]]", command_book, "Set a book directory.\n"}, + {"info", "", command_info, "Show information of the selected book.\n"}, + {"list", "", command_list, "List all dictionaries in the selected book.\n"}, + {"select", "subbook", command_select, "Select a subbook.\n"}, + {"subinfo", "", command_subinfo, "Show information of the selected subbook.\n"}, + {"copyright", "", command_copyright, "Show copyright of the selected subbook.\n"}, + {"menu", "", command_menu, "Show the menu of the selected subbook.\n"}, +#ifdef EB_HOOK_BEGIN_IMAGE_PAGE + {"image_menu", "", command_image_menu, "Show the graphic menu of the selected subbook.\n"}, +#endif + {"search", "pattern [offset]", command_search, "Search for a word\n"}, + {"content", "[-]entry [offset]", command_content, "Display contents of entry.\n"}, + {"dump", "entry [offset]", command_dump, "Display dumps of entry.\n"}, + {"pbm", "entry width height", command_pbm, "dump mono image in pbm.\n"}, + {"xbm", "entry width height", command_xbm, "dump mono image in xbm.\n"}, + {"bmp", "entry file", command_bmp, "dump bmp image into file.\n"}, + {"bmp2ppm", "entry file", command_bmp2ppm, "dump bmp image into file in PPM format.\n"}, + {"bmp2tiff", "entry file", command_bmp2tiff, "dump bmp image into file in TIFF format.\n"}, + {"jpg", "entry file", command_jpeg, "dump jpeg image into file.\n"}, + {"jpeg", "entry file", command_jpeg, "dump jpeg image into file.\n"}, + {"font", "[id]", command_font, "Display the bitmap of gaiji.\n"}, + {"show", "[variable]", command_show, "Show the value of variables.\n"}, + {"set", "variable value", command_set, "Set a variable to the value.\n"}, + {"unset", "variable...", command_unset, "Unset variables.\n"}, + {"candidate", "", command_candidate, "Show candidates for multi search\n"}, + {"label", "[id]", command_label, "Show label for multi search\n"}, + {"help", "", command_help, "Show this message.\n"}, + {"quit", "", NULL, "Quit program.\n"}, +#ifdef EB_HOOK_BEGIN_WAVE + {"wave", "entry_start entry_end file", command_wav, "dump wav sound into file.\n"}, + {"wav", "entry_start entry_end file", command_wav, "dump wav sound into file.\n"}, +#endif +#ifdef EB_HOOK_BEGIN_MPEG + {"mpeg", "id0 id1 id2 id3 file", command_mpeg, "dump mpeg1 movie into file.\n"}, + {"mpe", "id0 id1 id2 id3 file", command_mpeg, "dump mpeg1 movie into file.\n"}, + {"mpeg_path", "id0 id1 id2 id3", command_mpeg_path, "show full path name of mpeg1 movie.\n"}, +#endif +#ifdef EB_HOOK_BEGIN_COLOR_CHART + {"color", "number", command_color, "show color chart information.\n"}, +#endif + {NULL, NULL, NULL, NULL} +}; + +/* + * Text hooks + */ +EB_Hook text_hooks[] = { + {EB_HOOK_ISO8859_1, hook_iso8859_1}, + {EB_HOOK_NARROW_JISX0208, hook_euc_to_ascii}, + {EB_HOOK_NARROW_FONT, hook_font}, + {EB_HOOK_WIDE_FONT, hook_font}, +#ifdef EB_HOOK_GB2312 + {EB_HOOK_GB2312, hook_gb2312}, +#endif +#ifdef EB_HOOK_EBXAC_GAIJI + {EB_HOOK_EBXAC_GAIJI, hook_ebxac_gaiji}, +#endif + {EB_HOOK_NEWLINE, eb_hook_newline}, +#ifdef EB_HOOK_STOP_CODE + {EB_HOOK_STOP_CODE, hook_stopcode}, +#endif + {EB_HOOK_BEGIN_MONO_GRAPHIC, hook_img}, + {EB_HOOK_END_MONO_GRAPHIC, hook_img}, + {EB_HOOK_BEGIN_COLOR_JPEG,hook_img}, + {EB_HOOK_BEGIN_COLOR_BMP, hook_img}, + {EB_HOOK_END_COLOR_GRAPHIC, hook_img}, +#ifdef EB_HOOK_BEGIN_IN_COLOR_BMP + {EB_HOOK_BEGIN_IN_COLOR_JPEG,hook_img}, + {EB_HOOK_BEGIN_IN_COLOR_BMP, hook_img}, + {EB_HOOK_END_IN_COLOR_GRAPHIC, hook_img}, +#endif +/* {EB_HOOK_BEGIN_SOUND, hook_tags}, */ +/* {EB_HOOK_END_SOUND, hook_tags}, */ +#ifdef EB_HOOK_BEGIN_WAVE + {EB_HOOK_BEGIN_WAVE, hook_img}, + {EB_HOOK_END_WAVE, hook_img}, +#endif +#ifdef EB_HOOK_BEGIN_MPEG + {EB_HOOK_BEGIN_MPEG, hook_img}, + {EB_HOOK_END_MPEG, hook_img}, +#endif + {EB_HOOK_BEGIN_REFERENCE, hook_tags}, + {EB_HOOK_END_REFERENCE, hook_tags}, + {EB_HOOK_BEGIN_CANDIDATE, hook_tags}, + {EB_HOOK_END_CANDIDATE_GROUP, hook_tags}, +#ifdef EB_HOOK_BEGIN_UNICODE + {EB_HOOK_BEGIN_UNICODE, hook_tags}, + {EB_HOOK_END_UNICODE, hook_tags}, +#endif +#ifdef EB_HOOK_BEGIN_IMAGE_PAGE + {EB_HOOK_BEGIN_IMAGE_PAGE, hook_img}, + {EB_HOOK_END_IMAGE_PAGE, hook_img}, +#endif +#ifdef EB_HOOK_BEGIN_CLICKABLE_AREA + {EB_HOOK_BEGIN_GRAPHIC_REFERENCE, hook_tags}, + {EB_HOOK_END_GRAPHIC_REFERENCE, hook_tags}, + {EB_HOOK_GRAPHIC_REFERENCE, hook_tags}, + {EB_HOOK_BEGIN_CLICKABLE_AREA, hook_tags}, + {EB_HOOK_END_CLICKABLE_AREA, hook_tags}, +#endif +#ifdef EB_HOOK_BEGIN_COLOR_CHART + {EB_HOOK_BEGIN_COLOR_CHART, hook_tags}, + /* {EB_HOOK_END_COLOR_CHART, hook_tags}, */ +#endif + + {EB_HOOK_BEGIN_SUBSCRIPT, hook_decoration}, + {EB_HOOK_END_SUBSCRIPT, hook_decoration}, + {EB_HOOK_BEGIN_SUPERSCRIPT, hook_decoration}, + {EB_HOOK_END_SUPERSCRIPT, hook_decoration}, + {EB_HOOK_BEGIN_NO_NEWLINE, hook_decoration}, + {EB_HOOK_END_NO_NEWLINE, hook_decoration}, + {EB_HOOK_BEGIN_EMPHASIS, hook_decoration}, + {EB_HOOK_END_EMPHASIS, hook_decoration}, + {EB_HOOK_SET_INDENT, hook_decoration}, + {EB_HOOK_BEGIN_DECORATION, hook_decoration}, + {EB_HOOK_END_DECORATION, hook_decoration}, + + {EB_HOOK_NULL, NULL}, +}; + +EB_Hook heading_hooks[] = { + {EB_HOOK_ISO8859_1, hook_iso8859_1}, + {EB_HOOK_NARROW_JISX0208, hook_euc_to_ascii}, + {EB_HOOK_NARROW_FONT, hook_font}, + {EB_HOOK_WIDE_FONT, hook_font}, +#ifdef EB_HOOK_GB2312 + {EB_HOOK_GB2312, hook_gb2312}, +#endif +#ifdef EB_HOOK_EBXAC_GAIJI + {EB_HOOK_EBXAC_GAIJI, hook_ebxac_gaiji}, +#endif + {EB_HOOK_NEWLINE, eb_hook_newline}, +#ifdef EB_HOOK_STOP_CODE + {EB_HOOK_STOP_CODE, hook_stopcode}, +#endif +#ifdef EB_HOOK_BEGIN_UNICODE + {EB_HOOK_BEGIN_UNICODE, hook_tags}, + {EB_HOOK_END_UNICODE, hook_tags}, +#endif + {EB_HOOK_BEGIN_SUBSCRIPT, hook_decoration}, + {EB_HOOK_END_SUBSCRIPT, hook_decoration}, + {EB_HOOK_BEGIN_SUPERSCRIPT, hook_decoration}, + {EB_HOOK_END_SUPERSCRIPT, hook_decoration}, + {EB_HOOK_BEGIN_NO_NEWLINE, hook_decoration}, + {EB_HOOK_END_NO_NEWLINE, hook_decoration}, + {EB_HOOK_BEGIN_EMPHASIS, hook_decoration}, + {EB_HOOK_END_EMPHASIS, hook_decoration}, + {EB_HOOK_BEGIN_DECORATION, hook_decoration}, + {EB_HOOK_END_DECORATION, hook_decoration}, + + {EB_HOOK_NULL, NULL}, +}; + +static const char *short_options = "e:hqiv"; +static struct option long_options[] = { + {"encoding", required_argument, NULL, 'e'}, + {"help", no_argument, NULL, 'h'}, + {"no-init-file", no_argument, NULL, 'q'}, + {"non-interactive", no_argument, NULL, 'i'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0} +}; + + +int +main (argc, argv) + int argc; + char *const *argv; +{ + int optch; + int no_init = 0; + char buff[BUFSIZ]; + const char *book, *appendix, *s; + FILE *fp; + EB_Error_Code error_code = EB_SUCCESS; + +#ifdef USE_READLINE + char *histfile = NULL; +#endif + + invoked_name = argv[0]; +#ifdef USE_TINY_GETTEXT + set_invoked_name(argv[0]); +#endif + locale_init(NULL); + +#ifdef USE_READLINE + rl_readline_name = "EBlook"; + rl_attempted_completion_function = + (rl_completion_func_t *)fileman_completion; +#endif + + /* parse command line options */ + while ((optch = getopt_long(argc, argv, short_options, long_options, NULL)) + != EOF) { + switch (optch) { + case 'e': + locale_init(optarg); + break; + case 'h': + show_help (); + exit (0); + case 'v': + show_version (); + exit (0); + case 'q': + no_init = 1; + break; + case 'i': + interactive_mode = 0; + break; + default: + show_try_help (); + exit (1); + } + } + + /* check the rest arguments */ + book = appendix = NULL; + switch (argc - optind) { + case 2: + appendix = argv[optind + 1]; + case 1: + book = argv[optind]; + case 0: + break; + + default: + xfprintf (stderr, "%s: too many arguments\n", invoked_name); + show_try_help (); + exit (1); + } + + /* initialize variables */ + eb_initialize_library (); + eb_initialize_book (¤t_book); + eb_initialize_appendix (¤t_appendix); + eb_initialize_hookset (&text_hookset); + eb_initialize_hookset (&heading_hookset); + eb_set_hooks (&text_hookset, text_hooks); + eb_set_hooks (&heading_hookset, heading_hooks); + + if (!isatty(fileno(stdin))) interactive_mode = 0; + + variable_set ("prompt", default_prompt); + variable_set ("search-method", default_method); + variable_set ("use-narrow-kana", default_use_narrow_kana); + variable_set ("decorate-mode", default_decorate_mode); + variable_set ("escape-text", default_escape_text); +#ifdef USE_PAGER + variable_set ("pager", default_pager); +#endif + + sprintf (buff, "%d", MAX_HIT_SIZE); + variable_set ("max-hits", buff); + + sprintf (buff, "%d", MAX_TEXT_SIZE); + variable_set ("max-text", buff); + + sprintf (buff, "%d", MAX_DUMP_SIZE); + variable_set ("max-dump", buff); + + sprintf (buff, "%s %s (with EB %d.%d)", program_name, program_version, + EB_VERSION_MAJOR, EB_VERSION_MINOR); + variable_set ("version", buff); + + variable_set ("multi-search-id", "1"); + + /* load init file */ + if (!no_init) { + buff[0] = 0; + if (!strncmp (USER_INIT_FILE, "~/", 2)) { + char *homedir = getenv ("HOME"); + if (homedir && strlen(homedir) + strlen(USER_INIT_FILE + 1) < BUFSIZ) { + strcpy (buff, homedir); + strcat (buff, USER_INIT_FILE + 1); + } + } else { + if (strlen(USER_INIT_FILE) < BUFSIZ) + strcpy (buff, USER_INIT_FILE); + } + if (buff[0] && (fp = fopen (buff, "r")) != NULL) + while (read_command (buff, BUFSIZ, fp) != NULL) + if (!excute_command (buff)) + break; + } + + /* Read readline history */ +#ifdef USE_READLINE + if (interactive_mode) { + buff[0] = 0; + if (!strncmp (HIST_FILE, "~/", 2)) { + char *homedir = getenv ("HOME"); + if (homedir && strlen(homedir) + strlen(HIST_FILE + 1) < BUFSIZ) { + strcpy (buff, homedir); + strcat (buff, HIST_FILE + 1); + } + } else { + if (strlen(HIST_FILE) < BUFSIZ) + strcpy (buff, HIST_FILE); + } + if (buff[0] && (histfile=strdup(buff)) != NULL) + if (read_history(buff) != 0) + xprintf("Warning: History file %s not found\n",buff); + } +#endif /* USE_READLINE */ + + /* set book and appendix */ + if (book) { +#ifndef DOS_FILE_PATH + error_code = eb_bind (¤t_book, book); + if (EB_SUCCESS != error_code) { + xprintf ("Warning: invalid book directory: %s\n", book); + set_error_message (error_code); + } +#else /* DOS_FILE_PATH */ + strncpy(buff, book, sizeof(buff)); + if (strncmp(buff, "ebnet://", 8) != 0) + dos_fix_path(buff, 0); + error_code = eb_bind (¤t_book, buff); + if (EB_SUCCESS != error_code) { + sjis_to_euc(book, buff, sizeof(buff)); + xprintf ("Warning: invalid book directory: %s\n", buff); + set_error_message (error_code); + } +#endif /* DOS_FILE_PATH */ + } + if (appendix) { +#ifndef DOS_FILE_PATH + error_code = eb_bind_appendix (¤t_appendix, appendix); + if (EB_SUCCESS != error_code) { + xprintf ("Warning: invalid appendix directory: %s\n", appendix); + set_error_message (error_code); + } +#else /* DOS_FILE_PATH */ + strncpy(buff, appendix, sizeof(buff)); + if (strncmp(buff, "ebnet://", 8) != 0) + dos_fix_path(buff, 0); + error_code = eb_bind_appendix (¤t_appendix, buff); + if (EB_SUCCESS != error_code) { + sjis_to_euc(appendix, buff, sizeof(buff)); + xprintf ("Warning: invalid appendix directory: %s\n", buff); + set_error_message (error_code); + } +#endif /* !DOS_FILE_PATH */ + } + + /* check the book directory */ + if (!eb_is_bound (¤t_book)) + xputs ("Warning: you should specify a book directory first\n"); + + /* enter command loop */ + while (1) { + /* kanji code */ + if ((s = variable_ref ("kanji-code")) != NULL) { + if (strcasecmp (s, "JIS") == 0) + locale_init ("JIS"); + else if (strcasecmp (s, "SJIS") == 0) + locale_init ("SJIS"); + else if (strcasecmp (s, "EUC") == 0) + locale_init ("EUC"); + else if (strcasecmp (s, "UTF8") == 0) + locale_init ("UTF8"); + else if (strcasecmp (s, "AUTO") == 0) +#ifndef WIN32 + locale_init (NULL); +#else /* WIN32 - need for Visual C++ ? */ + locale_init ("SJIS"); +#endif /* !WIN32 */ + else { + xprintf ("Invalid kanji code: %s\n", s); + variable_set ("kanji-code", NULL); + } + } + + /* narrow kana */ + s = variable_ref ("use-narrow-kana"); + if (s != NULL && (strcasecmp(s, "true") == 0 || strcasecmp(s, "on") == 0)) + use_narrow_kana = 1; + else + use_narrow_kana = 0; + + /* decorate_mode */ + s = variable_ref ("decorate-mode"); + if (s != NULL && (strcasecmp(s, "true") == 0 || strcasecmp(s, "on") == 0)) + decorate_mode = 1; + else + decorate_mode = 0; + + /* escape text */ + s = variable_ref ("escape-text"); + if (s != NULL && (strcasecmp(s, "true") == 0 || strcasecmp(s, "on") == 0)) + escape_text = 1; + else + escape_text = 0; + + /* prompt */ + if ((s = variable_ref ("prompt")) == NULL) + s = default_prompt; + + /* read and excute */ + unset_error_message (); +#ifdef USE_READLINE + if (interactive_mode) { + if (read_command2 (buff, BUFSIZ, s) == NULL) + break; + } else +#endif + { + xfputs(s, stdout); + fflush(stdout); + if (read_command (buff, BUFSIZ, stdin) == NULL) + break; + } + if (!excute_command (buff)) + break; + } + +#ifdef USE_READLINE + if (interactive_mode && histfile!=NULL) + write_history(histfile); +#endif + + eb_finalize_library (); + return 0; +} + +char * +read_command (command_line, size, stream) + char *command_line; + size_t size; + FILE *stream; +{ + char *p; + + /* read string */ + if (xfgets (command_line, size, stream) == NULL) + return NULL; + + /* delete '\r', '\n' */ + if ((p = strchr (command_line, '\r')) != NULL) { /* Mac, DOS? depend on cc */ + *p = '\0'; + } else if ((p = strchr (command_line, '\n')) != NULL) { + *p = '\0'; + } else if (! feof(stream)) { + xputs ("Input is too long"); + while (xfgets (command_line, BUFSIZ, stream) != NULL && + strchr (command_line, '\r') == NULL && + strchr (command_line, '\n') == NULL); + command_line[0] = '\0'; + } + return command_line; +} + +#ifdef USE_READLINE +char * +read_command2 (buff, buf_len, prompt) + char *buff; + size_t buf_len; + const char *prompt; +{ + static char *line_read; + char *pr; + if (line_read) { + free (line_read); + line_read = NULL; + } + pr=strdup(prompt); + line_read = stripwhite ( readline (pr) ); + free(pr); + if (line_read==NULL) + return NULL; + + if (*line_read!=0) { + size_t status, ilen, size; + char *ibuf, *str; + if (strcmp (line_read, "quit") != 0) { + add_history (line_read); + } + ibuf=line_read; + ilen=strlen(ibuf); + str = buff; + size = buf_len; + status = current_to_euc(&ibuf,&ilen,&str,&size); + buff[buf_len-size]=0; + } else { + *buff = 0; + } + return buff; +} + +#endif /* READLINE */ + + +int +excute_command (command_line) + char *command_line; +{ + int i, argc; + char *argv[BUFSIZ / 2]; /* xxx: no good? */ + + argc = parse_command_line (command_line, argv); + + /* if input is empty, do nothing */ + if (argc == 0) + return 1; + + /* ignore comments in ".eblookrc" */ + if (argv[0][0]=='#' || argv[0][0]==';') + return 1; + + /* if input is "quit", we should quit */ + if (strcmp (argv[0], "quit") == 0) + return 0; + + /* otherwise, search command and execute */ + for (i = 0; command_table[i].name != NULL; i++) { + if (strcmp (argv[0], command_table[i].name) == 0) { + command_table[i].func (argc, argv); + return 1; + } + } + if (command_table[i].name == NULL) + xprintf ("Unknown command: %s\n", argv[0]); + return 1; +} + +int +parse_command_line (command_line, argv) + char *command_line; + char *argv[]; +{ + int num; + int reserved, in_quote; + char *p; + + /* devide string into tokens by white spaces */ + num = reserved = in_quote = 0; + for (p = command_line; *p != '\0'; p++) { + switch (*p) { + case '"': + if (!reserved) { + argv[num++] = p; + reserved = 1; + } + memmove (p, p + 1, strlen(p + 1) + 1); + p--; + in_quote = !in_quote; + break; + + case ' ': + case '\t': + if (!in_quote) { + *p = '\0'; + reserved = 0; + } + break; + + case '\\': + memmove (p, p + 1, strlen(p + 1) + 1); + default: + if (!reserved) { + argv[num++] = p; + reserved = 1; + } + } + } + + return num; +} + +void +command_book (argc, argv) + int argc; + char *argv[]; +{ + EB_Error_Code error_code = EB_SUCCESS; +#ifdef DOS_FILE_PATH + char temp[PATH_MAX]; +#endif /* DOS_FILE_PATH */ + + switch (argc) { + case 3: +#ifndef DOS_FILE_PATH + error_code = eb_bind_appendix (¤t_appendix, argv[2]); + if (EB_SUCCESS != error_code) { + xprintf ("Invalid appendix directory: %s\n", argv[2]); + set_error_message (error_code); + } +#else /* DOS_FILE_PATH */ + strncpy(temp, argv[2], sizeof(temp)); + if (strncmp(temp, "ebnet://", 8) != 0) + dos_fix_path(temp, 1); + error_code = eb_bind_appendix (¤t_appendix, temp); + if (EB_SUCCESS != error_code) { + sjis_to_euc(argv[2], temp, sizeof(temp)); + xprintf ("Invalid appendix directory: %s\n", temp); + set_error_message (error_code); + } +#endif /* !DOS_FILE_PATH */ + case 2: + if (argc == 2) + eb_finalize_appendix (¤t_appendix); +#ifndef DOS_FILE_PATH + error_code = eb_bind (¤t_book, argv[1]); + if (EB_SUCCESS != error_code) { + xprintf ("Invalid book directory: %s\n", argv[1]); + set_error_message (error_code); + } +#else /* DOS_FILE_PATH */ + strncpy(temp, argv[1], sizeof(temp)); + if (strncmp(temp, "ebnet://", 8) != 0) + dos_fix_path(temp, 1); + error_code = eb_bind (¤t_book, temp); + if (EB_SUCCESS != error_code) { + sjis_to_euc(argv[1], temp, sizeof(temp)); + xprintf ("Invalid book directory: %s\n", temp); + set_error_message (error_code); + } +#endif /* !DOS_FILE_PATH */ + break; + + case 1: + if (eb_is_bound (¤t_book)) { +#ifndef DOS_FILE_PATH + char temp[BUFSIZ]; + eb_path (¤t_book, temp); + xprintf ("book\t%s\n", temp); + if (eb_is_appendix_bound (¤t_appendix)) { + eb_appendix_path (¤t_appendix, temp); + xprintf ("appendix\t%s\n", temp); + } +#else /* DOS_FILE_PATH */ + char path[PATH_MAX]; + eb_path (¤t_book, path); + sjis_to_euc(path, temp, sizeof(temp)); + xprintf ("book\t%s\n", temp); + if (eb_is_appendix_bound (¤t_appendix)) { + eb_appendix_path (¤t_appendix, path); + sjis_to_euc(path, temp, sizeof(temp)); + xprintf ("appendix\t%s\n", temp); + } +#endif /* !DOS_FILE_PATH */ + } else { + xputs ("No book is specified"); + } + break; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +void +command_info (argc, argv) + int argc; + char *argv[]; +{ + EB_Subbook_Code code[EB_MAX_SUBBOOKS]; + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_book ()) { + int subcount; + EB_Disc_Code disccode; + EB_Character_Code charcode; + + /* disc type */ + eb_disc_type (¤t_book, &disccode); + if (disccode >= 0) { + xfputs (" disc type: ", stdout); + xputs ((disccode == EB_DISC_EB) ? "EB/EBG/EBXA" : "EPWING"); + } + + /* character code */ + eb_character_code (¤t_book, &charcode); + if (charcode != EB_CHARCODE_INVALID) { + xfputs (" character code: ", stdout); + switch (charcode){ + case EB_CHARCODE_ISO8859_1: + xputs ("ISO 8859-1"); + break; + case EB_CHARCODE_JISX0208: + case EB_CHARCODE_JISX0208_GB2312: + xputs ("JIS X 0208"); + break; +#ifdef EB_CHARCODE_UTF8 + case EB_CHARCODE_UTF8: + xputs ("UTF-8"); + break; +#endif + default: + xputs ("UNKNOWN"); + break; + } + } + + /* the number of dictionarys */ + if (EB_SUCCESS == eb_subbook_list (¤t_book, code, &subcount) + && subcount >= 0) + xprintf (" the number of dictionries: %d\n", subcount); + } +} + +void +command_list (argc, argv) + int argc; + char *argv[]; +{ + EB_Error_Code error_code = EB_SUCCESS; + + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_book ()) { + int i, j, num; + char buff[EB_MAX_TITLE_LENGTH + 1]; + char buff2[EB_MAX_SUBBOOKS][PATH_MAX + 4]; + EB_Subbook_Code list[EB_MAX_SUBBOOKS]; + + error_code = eb_subbook_list (¤t_book, list, &num); + if (EB_SUCCESS != error_code) + goto error; + + for (i = 0; i < num; i++) { + xprintf ("%2d. ", i + 1); + + error_code = eb_subbook_directory2 (¤t_book, list[i], buff2[i]); + if (EB_SUCCESS != error_code) + goto error; + for(j = 0; j < i; j++) { + if (strcmp(buff2[j], buff2[i]) == 0) { + sprintf(buff, ".%d", i + 1); + strcat(buff2[i], buff); + break; + } + } + + xprintf ("%s\t", buff2[i]); + error_code = eb_subbook_title2 (¤t_book, list[i], buff); + if (EB_SUCCESS != error_code) + goto error; + + xprintf("%s\n", buff); + } + + return; + + error: + xprintf ("An error occured in command_list: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return; + } +} + +void +command_select (argc, argv) + int argc; + char *argv[]; +{ + switch (argc) { + case 1: + eb_unset_subbook (¤t_book); + eb_unset_appendix_subbook (¤t_appendix); + return; + + case 2: + if (check_book ()) { + if (parse_dict_id (argv[1], ¤t_book)) { + if (eb_is_appendix_bound (¤t_appendix)) + { + EB_Subbook_Code code; + + eb_subbook (¤t_book, &code); + eb_set_appendix_subbook (¤t_appendix, code); + } + } + } + return; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +void +command_subinfo (argc, argv) + int argc; + char *argv[]; +{ + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_subbook ()) { + int i, num; + char buff[PATH_MAX + 1]; + EB_Font_Code list[EB_MAX_FONTS]; + + /* title */ + if (EB_SUCCESS == eb_subbook_title (¤t_book, buff)) { + xfputs (" title: ", stdout); + xfputs (buff, stdout); + fputc ('\n', stdout); + } + + /* directory */ + if (EB_SUCCESS == eb_subbook_directory (¤t_book, buff)) + xprintf (" directory: %s\n", buff); + + /* search methods */ + xfputs (" search methods:", stdout); + if (eb_have_word_search (¤t_book)) + xfputs (" word", stdout); + if (eb_have_endword_search (¤t_book)) + xfputs (" endword", stdout); + if (eb_have_exactword_search (¤t_book)) + xfputs (" exactword", stdout); + if (eblook_have_wild_search (¤t_book)) + xfputs (" wild", stdout); + if (eb_have_keyword_search (¤t_book)) + xfputs (" keyword", stdout); +#ifdef EB_MAX_CROSS_ENTRIES + if (eb_have_cross_search (¤t_book)) + xfputs (" cross", stdout); +#endif + if (eb_have_multi_search (¤t_book)) + xfputs (" multi", stdout); + if (eb_have_menu (¤t_book)) + xfputs (" menu", stdout); +#ifdef EB_HOOK_BEGIN_IMAGE_PAGE + if (eb_have_image_menu (¤t_book)) + xfputs (" image_menu", stdout); +#endif +#ifdef EB_HOOK_BEGIN_COLOR_CHART + if (eb_have_color_chart (¤t_book)) + xfputs (" color_chart", stdout); +#endif +/* if (eb_have_graphic_search (¤t_book)) */ +/* xfputs (" graphic", stdout); */ + fputc ('\n', stdout); + + /* font size */ + xfputs (" font sizes:", stdout); + + eb_font_list (¤t_book, list, &num); + for (i = 0; i < num; i++) { + switch (list[i]) { + case EB_FONT_16: xprintf (" 16"); break; + case EB_FONT_24: xprintf (" 24"); break; + case EB_FONT_30: xprintf (" 30"); break; + case EB_FONT_48: xprintf (" 48"); break; + default: xprintf (" 0"); break; + } + } + + fputc ('\n', stdout); + } +} + +void +command_copyright (argc, argv) + int argc; + char *argv[]; +{ + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_subbook ()) { + EB_Position pos; + if (EB_SUCCESS != eb_copyright (¤t_book, &pos)) + xputs ("Current dictionary has no copyright information."); + else + insert_content (¤t_book, ¤t_appendix, &pos, 0, 0); + } +} + +void +command_menu (argc, argv) + int argc; + char *argv[]; +{ + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_subbook ()) { + EB_Position pos; + if (EB_SUCCESS != eb_menu (¤t_book, &pos)) + xputs ("Current dictionary has no menu."); + else + insert_content (¤t_book, ¤t_appendix, &pos, 0, 0); + } +} + +#ifdef EB_HOOK_BEGIN_IMAGE_PAGE +void +command_image_menu (argc, argv) + int argc; + char *argv[]; +{ + if (argc > 1) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_subbook ()) { + EB_Position pos; + if (EB_SUCCESS != eb_image_menu (¤t_book, &pos)) + xputs ("Current dictionary has no graphic menu."); + else + insert_content (¤t_book, ¤t_appendix, &pos, 0, 0); + } +} +#endif + +void +command_search (argc, argv) + int argc; + char *argv[]; +{ + int begin, length; + char *pattern; + + begin = 1; + pattern = variable_ref ("max-hits"); + length = pattern ? atoi (pattern) : 0; + pattern = NULL; + + switch (argc) { + case 3: + begin = atoi (argv[2]); + case 2: + pattern = argv[1]; + case 1: + if (check_subbook ()) + search_pattern (¤t_book, ¤t_appendix, pattern, begin, length); + return; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +void +command_content (argc, argv) + int argc; + char *argv[]; +{ + int begin, length; + char *s; + EB_Position pos, pos1, pos2; + int backward = 0; + EB_Book *book = ¤t_book; + EB_Appendix *appendix = ¤t_appendix; + EB_Error_Code error_code; + + begin = 1; + s = variable_ref ("max-text"); + length = s ? (atoi (s) / EB_SIZE_PAGE) : 0; + + switch (argc) { + case 1: + xprintf ("%s: too few arguments\n", argv[0]); + return; + + case 4: + length = atoi (argv[3]); + case 3: + begin = atoi (argv[2]); + case 2: + if (check_subbook ()) { + if (*argv[1] == '-') backward = 1; + + if (parse_entry_id(argv[1] + backward, &pos)) { + if (backward) { + pos1 = pos; + pos1.offset += 4; + if (pos1.offset >= EB_SIZE_PAGE) { + pos1.page++; + pos1.offset -= EB_SIZE_PAGE; + } + + if (eb_seek_text(book, &pos) == EB_SUCCESS) { + error_code = eb_forward_text(book, appendix); + switch (error_code) { + case EB_SUCCESS: + case EB_ERR_END_OF_CONTENT: + pos2 = pos; + do { + if (eb_backward_text(book, appendix) != EB_SUCCESS + || eb_tell_text(book, &pos2) != EB_SUCCESS) { + pos2 = pos; + break; + } + } while (pos1.page < pos2.page + || ((pos1.page == pos2.page) + && (pos1.offset < pos2.offset))); + pos = pos2; + + if (eb_forward_text(book, appendix) == EB_SUCCESS + && eb_tell_text(book, &pos2) == EB_SUCCESS + && (pos2.page < pos1.page + || ((pos2.page == pos1.page) + && (pos2.offset < pos1.offset)))) + pos = pos2; + break; + default: + break; + } + } + } + + insert_content (book, appendix, &pos, begin, length); + } + } + return; + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +char *uc2bit[] = { +"0 0 0 0 ", "0 0 0 1 ", "0 0 1 0 ", "0 0 1 1 ", +"0 1 0 0 ", "0 1 0 1 ", "0 1 1 0 ", "0 1 1 1 ", +"1 0 0 0 ", "1 0 0 1 ", "1 0 1 0 ", "1 0 1 1 ", +"1 1 0 0 ", "1 1 0 1 ", "1 1 1 0 ", "1 1 1 1 " }; + +#define MAX_BITMAP_SIZE 1024*1024 +void +command_pbm(argc, argv) + int argc; + char *argv[]; +{ + static unsigned char buffer[MAX_BITMAP_SIZE]; + EB_Position pos; + ssize_t len; + int ret; + int i; + int j; + int w, h; + + if (argc != 4) + return; + + w = atoi(argv[2]); + h = atoi(argv[3]); + + parse_entry_id(argv[1], &pos); + + ret = eb_seek_text(¤t_book, &pos); + if (ret != EB_SUCCESS) + return; + if (w * h / 8 > MAX_BITMAP_SIZE) return; + ret = eb_read_rawtext(¤t_book, w*h/8, (char *)buffer, &len); + if (ret != EB_SUCCESS || len == 0) + return; + printf("P1\n%d %d\n", w, h); + for (i=0; i>4], stdout); + fputs(uc2bit[buffer[i]&0xF], stdout); + } + fputc('\n', stdout); + } + + return; +} + +unsigned char reversebit[] = { +0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, +0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, +0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, +0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, +0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, +0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, +0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, +0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, +0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, +0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, +0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, +0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, +0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, +0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, +0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, +0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, +0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, +0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, +0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, +0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, +0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, +0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, +0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, +0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, +0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, +0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, +0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, +0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, +0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, +0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, +0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, +0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff +}; + +void +command_xbm(argc, argv) + int argc; + char *argv[]; +{ + static unsigned char buffer[MAX_BITMAP_SIZE]; + EB_Position pos; + ssize_t len; + int ret; + int i; + int j; + int w, h; + + if (argc != 4) + return; + + w = atoi(argv[2]); + h = atoi(argv[3]); + + parse_entry_id(argv[1], &pos); + + ret = eb_seek_text(¤t_book, &pos); + if (ret != EB_SUCCESS) + return; + if (w * h / 8 > MAX_BITMAP_SIZE) return; + ret = eb_read_rawtext(¤t_book, w*h/8, (char *)buffer, &len); + if (ret != EB_SUCCESS || len == 0) + return; + + fprintf(stdout, "#define mono_width %d\n#define mono_height %d\n", w, h); + fprintf(stdout, "static char mono_bits[] = {\n"); + + for (i=0; i= 0) { + error_code = eb_read_binary(¤t_book, EB_SIZE_PAGE, + (char *)binary_data, &read_length); + if (error_code != EB_SUCCESS) { + jpeg_error = "jpeg read error"; + goto jpeg_fail; + /* + printf("eb_read_rawtext: %s\n", + eb_error_message(error_code)); + break;; + */ + } + if (read_length == 0) + break; + file_length -= read_length; + + if (firstpage && + strncmp((char *)binary_data, "data", 4) == 0 && + strncmp((char *)binary_data+14, "JFIF", 4) == 0) { + /* for old eb library ? */ + p = binary_data+8; + read_length -= 8; + } else { + p = binary_data; + } + p = binary_data; + + firstpage = 0; + + if (lastchar == 0xff) { + switch (p[0]) { + case 0xd9: + if (canstop) { + fwrite(p, 1, 1, fp); + goto jpeg_ok; + } else { + canstop = 1; + } + break; + case 0xed: + canstop = 0; + break; + } + } + + lastchar = p[read_length-1]; + for (i=0; i 2) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + if (check_subbook () && internal_set_font (¤t_book, NULL)) { + if (argc == 1) + insert_font_list (¤t_book); + else + insert_font (¤t_book, argv[1]); + } +} + +#ifdef EB_HOOK_BEGIN_COLOR_CHART +/* command_color number */ +void +command_color(argc, argv) + int argc; + char *argv[]; +{ + char *endp = NULL; + int number; + char name[EB_MAX_COLOR_NAME_LENGTH + 1]; + char value[EB_MAX_COLOR_VALUE_LENGTH + 1]; + EB_Error_Code error_code; + + if (argc < 2) { + xprintf ("%s: too few arguments\n", argv[0]); + return; + } else if (argc > 2) { + xprintf ("%s: too many arguments\n", argv[0]); + return; + } + + number = strtol(argv[1], &endp, 0); + if (*endp != 0) { + xprintf ("Illegal argument: %s\n", argv[1]); + return; + } + + if (check_subbook ()) { + if (!eb_have_color_chart (¤t_book)) { + xprintf ("This subbook does not have color chart\n", argv[1]); + return; + } + + error_code = eb_color_name(¤t_book, number, name); + if (error_code != EB_SUCCESS) { + xfputs (eb_error_message(error_code), stdout); + fputc ('\n', stdout); + return; + } + + error_code = eb_color_value(¤t_book, number, value); + if (error_code != EB_SUCCESS) { + xfputs (eb_error_message(error_code), stdout); + fputc ('\n', stdout); + return; + } + + xfputs (name, stdout); + xfputs (" (", stdout); + xfputs (value, stdout); + xfputs (")\n", stdout); + } +} +#endif + +void +command_show (argc, argv) + int argc; + char *argv[]; +{ + char *s; + StringAlist *var; + int showall = 0; + + if (argc == 2 && strcmp(argv[1],"-a") == 0) { + showall = 1; + argc --; + argv ++; + } + + switch (argc) { + case 1: + /* + * Show all variables and their values + */ + for (var = variable_alist; var != NULL; var = var->next) + if (var->key[0] != '_' || showall != 0) + xprintf ("%s\t%s\n", var->key, var->value); + return; + + case 2: + /* + * Show value of variable + */ + if ((s = variable_ref (argv[1])) != NULL) + xputs (s); + else + xprintf ("Unbounded variable: %s\n", argv[1]); + return; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +void +command_set (argc, argv) + int argc; + char *argv[]; +{ + switch (argc) { + case 1: + xprintf ("%s: too few arguments\n", argv[0]); + return; + + case 2: + argv[2] = ""; + case 3: + variable_set (argv[1], argv[2]); + return; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +void +command_unset (argc, argv) + int argc; + char *argv[]; +{ + int i; + if (argc == 1) { + xprintf ("%s: too few arguments\n", argv[0]); + } else { + for (i = 1; i < argc; i++) + variable_set (argv[i], NULL); + return; + } +} + +void +command_help (argc, argv) + int argc; + char *argv[]; +{ + int i; + char buff[256]; + const char *p; + switch (argc) { + case 1: + /* + * List up all command helps + */ + for (i = 0; command_table[i].name != NULL; i++) { + sprintf (buff, "%s %s", + command_table[i].name, command_table[i].option_string); + xprintf (" %-22s - ", buff); + for (p = command_table[i].help; + *p != '\0' && *p != '.' && *p != '\n'; + p++) + putchar (*p); + putchar ('\n'); + } + return; + + case 2: + /* + * Show command help + */ + for (i = 0; command_table[i].name != NULL; i++) { + if (strcmp (command_table[i].name, argv[1]) == 0) + break; + } + if (command_table[i].name == NULL) { + xprintf ("No such command: %s\n", argv[1]); + } else { + xprintf ("Usage: %s %s\n\n%s", + command_table[i].name, command_table[i].option_string, + command_table[i].help); + } + return; + + default: + xprintf ("%s: too many arguments\n", argv[0]); + } +} + +int +check_book () +{ + if (eb_is_bound (¤t_book)) { + return 1; + } else { + xputs ("You should specify a book directory first"); + return 0; + } +} + +int +check_subbook () +{ + if (check_book ()) { + EB_Subbook_Code code; + if (EB_SUCCESS == eb_subbook (¤t_book, &code)) + return 1; + else + xputs ("You should select a subbook first"); + } + return 0; +} + +int +internal_set_font (book, height) + EB_Book *book; + char *height; +{ + EB_Font_Code font; + EB_Error_Code error_code = EB_SUCCESS; + + if (height == NULL) + if ((height = variable_ref ("font")) == NULL) + height = "16"; + + font = atoi (height); + switch (font) { + case 16: font = EB_FONT_16; break; + case 24: font = EB_FONT_24; break; + case 30: font = EB_FONT_30; break; + case 48: font = EB_FONT_48; break; + default: + xprintf ("Illegal font height: %s\n", height); + return 0; + } + + if (!eb_have_font (book, font) ) { + xprintf ("Invalid font for %s: %s\n", + book->subbook_current->directory_name, + height); + /* set_error_message (); */ + return 0; + } + + error_code = eb_set_font (book, font); + if (EB_SUCCESS != error_code) { + xprintf ("An error occurred in internal_set_font: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return 0; + } + return 1; +} + +int +parse_dict_id (name, book) + char *name; + EB_Book *book; +{ + int i, num; + EB_Subbook_Code sublist[EB_MAX_SUBBOOKS]; + EB_Error_Code error_code = EB_SUCCESS; + +#ifdef _DEBUG + /* to avoid strange behavior in VC++ 6.0 debug mode. */ + memset (sublist, -1, sizeof (sublist)); +#endif /* !DEBUG */ + error_code = eb_subbook_list (book, sublist, &num); + if (EB_SUCCESS != error_code) + goto error; + + if (strchr (name, '.') != NULL) { + /* + * repeated directory, different index page + */ + name = strchr(name, '.') + 1; + } + if ((i = atoi (name)) > 0) { + /* + * Numbered dictionary + */ + if (--i < num) { + error_code = eb_set_subbook (book, sublist[i]); + if (EB_SUCCESS != error_code) + goto error; + return 1; + } else { + xprintf ("No such numberd dictionary : %s\n", name); + return 0; + } + } else { + /* + * Named dictionary + */ + char dir[PATH_MAX + 1]; + + for (i = 0; i < num; i++) { + error_code = eb_subbook_directory2 (book, sublist[i], dir); + if (EB_SUCCESS != error_code) + goto error; + + if (strcmp (name, dir) == 0) { + error_code = eb_set_subbook (book, sublist[i]); + if (EB_SUCCESS != error_code) + goto error; + return 1; + } + } + xprintf ("No such dictionary: %s\n", name); + return 0; + } + + error: + xprintf ("An error occurred in parse_dict_id: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return 0; +} + +int +parse_entry_id (code, pos) + char *code; + EB_Position *pos; +{ + EB_Error_Code error_code = EB_SUCCESS; + EB_Error_Code (*hit_list) (EB_Book *, int, EB_Hit *, int *); + + if (strchr (code, ':') != NULL) { + /* + * Encoded position + */ + char *endp; + pos->page = strtol (code, &endp, 0); + if (*endp != ':') + goto illegal; + + pos->offset = strtol (endp + 1, &endp, 0); + if (*endp != '\0') + goto illegal; + + return 1; + + illegal: + xprintf ("Illegal position: %s\n", code); + return 0; + + } else { + /* + * Numbered entry + */ + int num, count; + const char *pattern = variable_ref ("_last_search_pattern"); + EB_Hit list[MAX_HIT_SIZE]; + + if (!pattern) { + xputs ("No search has been executed yet."); + return 0; + } + if ((count = atoi (code) - 1) < 0) { + xprintf ("Invalid entry number: %s\n", code); + return 0; + } + if (check_subbook ()) { + error_code = last_search_function (¤t_book, pattern); + if (EB_SUCCESS != error_code) { + xprintf ("An error occured in parse_entry_id: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return 0; + } + if (last_search_function == eblook_search_wild) { + hit_list = eblook_hit_list_wild; + } + else + hit_list = eb_hit_list; + while (EB_SUCCESS == hit_list (¤t_book, MAX_HIT_SIZE, list, + &num) && 0 < num) { + if (count < num) { + qsort(list, num, sizeof(EB_Hit), hitcomp); + pos->page = list[count].text.page; + pos->offset = list[count].text.offset; + return 1; + } + count -= num; + pattern = NULL; + } + if (num == 0) + xprintf ("Too big: %s\n", code); + } + return 0; + } +} + + +int hitcomp(a, b) + const void *a; + const void *b; +{ + const EB_Hit *x, *y; + x = (EB_Hit *)a; + y = (EB_Hit *)b; + if (x->heading.page < y->heading.page) return -1; + if (x->heading.page == y->heading.page) { + if (x->heading.offset < y->heading.offset) return -1; + if (x->heading.offset == y->heading.offset) { + if (x->text.page < y->text.page) return -1; + if (x->text.page == y->text.page) { + if (x->text.offset < y->text.offset) return -1; + if (x->text.offset == y->text.offset) return 0; + } + } + } + return 1; +} + + +int +search_pattern (book, appendix, pattern, begin, length) + EB_Book *book; + EB_Appendix *appendix; + char *pattern; + int begin; + int length; +{ + int i, num, point; + char headbuf1[BUFSIZ]; + char headbuf2[BUFSIZ]; + char headbuf3[BUFSIZ]; + char *head; + const char *s; + EB_Error_Code (*search) (EB_Book *, const char *); + EB_Error_Code (*hit_list) (EB_Book *, int, EB_Hit *, int *); + EB_Hit hitlist[MAX_HIT_SIZE]; + EB_Error_Code error_code = EB_SUCCESS; + + char* prevhead; + int prevpage; + int prevoffset; + ssize_t heading_len; + + if (pattern == NULL) { + /* check last search */ + begin = last_search_begin; + length = last_search_length; + search = last_search_function; + pattern = variable_ref ("_last_search_pattern"); + if (pattern == NULL) { + xputs ("No search has been executed yet."); + return 0; + } + if (last_search_begin == 0) { + xprintf ("Last search had finished\n"); + return 0; + } + } else { + /* get search method */ + if ((s = variable_ref ("search-method")) == NULL) + s = default_method; + + if (strcmp (s, "exact") == 0) + search = eb_search_exactword; + else if (strcmp (s, "word") == 0) + search = eb_search_word; + else if (strcmp (s, "endword") == 0) + search = eb_search_endword; + else if (strcmp (s, "glob") == 0) { + search = eb_search_exactword; + + i = strlen (pattern) - 1; + if (strchr(pattern, '=') && eb_have_keyword_search(book)) + /* check for keyword search */ + search = eblook_search_keyword; +#ifdef EB_MAX_CROSS_ENTRIES + else if (strchr(pattern, '&') && eb_have_cross_search(book)) + /* check for cross search */ + search = eblook_search_cross; +#endif + else if (strchr(pattern, ':') && eb_have_multi_search(book)) + /* check for multi search */ + search = eblook_search_multi; + if (pattern[i] == '*') { + /* check for word search */ + pattern[i] = '\0'; + search = eb_search_word; + } else if (pattern[0] == '*') { + /* check for endword search */ + pattern++; + search = eb_search_endword; + } + } else if (strcmp (s, "keyword") == 0) + search = eblook_search_keyword; +#ifdef EB_MAX_CROSS_ENTRIES + else if (strcmp (s, "cross") == 0) + search = eblook_search_cross; +#endif + else if (strcmp (s, "multi") == 0) + search = eblook_search_multi; + else if (strcmp (s, "wild") == 0) + search = eblook_search_wild; + else { + xprintf ("Invalid search method: %s\n", s); + return 0; + } + /* reserve search information */ + /* use EB_Book structure directly here so as not to use more buffer. */ + variable_set ("_last_search_book", book->path); + variable_set ("_last_search_dict", book->subbook_current->directory_name); + variable_set ("_last_search_pattern", pattern); + last_search_begin = 0; + last_search_length = length; + last_search_function = search; + } + + /* search */ + error_code = search (book, pattern); + if (EB_SUCCESS != error_code) { + xprintf ("An error occured in search_pattern: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return 0; + } + + point = 0; + head = headbuf1; + prevhead = headbuf2; + *prevhead = '\0'; + prevpage = 0; + prevoffset = 0; + + if (search == eblook_search_wild) { + hit_list = eblook_hit_list_wild; + } else + hit_list = eb_hit_list; + + while (EB_SUCCESS == hit_list (book, MAX_HIT_SIZE, hitlist, &num) + && 0 < num) { + qsort(hitlist, num, sizeof(EB_Hit), hitcomp); + for (i = 0; i < num; i++) { + point++; + if (point >= begin + length && length > 0) { + xprintf ("\n", point); + last_search_begin = point; + goto exit; + } + + if (point >= begin) { + error_code = eb_seek_text (book, &hitlist[i].heading); + if (error_code != EB_SUCCESS) + continue; + error_code = eb_read_heading (book, appendix, &heading_hookset, NULL, + BUFSIZ - 1, head, &heading_len); + if (error_code != EB_SUCCESS || heading_len == 0) + continue; + *(head + heading_len) = '\0'; + + if (prevpage == hitlist[i].text.page && + prevoffset == hitlist[i].text.offset && + strcmp (head, prevhead) == 0) + continue; + + xprintf ("%2d. %d:%d\t", point, + hitlist[i].text.page, hitlist[i].text.offset); + xfputs (head, stdout); + while (eb_read_heading (book, appendix, &heading_hookset, + NULL, BUFSIZ - 1, headbuf3, + &heading_len) == EB_SUCCESS && + heading_len > 0) { + *(headbuf3 + heading_len) = '\0'; + xfputs (headbuf3, stdout); + } + fputc ('\n', stdout); + } + + if (head == headbuf1) { + head = headbuf2; + prevhead = headbuf1; + } else { + head = headbuf1; + prevhead = headbuf2; + } + prevpage = hitlist[i].text.page; + prevoffset = hitlist[i].text.offset; + } + if (num < MAX_HIT_SIZE) + break; + } + + exit: + return 1; +} + +static EB_Error_Code insert_prev_next(book, appendix, pos, fp) + EB_Book *book; + EB_Appendix *appendix; + EB_Position *pos; + FILE *fp; +{ + EB_Error_Code error_code; + EB_Position pos_temp; + char head[BUFSIZ]; + ssize_t heading_len; + + error_code = eb_seek_text(book, pos); + if (error_code != EB_SUCCESS) + return error_code; + error_code = eb_seek_text(book, pos); + if (error_code != EB_SUCCESS) + return error_code; + + if (eb_backward_text(book, appendix) == EB_SUCCESS) { + error_code = eb_tell_text(book, &pos_temp); + if (error_code != EB_SUCCESS) + return error_code; + error_code = eb_seek_text(book, &pos_temp); + if (error_code != EB_SUCCESS) + return error_code; + fprintf(fp, ""); + while (eb_read_heading (book, appendix, &heading_hookset, NULL, + BUFSIZ - 1, head, &heading_len) == EB_SUCCESS && + heading_len > 0) { + *(head + heading_len) = '\0'; + xfputs (head, fp); + } + fprintf(fp, "\n", pos_temp.page, pos_temp.offset); + } + error_code = eb_seek_text(book, pos); + if (error_code != EB_SUCCESS) + return error_code; + if (eb_forward_text(book, appendix) == EB_SUCCESS) { + error_code = eb_tell_text(book, &pos_temp); + if (error_code != EB_SUCCESS) + return error_code; + error_code = eb_seek_text(book, &pos_temp); + if (error_code != EB_SUCCESS) + return error_code; + fprintf(fp, ""); + while (eb_read_heading (book, appendix, &heading_hookset, NULL, + BUFSIZ - 1, head, &heading_len) == EB_SUCCESS && + heading_len > 0) { + *(head + heading_len) = '\0'; + xfputs (head, fp); + } + fprintf(fp, "\n", pos_temp.page, pos_temp.offset); + } + error_code = eb_seek_text(book, pos); + return error_code; +}; + +int +insert_content (book, appendix, pos, begin, length) + EB_Book *book; + EB_Appendix *appendix; + EB_Position *pos; + int begin; + int length; +{ + int point; + ssize_t len; + char last = '\n'; + char buff[EB_SIZE_PAGE]; + EB_Error_Code error_code = EB_SUCCESS; + FILE *outFP = stdout; + + show_prev_next_flag = 1; + + /* insert */ + point = 0; + error_code = eb_seek_text(book, pos); + if (error_code != EB_SUCCESS) { + xprintf("An error occured in seek_position: %s\n", + eb_error_message(error_code)); + set_error_message (error_code); + return 0; + } + +#ifdef USE_PAGER + if (interactive_mode) { + outFP = popen_pager(); + if (outFP == NULL) outFP = stdout; + } +#endif + + while (EB_SUCCESS == eb_read_text (book, appendix, &text_hookset, NULL, + EB_SIZE_PAGE - 1, buff, &len) && + 0 < len) { + *(buff + len) = '\0'; + /* count up */ + point++; + if (point >= begin + length && length > 0) { + xfprintf (outFP, "\n", point); + goto exit; + } + + /* insert */ + if (point >= begin) { + xfputs (buff, outFP); + last = buff[len - 1]; + } + } + + /* insert a newline securely */ + if (last != '\n') + putc('\n', outFP); + + if (show_prev_next_flag != 0) { + insert_prev_next(book, appendix, pos, outFP); + } + + exit: + +#ifdef USE_PAGER + if (interactive_mode) { + if (outFP != stdout) + pclose_pager(outFP); + } +#endif + return 1; +} + +int +insert_dump (book, appendix, pos, length) + EB_Book *book; + EB_Appendix *appendix; + EB_Position *pos; + int length; +{ + int page; + ssize_t len; + unsigned char buff[EB_SIZE_PAGE]; + EB_Error_Code error_code = EB_SUCCESS; + int i, count; + long position; + FILE *outFP = stdout; + int ret_code = 0; + +#ifdef USE_PAGER + if (interactive_mode) { + outFP = popen_pager(); + if (outFP == NULL) outFP = stdout; + } +#endif + + /* insert */ + for (page = 0; page < length; page++) { + error_code = eb_seek_text(book, pos); + if (error_code != EB_SUCCESS) { + xprintf("An error occured in seek_position: %s\n", + eb_error_message(error_code)); + set_error_message (error_code); + goto exit; + } + + position = (pos->page - 1) * 2048 + pos->offset; + + error_code = eb_read_rawtext (book, EB_SIZE_PAGE, (char *)buff, &len); + if ((error_code != EB_SUCCESS) || len <= 0) { + xprintf ("An error occured in command_dump: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + goto exit; + } + + /* insert */ + count = 0; + while (count < EB_SIZE_PAGE) { + xfprintf(outFP, "%08d:%04d ", position / 2048 + 1, position % 2048); + for (i = 0; i < 16; i+= 2) { + xfprintf(outFP, "%02x%02x", buff[count+i], buff[count+i+1]); + } + xfprintf(outFP, " "); + for (i = 0; i < 16; i+= 2) { + if (0x21 <= buff[count+i] && buff[count+i] <=0x7e && + 0x21 <= buff[count+i+1] && buff[count+i+1] <= 0x7e) { + xfprintf(outFP, "[%c%c]", buff[count+i] | 0x80, + buff[count+i+1] | 0x80); + } else { + xfprintf(outFP, "%02x%02x", buff[count+i], buff[count+i+1]); + } + } + xfprintf(outFP, "\n"); + position += 16; + count += 16; + } + pos->page ++; + } + ret_code = 1; + + exit: +#ifdef USE_PAGER + if (interactive_mode) { + if (outFP != stdout) + pclose_pager(outFP); + } +#endif + + return ret_code; +} + +int +insert_font (book, id) + EB_Book *book; + const char *id; +{ + int ch, width, height, start, end; + size_t size; + char bitmap[EB_SIZE_WIDE_FONT_48]; + char xbm[EB_SIZE_WIDE_FONT_48_XBM]; + EB_Error_Code error_code = EB_SUCCESS; + + switch (*id) { + case 'h': + ch = strtol (id + 1, NULL, 16); + eb_narrow_font_start (book, &start); + eb_narrow_font_end (book, &end); + if (start <= ch && ch <= end) { + eb_narrow_font_width (book, &width); + error_code = eb_narrow_font_character_bitmap (book, ch, bitmap); + if (EB_SUCCESS != error_code) + goto error; + } else { + xprintf ("No such character font: %s\n", id); + return 0; + } + break; + + case 'z': + ch = strtol (id + 1, NULL, 16); + eb_wide_font_start (book, &start); + eb_wide_font_end (book, &end); + if (start <= ch && ch <= end) { + eb_wide_font_width (book, &width); + error_code = eb_wide_font_character_bitmap (book, ch, bitmap); + if (EB_SUCCESS != error_code) + goto error; + } else { + xprintf ("No such character font: %s\n", id); + return 0; + } + break; + + default: + xprintf ("Invalid font id: %s\n", id); + return 0; + } + + eb_font_height (book, &height); + eb_bitmap_to_xbm (bitmap, width, height, xbm, &size); + xbm[size] = '\0'; + xfputs (xbm, stdout); + return 1; + + error: + xprintf ("An error occured in insert_font: %s\n", + eb_error_message (error_code)); + set_error_message (error_code); + return 0; +} + +int +insert_font_list (book) + EB_Book *book; +{ + int ch, width, height, start, end; + size_t size; + char bitmap[EB_SIZE_WIDE_FONT_48]; + char xbm[EB_SIZE_WIDE_FONT_48_XBM]; + + eb_font_height (book, &height); + + eb_narrow_font_width (book, &width); + eb_narrow_font_start (book, &start); + eb_narrow_font_end (book, &end); + + for (ch = start; ch < end; ch++) + if (EB_SUCCESS == eb_narrow_font_character_bitmap (book, ch, bitmap)) { + eb_bitmap_to_xbm (bitmap, width, height, xbm, &size); + xbm[size] = '\0'; + xfprintf (stdout, "\nid = h%04x\n", ch); + xfputs (xbm, stdout); + } + + eb_wide_font_width (book, &width); + eb_wide_font_start (book, &start); + eb_wide_font_end (book, &end); + for (ch = start; ch < end; ch++) + if (EB_SUCCESS == eb_wide_font_character_bitmap (book, ch, bitmap)) { + eb_bitmap_to_xbm (bitmap, width, height, xbm, &size); + xbm[size] = '\0'; + xfprintf (stdout, "\nid = z%04x\n", ch); + xfputs (xbm, stdout); + } + return 1; +} + +void +command_candidate(argc, argv) + int argc; + char *argv[]; +{ + switch (argc) { + case 3: + show_entry_candidate(¤t_book, atoi(argv[1])-1, atoi(argv[2])-1); + break; + default: + output_multi_information(¤t_book); + break; + } +} + +void +command_label(argc, argv) + int argc; + char *argv[]; +{ + if (argc == 1) { + show_label(¤t_book, -1); + } else { + show_label(¤t_book, atoi(argv[1]) - 1); + } + +} + + + +EB_Error_Code +hook_font (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + EB_Error_Code result = EB_SUCCESS; + + switch (code) { + case EB_HOOK_NARROW_FONT: + if (EB_SUCCESS != eb_narrow_alt_character_text (appendix, argv[0], buff)) + sprintf (buff, "", argv[0]); + result = eb_write_text_string(book, buff); + break; + + case EB_HOOK_WIDE_FONT: + if (EB_SUCCESS != eb_wide_alt_character_text (appendix, argv[0], buff)) + sprintf (buff, "", argv[0]); + result = eb_write_text_string(book, buff); + break; + } + return result; +} + +#ifdef EB_HOOK_GB2312 +EB_Error_Code +hook_gb2312 (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + sprintf (buff, "", argv[0]); + eb_write_text_string(book, buff); + return 0; +} +#endif + +#ifdef EB_HOOK_EBXAC_GAIJI +EB_Error_Code +hook_ebxac_gaiji (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + sprintf (buff, "", (argv[0] & 0x7f7f)); + eb_write_text_string(book, buff); + return 0; +} +#endif + +EB_Error_Code +hook_decoration (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + char buff[256]; + EB_Error_Code result = EB_SUCCESS; + + if (decorate_mode == DECORATE_OFF) + return EB_SUCCESS; + switch (code) { + case EB_HOOK_BEGIN_SUBSCRIPT: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_SUBSCRIPT: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_BEGIN_SUPERSCRIPT: + result = eb_write_text_string(book,""); + break; + case EB_HOOK_END_SUPERSCRIPT: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_BEGIN_NO_NEWLINE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_NO_NEWLINE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_BEGIN_EMPHASIS: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_EMPHASIS: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_SET_INDENT: + sprintf (buff, "", argv[1] > 8 ? 9 : argv[1]); + result = eb_write_text_string(book, buff); + break; + case EB_HOOK_BEGIN_DECORATION: + switch (argv[1]) { + case 3: + result = eb_write_text_string(book, ""); + break; + default: + result = eb_write_text_string(book, ""); + break; + } + break; + case EB_HOOK_END_DECORATION: + result = eb_write_text_string(book, ""); + break; + } + return result; +} + +#ifdef EB_HOOK_STOP_CODE +EB_Error_Code +hook_stopcode (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + const char *stop = variable_ref ("stop-code"); + + if (stop) { + unsigned int c; + c = strtol (stop, NULL, 0); + if (c == (argv[0] << 16) + argv[1]) + return EB_ERR_STOP_CODE; + else + return EB_SUCCESS; + } + + return (eb_hook_stop_code (book, appendix, container, code, argc, argv)); +} +#endif + +EB_Error_Code +hook_img (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + static int imgW, imgH, page, offset; + static char buff[256]; + EB_Error_Code result = EB_SUCCESS; + + switch (code) { + case EB_HOOK_BEGIN_MONO_GRAPHIC: + imgW = argv[3]; + imgH = argv[2]; + if (imgW && imgH) { + sprintf (buff, "", argv[3], argv[2]); + result = eb_write_text_string(book, buff); + } + break; + + case EB_HOOK_END_MONO_GRAPHIC: + if (imgW && imgH) { + sprintf (buff, "", argv[1], argv[2]); + imgW = imgH = 0; + result = eb_write_text_string(book, buff); + } + break; + + case EB_HOOK_BEGIN_COLOR_JPEG: + page = argv[2]; + offset = argv[3]; + result = eb_write_text_string(book, ""); + break; + + case EB_HOOK_BEGIN_COLOR_BMP: + page = argv[2]; + offset = argv[3]; + result = eb_write_text_string(book, ""); + break; + + case EB_HOOK_END_COLOR_GRAPHIC: + sprintf (buff, "", page, offset); + result = eb_write_text_string(book, buff); + break; + +#ifdef EB_HOOK_BEGIN_IN_COLOR_JPEG /* eb-3.3 */ + case EB_HOOK_BEGIN_IN_COLOR_JPEG: + page = argv[2]; + offset = argv[3]; + result = eb_write_text_string(book, ""); + break; +#endif + +#ifdef EB_HOOK_BEGIN_IN_COLOR_BMP /* eb-3.3 */ + case EB_HOOK_BEGIN_IN_COLOR_BMP: + page = argv[2]; + offset = argv[3]; + result = eb_write_text_string(book, ""); + break; +#endif + +#ifdef EB_HOOK_END_IN_COLOR_GRAPHIC + case EB_HOOK_END_IN_COLOR_GRAPHIC: + sprintf (buff, "", page, offset); + result = eb_write_text_string(book, buff); + break; +#endif + +#ifdef EB_HOOK_BEGIN_IMAGE_PAGE + case EB_HOOK_BEGIN_IMAGE_PAGE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_IMAGE_PAGE: + show_prev_next_flag = 0; + result = eb_write_text_string(book, ""); + break; +#endif +#ifdef EB_HOOK_BEGIN_WAVE + case EB_HOOK_BEGIN_WAVE: + sprintf (buff, "", argv[2], argv[3], argv[4], argv[5]); + result = eb_write_text_string(book, buff); + break; + case EB_HOOK_END_WAVE: + result = eb_write_text_string(book, ""); + break; +#endif +#ifdef EB_HOOK_BEGIN_MPEG + case EB_HOOK_BEGIN_MPEG: + sprintf (buff, "", argv[2], argv[3], argv[4], argv[5]); + result = eb_write_text_string(book, buff); + break; + case EB_HOOK_END_MPEG: + result = eb_write_text_string(book, ""); + break; +#endif + } + return result; +} + + +EB_Error_Code +hook_tags (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + char buff[256]; + EB_Error_Code result = EB_SUCCESS; + + switch (code) { + case EB_HOOK_BEGIN_REFERENCE: + case EB_HOOK_BEGIN_CANDIDATE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_REFERENCE: + case EB_HOOK_END_CANDIDATE_GROUP: + sprintf (buff, "", argv[1], argv[2]); + result = eb_write_text_string(book, buff); + break; +#ifdef EB_HOOK_BEGIN_UNICODE + case EB_HOOK_BEGIN_UNICODE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_END_UNICODE: + result = eb_write_text_string(book, ""); + break; +#endif +#ifdef EB_HOOK_BEGIN_CLICKABLE_AREA + case EB_HOOK_BEGIN_GRAPHIC_REFERENCE: + sprintf (buff, "", argv[1], argv[2]); + result = eb_write_text_string(book, buff); + break; + case EB_HOOK_END_GRAPHIC_REFERENCE: + result = eb_write_text_string(book, ""); + break; + case EB_HOOK_GRAPHIC_REFERENCE: + sprintf (buff, "", + argv[1], argv[2]); + result = eb_write_text_string(book, buff); + show_prev_next_flag = 0; + break; + case EB_HOOK_BEGIN_CLICKABLE_AREA: + sprintf (buff, + "", + argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + result = eb_write_text_string(book, buff); + break; + case EB_HOOK_END_CLICKABLE_AREA: + result = eb_write_text_string(book, ""); + break; +#endif +#ifdef EB_HOOK_BEGIN_COLOR_CHART + case EB_HOOK_BEGIN_COLOR_CHART: + sprintf (buff, "", argv[1]); + result = eb_write_text_string(book, buff); + break; +#endif + } + return result; +} + + +void +show_version () +{ + xprintf ("%s %s (with EB %d.%d)\n", program_name, program_version, + EB_VERSION_MAJOR, EB_VERSION_MINOR); + xputs ("Copyright (C) 1997,1998,1999,2000 NISHIDA Keisuke"); + xputs ("Copyright (C) 2000-2002 Satomi"); + xputs ("Copyright (C) 2000,2001 Kazuhiko"); + xputs ("Copyright (C) 2000-2002 NEMOTO Takashi"); + xputs ("Copyright (C) 2000,2001 YAMAGATA"); + xputs ("Copyright (C) 2006-2020 Kazuhiro Ito"); + xputs ("eblook may be distributed under the terms of the GNU General Public Licence;"); + xputs ("certain other uses are permitted as well. For details, see the file"); + xputs ("`COPYING'."); + xputs ("There is no warranty, to the extent permitted by law."); +} + +void +show_help () +{ + xfprintf (stderr, "Usage: %s [option...] [book-directory [appendix-directory]]\n", program_name); + xfprintf (stderr, "Options:\n"); + xfprintf (stderr, " -e, --encoding=NAME specify input/output encoding\n"); + xfprintf (stderr, " -q, --no-init-file ignore user init file\n"); + xfprintf (stderr, " -i, --non-interactive enter non interactive mode\n"); + xfprintf (stderr, " -h, --help show this message\n"); + xfprintf (stderr, " -v, --version show version number\n"); + fflush (stderr); +} + +void +show_try_help () +{ + xfprintf (stderr, "Try `%s --help' for more information.\n", invoked_name); + fflush (stderr); +} + +void +set_error_message (error_code) + EB_Error_Code error_code; +{ + variable_set ("_error", strerror (errno)); + variable_set ("_eb_error", eb_error_message (error_code)); +} + +void +unset_error_message () +{ + variable_set ("_error", NULL); + variable_set ("_eb_error", NULL); +} + +EB_Error_Code +eblook_search_keyword(book, pattern) + EB_Book *book; + const char *pattern; +{ + char *keyword[EB_MAX_KEYWORDS+2]; + EB_Error_Code error_code; + char *p = strdup(pattern); + int i; + + keyword[0] = strtok(p, "="); + + for (i=1; isubbook_current == NULL) { + error_code = EB_ERR_NO_CUR_SUB; + goto failed; + } + + if (eblook_have_wild_search(book) == 0) { + error_code = EB_ERR_NO_SUCH_SEARCH; + goto failed; + } + + search_wild_convert_pattern(eblook_wild_pattern, (const unsigned char *)pattern, EB_MAX_WORD_LENGTH * 2); + eblook_wild_page = 0; + eblook_wild_count = 0; + error_code = EB_SUCCESS; + + failed: + return error_code; +} + +EB_Error_Code eblook_hit_list_wild (book, max_hit_count, hit_list, hit_count) + EB_Book *book; + int max_hit_count; + EB_Hit *hit_list; + int *hit_count; +{ + int start, end, current; + int i, pos, key_length; + unsigned char count, current_count = 0; + static unsigned char buff[EB_SIZE_PAGE]; + unsigned char key[EB_MAX_WORD_LENGTH+1]; + EB_Position eb_pos, content_pos, heading_pos; + EB_Error_Code error_code; + ssize_t read_length; + + start = book->subbook_current->word_asis.start_page; + end = book->subbook_current->word_asis.end_page; + if (eblook_wild_page != 0) { + current = eblook_wild_page; + } else { + current = start; + } + count = 0; + + *hit_count = 0; + eb_pos.offset = 0; + while (current <= end) { + eb_pos.page = current; + error_code = eb_seek_text(book, &eb_pos); + if ( error_code != EB_SUCCESS ) + goto failed; + + error_code = eb_read_rawtext(book, EB_SIZE_PAGE, (char *)buff, &read_length); + if (error_code != EB_SUCCESS || read_length != EB_SIZE_PAGE) + goto failed; + + i = 0; + switch (buff[0]) { + case 0x80: + case 0xa0: + case 0xc0: + case 0xe0: + pos = 4; + for (i = uint2(buff + 2); i > 0; i--) { + key_length = uint1(buff + pos); + jis_to_euc((char *)key, (char *)buff+pos+1, key_length); + pos += key_length + 1; + + if (search_wild_match_pattern (key, eblook_wild_pattern)) { + count++; + if (eblook_wild_count < count) { + content_pos.page = uint4(buff + pos); + content_pos.offset = uint2(buff + pos + 4); + heading_pos.page = uint4(buff + pos + 6); + heading_pos.offset = uint2(buff + pos + 10); + + hit_list[*hit_count].heading = heading_pos; + hit_list[*hit_count].text = content_pos; + (*hit_count)++; + if (*hit_count >= max_hit_count) + break; + } + } + pos += 12; + } + default: + break; + } + + if (i==0) { + current++; + count = 0; + eblook_wild_count = 0; + } else { + eblook_wild_count = count - 1; + break; + } + } + + eblook_wild_page = current; + return EB_SUCCESS; + failed: + eblook_wild_page = 0; + return error_code; +} + +void search_wild_insert_euc_char (pos, ch) + unsigned char *pos; + unsigned char ch; +{ + /*ʸʸѴ*/ + static const unsigned char ascii_euc_table_u[] = { + 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + 0xa1, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + 0xa1, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, + 0xa3, 0xa3, 0xa3, 0xa1, 0xa1, 0xa1, 0xa1 + }; + + static const unsigned char ascii_euc_table_l[] = { + 0xa1, 0xaa, 0xc9, 0xf4, 0xf0, 0xf3, 0xf5, 0xc7, + 0xca, 0xcb, 0xf6, 0xdc, 0xa4, 0xdd, 0xa5, 0xbf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xa7, 0xa8, 0xe3, 0xe1, 0xe4, 0xa9, + 0xf7, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xce, 0xef, 0xcf, 0xb0, 0xb2, + 0xae, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xd0, 0xc3, 0xd1, 0xc1 + }; + + if (ch >=0x7f || ch < 0x20) + ch = 0x20; + ch -= 0x20; + *pos = ascii_euc_table_u[ch]; + *(pos + 1) = ascii_euc_table_l[ch]; +} + +int search_wild_convert_pattern (query, pattern, buff_length) + unsigned char *query; + const unsigned char *pattern; + int buff_length; +{ + int length = 0, read = 0; + int escaped = 0; + + while (length < buff_length) { + if (pattern[read] == 0) + break; + + if (pattern[read] >= 0x80) { + escaped = 0; + if (length + 1 < buff_length) { + query[length] = pattern[read]; + query[length+1] = pattern[read+1]; + length += 2; + read += 2; + } else + break; + } else { + switch (pattern[read]) { + case '\\': + if (escaped == 0) + escaped = 1; + else { + escaped = 0; + if (length + 1 < buff_length) { + search_wild_insert_euc_char(query+length, '\\'); + length += 2; + } + } + read++; + break; + case '*': + case '?': + if (escaped==0) { + query[length++] = pattern[read++]; + break; + } + default: + escaped = 0; + if (length + 1 < buff_length) { + search_wild_insert_euc_char(query+length, pattern[read]); + length += 2; + read++; + } + } + } + } + query[length] = 0; + + /* remove spaces */ + length = 0; + read = 0; + while (query[read] != 0) { + if (query[read] < 0x80) { + if (read != length) { + query[length] = query[read]; + } + read++; + length++; + } else if (query[read] == 0xa1 || query[read+1] == 0xa1) { + read += 2; + } else if (read != length) { + query[length++] = query[read++]; + query[length++] = query[read++]; + } else { + read += 2; + length += 2; + } + if (query[length - 1] == 0) { + length--; + break; + } + } + query[length] = 0; + + /* convert lower case to upper as required. */ + if (current_book.subbook_current->word_asis.lower == EB_INDEX_STYLE_CONVERT) { + read = 0; + while (read < length) { + if(query[read] < 0x80) { + read++; + } else if (query[read] == 0xa3 + && query[read + 1] >= 0xe1 + && query[read + 1] <= 0xfa) { + query[read + 1] -= 0x20; + read += 2; + } else { + read += 2; + } + } + } + + return length; +} + + +int search_wild_match_pattern(char *key, char *pattern) { + char *s; + + while (*key != 0) { + switch (*pattern) { + case '?': + key += 2; + pattern++; + break; + case '*': + if (pattern + 1 == 0) { + return 1; + } + s = key; + for (;;) { + if (search_wild_match_pattern(s, pattern + 1)) + return 1; + if (*s == 0) + break; + s += 2; + } + case 0: + return 0; + default: + if (*key != *pattern || key[1] != pattern[1]) + return 0; + key += 2; + pattern += 2; + break; + } + } + if (*pattern == 0 || (*pattern == '*' && pattern[1] == 0)) + return 1; + return 0; +} + +int eblook_have_wild_search (book) + EB_Book *book; +{ + if (book->subbook_current == NULL || + book->subbook_current->word_asis.start_page == 0 || + book->character_code != EB_CHARCODE_JISX0208) + return 0; + return 1; +} + + +StringAlist * +salist_set (alist, key, value) + StringAlist *alist; + const char *key; + const char *value; +{ + StringAlist *var; + + if (value) { + /* + * Set KEY to VALUE + */ + StringAlist *prev = NULL; + for (var = alist; var != NULL; var = var->next) { + if (strcmp (key, var->key) == 0) { + /* update original value */ + char *p = strdup (value); + if (p != NULL) { + free (var->value); + var->value = p; + } else { + xputs ("memory full"); + if (prev) + prev->next = var->next; + else + alist = var->next; + + free (var->key); + free (var->value); + free (var); + } + break; + } + prev = var; + } + if (var == NULL) { + /* add new element */ + if ((var = malloc (sizeof (StringAlist))) == NULL) { + xputs ("memory full"); + } else if ((var->key = strdup (key)) == NULL || + (var->value = strdup (value)) == NULL) { + xputs ("memory full"); + free (var->key); + free (var); + } else { + var->next = alist; + alist = var; + } + } + } else { + /* + * Delete element + */ + StringAlist *prev = NULL; + for (var = alist; var != NULL; var = var->next) { + if (strcmp (key, var->key) == 0) { + /* delete from alist */ + if (prev) + prev->next = var->next; + else + alist = var->next; + + /* free */ + free (var->key); + free (var->value); + free (var); + break; + } + prev = var; + } + } + + return alist; +} + +char * +salist_ref (alist, key) + StringAlist *alist; + const char *key; +{ + StringAlist *var; + for (var = alist; var != NULL; var = var->next) + if (strcmp (key, var->key) == 0) + return var->value; + + return NULL; +} + +const EB_Position zero_pos = { 0, 0 }; + +struct multi_can { + char text[256]; + struct multi_can *child; + EB_Position child_pos; + struct multi_can *next; + int terminated; +}; + +struct multi_can *head = 0, *tail = 0; + +char can_word[256]; + +EB_Error_Code +can_menu_begin(book, appendix, workbuf, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *workbuf; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ + memset(can_word, 0, sizeof(can_word)); + return EB_SUCCESS; +} + +EB_Error_Code +can_menu_end(book, appendix, workbuf, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *workbuf; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ +#if MULTI_DEBUG + xprintf(">> can_word = %s\n", can_word); +#endif + + if (head == 0) { + head = malloc(sizeof(struct multi_can)); + tail = head; + } else { +#if MULTI_DEBUG + xprintf(">> current tail %s:%d->next %s:%d\n", + tail->text, tail, + tail->next->text, tail->next); +#endif + tail->next = malloc(sizeof(struct multi_can)); +#if MULTI_DEBUG + xprintf(">> %s:%d->next = %s:%d\n", tail->text, tail, can_word, tail->next); +#endif + tail = tail->next; + } + + memset(tail, 0, sizeof(struct multi_can)); + strcpy(tail->text, can_word); + memset(can_word, 0, sizeof(can_word)); + +#if MULTI_DEBUG + xprintf(">> %s:%d\n", tail->text, tail); +#endif + + if (argv[1] || argv[2]) { + tail->child_pos.page = argv[1]; + tail->child_pos.offset = argv[2]; + } else { +#if MULTI_DEBUG + xprintf(">> %s\n", tail->text); +#endif + } + return EB_SUCCESS; +} + +/* + * EUC JP to ASCII conversion table. + */ +static const unsigned char euc_a1_to_ascii_table[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98 */ + 0x00, 0x20, 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x3a, /* 0xa0 */ + 0x3b, 0x3f, 0x21, 0x00, 0x00, 0x00, 0x60, 0x00, /* 0xa8 */ + 0x5e, 0x7e, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2f, /* 0xb8 */ + 0x5c, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x27, /* 0xc0 */ + 0x00, 0x22, 0x28, 0x29, 0x00, 0x00, 0x5b, 0x5d, /* 0xc8 */ + 0x7b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0 */ + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2d, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x3d, 0x00, 0x3c, 0x3e, 0x00, 0x00, 0x00, /* 0xe0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, /* 0xe8 */ + 0x24, 0x00, 0x00, 0x25, 0x23, 0x26, 0x2a, 0x40, /* 0xf0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + +static const unsigned char euc_a3_to_ascii_table[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8 */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0xb0 */ + 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8 */ + 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0xc0 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0xc8 */ + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0xd0 */ + 0x58, 0x59, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0xe0 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0xe8 */ + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0xf0 */ + 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + +/* + * Convert the `workbuf' string from EUC to ASCII. + */ +EB_Error_Code +can_menu_narrow_char(book, appendix, container, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ + int in_code1, in_code2; + int out_code = 0; + unsigned char outchars[3]; + + in_code1 = argv[0] >> 8; + in_code2 = argv[0] & 0xFF; + + if (in_code1 == 0xa1) + out_code = euc_a1_to_ascii_table[in_code2]; + else if (in_code1 == 0xa3) + out_code = euc_a3_to_ascii_table[in_code2]; + + if (out_code == 0) { + outchars[0] = in_code1; + outchars[1] = in_code2; + outchars[2] = 0; + } else { + outchars[0] = out_code; + outchars[1] = 0; + } + + strcat(can_word, (char *)outchars); + + return EB_SUCCESS; +} + +EB_Error_Code +can_menu_wide_char(book, appendix, container, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ + unsigned char outchars[3]; + + outchars[0] = argv[0] >> 8; + outchars[1] = argv[0] & 0xFF; + outchars[2] = 0; + + strcat(can_word, (char *)outchars); + + return EB_SUCCESS; +} + +EB_Error_Code +can_menu_gaiji(book, appendix, container, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ + char workbuf[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + char c; + + switch (hook_code) { + case EB_HOOK_NARROW_FONT: + c = 'h'; + break; + case EB_HOOK_WIDE_FONT: + c = 'z'; + break; + default: + c = '?'; + } + sprintf(workbuf, "", c, argv[0]); + strcat(can_word, workbuf); + return EB_SUCCESS; +} + +#ifdef EB_HOOK_GB2312 +EB_Error_Code +can_menu_gb2312(book, appendix, container, hook_code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code hook_code; + int argc; + const unsigned int *argv; +{ + char workbuf[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + sprintf(workbuf, "", argv[0]); + strcat(can_word, workbuf); + return EB_SUCCESS; +} +#endif + +EB_Hookset multi_candidate_hookset; +EB_Hook +multi_candidate_hooks [] = { + {EB_HOOK_NARROW_FONT, can_menu_gaiji}, + {EB_HOOK_WIDE_FONT, can_menu_gaiji}, + {EB_HOOK_NARROW_JISX0208, can_menu_narrow_char}, + {EB_HOOK_WIDE_JISX0208, can_menu_wide_char}, +#ifdef EB_HOOK_GB2312 + {EB_HOOK_GB2312, can_menu_gb2312}, +#endif + {EB_HOOK_BEGIN_CANDIDATE, can_menu_begin}, + {EB_HOOK_END_CANDIDATE_LEAF, can_menu_end}, + {EB_HOOK_END_CANDIDATE_GROUP, can_menu_end}, + {EB_HOOK_NULL, NULL}, +}; + +struct multi_can * +find_child(can) + struct multi_can * can; +{ + while (can) { + if (can->child_pos.page == 0 && can->child_pos.offset == 0) { +#if MULTI_DEBUG + xprintf(">> %s noref skip\n", can->text); +#endif + can = can->next; + } else if (can->child != 0) { +#if MULTI_DEBUG + xprintf(">> %s has processed child skip\n", can->text); +#endif + can = can->next; + } else { +#if MULTI_DEBUG + xprintf(">> unprocessed child found %d\n", can); + xprintf(">> %s[\n", can->text); +#endif + return can; + } + } + return 0; +} + +int +process_child(book, can) + EB_Book *book; + struct multi_can * can; +{ + EB_Error_Code error_code; + char buf[2048]; + ssize_t buflen; + +#if MULTI_DEBUG + xprintf(">> seeking %d:%d\n", can->child_pos.page, can->child_pos.offset); +#endif + error_code = eb_seek_text(book, &can->child_pos); +#if MULTI_DEBUG + xprintf(">> eb_seek_text %s\n", eb_error_message(error_code)); +#endif + error_code = eb_read_text(book, 0, &multi_candidate_hookset, NULL, 2047, buf, &buflen); +#if MULTI_DEBUG + xprintf(">> eb_read_text %s\n", eb_error_message(error_code)); + xprintf(">> buflen = %ld\n", (long)buflen); + xprintf(">> ]\n"); +#endif + + tail->terminated = 1; + return(0); +} + +void +show_candidates_level(can, level) + struct multi_can * can; + int level; +{ + char * indent; + + indent = malloc(level+1); + if (!indent) { + xputs("memory full"); + return; + } + memset(indent, '\t', level); + *(indent + level) = '\0'; + + while (1) { + xprintf("%s%c%s\n", indent, can->child ? ' ': '*', can->text); + if (can->child) { + show_candidates_level(can->child, level+1); + } + if (can->terminated) + break; + can = can->next; + } + + free(indent); +} + +void +free_candidates_tree(can) + struct multi_can * can; +{ + struct multi_can * next; + + do { + next = can->next; +#if MULTI_DEBUG + xfprintf(stderr, ">> freeing %s:%d\n", can->text, can); + xfprintf(stderr, ">> next is %s:%d\n", next->text, next); +#endif + free(can); + can = next; + } while (next); +} + +int +show_candidate(book, pos0) + EB_Book *book; + EB_Position pos0; +{ + char buf[2048]; + ssize_t buflen; + struct multi_can *child, *ptail; + EB_Error_Code error_code = EB_SUCCESS; + + eb_initialize_hookset (&multi_candidate_hookset); + eb_set_hooks (&multi_candidate_hookset, multi_candidate_hooks); + + error_code = eb_seek_text(book, &pos0); + if (error_code != EB_SUCCESS) { + xprintf("An error occured in seek_position: %s\n", + eb_error_message(error_code)); + set_error_message (error_code); + return 0; + } + error_code = eb_read_text(book, 0, &multi_candidate_hookset, NULL, + 2047, buf, &buflen); + if (error_code != EB_SUCCESS) { + xprintf("An error occured in read_text: %s\n", + eb_error_message(error_code)); + set_error_message (error_code); + return 0; + } +#if MULTI_DEBUG + xprintf(">> buflen = %ld\n", (long)buflen); +#endif + + tail->terminated = 1; + + while ((child = find_child(head)) != 0) { + ptail = tail; +#if MULTI_DEBUG + xprintf(">> current tail %s:%d->next %s:%d\n", + tail->text, tail, + tail->next->text, tail->next); +#endif + process_child(book, child); + child->child = ptail->next; + } + + show_candidates_level(head, 0); + + free_candidates_tree(head); + head = 0; + tail = 0; + + return 1; +} + + +/* + * Output information about multi searches. + */ +static void +output_multi_information(book) + EB_Book *book; +{ + EB_Error_Code error_code; + EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES]; + EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES]; + int multi_count; + int entry_count; + char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1]; + int i, j; + + error_code = eb_multi_search_list(book, multi_list, &multi_count); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_search_list %s\n", eb_error_message(error_code)); + return; + } + for (i = 0; i < multi_count; i++) { + xprintf(" multi search %d:\n", i + 1); + error_code = eb_multi_entry_list(book, multi_list[i], entry_list, + &entry_count); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_entry_list %s\n", eb_error_message(error_code)); + continue; + } + for (j = 0; j < entry_count; j++) { + error_code = eb_multi_entry_label(book, multi_list[i], + entry_list[j], entry_label); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_entry_label %s\n", + eb_error_message(error_code)); + continue; + } + + xprintf(" label %d: %s\n", j + 1, entry_label); + xfputs(" candidates: ", stdout); + if (eb_multi_entry_have_candidates(book, multi_list[i], + entry_list[j])) { + EB_Position pos; + + xfputs("exist\n", stdout); + + eb_multi_entry_candidates(book, + multi_list[i], entry_list[j], &pos); +#if MULTI_DEBUG + xprintf(">> candidate = %d:%d\n", pos.page, pos.offset); +#endif + + show_candidate(book, pos); + + } + else + xfputs("not-exist\n", stdout); + } + } + fflush(stdout); +} + + + +void +show_entry_candidate(book, search_id, entry_id) + EB_Book *book; + int search_id; + int entry_id; +{ + EB_Error_Code error_code; + EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES]; + EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES]; + EB_Position candidate_pos; + /* char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1]; */ + int multi_count; + int entry_count; + + if (!eb_have_multi_search(book)) + return; + + error_code = eb_multi_search_list(book, multi_list, &multi_count); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_search_list: %s\n", eb_error_message(error_code)); + return; + } + + if (search_id >= multi_count || search_id < 0) + return; + error_code = eb_multi_entry_list(book, multi_list[search_id], + entry_list, &entry_count); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_entry_list %s\n", eb_error_message(error_code)); + return; + } + + if (entry_id >= entry_count || entry_count < 0) + return; + if (!eb_multi_entry_have_candidates(book, multi_list[search_id], entry_list[entry_id])) { + xprintf(" no-candidate\n"); + return; + } + + + if ((error_code = eb_multi_entry_candidates(book, multi_list[search_id], + entry_list[entry_id], &candidate_pos)) != EB_SUCCESS) { + xprintf("eb_multi_entry_candidates %s\n", eb_error_message(error_code)); + return; + } + + show_candidate(book, candidate_pos); +} + +void +show_label(book, id) + EB_Book *book; + int id; +{ + EB_Error_Code error_code; + EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES]; + EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES]; + char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1]; + int multi_count; + int entry_count; + int i, j; + + + if (!eb_have_multi_search(book)) + return; + + error_code = eb_multi_search_list(book, multi_list, &multi_count); + if (error_code != EB_SUCCESS) { + xprintf("eb_multi_search_list: %s\n", eb_error_message(error_code)); + return; + } + + for (i=0; i" */ + return eb_write_text_string(book, ">"); + } + } + + if (use_narrow_kana == 0) + return eb_hook_euc_to_ascii (book, appendix, container, code, argc, argv); + high = (argv[0] >> 8) & 0x7f; + low = (argv[0] & 0xff) & 0x7f; + + if (high == 0x25) { + int x; + x = table25[low-0x21]; + if (x != 'Z') { + if (x & 0x80) { /* Japanese Hankaku Kana (JISX0201.1978) */ + return eb_write_text_byte2(book, 0x8e, x); + } else if (x & 0x40) { /* Japanese Hankaku Dakuon */ + if (x >= 0x60) x -= 0x40; + eb_write_text_byte2(book, 0x8e, x + 0x80); + return eb_write_text_byte2(book, 0x8e, 0xde); + } else { + if (x < 0x20) x += 0x40; + eb_write_text_byte2(book, 0x8e, x+0x80); + return eb_write_text_byte2(book, 0x8e, 0xdf); + } + } + } else if (high == 0x21) { + if (table21[low-0x21] & 0x80) { + return eb_write_text_byte2(book, 0x8e, table21[low-0x21]); + } + + } + return eb_hook_euc_to_ascii (book, appendix, container, code, argc, argv); +} + +EB_Error_Code +hook_iso8859_1 (book, appendix, container, code, argc, argv) + EB_Book *book; + EB_Appendix *appendix; + void *container; + EB_Hook_Code code; + int argc; + const unsigned int *argv; +{ + if (escape_text) { + switch (argv[0]) { + case '&': + return eb_write_text_string(book, "&"); + case '<': + return eb_write_text_string(book, "<"); + case '>': + return eb_write_text_string(book, ">"); + } + } + + switch (argv[0]) { + case 0xa0: + return eb_write_text_byte1(book, 0x20); + default: + return eb_write_text_byte1(book, argv[0]); + } +} + +#ifdef USE_PAGER +FILE *popen_pager() +{ + char *pager; + pager = variable_ref("pager"); + if (pager == NULL || strcasecmp(pager,"off")==0 ) return NULL; + if (strcasecmp(pager,"on") == 0) { + pager = getenv("PAGER"); + } + if (pager == NULL) return NULL; + return popen(pager, "w"); +} + +int pclose_pager(FILE *stream) +{ + fflush(stream); + return pclose(stream); +} + +#endif /* USE_PAGER */ + +#ifdef USE_READLINE +static int issp (char); +static int +issp(ch) + char ch; +{ + if (ch=='\t' || ch==' ' || ch=='\r' || ch=='\n') return 1; + return 0; +} + +char * +stripwhite (string) + char *string; +{ + unsigned char *s, *t; + if (string == NULL) return NULL; + s = string; + while (issp(*s)) + s++; + if (*s == 0) + return (s); + + t = s + strlen (s) - 1; + while (t > s && issp(*t)) + t--; + *++t = '\0'; + return s; +} + +char ** +fileman_completion (text, start, end) + char *text; + int start, end; +{ + char **matches; + + matches = NULL; + + /* If this word is at the start of the line, then it is a command + to complete. Otherwise it is the name of a file in the current + directory. */ + if (start == 0) + matches = + rl_completion_matches (text, (rl_compentry_func_t *) command_generator); + return matches; +} + +/* Generator function for command completion. STATE lets us know whether + to start from scratch; without any state (i.e. STATE == 0), then we + start at the top of the list. */ +char * +command_generator (text, state) + char *text; + int state; +{ + static int list_index, len; + const char *name; + + /* If this is a new word to complete, initialize now. This includes + saving the length of TEXT for efficiency, and initializing the index + variable to 0. */ + if (!state) { + list_index = 0; + len = strlen (text); + } + + /* Return the next name which partially matches from the command list. */ + while ((name = command_table[list_index].name) != NULL) { + list_index++; + if (strncmp (name, text, len) == 0) + return (strdup(name)); + } + + /* If no names matched, then return NULL. */ + return NULL; +} +#endif diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.info b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.info new file mode 100644 index 0000000..f7485d5 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.info @@ -0,0 +1,755 @@ + eblook.infoeblook.texi makeinfo С 4.5 +ˤäƺޤ + +INFO-DIR-SECTION CD-ROM Book Utilities +START-INFO-DIR-ENTRY +* eblook: (eblook). Interactive EB interface command. +END-INFO-DIR-ENTRY + + This file documents eblook, an interactive EB interface command. + + Copyright (C) 1997,1998,1999,2000 Keisuke Nishida Copyright (C) +2000-2002 Satomi Copyright (C) 2000,2001 Kazuhiko Copyright (C) +2000-2002 NEMOTO Takashi + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be stated in a +translation approved by the Free Software Foundation. + + +File: eblook.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + +eblook +****** + + eblook ϡEB +饤֥Ѥ÷ŻҼ񸡺ޥɤǤñ +ȥޥɤˤ CD-ROM Ҥѽޤ + + ܽ eblook 1.6 ˤĤƤޤ + +* Menu: + +* Introduction:: Ϥ +* Overview:: ޤʻȤ +* Starting:: eblook εư +* Setting:: +* Search:: ˡ +* Information:: Ƽ +* Commands:: ޥɰ +* Variables:: ѿ +* Compile:: ѥȥ󥹥ȡ +* How To Get:: ǿ + + +File: eblook.info, Node: Introduction, Next: Overview, Prev: Top, Up: Top + +Ϥ +******** + + eblook ϡEB 饤֥(*note EB: (eb)Top)Ѥ÷ŻҼ +ޥɤǤñȥޥɤˤ CD-ROM Ҥѽޤ + + eblook +ϼڤŻ뤷ġǤꡢ桼δʤɡͥ +ȥѤꤷʣʵǽ󶡤Ƥޤ󡣤Τ褦Ūˤ +NDTPD ȤեȥƤޤΤǡ餬Ѥˤʤޤ +( 򻲾) + + eblook ϥե꡼եȥǤʤϡFree Software +Foundation ɽ GNU General Public License (GNU +̸ͭѵ)ΥС 2 +뤤ϤʹߤγƥС椫餤줫򤷡ΥС +˽ä eblook ۤޤѹ뤳ȤǤޤ + + eblook +ͭѤȤϻפޤۤˤäƤϡԾڤŪŬ +ˤĤƤΰۤݾڤޤơʤݾڤԤʤޤ󡣾ܺ٤ˤĤƤ +GNU General Public License ɤߤ + + äƤʤϡeblook ȶѤ CD-ROM +Ҥλѵʤ Фʤޤ󡣽ҤѤʤˤ +eblook Ѥ뤳Ȥϲǽ ⤷ޤ󤬡Τ褦ʾ eblook +ѤƤϤʤޤ + + +File: eblook.info, Node: Overview, Next: Starting, Prev: Introduction, Up: Top + +ޤʻȤ +************** + + Τǥ쥯ȥˡeblook 򥷥뤫鵯ưޤ + + % eblook /cdrom + eblook> -!- + + `help' ǥޥɰɽޤ + + eblook> help + book [directory [appendix]] - Set a book directory + info - Show information of the selected book + list - List all dictionaries in the selected book + select subbook - Select a subbook + subinfo - Show information of the selected subbook + copyright - Show copyright of the selected subbook + menu - Show the menu of the selected subbook + search pattern [offset] - Search for a word + content entry [offset] - Display contents of entry + dump entry [offset] - Display dumps of entry + font [id] - Display the bitmap of gaiji + show [variable] - Show the value of variables + set variable value - Set a variable to the value + unset variable... - Unset variables + candidate - Show candidates for multi search + label [id] - Show label for multi search + help - Show this message + quit - Quit program + + `list' Ǽɽޤ + + eblook> list + 1. KOKUGO 켭ŵ + 2. EIWA ¼ŵ + + `select' Ǽ򤷡`search' Ǹޤ + + eblook> select 2 + eblook> search test + 1. 1234:567 test + + `content' ɽޤ + + eblook> content 1 + test /t'est/ + [̾] 1. ... + + `quit' ǽλޤ + + eblook> quit + % -!- + + +File: eblook.info, Node: Starting, Next: Setting, Prev: Overview, Up: Top + +eblook εư +************* + + eblook εưˡϼ̤Ǥ + + eblook [option...] [BOOK-DIRECTORY [APPENDIX-DIRECTORY]] + + BOOK-DIRECTORY ϽҤΤǥ쥯ȥꤷޤά줿 +ϡȥǥ쥯ȥ꤬ҥǥ쥯ȥȤߤʤޤ + + APPENDIX-DIRECTORY ˤ Appendix Τǥ쥯ȥꤷޤ +ά줿ϡAppendix Ѥޤ(*note Appendix::) + + ͤϡɤⵯưѹ뤳Ȥޤ *note +Setting:: 򻲾ȤƲ + + ץˤϼΤΤͭǤ + +`-e' +`--encoding=NAME' + ʸɤꤷޤ (euc, sjis, jis, + utf8)ǥեȤϼưȽ̡ ѤǤʸɤϥƥ + iconv 饤֥˰¸ޤ iconv ̵ƥǤ euc, sjis + ѲǽǤ + +`-q' +`--no-init-file' + ե(`~/.eblookrc')ɤ߹ߤޤ + +`-v' +`--version' + ޥɤΥСֹɽƽλޤ + +`-h' +`--help' + ޥɤΥإפɽƽλޤ + + +File: eblook.info, Node: Setting, Next: Search, Prev: Starting, Up: Top + + +**************** + + eblook ưȡǽ˥ۡǥ쥯ȥˤե +(`~/.eblookrc', DOS ξ `%HOME%/eblookrc') ɤ߹ߤޤ +Υեˤϰʲ˵ܤ줿ǤդΥޥɤ򵭽Ҥ뤳ȤǤƬ˲ᤵޤΥޥɼ¹ԤϽҥե򳫤˼¹Ԥ뤿ᡢޥϥ顼Ȥʤޤ + + ޥ `book' ˤҤΤǥ쥯ȥꤷޤ + + eblook> book `/cdrom' `/usr/local/share/eb/appendix' + + ҥǥ쥯ȥ˴ޤޤ뼭ΰϡޥ `list' ˤ긫 +Ȥޤ + + eblook> list + 1. KOKUGO 켭ŵ + 2. EIWA ¼ŵ + + ϥޥ `select' ˤꥻåȤ뤳ȤǡѲǽȤʤޤ + + eblook> select 1 + + 뤤 + + eblook> select KOKUGO + + ޥ `set' ˤꡢץ꤬ǽǤ㤨Хץץ +ѹˤϡΤ褦ˤޤ + + eblook> set prompt "eblook$ " + eblook$ -!- + +Τ褦ˡ˶ޤɬפˤϡ֥ͤ륯Ȥǰ +ѽޤ + + ѿͤϥޥ `show' Ǹ뤳Ȥޤ +̵ͤˤˤϥޥ `unset' ޤ + + eblook$ show prompt + eblook$ + eblook$ unset prompt + eblook> show + version eblook 1.0 + max-text 8192 + max-hits 256 + eblook> -!- + + ꡦȤǤѿΰ *Note Variables:: 򻲾ȤƲ + + +File: eblook.info, Node: Search, Next: Information, Prev: Setting, Up: Top + +ˡ +******** + + ΥС eblook +ǤϡȤñ측(׸ +׸׸)ȡ˥塼λȤԤʤȤޤޤ +򰷤Ȥޤ + +* Menu: + +* Word Search:: ñ측 +* Keyword Search:: ︡ +* Multiple Search:: ʣ縡 +* Menu:: ˥塼 +* Content:: ɽ +* Appendix:: ִ + + +File: eblook.info, Node: Word Search, Next: Keyword Search, Prev: Search, Up: Search + +ñ측 +======== + + ޥ `search' ǸԤʤޤ餫Ἥ򤷤Ƥ +ɬפޤ + + eblook> select EIWA + eblook> search test + 1. 1234:567 test + + ѿ `search-method' ˤ긡ѹޤߡΤΤ +ǽǤ(ǥեȤ `glob') + +`word' + ׸Ԥʤ + +`endword' + ׸Ԥʤ + +`exact' + ׸Ԥʤ + +`glob' + ʸ򸫤ơˡꤷޤ줬 `foo*' ʤ `foo' + 򥭡׸ԤʤƱͤ `*foo' ʤи׸ + `foo' ʤд׸Ԥʤޤ + + eblook> show search-method + glob + eblook> search test* + 1. 1234:567 test + 2. 2345:678 testament + eblook> search *test + 1. 1234:567 test + 2. 3456:789 latest + eblook> set search-method word + eblook> search test + 1. 1234:567 test + 2. 2345:678 testament + +Ϥΰܤϥȥֹǡܤϥȥꤹ뤿Υ +Ǥ줫򥳥ޥ `content' ϤȤǡȥƤ +Ϥޤ(*note Content::) + + ѿ `max-hits' ˤꡢϤ븫Фο½ޤ + + eblook> show max-hits + 256 + eblook> search t* + 1. 1263:25 t + 2. 1273:832 t. + : + 255. 1312:684 tabu + + + ³ɽˤϡ`search' ϤƲ + + eblook> search t* 256 + 256. 1336:32 tantalization + 257. 1358:2ab tantalize + : + 511. 14c6:233 tea shop + + + `max-hits' 0 ꤹȡƤΥȥ꤬Ϥޤ + + +File: eblook.info, Node: Keyword Search, Next: Multiple Search, Prev: Word Search, Up: Search + +︡ +======== + + ޥ `search' ǸԤʤݤ `=foo' Τ褦 `=' +³ƥɤꤹо︡Ԥޤ`=foo=bar' Τ褦 +ˡʣΥɤꤹ뤳ȤǤޤ + + eblook> search == + 1. 54a:56a ۥҥ + 2. 658:2ce 줷Ρڴ + 3. 129e:256 ꡼󡾥ƥgreen tea + 4. 1577:166 ڹ + 5. 28a9:bc Τۤܡ + 6. 3323:29e Ϥ֡ۡť + + (ʾ塢ϹǤ) + + +File: eblook.info, Node: Multiple Search, Next: Menu, Prev: Keyword Search, Up: Search + +ʣ縡 +======== + + ޥ `label' ˤꡢμǤʣ縡Υ٥ɽ +ֹʣ縡 ID Ǥ`label 1' Ȥȡֹ ID Υ +٥Τ߽Ϥޤ + + eblook> label + 1. ϰʢȡ:ʢȡ::: + 2. ̾ϰ̾ʢȡ:̾ʢȡ::: + 3. ̾ʤɡʢȡ:ʢȡ::: + 4. ʢȡ:ʢȡ::: + + ޥ `candidate' ˤꡢʣ縡Υɤθɽޤ + + eblook> candidate + multi search 1: + label 1: ϰʢȡ + candidates: exist + * + *ī + *衼åѡ̥ꥫ + *ɡեꥫʤ + label 2: ʢȡ + candidates: exist + * + *ḽ + label 3:  + candidates: not-exist + label 4:  + candidates: not-exist + multi search 2: + label 1: ̾ϰ̾ʢȡ + candidates: exist + (ά) + + ºݤʣ縡¹Ԥˤϡޥ `search' ǸԤʤݤ +`:ī:ḽ:Ҥ:*:' Τ褦 `:' Ƕڤäƥ +ꤷޤ + + eblook> search :ī:ḽ:Ҥ:*: + 1. 2fa:36 Ĥաڰãס + 2. 759:636 󡾤 + 3. 7a7:25e ڲݡۥ復 + 4. 7ba:6ec 礦ᤤáۥ復ƥ + (ά) + + ޥ `set multi-search-id 2' ʤɤȤȡʣ縡 ID ڤ +ޤ + + eblook> set multi-search-id 2 + eblook> label 2 + 2. ̾ϰ̾ʢȡ:̾ʢȡ::: + eblook> search ::̳ƻ:*:*: + 1. 7b:3ac Ӥʿ + 2. 8b:218 ڰ + 3. 8b:31a 󡾤ڰС + 4. 8b:434 󡾤ĤڰΩۡ + (ά) + + (ʾ塢ϹǤ) + + +File: eblook.info, Node: Menu, Next: Content, Prev: Multiple Search, Up: Search + +˥塼 +======== + + 񤬥˥塼ľ硢ޥ `menu' ˤϤޤ + + eblook> menu + ع켭ŵ٤ˤĤ + + + ѳ̤˶ޤ줿Τ`/reference=' ȤʤäƤʬθ +˥塼ƤȤʤäƤꡢޥ `content' ˤꤽ뤳 +Ȥޤ(*note Content::) + + eblook> content 2a18:2 + ع켭ŵ ǡ + + 19xxǯxxxx + + +File: eblook.info, Node: Content, Next: Appendix, Prev: Menu, Up: Search + +ɽ +======== + + ޥ `content' ˤꡢȥƤޤ + + eblook> search test + 1. 1234:567 test + 2. 2345:678 testament + eblook> content 1 + test /t'est/ + [̾] 1. ... + eblook> content 1234:567 + test /t'est/ + [̾] 1. ... + +Ƥե󥹤ľ硢ʬΥ˥塼Ʊˤäɽ +蘆ޤ + + `search' ƱͤˡϤХȿѿ `max-text' ˤä +Ĵޤ³ˤ `content' ͿΤƱ +Ǥ0 ͿȺǸޤǽϤޤ + + Ƥγʬ̾Υƥʸ֤뤳ȤǽǤ +*Note Appendix:: 򻲾ȤƲ + + +File: eblook.info, Node: Appendix, Prev: Content, Up: Search + +Appendix ե +======================= + + eblook ѤƤ EB 饤֥ˤϡAppendix ȸƤФ +Ƽ˸ͭιܶڤ국䳰ˡꤹ뵡ǽޤ +eblook ñλѤʤɡ bitmap ɽǤʤ +ܶڤ꤬ޤưꤵʤ硢ܤؤΰưǽ +ưʤˤѲ + + פʼˤĤƤϴ¾οͤ Appendix եƤ +礬ޤξˤ Appendix ѥåꤷŬ +ǥ쥯ȥŸƲ + +NDTPD + + + eblook ޥɤ⤷ϥޥ `book' Ȥ +ƥǥ쥯ȥꤹ뤳Ȥˤ굡ǽޤ (*note Starting::) + + ʬ Appendix ˤϡߤΤȤʸ줿 +ʸޤΤǡ¸Ŭ appendix ե `*.app' +򻲹ͤ˺Ʋ + +ܶڤλ +---------------- + + ܴ֤ζڤ국椬ǧǤʤ˻ꤷޤ +ޤʤ硢Ƥ appendix ե + + `stop-code 0x1f09 0x0001' + + ꤹɤȻפޤΤǤ + +ִ +---------- + + EB 饤֥εǽȤơCD-ROM +Ҥ˴ޤޤüʳ̾ʸ +֤뤳ȤǽǤ⤷ʤȡϼΤ褦ɽ蘆ޤ + + eblook> content 1234:567 + test /tst/ + 1. ... + + ֤ԤʤȡʲΤ褦ɽ뤳ȤǤޤ +(lookup Ȥ߹碌ƻѤȤϡ bitmap ɽ뤳 +ǽʾ礬ޤΤǡߤˡ򤷤Ʋ) + + eblook> book /cdrom /usr/local/share/eb/appendix + eblook> content 1234:567 + test /t'est/ + [̾] 1. ... + eblook> -!- + + 뤤ϥޥ `font' ˤꡢΥǡ xbm Υӥåȥޥ +ץǡȤ뤳Ȥޤ + + eblook> font ha123 + #define default_width 8 + #define default_height 16 + static unsigned char default_bits[] = { + 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x7e, 0x02, 0x02, + 0x44, 0x38, 0x00, 0x00}; + + +File: eblook.info, Node: Information, Next: Commands, Prev: Search, Up: Top + +Ƽ +******** + + ޥ `info' ˤꡢҤξ󤬽Ϥޤ + + eblook> info + disc type: EPWING + character code: JIS X 0208 + the number of dictionaries: 4 + + ޥ `subinfo' ˤꡢ򤷤Ƥ뼭ξ󤬽Ϥޤ + + eblook> select EIWA + eblook> subinfo + title: ¼ŵ + directory: EIWA + search methods: word endword exact menu + font sizes: 16 24 30 48 + widw font characters: 0xa123 -- 0xa456 + + ޥ `copyright' ˤꡢ򤷤Ƥ뼭󤬽Ϥ +ޤ + + eblook> copyright + ֱ¼ŵ Copyright (C) 1998 Keisuke Nishida + + ޥ `help' ˤꡢޥɤΰϤޤ + + +File: eblook.info, Node: Commands, Next: Variables, Prev: Information, Up: Top + +ޥɰ +************ + +`book [DIRECTORY [APPENDIX]]' + 򤷤ޤˤϽҤΤǥ쥯ȥꡢˤ + Appendix + Τǥ쥯ȥꤷޤƾάˤϡߤ + ꤬ɽޤ + +`info' + 򤵤ƤҤ˴ؤϤޤ + +`list' + 򤵤ƤҤμϤޤ + +`select DICTIONARY' + 򤷤ޤꤹ٤ͤϡ`list' + ޥɤνϤޤ + +`subinfo' + 򤵤Ƥ뼭˴ؤϤޤ + +`copyright' + 򤵤Ƥ뼭Ϥޤ + +`menu' + 򤵤Ƥ뼭񤬥˥塼ľ硢Ϥޤ(*note + Menu::) + +`search PATTERN [OFFSET]' + ԤʤޤϽϤγϰ֡(*note Search::) + +`content ENTRY [OFFSET]' + ȥƤϤޤϽϤγϰ֡(*note + Content::) + +`font [ID]' + ǡ xbm + ǽϤޤά硢Ƥγξ + Ϥޤι⤵ѿ `font' ˤͿޤ + +`show [`-a'] [VARIABLE]' + ѿͤϤޤά硢٤ƤѿΰϤޤ + `-a' ꤹȡ̾ɽʤѿɽޤ + +`set VARIABLE VALUE' + ѿͤ򥻥åȤޤ + +`unset VARIALBE...' + ѿ򥯥ꥢޤ + +`help' + ޥɤΰϤޤ + +`quit' + eblook λޤ + + +File: eblook.info, Node: Variables, Next: Compile, Prev: Commands, Up: Top + +ѿ +******** + +`search-method' + `search' ޥɤθˡ`exact', `word', `endword', `glob' + Τ줫ǽǥեȤ `glob' + +`max-hits' + `search' ޥɤϤιܿ0 ΤȤ̵¡ + ǥեȤ 256 + +`max-text' + `content' ޥɤϤɽХȿ(ܰ)0 ΤȤ̵¡ + ǥեȤ 8192 + +`font' + ǡι⤵ǥեȤ 16 + +`kanji-code' + Ϥʸɡͤ `jis', `sjis', `euc', `utf8', + `auto' ʤɡ(ʸʸζ̤ʤ)ѤǤ륳ɤ OS + ˰¸ޤ + +`prompt' + ץץȡǥեȤ "eblook> " + +`version' + eblook ΥСֹ档 + +`use-narrow-kana' + "true" ꤹȽϤȾѥʸޤޤǥեȤ + "off" ǡ ȾѥʸʸȤƽϤޤ + +`stop-code' + []ƥȽϤνλɡ"set stop-code 0x1f090000" + Τ褦˻ꤷޤ + ˤäƤϡꤷʤȽϤŬڤʸĽǽλޤ + Ƕ eb library (Version 3.x) + ȤȤ߹碌Ǥϵǽޤ󡣤 appendix file + ꤷƲ(*note Appendix::) + +`pager' + [] "on" ꤹȸɽ (content ޥ) Ķѿ + PAGER + ꤷڡ㡼Ѥ롣εǽѤ뤿ˤϡѥ + -with-pager ץĤ configure ɬפ롣 + ()ѿϾѹǽ⤤ + +`decorate-mode' + [] "on" ꤹʸΤΥϤޤ + ()ѿϾѹǽ⤤ + + +File: eblook.info, Node: Compile, Next: How To Get, Prev: Variables, Up: Top + +ѥȥ󥹥ȡ +************************ + + ̾ UNIX ĶǤϡѥϤۤ񤷤ޤ +ʲμǥѥԤʤäƲ + 1. ޤeb library 򥤥󥹥ȡ뤷Ʋ eb library + ǽǤ + + 2. `configure' ץȤ¹Ԥޤ `./configure --prefix=/usr + --with-eb-conf=/etc/eb.conf ' + ʤɤȤޤǤ륪ץϰʲΰ򻲾ȤƲ + + 3. `make' ¹Ԥޤ + + 4. `make install' ¹Ԥޤ󥹥ȡˤäƤ root + ¤ɬפˤʤޤ + + פꥪץ + +`--prefix' + 󥹥ȡꤷޤꤷʤȡ + `--prefix=/usr/local' ꤷƱǤ + +`--with-eb-conf=FILE' + eb library եΤ꤫ꤷޤ̾ưŪ + $(prefix)/etc/eb.conf ($(sysconfdir)/eb.conf)ꤵΤǡ + ʳξ˥󥹥ȡ뤷ˤ + `--with-eb-conf=/etc/eb.conf' 뤤 `--sysconfdir=/etc' + ʤɤȤŪ˻ꤷƲ + +`--with-readline' + GNU readline 饤֥ѤƹԽԤ˻ꤷޤ + +`--with-pager' + ̤ pager + ѤɽޤºݤλѤˤäƤϡĶѿ `PAGER' + λ (`setenv PAGER less' ) eblook ѿλ `set pager + on'"ɬפǤ + + +File: eblook.info, Node: How To Get, Prev: Compile, Up: Top + +ǿ +************** + + ǿ eblook ϡΤȤǽǤ + +eblook + + + eblook ˴ؤ򴹤ϡedict NDTPD +Υ᡼󥰥ꥹȤˤƹԤ Ƥޤ + +edict + + +NDTPD + + + eblook edict ȯ () ˤ +Ƥޤeblook ˴ؤ䤤碌ϤޤǤꤤޤ + + + +Tag Table: +Node: Top1133 +Node: Introduction1864 +Node: Overview3079 +Node: Starting4814 +Node: Setting5862 +Node: Search7313 +Node: Word Search7847 +Node: Keyword Search9551 +Node: Multiple Search10181 +Node: Menu12259 +Node: Content12813 +Node: Appendix13557 +Node: Information15689 +Node: Commands16455 +Node: Variables17916 +Node: Compile19536 +Node: How To Get20949 + +End Tag Table diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.texi b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.texi new file mode 100644 index 0000000..6ac724e --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/eblook.texi @@ -0,0 +1,798 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename eblook.info +@settitle eblook +@setchapternewpage off +@c %**end of header + +@set UPDATED 23 Oct. 2002 +@set EDITION 1.6 +@set VERSION 1.6 + +@ifinfo +@dircategory CD-ROM Book Utilities +@direntry +* eblook: (eblook). Interactive EB interface command. +@end direntry + +This file documents eblook, an interactive EB interface command. + +Copyright @copyright{} 1997,1998,1999,2000 Keisuke Nishida +Copyright @copyright{} 2000-2002 Satomi +Copyright @copyright{} 2000,2001 Kazuhiko +Copyright @copyright{} 2000-2002 NEMOTO Takashi + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries a copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation +approved by the Free Software Foundation. +@end ifinfo + +@titlepage +@title eblook +@subtitle for eblook @value{VERSION} +@author Keisuke Nishida +@author Kazuhiko +@author Satomi +@author NEMOTO Takashi + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1997,1998,1999,2000 Keisuke Nishida +Copyright @copyright{} 2000-2002 Satomi +Copyright @copyright{} 2000,2001 Kazuhiko +Copyright @copyright{} 2000-2002 NEMOTO Takashi + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation +approved by the Free Software Foundation. +@end titlepage + +@contents + +@ifinfo +@c ********************************************************************* +@node Top, Introduction, (dir), (dir) +@top eblook + +eblook ϡEB 饤֥Ѥ÷ŻҼ񸡺ޥɤǤñ +ȥޥɤˤ CD-ROM Ҥѽޤ + +ܽ eblook @value{VERSION} ˤĤƤޤ +@end ifinfo + +@menu +* Introduction:: Ϥ +* Overview:: ޤʻȤ +* Starting:: eblook εư +* Setting:: +* Search:: ˡ +* Information:: Ƽ +* Commands:: ޥɰ +* Variables:: ѿ +* Compile:: ѥȥ󥹥ȡ +* How To Get:: ǿ +@end menu + +@c ********************************************************************* +@node Introduction, Overview, Top, Top +@chapter Ϥ + +eblook ϡEB 饤֥(@inforef{Top, EB, eb})Ѥ÷ŻҼ +ޥɤǤñȥޥɤˤ CD-ROM Ҥѽޤ + +eblook ϼڤŻ뤷ġǤꡢ桼δʤɡͥ +ȥѤꤷʣʵǽ󶡤Ƥޤ󡣤Τ褦Ūˤ +NDTPD ȤեȥƤޤΤǡ餬Ѥˤʤޤ +(@url{http://www.sra.co.jp/people/m-kasahr/ndtpd/} 򻲾) + +eblook ϥե꡼եȥǤʤϡFree Software Foundation +ɽ GNU General Public License (GNU ̸ͭѵ)ΥС 2 +뤤ϤʹߤγƥС椫餤줫򤷡ΥС +˽ä eblook ۤޤѹ뤳ȤǤޤ + +eblook ͭѤȤϻפޤۤˤäƤϡԾڤŪŬ +ˤĤƤΰۤݾڤޤơʤݾڤԤʤޤ󡣾ܺ٤ˤĤƤ +GNU General Public License ɤߤ + +äƤʤϡeblook ȶѤ CD-ROM Ҥλѵʤ +Фʤޤ󡣽ҤѤʤˤ eblook Ѥ뤳Ȥϲǽ +⤷ޤ󤬡Τ褦ʾ eblook ѤƤϤʤޤ + +@c ********************************************************************* +@node Overview, Starting, Introduction, Top +@chapter ޤʻȤ + +Τǥ쥯ȥˡeblook 򥷥뤫鵯ưޤ + +@example +% @kbd{eblook /cdrom} +eblook> @point{} +@end example + +@code{help} ǥޥɰɽޤ + +@example +eblook> @kbd{help} + book [directory [appendix]] - Set a book directory + info - Show information of the selected book + list - List all dictionaries in the selected book + select subbook - Select a subbook + subinfo - Show information of the selected subbook + copyright - Show copyright of the selected subbook + menu - Show the menu of the selected subbook + search pattern [offset] - Search for a word + content entry [offset] - Display contents of entry + dump entry [offset] - Display dumps of entry + font [id] - Display the bitmap of gaiji + show [variable] - Show the value of variables + set variable value - Set a variable to the value + unset variable... - Unset variables + candidate - Show candidates for multi search + label [id] - Show label for multi search + help - Show this message + quit - Quit program +@end example + +@code{list} Ǽɽޤ + +@example +eblook> @kbd{list} + 1. KOKUGO 켭ŵ + 2. EIWA ¼ŵ +@end example + +@code{select} Ǽ򤷡@code{search} Ǹޤ + +@example +eblook> @kbd{select 2} +eblook> @kbd{search test} + 1. 1234:567 test +@end example + +@code{content} ɽޤ + +@example +eblook> @kbd{content 1} +test /t'est/ +[̾] 1. ... +@end example + +@code{quit} ǽλޤ + +@example +eblook> @kbd{quit} +% @point{} +@end example + +@c ********************************************************************* +@node Starting, Setting, Overview, Top +@chapter eblook εư + +eblook εưˡϼ̤Ǥ + +@example +eblook [option...] [@var{book-directory} [@var{appendix-directory}]] +@end example + +@var{book-directory} ϽҤΤǥ쥯ȥꤷޤά줿 +ϡȥǥ쥯ȥ꤬ҥǥ쥯ȥȤߤʤޤ + +@var{appendix-directory} ˤ Appendix Τǥ쥯ȥꤷޤ +ά줿ϡAppendix Ѥޤ(@pxref{Appendix}) + +ͤϡɤⵯưѹ뤳Ȥޤ +@pxref{Setting} 򻲾ȤƲ + +ץˤϼΤΤͭǤ + +@table @code +@item -e +@itemx --encoding=NAME +ʸɤꤷޤ (euc, sjis, jis, utf8)ǥեȤϼưȽ̡ +ѤǤʸɤϥƥ iconv 饤֥˰¸ޤ +iconv ̵ƥǤ euc, sjis ѲǽǤ + +@item -q +@itemx --no-init-file +ե(@file{~/.eblookrc})ɤ߹ߤޤ + +@item -v +@itemx --version +ޥɤΥСֹɽƽλޤ + +@item -h +@itemx --help +ޥɤΥإפɽƽλޤ +@end table + +@c ********************************************************************* +@node Setting, Search, Starting, Top +@chapter +eblook ưȡǽ˥ۡǥ쥯ȥˤե +(@file{~/.eblookrc}, DOS ξ @file{%HOME%/eblookrc}) ɤ߹ߤޤ +Υեˤϰʲ˵ܤ줿ǤդΥޥɤ򵭽Ҥ뤳ȤǤƬ˲ᤵޤΥޥɼ¹ԤϽҥե򳫤˼¹Ԥ뤿ᡢޥϥ顼Ȥʤޤ + +ޥ @code{book} ˤҤΤǥ쥯ȥꤷޤ + +@example +eblook> @kbd{book} @file{/cdrom} @file{/usr/local/share/eb/appendix} +@end example + +ҥǥ쥯ȥ˴ޤޤ뼭ΰϡޥ @code{list} ˤ긫 +Ȥޤ + +@example +eblook> @kbd{list} + 1. KOKUGO 켭ŵ + 2. EIWA ¼ŵ +@end example + +ϥޥ @code{select} ˤꥻåȤ뤳ȤǡѲǽȤʤޤ + +@example +eblook> @kbd{select 1} +@end example + +뤤 + +@example +eblook> @kbd{select KOKUGO} +@end example + +ޥ @code{set} ˤꡢץ꤬ǽǤ㤨Хץץ +ѹˤϡΤ褦ˤޤ + +@example +eblook> @kbd{set prompt "eblook$ "} +eblook$ @point{} +@end example + +Τ褦ˡ˶ޤɬפˤϡ֥ͤ륯Ȥǰ +ѽޤ + +ѿͤϥޥ @code{show} Ǹ뤳Ȥޤ +̵ͤˤˤϥޥ @code{unset} ޤ + +@example +eblook$ @kbd{show prompt} +eblook$ +eblook$ @kbd{unset prompt} +eblook> @kbd{show} +version eblook 1.0 +max-text 8192 +max-hits 256 +eblook> @point{} +@end example + +ꡦȤǤѿΰ @ref{Variables} 򻲾ȤƲ + +@c ********************************************************************* +@node Search, Information, Setting, Top +@chapter ˡ + +ΥС eblook ǤϡȤñ측(׸ +׸׸)ȡ˥塼λȤԤʤȤޤޤ +򰷤Ȥޤ + +@menu +* Word Search:: ñ측 +* Keyword Search:: ︡ +* Multiple Search:: ʣ縡 +* Menu:: ˥塼 +* Content:: ɽ +* Appendix:: ִ +@end menu + +@c ===================================================================== +@node Word Search, Keyword Search, Search, Search +@section ñ측 + +ޥ @code{search} ǸԤʤޤ餫Ἥ򤷤Ƥ +ɬפޤ + +@example +eblook> @kbd{select EIWA} +eblook> @kbd{search test} + 1. 1234:567 test +@end example + +ѿ @code{search-method} ˤ긡ѹޤߡΤΤ +ǽǤ(ǥեȤ @code{glob}) + +@table @code +@item word +׸Ԥʤ +@item endword +׸Ԥʤ +@item exact +׸Ԥʤ +@item glob +ʸ򸫤ơˡꤷޤ줬 @samp{foo*} ʤ @samp{foo} +򥭡׸ԤʤƱͤ @samp{*foo} ʤи׸ +@samp{foo} ʤд׸Ԥʤޤ +@end table + +@example +eblook> @kbd{show search-method} +glob +eblook> @kbd{search test*} + 1. 1234:567 test + 2. 2345:678 testament +eblook> @kbd{search *test} + 1. 1234:567 test + 2. 3456:789 latest +eblook> @kbd{set search-method word} +eblook> @kbd{search test} + 1. 1234:567 test + 2. 2345:678 testament +@end example + +Ϥΰܤϥȥֹǡܤϥȥꤹ뤿Υ +Ǥ줫򥳥ޥ @code{content} ϤȤǡȥƤ +Ϥޤ(@pxref{Content}) + +ѿ @code{max-hits} ˤꡢϤ븫Фο½ޤ + +@example +eblook> @kbd{show max-hits} +256 +eblook> @kbd{search t*} + 1. 1263:25 t + 2. 1273:832 t. + : +255. 1312:684 tabu + +@end example + +³ɽˤϡ@code{search} ϤƲ + +@example +eblook> @kbd{search t* 256} +256. 1336:32 tantalization +257. 1358:2ab tantalize + : +511. 14c6:233 tea shop + +@end example + + @code{max-hits} 0 ꤹȡƤΥȥ꤬Ϥޤ + +@c ===================================================================== +@node Keyword Search, Multiple Search, Word Search, Search +@section ︡ + +ޥ @code{search} ǸԤʤݤ @samp{=foo} Τ褦 @samp{=} +³ƥɤꤹо︡Ԥޤ@samp{=foo=bar} Τ褦 +ˡʣΥɤꤹ뤳ȤǤޤ + +@example +eblook> @kbd{search ==} + 1. 54a:56a ۥҥ + 2. 658:2ce 줷Ρڴ + 3. 129e:256 ꡼󡾥ƥgreen tea + 4. 1577:166 ڹ + 5. 28a9:bc Τۤܡ + 6. 3323:29e Ϥ֡ۡť +@end example + +(ʾ塢ϹǤ) + +@c ===================================================================== +@node Multiple Search, Menu, Keyword Search, Search +@section ʣ縡 + +ޥ @code{label} ˤꡢμǤʣ縡Υ٥ɽ +ֹʣ縡 ID Ǥ@code{label 1} Ȥȡֹ ID Υ +٥Τ߽Ϥޤ + +@example +eblook> @kbd{label} + 1. ϰʢȡ:ʢȡ::: + 2. ̾ϰ̾ʢȡ:̾ʢȡ::: + 3. ̾ʤɡʢȡ:ʢȡ::: + 4. ʢȡ:ʢȡ::: +@end example + +ޥ @code{candidate} ˤꡢʣ縡Υɤθɽޤ + +@example +eblook> @kbd{candidate} + multi search 1: + label 1: ϰʢȡ + candidates: exist +* +*ī +*衼åѡ̥ꥫ +*ɡեꥫʤ + label 2: ʢȡ + candidates: exist +* +*ḽ + label 3:  + candidates: not-exist + label 4:  + candidates: not-exist + multi search 2: + label 1: ̾ϰ̾ʢȡ + candidates: exist +(ά) +@end example + +ºݤʣ縡¹Ԥˤϡޥ @code{search} ǸԤʤݤ +@samp{:ī:ḽ:Ҥ:*:} Τ褦 @samp{:} Ƕڤäƥ +ꤷޤ + +@example +eblook> @kbd{search :ī:ḽ:Ҥ:*:} + 1. 2fa:36 Ĥաڰãס + 2. 759:636 󡾤 + 3. 7a7:25e ڲݡۥ復 + 4. 7ba:6ec 礦ᤤáۥ復ƥ +(ά) +@end example + +ޥ @code{set multi-search-id 2} ʤɤȤȡʣ縡 ID ڤ +ޤ + +@example +eblook> @kbd{set multi-search-id 2} +eblook> @kbd{label 2} + 2. ̾ϰ̾ʢȡ:̾ʢȡ::: +eblook> @kbd{search ::̳ƻ:*:*:} + 1. 7b:3ac Ӥʿ + 2. 8b:218 ڰ + 3. 8b:31a 󡾤ڰС + 4. 8b:434 󡾤ĤڰΩۡ +(ά) +@end example + +(ʾ塢ϹǤ) + +@c ===================================================================== +@node Menu, Content, Multiple Search, Search +@section ˥塼 + +񤬥˥塼ľ硢ޥ @code{menu} ˤϤޤ + +@example +eblook> @kbd{menu} +ع켭ŵ٤ˤĤ + +@end example + +ѳ̤˶ޤ줿Τ@samp{/reference=} ȤʤäƤʬθ +˥塼ƤȤʤäƤꡢޥ @code{content} ˤꤽ뤳 +Ȥޤ(@pxref{Content}) + +@example +eblook> @kbd{content 2a18:2} +ع켭ŵ ǡ + +19xxǯxxxx +@end example + +@c ===================================================================== +@node Content, Appendix, Menu, Search +@section ɽ + +ޥ @code{content} ˤꡢȥƤޤ + +@example +eblook> @kbd{search test} + 1. 1234:567 test + 2. 2345:678 testament +eblook> @kbd{content 1} +test /t'est/ +[̾] 1. ... +eblook> @kbd{content 1234:567} +test /t'est/ +[̾] 1. ... +@end example + +Ƥե󥹤ľ硢ʬΥ˥塼Ʊˤäɽ +蘆ޤ + +@code{search} ƱͤˡϤХȿѿ @code{max-text} ˤä +Ĵޤ³ˤ @code{content} ͿΤƱ +Ǥ0 ͿȺǸޤǽϤޤ + +Ƥγʬ̾Υƥʸ֤뤳ȤǽǤ +@ref{Appendix} 򻲾ȤƲ + +@c ===================================================================== +@node Appendix, , Content, Search +@section Appendix ե + +eblook ѤƤ EB 饤֥ˤϡAppendix ȸƤФ +Ƽ˸ͭιܶڤ국䳰ˡꤹ뵡ǽޤ +eblook ñλѤʤɡ bitmap ɽǤʤ +ܶڤ꤬ޤưꤵʤ硢ܤؤΰưǽ +ưʤˤѲ + +פʼˤĤƤϴ¾οͤ Appendix եƤ +礬ޤξˤ Appendix ѥåꤷŬ +ǥ쥯ȥŸƲ + +@table @asis +@item NDTPD +@url{http://www.sra.co.jp/people/m-kasahr/ndtpd/} +@end table + +eblook ޥɤ⤷ϥޥ @code{book} Ȥ +ƥǥ쥯ȥꤹ뤳Ȥˤ굡ǽޤ +(@pxref{Starting}) + +ʬ Appendix ˤϡߤΤȤʸ줿 +ʸޤΤǡ¸Ŭ appendix ե +@file{*.app} 򻲹ͤ˺Ʋ + +@subsection ܶڤλ +ܴ֤ζڤ국椬ǧǤʤ˻ꤷޤ +ޤʤ硢Ƥ appendix ե + +@code{stop-code 0x1f09 0x0001} + +ꤹɤȻפޤΤǤ + +@subsection ִ + +EB 饤֥εǽȤơCD-ROM Ҥ˴ޤޤüʳ̾ʸ +֤뤳ȤǽǤ⤷ʤȡϼΤ褦ɽ蘆ޤ + +@example +eblook> @kbd{content 1234:567} +test /tst/ + 1. ... +@end example + +֤ԤʤȡʲΤ褦ɽ뤳ȤǤޤ +(lookup Ȥ߹碌ƻѤȤϡ bitmap ɽ뤳 +ǽʾ礬ޤΤǡߤˡ򤷤Ʋ) + +@example +eblook> @kbd{book /cdrom /usr/local/share/eb/appendix} +eblook> @kbd{content 1234:567} +test /t'est/ +[̾] 1. ... +eblook> @point{} +@end example + +뤤ϥޥ @code{font} ˤꡢΥǡ xbm Υӥåȥޥ +ץǡȤ뤳Ȥޤ + +@example +eblook> font ha123 +#define default_width 8 +#define default_height 16 +static unsigned char default_bits[] = @{ + 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x7e, 0x02, 0x02, + 0x44, 0x38, 0x00, 0x00@}; +@end example + +@c ********************************************************************* +@node Information, Commands, Search, Top +@chapter Ƽ + +ޥ @code{info} ˤꡢҤξ󤬽Ϥޤ + +@example +eblook> @kbd{info} + disc type: EPWING + character code: JIS X 0208 + the number of dictionaries: 4 +@end example + +ޥ @code{subinfo} ˤꡢ򤷤Ƥ뼭ξ󤬽Ϥޤ + +@example +eblook> @kbd{select EIWA} +eblook> @kbd{subinfo} + title: ¼ŵ + directory: EIWA + search methods: word endword exact menu + font sizes: 16 24 30 48 + widw font characters: 0xa123 -- 0xa456 +@end example + +ޥ @code{copyright} ˤꡢ򤷤Ƥ뼭󤬽Ϥ +ޤ + +@example +eblook> @kbd{copyright} +ֱ¼ŵ Copyright (C) 1998 Keisuke Nishida +@end example + +ޥ @code{help} ˤꡢޥɤΰϤޤ + +@c ********************************************************************* +@node Commands, Variables, Information, Top +@chapter ޥɰ + +@table @code +@item book [@var{directory} [@var{appendix}]] +򤷤ޤˤϽҤΤǥ쥯ȥꡢˤ +Appendix Τǥ쥯ȥꤷޤƾάˤϡߤ +꤬ɽޤ + +@item info +򤵤ƤҤ˴ؤϤޤ + +@item list +򤵤ƤҤμϤޤ + +@item select @var{dictionary} +򤷤ޤꤹ٤ͤϡ@code{list} ޥɤνϤޤ + +@item subinfo +򤵤Ƥ뼭˴ؤϤޤ + +@item copyright +򤵤Ƥ뼭Ϥޤ + +@item menu +򤵤Ƥ뼭񤬥˥塼ľ硢Ϥޤ(@pxref{Menu}) + +@item search @var{pattern} [@var{offset}] +ԤʤޤϽϤγϰ֡(@pxref{Search}) + +@item content @var{entry} [@var{offset}] +ȥƤϤޤϽϤγϰ֡(@pxref{Content}) + +@item font [@var{id}] +ǡ xbm ǽϤޤά硢Ƥγξ +Ϥޤι⤵ѿ @code{font} ˤͿޤ + +@item show [@code{-a}] [@var{variable}] +ѿͤϤޤά硢٤ƤѿΰϤޤ +@code{-a} ꤹȡ̾ɽʤѿɽޤ + +@item set @var{variable} @var{value} +ѿͤ򥻥åȤޤ + +@item unset @var{varialbe}... +ѿ򥯥ꥢޤ + +@item help +ޥɤΰϤޤ + +@item quit +eblook λޤ +@end table + +@c ********************************************************************* +@node Variables, Compile, Commands, Top +@chapter ѿ + +@table @code +@item search-method +@code{search} ޥɤθˡ@code{exact}, @code{word}, +@code{endword}, @code{glob} Τ줫ǽǥեȤ @code{glob} + +@item max-hits +@code{search} ޥɤϤιܿ0 ΤȤ̵¡ +ǥեȤ 256 + +@item max-text +@code{content} ޥɤϤɽХȿ(ܰ)0 ΤȤ̵¡ +ǥեȤ 8192 + +@item font +ǡι⤵ǥեȤ 16 + +@item kanji-code +Ϥʸɡͤ @code{jis}, @code{sjis}, @code{euc}, +@code{utf8}, @code{auto} ʤɡ(ʸʸζ̤ʤ)ѤǤ륳ɤ OS ˰¸ޤ + +@item prompt +ץץȡǥեȤ "eblook> " + +@item version +eblook ΥСֹ档 + +@item use-narrow-kana +"true" ꤹȽϤȾѥʸޤޤǥեȤ "off" ǡ +ȾѥʸʸȤƽϤޤ + +@item stop-code +[]ƥȽϤνλɡ"set stop-code 0x1f090000" Τ褦˻ꤷޤ +ˤäƤϡꤷʤȽϤŬڤʸĽǽλޤ +Ƕ eb library (Version 3.x) ȤȤ߹碌Ǥϵǽޤ󡣤 +appendix file ꤷƲ(@pxref{Appendix}) + +@item pager +[] "on" ꤹȸɽ (content ޥ) Ķѿ PAGER +ꤷڡ㡼Ѥ롣εǽѤ뤿ˤϡѥ +--with-pager ץĤ configure ɬפ롣 +()ѿϾѹǽ⤤ + +@item decorate-mode +[] "on" ꤹʸΤΥϤޤ +()ѿϾѹǽ⤤ +@end table + +@c ********************************************************************* +@node Compile, How To Get,Variables, Top +@chapter ѥȥ󥹥ȡ +̾ UNIX ĶǤϡѥϤۤ񤷤ޤ +ʲμǥѥԤʤäƲ +@enumerate +@item ޤeb library 򥤥󥹥ȡ뤷Ʋ eb library +@url{http://www.sra.co.jp/people/m-kasahr/eb/} ǽǤ +@item @kbd{configure} ץȤ¹Ԥޤ +@kbd{./configure --prefix=/usr --with-eb-conf=/etc/eb.conf } +ʤɤȤޤǤ륪ץϰʲΰ򻲾ȤƲ +@item @kbd{make} ¹Ԥޤ +@item @kbd{make install} ¹Ԥޤ󥹥ȡˤäƤ +root ¤ɬפˤʤޤ +@end enumerate + +פꥪץ + +@table @code +@item --prefix +󥹥ȡꤷޤꤷʤȡ @kbd{--prefix=/usr/local} +ꤷƱǤ +@item --with-eb-conf=FILE +eb library եΤ꤫ꤷޤ̾ưŪ +$(prefix)/etc/eb.conf ($(sysconfdir)/eb.conf)ꤵΤǡ +ʳξ˥󥹥ȡ뤷ˤ @kbd{--with-eb-conf=/etc/eb.conf} +뤤 @kbd{--sysconfdir=/etc} ʤɤȤŪ˻ꤷƲ +@item --with-readline +GNU readline 饤֥ѤƹԽԤ˻ꤷޤ +@item --with-pager +̤ pager ѤɽޤºݤλѤˤäƤϡĶѿ +@kbd{PAGER} λ (@kbd{setenv PAGER less} ) eblook ѿλ @kbd{set pager on}"ɬפǤ +@end table + +@c ********************************************************************* +@node How To Get, , Compile, Top +@chapter ǿ + +ǿ eblook ϡΤȤǽǤ + +@table @asis +@item eblook +@url{http://openlab.ring.gr.jp/edict/eblook/} +@end table + +eblook ˴ؤ򴹤ϡedict NDTPD Υ᡼󥰥ꥹȤˤƹԤ +Ƥޤ + +@table @asis +@item edict +@url{http://openlab.ring.gr.jp/edict/} +@item NDTPD +@url{http://www.sra.co.jp/people/m-kasahr/ndtpd/} +@end table + +eblook edict ȯ (@email{edict@@ring.gr.jp}) ˤ +Ƥޤeblook ˴ؤ䤤碌ϤޤǤꤤޤ + +@bye diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.c b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.c new file mode 100644 index 0000000..b853559 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.c @@ -0,0 +1,1031 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu + before changing it! + + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 + Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 +#include +#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +#define ELIDE_CODE +#endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +#include +#include +#endif /* GNU C library. */ + +#ifdef VMS +#include +#if HAVE_STRING_H - 0 +#include +#endif +#else +#if HAVE_STRING_H +#include +#endif +#endif + +#if defined (WIN32) && !defined (__CYGWIN32__) +/* It's not Unix, really. See? Capital letters. */ +#include +#define getpid() GetCurrentProcessId() +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. + When compiling libc, the _ macro is predefined. */ +#ifdef HAVE_LIBINTL_H +# include +# define _(msgid) gettext (msgid) +#else +# define _(msgid) (msgid) +#endif +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = NULL; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +#include +#define my_index strchr +#else + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +char *getenv (); + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; + +static int original_argc; +static char *const *original_argv; + +extern pid_t __libc_pid; + +/* Make sure the environment variable bash 2.0 puts in the environment + is valid for the getopt call we must make sure that the ARGV passed + to getopt is that one passed to the process. */ +static void +__attribute__ ((unused)) +store_args_and_env (int argc, char *const *argv) +{ + /* XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ + original_argc = argc; + original_argv = argv; +} +text_set_element (__libc_subinit, store_args_and_env); + +#define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +#else /* !_LIBC */ +#define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void exchange (char **); + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#ifdef _LIBC + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); + memset (&new_str[nonoption_flags_max_len], '\0', + top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +static const char *_getopt_initialize (int, char *const *, const char *); + +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#ifdef _LIBC + if (posixly_correct == NULL + && argc == original_argc && argv == original_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + { + memcpy (__getopt_nonoption_flags, orig_str, len); + memset (&__getopt_nonoption_flags[len], '\0', + nonoption_flags_max_len - len); + } + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#ifdef _LIBC +#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + _("%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + _("%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (opterr) + { + if (argv[optind][1] == '-') + /* --option */ + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); + else + /* +option or -option */ + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (opterr) + { + if (posixly_correct) + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, _("%s: illegal option -- %c\n"), + argv[0], c); + else + fprintf (stderr, _("%s: invalid option -- %c\n"), + argv[0], c); + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.h b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.h new file mode 100644 index 0000000..d68b6d6 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt.h @@ -0,0 +1,119 @@ +/* Declarations for getopt. + Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GETOPT_H +#define _GETOPT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +#ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int argc, char *const *argv, const char *shortopts); +#else /* not __GNU_LIBRARY__ */ +extern int getopt (); +#endif /* __GNU_LIBRARY__ */ +extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); +extern int getopt_long_only (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind, + int long_only); + +#ifdef __cplusplus +} +#endif + +#endif /* _GETOPT_H */ diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/getopt1.c b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt1.c new file mode 100644 index 0000000..ca15582 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/getopt1.c @@ -0,0 +1,179 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "getopt.h" + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 +#include +#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +#define ELIDE_CODE +#endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 1); +} + + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +#include + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/install-sh b/lib/ebu/others/eblook-1.6.1+media-20200414/install-sh new file mode 100644 index 0000000..0360b79 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/install-sh @@ -0,0 +1,501 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2016-01-11.22; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/ltmain.sh b/lib/ebu/others/eblook-1.6.1+media-20200414/ltmain.sh new file mode 100644 index 0000000..a87bb19 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/ltmain.sh @@ -0,0 +1,11150 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from /usr/src/ports/libtool/libtool-2.4.6-7.x86_64/src/libtool-2.4.6/build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.6 +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -fopenacc|-fopenmp|-ftree-parallelize-loops=*|-fcilkplus|-fgnu-tm| \ + -ffast-math|-funsafe-math-optimizations|-fvtable-verify*| \ + -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/eb4.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/eb4.m4 new file mode 100644 index 0000000..5817a1f --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/eb4.m4 @@ -0,0 +1,116 @@ +dnl * +dnl * Make ready to link EB Library 3.x or 4.x. +dnl * +dnl * Copyright (c) 2000-2006 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +AC_DEFUN([eb_LIB_EB4], +[dnl +dnl * +dnl * Requirements. +dnl * +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_LIBTOOL]) +AC_REQUIRE([AC_TYPE_OFF_T]) +AC_REQUIRE([AC_TYPE_SIZE_T]) + +AC_CHECK_HEADERS(limits.h) +AC_CHECK_TYPE(ssize_t, int) + +dnl * +dnl * --with-eb-conf option. +dnl * +AC_ARG_WITH(eb-conf, +AC_HELP_STRING([--with-eb-conf=FILE], + [eb.conf file is FILE [[SYSCONFDIR/eb.conf]]]), +[ebconf="${withval}"], [ebconf=$sysconfdir/eb.conf]) +if test X$prefix = XNONE; then + PREFIX=$ac_default_prefix +else + PREFIX=$prefix +fi +ebconf=`echo X$ebconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ + -e 's;\$(prefix);'"$PREFIX;g"` + +dnl * +dnl * Read eb.conf +dnl * +AC_MSG_CHECKING(for eb.conf) +AC_MSG_RESULT($ebconf) +if test -f ${ebconf}; then + . ${ebconf} +else + AC_MSG_ERROR($ebconf not found) +fi + +if test X$EBCONF_ENABLE_PTHREAD = Xyes; then + AC_DEFINE(EBCONF_ENABLE_PTHREAD, 1, + [Define if EB Library supports pthread.]) +fi +if test X$EBCONF_ENABLE_NLS = Xyes; then + AC_DEFINE(EBCONF_ENABLE_NLS, 1, + [Define if EB Library supports native language.]) +fi +if test X$EBCONF_ENABLE_EBNET = Xyes; then + AC_DEFINE(EBCONF_ENABLE_EBNET, 1, + [Define if EB Library supports remote access.]) +fi + +AC_SUBST(EBCONF_EBINCS) +AC_SUBST(EBCONF_EBLIBS) +AC_SUBST(EBCONF_ZLIBINCS) +AC_SUBST(EBCONF_ZLIBLIBS) +AC_SUBST(EBCONF_PTHREAD_CPPFLAGS) +AC_SUBST(EBCONF_PTHREAD_CFLAGS) +AC_SUBST(EBCONF_PTHREAD_LDFLAGS) +AC_SUBST(EBCONF_INTLINCS) +AC_SUBST(EBCONF_INTLLIBS) + +dnl * +dnl * Check for EB Library. +dnl * +AC_MSG_CHECKING(for EB Library) +save_CPPFLAGS=$CPPFLAGS +save_CFLAGS=$CFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" +CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" +LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" +LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" +AC_TRY_LINK([#include ], +[eb_initialize_library(); return 0;], +try_eb=yes, try_eb=no) +CPPFLAGS=$save_CPPFLAGS +CFLAGS=$save_CFLAGS +LDFLAGS=$save_LDFLAGS +LIBS=$save_LIBS +AC_MSG_RESULT($try_eb) +if test ${try_eb} != yes; then + AC_MSG_ERROR(EB Library not available) +fi +]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ebu.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ebu.m4 new file mode 100644 index 0000000..1f11ebc --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ebu.m4 @@ -0,0 +1,138 @@ +dnl * +dnl * Make ready to link EB Library with UTF-8 support. +dnl * +dnl * Copyright (c) 2000-2006 Motoyuki Kasahara +dnl * Copyright (c) 2011 Kazuhiro Ito +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +AC_DEFUN([eb_LIB_EBU], +[dnl +dnl * +dnl * --enable-ebu option +dnl * +AC_ARG_ENABLE(ebu, + AC_HELP_STRING([--enable-ebu], [Build with EB Library with UTF-8 support [[auto]]]), + ENABLE_EBU=$enableval, ENABLE_EBU=auto) + +if test $ENABLE_EBU != no; then + dnl * + dnl * Requirements. + dnl * + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + AC_REQUIRE([AC_TYPE_OFF_T]) + AC_REQUIRE([AC_TYPE_SIZE_T]) + + AC_CHECK_HEADERS(limits.h) + AC_CHECK_TYPE(ssize_t, int) + + dnl * + dnl * --with-ebu-conf option. + dnl * + AC_ARG_WITH(ebu-conf, + AC_HELP_STRING([--with-ebu-conf=FILE], + [ebu.conf file is FILE [[SYSCONFDIR/ebu.conf]]]), + [ebuconf="${withval}"], [ebuconf=$sysconfdir/ebu.conf]) + if test X$prefix = XNONE; then + PREFIX=$ac_default_prefix + else + PREFIX=$prefix + fi + ebuconf=`echo X$ebuconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ + -e 's;\$(prefix);'"$PREFIX;g"` + + dnl * + dnl * Read ebu.conf + dnl * + AC_MSG_CHECKING(for ebu.conf) + AC_MSG_RESULT($ebuconf) + if test -f ${ebuconf}; then + . ${ebuconf} + else + if test $ENABLE_EBU = yes; then + AC_MSG_ERROR($ebuconf not found) + else + ENABLE_NLS=no + fi + fi +fi + +if test $ENABLE_EBU != no; then + if test X$EBCONF_ENABLE_PTHREAD = Xyes; then + AC_DEFINE(EBCONF_ENABLE_PTHREAD, 1, + [Define if EB Library supports pthread.]) + fi + if test X$EBCONF_ENABLE_NLS = Xyes; then + AC_DEFINE(EBCONF_ENABLE_NLS, 1, + [Define if EB Library supports native language.]) + fi + if test X$EBCONF_ENABLE_EBNET = Xyes; then + AC_DEFINE(EBCONF_ENABLE_EBNET, 1, + [Define if EB Library supports remote access.]) + fi + + AC_SUBST(EBCONF_EBINCS) + AC_SUBST(EBCONF_EBLIBS) + AC_SUBST(EBCONF_ZLIBINCS) + AC_SUBST(EBCONF_ZLIBLIBS) + AC_SUBST(EBCONF_PTHREAD_CPPFLAGS) + AC_SUBST(EBCONF_PTHREAD_CFLAGS) + AC_SUBST(EBCONF_PTHREAD_LDFLAGS) + AC_SUBST(EBCONF_INTLINCS) + AC_SUBST(EBCONF_INTLLIBS) + + dnl * + dnl * Check for EB Library with UTF-8 support. + dnl * + AC_MSG_CHECKING(for EB Library with UTF-8 support) + save_CPPFLAGS=$CPPFLAGS + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" + CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" + LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" + LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" + AC_TRY_LINK([#include ], + [eb_initialize_library(); return 0;], + try_eb=yes, try_eb=no) + CPPFLAGS=$save_CPPFLAGS + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + AC_MSG_RESULT($try_eb) + if test ${try_eb} != yes; then + if test $ENABLE_EBU = yes; then + AC_MSG_ERROR(EB Library with UTF-8 support not available) + else + ENABLE_EBU=no + fi + else + AC_DEFINE(ENABLE_EBU, 1, [Define if EB library with UTF-8 support is requested]) + fi +fi +]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/largefile.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/largefile.m4 new file mode 100644 index 0000000..a0dd034 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/largefile.m4 @@ -0,0 +1,63 @@ +dnl * +dnl * Copyright (c) 2009 Motoyuki Kasahara +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * 1. Redistributions of source code must retain the above copyright +dnl * notice, this list of conditions and the following disclaimer. +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl * notice, this list of conditions and the following disclaimer in the +dnl * documentation and/or other materials provided with the distribution. +dnl * 3. Neither the name of the project nor the names of its contributors +dnl * may be used to endorse or promote products derived from this software +dnl * without specific prior written permission. +dnl * +dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl * SUCH DAMAGE. +dnl * + +dnl * +dnl * Check for large file support. +dnl * +AC_DEFUN([eb_SYS_LARGEFILE], [dnl +AC_REQUIRE([AC_SYS_LARGEFILE]) +AC_CACHE_CHECK([for ll modifier of printf], ac_cv_func_printf_ll, +[AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include + int main() { + char buffer[[128]]; + sprintf(buffer, "%llx", (unsigned long long) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } +])], [ac_cv_func_printf_ll=yes], [ac_cv_func_printf_ll=no])]) +AC_CACHE_CHECK([for I64 modifier of printf], ac_cv_func_printf_i64, +[AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include + int main() { + char buffer[[128]]; + sprintf(buffer, "%I64x", (unsigned __int64) 1 << 32); + return (strcmp(buffer, "100000000") == 0) ? 0 : 1; + } +])], [ac_cv_func_printf_i64=yes], [ac_cv_func_printf_i64=no])]) +if test "$ac_cv_func_printf_ll" = yes; then + AC_DEFINE(PRINTF_LL_MODIFIER, 1, +[Define to `1' if printf() recognizes "ll" modifier for long long]) +fi +if test "$ac_cv_func_printf_i64" = yes; then + AC_DEFINE(PRINTF_I64_MODIFIER, 1, +[Define to `1' if printf() recognizes "I64" modifier for __int64]) +fi]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/libtool.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/libtool.m4 new file mode 100644 index 0000000..a3bc337 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/libtool.m4 @@ -0,0 +1,8369 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +]) + +# serial 58 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + +# _LT_CC_BASENAME(CC) +# ------------------- +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. +m4_defun([_LT_CC_BASENAME], +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from 'configure', and 'config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain=$ac_aux_dir/ltmain.sh +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the 'libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags='_LT_TAGS'dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# '#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test 0 = "$lt_write_fail" && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +'$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test 0 != $[#] +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try '$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try '$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +_LT_COPYING +_LT_LIBTOOL_TAGS + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS=$save_LDFLAGS + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + m4_if([$1], [CXX], +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case $ECHO in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and where our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test yes = "[$]$2"; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +]) + +if test yes = "[$]$2"; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n "$lt_cv_sys_max_cmd_len"; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes = "$cross_compiling"; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen=shl_load], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen=dlopen], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then + + # We can hardcode non-existent directories. + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program that can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac]) +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program that can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test no = "$withval" || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi]) +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM=-lm) + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64, which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test yes = "$GCC"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + osf3*) + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting $shlibpath_var if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC=$CC +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report what library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC=$lt_save_CC +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_caught_CXX_error"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test yes = "$GXX"; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='$wl' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GXX"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require '-G' NOT '-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test yes != "$_lt_caught_CXX_error" + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || + test x-R = "$p"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test no = "$pre_test_object_deps_done"; then + case $prev in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)=$prev$p + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test no = "$pre_test_object_deps_done"; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)=$p + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)=$p + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_F77"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_FC"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code=$lt_simple_compile_test_code + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f "$lt_ac_sed" && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test 10 -lt "$lt_ac_count" && break + lt_ac_count=`expr $lt_ac_count + 1` + if test "$lt_ac_count" -gt "$lt_ac_max"; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine what file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltoptions.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltoptions.m4 new file mode 100644 index 0000000..94b0829 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltoptions.m4 @@ -0,0 +1,437 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 8 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option '$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' +# LT_INIT options. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltsugar.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltversion.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltversion.m4 new file mode 100644 index 0000000..fa04b52 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 4179 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.6' +macro_revision='2.4.6' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/m4/lt~obsolete.m4 b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/lt~obsolete.m4 new file mode 100644 index 0000000..c6b26f8 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/m4/lt~obsolete.m4 @@ -0,0 +1,99 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/missing b/lib/ebu/others/eblook-1.6.1+media-20200414/missing new file mode 100644 index 0000000..c6e3795 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2016-01-11.22; # UTC + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/mkinstalldirs b/lib/ebu/others/eblook-1.6.1+media-20200414/mkinstalldirs new file mode 100644 index 0000000..a31ce6d --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/mkinstalldirs @@ -0,0 +1,162 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2016-01-11.22; # UTC + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the 'mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because '.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/strcasecmp.c b/lib/ebu/others/eblook-1.6.1+media-20200414/strcasecmp.c new file mode 100644 index 0000000..e535cb4 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/strcasecmp.c @@ -0,0 +1,154 @@ +/* + * Copyright (c) 1997, 98, 2000 Motoyuki Kasahara + * + * This programs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * This program requires the following Autoconf macros: + * AC_C_CONST + * AC_TYPE_SIZE_T + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include + +/* for DOS16 size_t definition */ +#include + +/* + * Character comparison table used in strcasecmp() and strncasecmp(). + */ +static const unsigned char comparison_table[] = { + /* 0x00 -- 0x0f */ + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + + /* 0x10 -- 0x1f */ + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + + /* 0x20 -- 0x2f */ + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + + /* 0x30 -- 0x3f */ + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + + /* 0x40 -- 0x4f */ + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + + /* 0x50 -- 0x5f */ + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + + /* 0x60 -- 0x6f */ + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + + /* 0x70 -- 0x7f */ + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + + /* 0x80 -- 0x8f */ + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + + /* 0x90 -- 0x9f */ + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + + /* 0xa0 -- 0xaf */ + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + + /* 0xb0 -- 0xbf */ + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + + /* 0xc0 -- 0xcf */ + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + + /* 0xd0 -- 0xdf */ + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + + /* 0xe0 -- 0xef */ + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + + /* 0xf0 -- 0xff */ + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; + + +/* + * Compare strings. + * Cases in the strings are insensitive. + */ +int +strcasecmp(string1, string2) + const char *string1; + const char *string2; +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + int comparison_result; + + while (*string1_p != '\0') { + comparison_result + = comparison_table[*string1_p++] - comparison_table[*string2_p++]; + if (comparison_result != 0) + return comparison_result; + } + + return -comparison_table[*string2_p]; +} + + +/* + * Compare strings within `n' characters. + * Cases in the strings are insensitive. + */ +int +strncasecmp(string1, string2, n) + const char *string1; + const char *string2; + size_t n; +{ + const unsigned char *string1_p = (const unsigned char *)string1; + const unsigned char *string2_p = (const unsigned char *)string2; + size_t i = n; + int comparison_result; + + if (i == 0) + return 0; + + while (*string1_p != '\0') { + if (i-- <= 0) + return 0; + comparison_result + = comparison_table[*string1_p++] - comparison_table[*string2_p++]; + if (comparison_result != 0) + return comparison_result; + } + + return -comparison_table[*string2_p]; +} + + diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/strdup.c b/lib/ebu/others/eblook-1.6.1+media-20200414/strdup.c new file mode 100644 index 0000000..9f271fe --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/strdup.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include +#include +#include + +char * +strdup(str) + const char *str; +{ + size_t len; + char *copy; + + len = strlen(str) + 1; + if ((copy = malloc(len)) == NULL) + return (NULL); + memcpy(copy, str, len); + return (copy); +} diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/texinfo.tex b/lib/ebu/others/eblook-1.6.1+media-20200414/texinfo.tex new file mode 100644 index 0000000..b40a6e2 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/texinfo.tex @@ -0,0 +1,11685 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2017-06-04.19} +% +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 +% Free Software Foundation, Inc. +% +% This texinfo.tex file is free software: you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. +% +% This texinfo.tex file is distributed in the hope that it will be +% useful, but WITHOUT ANY WARRANTY; without even the implied warranty +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see . +% +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + +% LaTeX's \typeout. This ensures that the messages it is used for +% are identical in format to the corresponding ones from latex/pdflatex. +\def\typeout{\immediate\write17}% + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexraggedright=\raggedright +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexsp=\sp +\let\ptexstar=\* +\let\ptexsup=\sup +\let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Give the space character the catcode for a space. +\def\spaceisspace{\catcode`\ =10\relax} + +% Likewise for ^^M, the end of line character. +\def\endlineisspace{\catcode13=10\relax} + +\chardef\dashChar = `\- +\chardef\slashChar = `\/ +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% Output routine +% + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt } + +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. + +% \domark is called twice inside \chapmacro, to add one +% mark before the section break, and one after. +% In the second call \prevchapterdefs is the same as \lastchapterdefs, +% and \prevsectiondefs is the same as \lastsectiondefs. +% Then if the page is not broken at the mark, some of the previous +% section appears on the page, and we can get the name of this section +% from \firstmark for @everyheadingmarks top. +% @everyheadingmarks bottom uses \botmark. +% +% See page 260 of The TeXbook. +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top + \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom + \noexpand\else \the\toks8 % 2: color marks + }% +} + +% \gettopheadingmarks, \getbottomheadingmarks, +% \getcolormarks - extract needed part of mark. +% +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\lastsection{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\txipagewidth \newdimen\txipageheight + +% Main output routine. +% +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. +% \shipout a vbox for a single page, adding an optional header, footer, +% cropmarks, and footnote. This also causes index entries for this page +% to be written to the auxiliary files. +% +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Common context changes for both heading and footing. + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars} + % + % Retrieve the information for the headings from the marks in the page, + % and call Plain TeX's \makeheadline and \makefootline, which use the + % values in \headline and \footline. + % + % This is used to check if we are on the first page of a chapter. + \ifcase1\topmark\fi + \let\prevchaptername\thischaptername + \ifcase0\firstmark\fi + \let\curchaptername\thischaptername + % + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + % + \ifx\curchaptername\prevchaptername + \let\thischapterheading\thischapter + \else + % \thischapterheading is the same as \thischapter except it is blank + % for the first page of a chapter. This is to prevent the chapter name + % being shown twice. + \def\thischapterheading{}% + \fi + % + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% + % + {% + % Set context for writing to auxiliary files like index files. + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +% Main part of page, including any footnotes +\def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +\dimen@=\dp#1\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + + +% Argument parsing + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% For example, \def\foo{\parsearg\fooxxx}. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. Also remove a @texinfoc +% comment (see \scanmacro for details). Pass the result on to \argcheckspaces. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} +\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + + +% \parseargdef - define a command taking an argument on the line +% +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Environment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + outside of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal. + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + \addgroupbox + \prevdepth = \dimen1 + \checkinserts +} + +\def\addgroupbox{ + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\txipageheight + \page + \fi + \fi + \box\groupbox +} + +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} +% +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\centersub\centerH + \else + \let\centersub\centerV + \fi + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case +} +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% +} + +% @sp n outputs n lines of vertical space +% +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment + + +\def\c{\begingroup \catcode`\^^M=\active% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\cxxx} +{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} +% +\let\comment\c + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent {\restorefirstparagraphindent \indent}% + \gdef\noindent{\restorefirstparagraphindent \noindent}% + \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% +} +% +\gdef\restorefirstparagraphindent{% + \global\let\indent = \ptexindent + \global\let\noindent = \ptexnoindent + \global\everypar = {}% +} + + +% @refill is a no-op. +\let\refill=\relax + +% @setfilename INFO-FILENAME - ignored +\let\setfilename=\comment + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newbox\boxB +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% +% For LuaTeX +% + +\newif\iftxiuseunicodedestname +\txiuseunicodedestnamefalse % For pdfTeX etc. + +\ifx\luatexversion\thisisundefined +\else + % Use Unicode destination names + \txiuseunicodedestnametrue + % Escape PDF strings with converting UTF-16 from UTF-8 + \begingroup + \catcode`\%=12 + \directlua{ + function UTF16oct(str) + tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377') + for c in string.utfvalues(str) do + if c < 0x10000 then + tex.sprint( + string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. + string.char(0x5c) .. string.char(0x25) .. '03o', + (c / 256), (c % 256))) + else + c = c - 0x10000 + local c_hi = c / 1024 + 0xd800 + local c_lo = c % 1024 + 0xdc00 + tex.sprint( + string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. + string.char(0x5c) .. string.char(0x25) .. '03o' .. + string.char(0x5c) .. string.char(0x25) .. '03o' .. + string.char(0x5c) .. string.char(0x25) .. '03o', + (c_hi / 256), (c_hi % 256), + (c_lo / 256), (c_lo % 256))) + end + end + end + } + \endgroup + \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}} + % Escape PDF strings without converting + \begingroup + \directlua{ + function PDFescstr(str) + for c in string.bytes(str) do + if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then + tex.sprint( + string.format(string.char(0x5c) .. string.char(0x25) .. '03o', + c)) + else + tex.sprint(string.char(c)) + end + end + end + } + \endgroup + \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}} + \ifnum\luatexversion>84 + % For LuaTeX >= 0.85 + \def\pdfdest{\pdfextension dest} + \let\pdfoutput\outputmode + \def\pdfliteral{\pdfextension literal} + \def\pdfcatalog{\pdfextension catalog} + \def\pdftexversion{\numexpr\pdffeedback version\relax} + \let\pdfximage\saveimageresource + \let\pdfrefximage\useimageresource + \let\pdflastximage\lastsavedimageresourceindex + \def\pdfendlink{\pdfextension endlink\relax} + \def\pdfoutline{\pdfextension outline} + \def\pdfstartlink{\pdfextension startlink} + \def\pdffontattr{\pdfextension fontattr} + \def\pdfobj{\pdfextension obj} + \def\pdflastobj{\numexpr\pdffeedback lastobj\relax} + \let\pdfpagewidth\pagewidth + \let\pdfpageheight\pageheight + \edef\pdfhorigin{\pdfvariable horigin} + \edef\pdfvorigin{\pdfvariable vorigin} + \fi +\fi + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \xdef#1{#1}% + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi +} +\def\txiescapepdfutfsixteen#1{% + \ifx\pdfescapestrutfsixteen\thisisundefined + % No UTF-16 converting macro available. + \txiescapepdf{#1}% + \else + \xdef#1{\pdfescapestrutfsixteen{#1}}% + \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros using ideas from pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % rg sets the color for filling (usual text, etc.); + % RG sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\setpdfdestname#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \makevalueexpandable + \turnoffactive + \iftxiuseunicodedestname + \ifx \declaredencoding \latone + % Pass through Latin-1 characters. + % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode. + \else + \ifx \declaredencoding \utfeight + % Pass through Unicode characters. + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \fi + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + }} + % + \def\setpdfoutlinetext#1{{% + \indexnofonts + \makevalueexpandable + \turnoffactive + \ifx \declaredencoding \latone + % The PDF format can use an extended form of Latin-1 in bookmark + % strings. See Appendix D of the PDF Reference, Sixth Edition, for + % the "PDFDocEncoding". + \passthroughcharstrue + % Pass through Latin-1 characters. + % LuaTeX: Convert to Unicode + % pdfTeX: Use Latin-1 as PDFDocEncoding + \def\pdfoutlinetext{#1}% + \else + \ifx \declaredencoding \utfeight + \ifx\luatexversion\thisisundefined + % For pdfTeX with UTF-8. + % TODO: the PDF format can use UTF-16 in bookmark strings, + % but the code for this isn't done yet. + % Use ASCII approximations. + \passthroughcharsfalse + \def\pdfoutlinetext{#1}% + \else + % For LuaTeX with UTF-8. + % Pass through Unicode characters for title texts. + \passthroughcharstrue + \def\pdfoutlinetext{#1}% + \fi + \else + % For non-Latin-1 or non-UTF-8 encodings. + % Use ASCII approximations. + \passthroughcharsfalse + \def\pdfoutlinetext{#1}% + \fi + \fi + % LuaTeX: Convert to UTF-16 + % pdfTeX: Use Latin-1 as PDFDocEncoding + \txiescapepdfutfsixteen\pdfoutlinetext + }} + % + \def\pdfmkdest#1{% + \setpdfdestname{#1}% + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + } + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \setpdfoutlinetext{#1} + \setpdfdestname{#3} + \ifx\pdfdestname\empty + \def\pdfdestname{#4}% + \fi + % + \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % + \indexnofonts + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + +% +% For XeTeX +% +\ifx\XeTeXrevision\thisisundefined +\else + % + % XeTeX version check + % + \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1 + % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307. + % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941). + % For avoiding PDF destination name replacement, we use this special + % instead of xdvipdfmx's command line option `-C 0x0010'. + \special{dvipdfmx:config C 0x0010} + % XeTeX 0.99995+ comes with xdvipdfmx 20160307+. + % It can handle Unicode destination names for PDF. + \txiuseunicodedestnametrue + \else + % XeTeX < 0.99996 (TeX Live < 2016) cannot use the + % `dvipdfmx:config' special. + % So for avoiding PDF destination name replacement, + % xdvipdfmx's command line option `-C 0x0010' is necessary. + % + % XeTeX < 0.99995 can not handle Unicode destination names for PDF + % because xdvipdfmx 20150315 has a UTF-16 conversion issue. + % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). + \txiuseunicodedestnamefalse + \fi + % + % Color support + % + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + \def\pdfsetcolor#1{\special{pdf:scolor [#1]}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % PDF outline support + % + % Emulate pdfTeX primitive + \def\pdfdest name#1 xyz{% + \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}% + } + % + \def\setpdfdestname#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \makevalueexpandable + \turnoffactive + \iftxiuseunicodedestname + % Pass through Unicode characters. + \else + % Use ASCII approximations in destination names. + \passthroughcharsfalse + \fi + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + }} + % + \def\setpdfoutlinetext#1{{% + \turnoffactive + % Always use Unicode characters in title texts. + \def\pdfoutlinetext{#1}% + % For XeTeX, xdvipdfmx converts to UTF-16. + % So we do not convert. + \txiescapepdf\pdfoutlinetext + }} + % + \def\pdfmkdest#1{% + \setpdfdestname{#1}% + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + } + % + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + \def\dopdfoutline#1#2#3#4{% + \setpdfoutlinetext{#1} + \setpdfdestname{#3} + \ifx\pdfdestname\empty + \def\pdfdestname{#4}% + \fi + % + \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A + << /S /GoTo /D (\pdfdestname) >> >> }% + } + % + \def\pdfmakeoutlines{% + \begingroup + % + % For XeTeX, counts of subentries are not necessary. + % Therefore, we read toc only once. + % + % We use node names as destinations. + \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{1}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{2}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{3}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{4}{##3}{##4}}% + % + \let\appentry\numchapentry% + \let\appsecentry\numsecentry% + \let\appsubsecentry\numsubsecentry% + \let\appsubsubsecentry\numsubsubsecentry% + \let\unnchapentry\numchapentry% + \let\unnsecentry\numsecentry% + \let\unnsubsecentry\numsubsecentry% + \let\unnsubsubsecentry\numsubsubsecentry% + % + % For XeTeX, xdvipdfmx converts strings to UTF-16. + % Therefore, the encoding and the language may not be considered. + % + \indexnofonts + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] + + \special{pdf:docview << /PageMode /UseOutlines >> } + % ``\special{pdf:tounicode ...}'' is not necessary + % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it. + % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315, + % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings. + % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). +% + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% + \special{pdf:bann << /Border [0 0 0] + /Subtype /Link /A << /S /URI /URI (#1) >> >>}% + \endgroup} + \def\endlink{\setcolor{\maincolor}\special{pdf:eann}} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \special{pdf:bann << /Border [0 0 0] + /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}% + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +% + % + % @image support + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\doxeteximage#1#2#3{% + \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\xeteximgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errmessage{Could not find image file #1 for XeTeX}% + \else \gdef\xeteximgext{JPG}% + \fi + \else \gdef\xeteximgext{jpeg}% + \fi + \else \gdef\xeteximgext{jpg}% + \fi + \else \gdef\xeteximgext{png}% + \fi + \else \gdef\xeteximgext{PDF}% + \fi + \else \gdef\xeteximgext{pdf}% + \fi + \closein 1 + \endgroup + % + \def\xetexpdfext{pdf}% + \ifx\xeteximgext\xetexpdfext + \XeTeXpdffile "#1".\xeteximgext "" + \else + \def\xetexpdfext{PDF}% + \ifx\xeteximgext\xetexpdfext + \XeTeXpdffile "#1".\xeteximgext "" + \else + \XeTeXpicfile "#1".\xeteximgext "" + \fi + \fi + \ifdim \wd0 >0pt width \xeteximagewidth \fi + \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + } +\fi + + +% +\message{fonts,} + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\newdimen\textleading +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\thisisundefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named \fontprefix#2. +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% +% (end of cmaps) + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\thisisundefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} % where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. (The default in Texinfo.) +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defsl\slshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\ttfont=\deftt \let\bffont = \defbf +\let\ttslfont=\defttsl \let\slfont=\defsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acronym in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions, \definetextfontsizexi + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\ttfont=\deftt \let\bffont = \defbf +\let\slfont=\defsl \let\ttslfont=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acronym in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions, \definetextfontsizex + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + +% +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname #1font\endcsname % change the current font +} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. We don't +% bother to reset \scriptfont and \scriptscriptfont; awaiting user need. +% +\def\resetmathfonts{% + \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont + \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont + \textfont\ttfam=\ttfont \textfont\sffam=\sffont +} + +% + +% The font-changing commands (all called \...fonts) redefine the meanings +% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs +% to also set the current \fam for math mode. Our \STYLE (e.g., \rm) +% commands hardwire \STYLEfont to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used +% in, e.g., the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% + +\def\assignfonts#1{% + \expandafter\let\expandafter\rmfont\csname #1rm\endcsname + \expandafter\let\expandafter\itfont\csname #1it\endcsname + \expandafter\let\expandafter\slfont\csname #1sl\endcsname + \expandafter\let\expandafter\bffont\csname #1bf\endcsname + \expandafter\let\expandafter\ttfont\csname #1tt\endcsname + \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname + \expandafter\let\expandafter\sffont \csname #1sf\endcsname + \expandafter\let\expandafter\ifont \csname #1i\endcsname + \expandafter\let\expandafter\syfont \csname #1sy\endcsname + \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname +} + +\newif\ifrmisbold + +% Select smaller font size with the current style. Used to change font size +% in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for +% normal roman text, also use bold fonts for roman text in the smaller size. +\def\switchtolllsize{% + \expandafter\assignfonts\expandafter{\lllsize}% + \ifrmisbold + \let\rmfont\bffont + \fi + \csname\curfontstyle\endcsname +}% + +\def\switchtolsize{% + \expandafter\assignfonts\expandafter{\lsize}% + \ifrmisbold + \let\rmfont\bffont + \fi + \csname\curfontstyle\endcsname +}% + +\def\definefontsetatsize#1#2#3#4#5{% +\expandafter\def\csname #1fonts\endcsname{% + \def\curfontsize{#1}% + \def\lsize{#2}\def\lllsize{#3}% + \csname rmisbold#5\endcsname + \assignfonts{#1}% + \resetmathfonts + \setleading{#4}% +}} + +\definefontsetatsize{text} {reduced}{smaller}{\textleading}{false} +\definefontsetatsize{title} {chap} {subsec} {27pt} {true} +\definefontsetatsize{chap} {sec} {text} {19pt} {true} +\definefontsetatsize{sec} {subsec} {reduced}{17pt} {true} +\definefontsetatsize{ssec} {text} {small} {15pt} {true} +\definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false} +\definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false} +\definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false} + +\def\titlefont#1{{\titlefonts\rm #1}} +\let\subsecfonts = \ssecfonts +\let\subsubsecfonts = \ssecfonts + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% --karl, 24jan03. + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +% +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +% +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Font commands. + +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} + +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ifx\next\.% + \else\ifx\next\comma% + \else\ptexslash + \fi\fi\fi\fi\fi + \aftersmartic +} + +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} + +% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m + \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +% @t, explicit typewriter. +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp + +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null % reset spacefactor to 1000 +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. +% +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions + % + \global\def\code{\begingroup + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\normaldash + \let_\realunder + \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % + \codex + } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + % we need the space after the = for the case when \next itself is a + % space token; it would get swallowed otherwise. As in @code{- a}. + \global\let\codedashprev= \next + } +} +\def\normaldash{-} +% +\def\codex #1{\tclose{#1}\endgroup} + +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi +} + +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. +\let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code + +% @uref (abbreviation for `urlref') aka @url takes an optional +% (comma-separated) second argument specifying the text to display and +% an optional third arg as text to display instead of (rather than in +% addition to) the url itself. First (mandatory) arg is the url. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +% +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% look for second arg + \ifdim\wd0 > 0pt + \ifpdf + % For pdfTeX and LuaTeX + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \else + \ifx\XeTeXrevision\thisisundefined + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \else + % For XeTeX + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \fi + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode`\&=\active \catcode`\.=\active + \catcode`\#=\active \catcode`\?=\active + \catcode`\/=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \ifx\XeTeXrevision\thisisundefined + \let\email=\uref + \else + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} + \fi +\fi + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + +\def\xkey{\key} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\switchtolsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \ifmmode\else % only go into math if not in math mode already + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + % have to provide another name for sup operator + \let\mathopsup=\sup + $\expandafter\finishmath\fi +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% for @sub and @sup, if in math mode, just do a normal sub/superscript. +% If in text, use math to place as sub/superscript, but switch +% into text mode, with smaller fonts. This is a different font than the +% one used for real math sub/superscripts (8pt vs. 7pt), but let's not +% fix it (significant additions to font machinery) until someone notices. +% +\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} +\def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}% +% +\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} +\def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}% + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% +% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if +% FMTNAME is tex, else ELSE-TEXT. +\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} +\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi +} +% +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + +% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. +% +\long\def\inlineifset#1{\doinlineifset #1,\finish} +\long\def\doinlineifset#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax + \else\ignorespaces#2\fi +} + +% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. +% +\long\def\inlineifclear#1{\doinlineifclear #1,\finish} +\long\def\doinlineifclear#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}} +\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}} +\let\{=\lbracechar +\let\}=\rbracechar + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \switchtolllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. Define \ensuremath to switch into math mode +% unless we are already there. Expansion tricks may not be needed here, +% but safer, and can't hurt. +\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi} +\def\ensuredmath#1{$\relax#1$} +% +\def\bullet{\ensuremath\ptexbullet} +\def\geq{\ensuremath\ge} +\def\leq{\ensuremath\le} +\def\minus{\ensuremath-} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\ttfont \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the European Computer Modern fonts (cm-super in outline format) +% for non-CM glyphs. That is ec* for regular text and tc* for the text +% companion symbols (LaTeX TS1 encoding). Both are part of the ec +% package and follow the same conventions. +% +\def\ecfont{\etcfont{e}} +\def\tcfont{\etcfont{t}} +% +\def\etcfont#1{% + % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifmonospace + % typewriter: + \font\thisecfont = #1ctt\ecsize \space at \nominalsize + \else + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\thisisundefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% @setcontentsaftertitlepage used to do an implicit @contents or +% @shortcontents after @end titlepage, but it is now obsolete. +\def\setcontentsaftertitlepage{% + \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo + command; move your @contents command if you want the contents + after the title page.}}% +\def\setshortcontentsaftertitlepage{% + \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo + command; move your @shortcontents and @contents commands if you + want the contents after the title page.}}% + +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. \par should +% be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rm + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: + +\let\subtitlerm=\rmfont +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\parseargdef\title{% + \checkenv\titlepage + \vbox{\titlefonts \raggedtitlesettings #1\par}% + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\secfonts\rm \leftline{#1}}% + \fi +} + + +% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make \makeheadline and \makefootline in Plain TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\txipageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +% These define \getoddheadingmarks, \getevenheadingmarks, +% \getoddfootingmarks, and \getevenfootingmarks, each to one of +% \gettopheadingmarks, \getbottomheadingmarks. +% +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\parseargdef\headings{\csname HEADINGS#1\endcsname} + +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapterheading\hfil\folio}} +\global\oddheadline={\line{\thischapterheading\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\thisisundefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil\relax + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark so that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % + \ifinner\else + \vadjust{\penalty 1200}% not good to break after first line of item. + \fi + % We can be in inner vertical mode in a footnote, although an + % @itemize looks awful there. + }% + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a . + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. Assignments +% have to be global since we are inside the implicit group of an +% alignment entry. \everycr below resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% +% +% default for tables with no headings. +\let\headitemcrhook=\relax +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% Reset from possible headitem. + \global\colcount=0 % Reset the column counter. + % + % Check for saved footnotes, etc.: + \checkinserts + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\-=\active \catcode`\_=\active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\normaldash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% Like \expandablevalue, but completely expandable (the \message in the +% definition above operates at the execution level of TeX). Used when +% writing to auxiliary files, due to the expansion that \write does. +% If flag is undefined, pass through an unexpanded @value command: maybe it +% will be set by the time it is read back in. +% +% NB flag names containing - or _ may not work here. +\def\dummyvalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + \noexpand\value{#1}% + \else + \csname SET#1\endcsname + \fi +} + +% Used for @value's in index entries to form the sort key: expand the @value +% if possible, otherwise sort late. +\def\indexnofontsvalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + ZZZZZZZ + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get the special treatment we need for `@end ifset,' we call +% \makecond and then redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end executes the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named IX. +% It automatically defines \IXindex such that +% \IXindex ...rest of line... puts an entry in the index IX. +% It also defines \IXindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is IX. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \expandafter\chardef\csname#1indfile\endcsname=0 + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \expandafter\chardef\csname#1indfile\endcsname=0 + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + +% The default indices: +\newindex{cp}% concepts, +\newcodeindex{fn}% functions, +\newcodeindex{vr}% variables, +\newcodeindex{tp}% types, +\newcodeindex{ky}% keys +\newcodeindex{pg}% and programs. + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + \requireopenindexfile{#3}% + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all index macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it is the two-letter name of the index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} +\def\doindexxxx #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} +\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} + + +% Used when writing an index entry out to an index file to prevent +% expansion of Texinfo commands that can appear in an index entry. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \definedummyletter\@% + \definedummyletter\ % + % + % For texindex which always views { and } as separators. + \def\{{\lbracechar{}}% + \def\}{\rbracechar{}}% + % + % Do the redefinitions. + \definedummies +} + +% Used for the aux and toc files, where @ is the escape character. +% +\def\atdummies{% + \definedummyletter\@% + \definedummyletter\ % + \definedummyletter\{% + \definedummyletter\}% + % + % Do the redefinitions. + \definedummies + \otherbackslash +} + +% \definedummyword defines \#1 as \string\#1\space, thus effectively +% preventing its expansion. This is used only for control words, +% not control letters, because the \space would be incorrect for +% control characters, but is needed to separate the control word +% from whatever follows. +% +% These can be used both for control words that take an argument and +% those that do not. If it is followed by {arg} in the input, then +% that will dutifully get written to the index (or wherever). +% +% For control letters, we have \definedummyletter, which omits the +% space. +% +\def\definedummyword #1{\def#1{\string#1\space}}% +\def\definedummyletter#1{\def#1{\string#1}}% +\let\definedummyaccent\definedummyletter + +% Called from \indexdummies and \atdummies, to effectively prevent +% the expansion of commands. +% +\def\definedummies{% + % + \let\commondummyword\definedummyword + \let\commondummyletter\definedummyletter + \let\commondummyaccent\definedummyaccent + \commondummiesnofonts + % + \definedummyletter\_% + \definedummyletter\-% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\DH + \definedummyword\L + \definedummyword\O + \definedummyword\OE + \definedummyword\TH + \definedummyword\aa + \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown + \definedummyword\l + \definedummyword\o + \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\atchar + \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\mathopsup + \definedummyword\minus + \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\rbracechar + \definedummyword\result + \definedummyword\sub + \definedummyword\sup + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + \let\value\dummyvalue + % + \normalturnoffactive +} + +% \commondummiesnofonts: common to \definedummies and \indexnofonts. +% Define \commondummyletter, \commondummyaccent and \commondummyword before +% using. Used for accents, font commands, and various control letters. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \commondummyletter\!% + \commondummyaccent\"% + \commondummyaccent\'% + \commondummyletter\*% + \commondummyaccent\,% + \commondummyletter\.% + \commondummyletter\/% + \commondummyletter\:% + \commondummyaccent\=% + \commondummyletter\?% + \commondummyaccent\^% + \commondummyaccent\`% + \commondummyaccent\~% + \commondummyword\u + \commondummyword\v + \commondummyword\H + \commondummyword\dotaccent + \commondummyword\ogonek + \commondummyword\ringaccent + \commondummyword\tieaccent + \commondummyword\ubaraccent + \commondummyword\udotaccent + \commondummyword\dotless + % + % Texinfo font commands. + \commondummyword\b + \commondummyword\i + \commondummyword\r + \commondummyword\sansserif + \commondummyword\sc + \commondummyword\slanted + \commondummyword\t + % + % Commands that take arguments. + \commondummyword\abbr + \commondummyword\acronym + \commondummyword\anchor + \commondummyword\cite + \commondummyword\code + \commondummyword\command + \commondummyword\dfn + \commondummyword\dmn + \commondummyword\email + \commondummyword\emph + \commondummyword\env + \commondummyword\file + \commondummyword\image + \commondummyword\indicateurl + \commondummyword\inforef + \commondummyword\kbd + \commondummyword\key + \commondummyword\math + \commondummyword\option + \commondummyword\pxref + \commondummyword\ref + \commondummyword\samp + \commondummyword\strong + \commondummyword\tie + \commondummyword\U + \commondummyword\uref + \commondummyword\url + \commondummyword\var + \commondummyword\verb + \commondummyword\w + \commondummyword\xref +} + +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + +\let\indexlbrace\relax +\let\indexrbrace\relax + +{\catcode`\@=0 +\catcode`\\=13 + @gdef@backslashdisappear{@def\{}} +} + +{ +\catcode`\<=13 +\catcode`\-=13 +\catcode`\`=13 + \gdef\indexnonalnumdisappear{% + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else + % @set txiindexlquoteignore makes us ignore left quotes in the sort term. + % (Introduced for FSFS 2nd ed.) + \let`=\empty + \fi + % + \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else + \backslashdisappear + \fi + % + \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else + \def-{}% + \fi + \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else + \def<{}% + \fi + \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else + \def\@{}% + \fi + } + + \gdef\indexnonalnumreappear{% + \useindexbackslash + \let-\normaldash + \let<\normalless + \def\@{@}% + } +} + + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\commondummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\commondummyletter##1{\let##1\empty}% + % All control words become @asis by default; overrides below. + \let\commondummyword\commondummyaccent + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + \uccode`\1=`\{ \uppercase{\def\{{1}}% + \uccode`\1=`\} \uppercase{\def\}{1}}% + \let\lbracechar\{% + \let\rbracechar\}% + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{TH}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{th}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. \defglyph gives the control sequence a + % definition that removes the {} that follows its use. + \defglyph\atchar{@}% + \defglyph\arrow{->}% + \defglyph\bullet{bullet}% + \defglyph\comma{,}% + \defglyph\copyright{copyright}% + \defglyph\dots{...}% + \defglyph\enddots{...}% + \defglyph\equiv{==}% + \defglyph\error{error}% + \defglyph\euro{euro}% + \defglyph\expansion{==>}% + \defglyph\geq{>=}% + \defglyph\guillemetleft{<<}% + \defglyph\guillemetright{>>}% + \defglyph\guilsinglleft{<}% + \defglyph\guilsinglright{>}% + \defglyph\leq{<=}% + \defglyph\lbracechar{\{}% + \defglyph\minus{-}% + \defglyph\point{.}% + \defglyph\pounds{pounds}% + \defglyph\print{-|}% + \defglyph\quotedblbase{"}% + \defglyph\quotedblleft{"}% + \defglyph\quotedblright{"}% + \defglyph\quoteleft{`}% + \defglyph\quoteright{'}% + \defglyph\quotesinglbase{,}% + \defglyph\rbracechar{\}}% + \defglyph\registeredsymbol{R}% + \defglyph\result{=>}% + \defglyph\textdegree{o}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist + \let\value\indexnofontsvalue +} +\def\defglyph#1#2{\def#1##1{#2}} % see above + + + + +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. +% TODO: Two-level index? Operation index? + +% Workhorse for all indexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + \requireopenindexfile{#1}% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Check if an index file has been opened, and if not, open it. +\def\requireopenindexfile#1{% +\ifnum\csname #1indfile\endcsname=0 + \expandafter\newwrite \csname#1indfile\endcsname + \edef\suffix{#1}% + % A .fls suffix would conflict with the file extension for the output + % of -recorder, so use .f1s instead. + \ifx\suffix\indexisfl\def\suffix{f1}\fi + % Open the file + \immediate\openout\csname#1indfile\endcsname \jobname.\suffix + % Using \immediate above here prevents an object entering into the current + % box, which could confound checks such as those in \safewhatsit for + % preceding skips. + \typeout{Writing index file \jobname.\suffix}% +\fi} +\def\indexisfl{fl} + +% Output \ as {\indexbackslash}, because \ is an escape character in +% the index files. +\let\indexbackslash=\relax +{\catcode`\@=0 \catcode`\\=\active + @gdef@useindexbackslash{@def\{{@indexbackslash}}} +} + +% Definition for writing index entry text. +\def\sortas#1{\ignorespaces}% + +% Definition for writing index entry sort key. Should occur at the at +% the beginning of the index entry, like +% @cindex @sortas{september} \september +% The \ignorespaces takes care of following space, but there's no way +% to remove space before it. +{ +\catcode`\-=13 +\gdef\indexwritesortas{% + \begingroup + \indexnonalnumreappear + \indexwritesortasxxx} +\gdef\indexwritesortasxxx#1{% + \xdef\indexsortkey{#1}\endgroup} +} + + +% Write the entry in \toks0 to the index file. +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \useindexbackslash % \indexbackslash isn't defined now so it will be output + % as is; and it will print as backslash. + % The braces around \indexbrace are recognized by texindex. + % + % Get the string to sort by, by processing the index entry with all + % font commands turned off. + {\indexnofonts + \def\lbracechar{{\indexlbrace}}% + \def\rbracechar{{\indexrbrace}}% + \let\{=\lbracechar + \let\}=\rbracechar + \indexnonalnumdisappear + \xdef\indexsortkey{}% + \let\sortas=\indexwritesortas + \edef\temp{\the\toks0}% + \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas + \ifx\indexsortkey\empty + \xdef\indexsortkey{\temp}% + \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi + \fi + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} +\newbox\dummybox % used above + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{\ifhmode + #1% + \else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 12 + % See comment in \requireopenindexfile. + \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi + \openin 1 \jobname.\indexname s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \typeout{No file \jobname.\indexname s.}% + \else + \catcode`\\ = 0 + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \thisline + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\ttbackslash}% + \let\indexlbrace\{ % Likewise, set these sequences for braces + \let\indexrbrace\} % used in the sort key. + \begindoublecolumns + \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty + % + % Read input from the index file line by line. + \loopdo + \ifeof1 \else + \read 1 to \nextline + \fi + % + \indexinputprocessing + \thisline + % + \ifeof1\else + \let\thisline\nextline + \repeat + %% + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} +\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} +\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} + +\def\indexinputprocessing{% + \ifeof1 + \let\firsttoken\relax + \else + \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% + \act + \fi +} +\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} +\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} + + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 +\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 +\catcode`\$=3 +\gdef\initialglyphs{% + % Some changes for non-alphabetic characters. Using the glyphs from the + % math fonts looks more consistent than the typewriter font used elsewhere + % for these characters. + \def\indexbackslash{\math{\backslash}}% + \let\\=\indexbackslash + % + % Can't get bold backslash so don't use bold forward slash + \catcode`\/=13 + \def/{{\secrmnotbold \normalslash}}% + \def-{{\normaldash\normaldash}}% en dash `--' + \def^{{\chapbf \normalcaret}}% + \def~{{\chapbf \normaltilde}}% + \def\_{% + \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% + \def|{$\vert$}% + \def<{$\less$}% + \def>{$\gtr$}% + \def+{$\normalplus$}% +}} + +\def\initial{% + \bgroup + \initialglyphs + \initialx +} + +\def\initialx#1{% + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + % The glue before the bonus allows a little bit of space at the + % bottom of a column to reduce an increase in inter-line spacing. + \nobreak + \vskip 0pt plus 5\baselineskip + \penalty -300 + \vskip 0pt plus -5\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus 1\baselineskip + \leftline{\secfonts \kern-0.05em \secbf #1}% + % \secfonts is inside the argument of \leftline so that the change of + % \baselineskip will not affect any glue inserted before the vbox that + % \leftline creates. + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip + \egroup % \initialglyphs +} + +\newdimen\entryrightmargin +\entryrightmargin=0pt + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +\def\entry{% + \begingroup + % + % For pdfTeX and XeTeX. + % The redefinition of \domark stops marks being added in \pdflink to + % preserve coloured links across page boundaries. Otherwise the marks + % would get in the way of \lastbox in \insertentrybox. + \let\domark\relax + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % No extra space above this paragraph. + \parskip = 0in + % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% An undocumented command + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\entrybreak{\unskip\space\ignorespaces}% +\def\doentry{% + % Save the text of the entry + \global\setbox\boxA=\hbox\bgroup + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. + % Not absorbing as a macro argument reduces the chance of problems + % with catcodes occurring. +} +{\catcode`\@=11 +\gdef\finishentry#1{% + \egroup % end box A + \dimen@ = \wd\boxA % Length of text of entry + \global\setbox\boxA=\hbox\bgroup\unhbox\boxA + % #1 is the page number. + % + % Get the width of the page numbers, and only use + % leaders if they are present. + \global\setbox\boxB = \hbox{#1}% + \ifdim\wd\boxB = 0pt + \null\nobreak\hfill\ % + \else + % + \null\nobreak\indexdotfill % Have leaders before the page number. + % + \ifpdf + \pdfgettoks#1.% + \hskip\skip\thinshrinkable\the\toksA + \else + \ifx\XeTeXrevision\thisisundefined + \hskip\skip\thinshrinkable #1% + \else + \pdfgettoks#1.% + \hskip\skip\thinshrinkable\the\toksA + \fi + \fi + \fi + \egroup % end \boxA + \ifdim\wd\boxB = 0pt + \global\setbox\entrybox=\vbox{\unhbox\boxA}% + \else + \global\setbox\entrybox=\vbox\bgroup + % We want the text of the entries to be aligned to the left, and the + % page numbers to be aligned to the right. + % + \parindent = 0pt + \advance\leftskip by 0pt plus 1fil + \advance\leftskip by 0pt plus -1fill + \rightskip = 0pt plus -1fil + \advance\rightskip by 0pt plus 1fill + % Cause last line, which could consist of page numbers on their own + % if the list of page numbers is long, to be aligned to the right. + \parfillskip=0pt plus -1fill + % + \advance\rightskip by \entryrightmargin + % Determine how far we can stretch into the margin. + % This allows, e.g., "Appendix H GNU Free Documentation License" to + % fit on one line in @letterpaper format. + \ifdim\entryrightmargin>2.1em + \dimen@i=2.1em + \else + \dimen@i=0em + \fi + \advance \parfillskip by 0pt minus 1\dimen@i + % + \dimen@ii = \hsize + \advance\dimen@ii by -1\leftskip + \advance\dimen@ii by -1\entryrightmargin + \advance\dimen@ii by 1\dimen@i + \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line + \ifdim\dimen@ > 0.8\dimen@ii % due to long index text + \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly + \dimen@ii = \hsize + \ifnum\dimen@>\dimen@ii + % If the entry is too long, use the whole line + \dimen@ = \dimen@ii + \fi + \advance\leftskip by 0pt plus 1fill % ragged right + \advance \dimen@ by 1\rightskip + \parshape = 2 0pt \dimen@ 0em \dimen@ii + % Ideally we'd add a finite glue at the end of the first line only, + % instead of using \parshape with explicit line lengths, but TeX + % doesn't seem to provide a way to do such a thing. + % + \leftskip = 1em + \parindent = -1em + \fi\fi + \indent % start paragraph + \unhbox\boxA + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % Word spacing - no stretch + \spaceskip=\fontdimen2\font minus \fontdimen4\font + % + \linepenalty=1000 % Discourage line breaks. + \hyphenpenalty=5000 % Discourage hyphenation. + % + \par % format the paragraph + \egroup % The \vbox + \fi + \endgroup + \dotheinsertentrybox +}} + +\newskip\thinshrinkable +\skip\thinshrinkable=.15em minus .15em + +\newbox\entrybox +\def\insertentrybox{% + \ourunvbox\entrybox +} + +% default definition +\let\dotheinsertentrybox\insertentrybox + +% Use \lastbox to take apart vbox box by box, and add each sub-box +% to the current vertical list. +\def\ourunvbox#1{% +\bgroup % for local binding of \delayedbox + % Remove the last box from box #1 + \global\setbox#1=\vbox{% + \unvbox#1% + \unskip % remove any glue + \unpenalty + \global\setbox\interbox=\lastbox + }% + \setbox\delayedbox=\box\interbox + \ifdim\ht#1=0pt\else + \ourunvbox#1 % Repeat on what's left of the box + \nobreak + \fi + \box\delayedbox +\egroup +} +\newbox\delayedbox +\newbox\interbox + +% Used from \printindex. \firsttoken should be the first token +% after the \entry. If it's not another \entry, we are at the last +% line of a group of index entries, so insert a penalty to discourage +% widowed index entries. +\def\dotheinsertentryboxwithpenalty{% + \ifx\firsttoken\isentry + \else + \penalty 9000 + \fi + \insertentrybox +} +\def\isentry{\entry}% + +% Like plain.tex's \dotfill, except uses up at least 1 em. +% The filll stretch here overpowers both the fil and fill stretch to push +% the page number to the right. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} + + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + \ifx\XeTeXrevision\thisisundefined + #2 + \else + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \fi + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 % private names + +\newbox\partialpage +\newdimen\doublecolumnhsize + +% Use inside an output routine to save \topmark and \firstmark +\def\savemarks{% + \global\savedtopmark=\expandafter{\topmark }% + \global\savedfirstmark=\expandafter{\firstmark }% +} +\newtoks\savedtopmark +\newtoks\savedfirstmark + +% Set \topmark and \firstmark for next time \output runs. +% Can't be run from withinside \output (because any material +% added while an output routine is active, including +% penalties, is saved for after it finishes). The page so far +% should be empty, otherwise what's on it will be thrown away. +\def\restoremarks{% + \mark{\the\savedtopmark}% + \bgroup\output = {% + \setbox\dummybox=\box\PAGE + }abc\eject\egroup + % "abc" because output routine doesn't fire for a completely empty page. + \mark{\the\savedfirstmark}% +} + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % If not much space left on page, start a new page. + \ifdim\pagetotal>0.8\vsize\vfill\eject\fi + % + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + \savemarks + }% + \eject % run that output routine to set \partialpage + \restoremarks + % + % We recover the two marks that the last output routine saved in order + % to propagate the information in marks added around a chapter heading, + % which could be otherwise be lost by the time the final page is output. + % + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. + \advance\vsize by -\ht\partialpage + \vsize = 2\vsize + % + % For the benefit of balancing columns + \advance\baselineskip by 0pt plus 0.5pt +} + +% The double-column output routine for all double-column pages except +% the last, which is done by \balancecolumns. +% +\def\doublecolumnout{% + % + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@ + \global\advance\vsize by 2\ht\partialpage + \onepageout\pagesofar + \unvbox\PAGE + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\txipagewidth{\box0\hfil\box2}% +} + + +% Finished with with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \txipageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. + \savemarks + \balancecolumns + % + % Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + \restoremarks + % Leave the double-column material on the current page, no automatic + % page break. + \box\balancedcolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize. + \global\vsize = \txipageheight % + \pagegoal = \txipageheight % +} +\newbox\balancedcolumns +\setbox\balancedcolumns=\vbox{shouldnt see this}% +% +% Only called for the last of the double column material. \doublecolumnout +% does the others. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \ifdim\dimen@<5\baselineskip + % Don't split a short final column in two. + \setbox2=\vbox{}% + \else + \divide\dimen@ by 2 % target to split to + \dimen@ii = \dimen@ + \splittopskip = \topskip + % Loop until left column is at least as high as the right column. + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht1<\ht3 + \global\advance\dimen@ by 1pt + \repeat + }% + % Now the left column is in box 1, and the right column in box 3. + % Check whether the left column has come out higher than the page itself. + % (Note that we have doubled \vsize for the double columns, so + % the actual height of the page is 0.5\vsize). + \ifdim2\ht1>\vsize + % Just split the last of the double column material roughly in half. + \setbox2=\box0 + \setbox0 = \vsplit2 to \dimen@ii + \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}% + \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}% + \else + % Compare the heights of the two columns. + \ifdim4\ht1>5\ht3 + % Column heights are too different, so don't make their bottoms + % flush with each other. + \setbox2=\vbox to \ht1 {\unvbox3\vfill}% + \setbox0=\vbox to \ht1 {\unvbox1\vfill}% + \else + % Make column bottoms flush with each other. + \setbox2=\vbox to\ht1{\unvbox3\unskip}% + \setbox0=\vbox to\ht1{\unvbox1\unskip}% + \fi + \fi + \fi + % + \global\setbox\balancedcolumns=\vbox{\pagesofar}% +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rm #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + % This outputs a mark at the end of the page that clears \thischapter + % and \thissection, as is done in \startcontents. + \let\pchapsepmacro\relax + \chapmacro{}{Yomitfromtoc}{}% + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unnlevel + \def\headtype{U}% + \else + \chardef\unnlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +% +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +% Parameter controlling skip before chapter headings (if needed) +\newskip\chapheadingskip + +% Define plain chapter starts, and page on/off switching for it. +\def\chapbreak{\dobreak \chapheadingskip {-4000}} + +% Start a new page +\def\chappager{\par\vfill\supereject} + +% \chapoddpage - start on an odd page for a new chapter +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \headingsoff + \null + \chappager + \endgroup + \fi +} + +\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% \chapmacro - Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} +% +\def\chapmacro#1#2#3{% + \expandafter\ifx\thisenv\titlepage\else + \checkenv{}% chapters, etc., should not start inside an environment. + \fi + % FIXME: \chapmacro is currently called from inside \titlepage when + % \setcontentsaftertitlepage to print the "Table of Contents" heading, but + % this should probably be done by \sectionheading with an option to print + % in chapter size. + % + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rm + \let\footnote=\errfootnoteheading % give better error message + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #4 is the section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi + \let\footnote=\errfootnoteheading + % + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rm + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \global\let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. + \vskip-\parskip + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf + \global\pdfmakepagedesttrue + \else + \ifx\XeTeXrevision\thisisundefined + \else + \global\pdfmakepagedesttrue + \fi + \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \entryrightmargin=\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\partentry = \shortpartentry + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} + +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + % Move the page numbers slightly to the right + \advance\entryrightmargin by -0.05em + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @tex ... @end tex escapes into raw TeX temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain @ character. + +\envdef\tex{% + \setupmarkupstyle{tex}% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \catcode `\`=\other + \catcode `\'=\other + % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % + % Inverse of the list at the beginning of the file. + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\sp=\ptexsp + \let\*=\ptexstar + %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode + \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % we've made it outer + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + \ifnum\lastpenalty<10000 + % Penalize breaking before the environment, because preceding text + % often leads into it. + \penalty100 + \fi + \vskip\envskipamount + \fi + \fi +}} + +\def\afterenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % + \setbox\groupbox=\vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \addgroupbox + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\newdimen\nonfillparindent +\def\nonfillstart{% + \aboveenvbreak + \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent + \parindent = 0pt + \let\indent\nonfillindent + % + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% +} +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvdef{lisp}{example}{% + \nonfillstart + \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenvdef{display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenvdef{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill\relax + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. +\envdef\raggedright{% + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\makedispenvdef{quotation}{\quotationstart} +% +\def\quotationstart{% + \indentedblockstart % same as \indentedblock, but increase right margin too. + \ifx\nonarrowing\relax + \advance\rightskip by \lispnarrowing + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\thisisundefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallquotation{\Equotation} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + + +% LaTeX-like @verbatim...@end verbatim and @verb{...} +% If we want to allow any as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion. +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox + }% + } +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% + \tabexpand + \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and + % make each space count. + % Must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil\relax + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remaining is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \doingtypefnfalse % distinguish typed functions from all else + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +% Types: + +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + \par + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \rmfont + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\thisisundefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +% alias because \c means cedilla in @tex or @math +\let\texinfoc=\c + +\newcount\savedcatcodeone +\newcount\savedcatcodetwo + +% Used at the time of macro expansion. +% Argument is macro body with arguments substituted +\def\scanmacro#1{% + \newlinechar`\^^M + \def\xeatspaces{\eatspaces}% + % + % Temporarily undo catcode changes of \printindex. Set catcode of @ to + % 0 so that @-commands in macro expansions aren't printed literally when + % formatting an index file, where \ is used as the escape character. + \savedcatcodeone=\catcode`\@ + \savedcatcodetwo=\catcode`\\ + \catcode`\@=0 + \catcode`\\=\active + % + % Process the macro body under the current catcode regime. + \scantokens{#1@texinfoc}% + % + \catcode`\@=\savedcatcodeone + \catcode`\\=\savedcatcodetwo + % + % The \texinfoc is to remove the \newlinechar added by \scantokens, and + % can be noticed by \parsearg. + % We avoid surrounding the call to \scantokens with \bgroup and \egroup + % to allow macros to open or close groups themselves. +} + +% Used for copying and captions +\def\scanexp#1{% + \expandafter\scanmacro\expandafter{#1}% +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \commondummyword\macro1\commondummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\commondummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. +% +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. +% +\def\scanctxt{% used as subroutine + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \passthroughcharstrue +} + +\def\scanargctxt{% used for copying and captions, not macros. + \scanctxt + \catcode`\@=\other + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% used for @macro definitions + \scanctxt + \catcode`\ =\other + \catcode`\@=\other + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +% Used when scanning braced macro arguments. Note, however, that catcode +% changes here are ineffectual if the macro invocation was nested inside +% an argument to another Texinfo command. +\def\macroargctxt{% + \scanctxt + \catcode`\ =\active + \catcode`\^^M=\other + \catcode`\\=\active +} + +\def\macrolineargctxt{% used for whole-line arguments without braces + \scanctxt + \catcode`\{=\other + \catcode`\}=\other +} + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. +% +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\margbackslash#1{\char`\#1 } + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0\relax + \else + \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\commondummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\commondummyword \noexpand#1% + \fi +} + +% \getargs -- Parse the arguments to a @macro line. Set \macname to +% the name of the macro, and \argl to the braced argument list. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname#1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} +% This made use of the feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. + +% Parse the optional {params} list to @macro or @rmacro. +% Set \paramno to the number of arguments, +% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a +% three-param macro.) Define \macarg.BLAH for each BLAH in the params +% list to some hook where the argument is to be expanded. If there are +% less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% +% That gets used by \mbodybackslash (above). +% +% If there are 10 or more arguments, a different technique is used: see +% \parsemmanyargdef. +% +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + % \hash is redefined to `#' later to get it into definitions + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1 + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +% \parsemacbody, \parsermacbody +% +% Read recursive and nonrecursive macro bodies. (They're different since +% rec and nonrec macros end differently.) +% +% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro +% body to be transformed. +% Set \macrobody to the body of the macro, and call \defmacro. +% +{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% +{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% +\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% + +% Make @ a letter, so that we can make private-to-Texinfo macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + +%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% + +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime under which the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, no macro can have more than 256 arguments (else error). +% +% In case that there are 10 or more arguments we parse again the arguments +% list to set new definitions for the \macarg.BLAH macros corresponding to +% each BLAH argument. It was anyhow needed to parse already once this list +% in order to count the arguments, and as macros with at most 9 arguments +% are by far more frequent than macro with 10 or more arguments, defining +% twice the \macarg.BLAH macros does not cost too much processing power. +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments' values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa. +% +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +% Define the named-macro outside of this group and then close this group. +% +\def\macargexpandinbody@{% + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Trailing missing arguments are set to empty. +% +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + + +%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% + + +% This defines a Texinfo @macro or @rmacro, called by \parsemacbody. +% \macrobody has the body of the macro in it, with placeholders for +% its parameters, looking like "\xeatspaces{\hash 1}". +% \paramno is the number of parameters +% \paramlist is a TeX parameter text, e.g. "#1,#2,#3," +% There are four cases: macros of zero, one, up to nine, and many arguments. +% \xdef is used so that macro definitions will survive the file +% they're defined in: @include reads the file inside a group. +% +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifnum\paramno=1 + \def\xeatspaces##1{##1}% + % This removes the pair of braces around the argument. We don't + % use \eatspaces, because this can cause ends of lines to be lost + % when the argument to \eatspaces is read, leading to line-based + % commands like "@itemize" not being read correctly. + \else + \let\xeatspaces\relax % suppress expansion + \fi + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\spaceisspace + \noexpand\endlineisspace + \noexpand\expandafter % skip any whitespace after the macro name. + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname{% + \egroup + \noexpand\scanmacro{\macrobody}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname @@@\endcsname}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \egroup + \noexpand\scanmacro{\macrobody}% + }% + \else % at most 9 + \ifnum\paramno<10\relax + % @MACNAME sets the context for reading the macro argument + % @MACNAME@@ gets the argument, processes backslashes and appends a + % comma. + % @MACNAME@@@ removes braces surrounding the argument list. + % @MACNAME@@@@ scans the macro body with arguments substituted. + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup + \noexpand\expandafter % This \expandafter skip any spaces after the + \noexpand\macroargctxt % macro before we change the catcode of space. + \noexpand\expandafter + \expandafter\noexpand\csname\the\macname @@\endcsname}% + \expandafter\xdef\csname\the\macname @@\endcsname##1{% + \noexpand\passargtomacro + \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% + \expandafter\xdef\csname\the\macname @@@\endcsname##1{% + \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname @@@@\endcsname\paramlist{% + \egroup\noexpand\scanmacro{\macrobody}}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi + \fi} + +\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape +@catcode`@_=11 % private names +@catcode`@!=11 % used as argument separator + +% \passargtomacro#1#2 - +% Call #1 with a list of tokens #2, with any doubled backslashes in #2 +% compressed to one. +% +% This implementation works by expansion, and not execution (so we cannot use +% \def or similar). This reduces the risk of this failing in contexts where +% complete expansion is done with no execution (for example, in writing out to +% an auxiliary file for an index entry). +% +% State is kept in the input stream: the argument passed to +% @look_ahead, @gobble_and_check_finish and @add_segment is +% +% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) +% +% where: +% THE_MACRO - name of the macro we want to call +% ARG_RESULT - argument list we build to pass to that macro +% PENDING_BS - either a backslash or nothing +% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next + +@gdef@passargtomacro#1#2{% + @add_segment #1!{}@relax#2\@_finish\% +} +@gdef@_finish{@_finishx} @global@let@_finishx@relax + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 used to look ahead +% +% If the next token is not a backslash, process the rest of the argument; +% otherwise, remove the next token. +@gdef@look_ahead#1!#2#3#4{% + @ifx#4\% + @expandafter@gobble_and_check_finish + @else + @expandafter@add_segment + @fi#1!{#2}#4#4% +} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 should be a backslash, which is gobbled. +% #5 looks ahead +% +% Double backslash found. Add a single backslash, and look ahead. +@gdef@gobble_and_check_finish#1!#2#3#4#5{% + @add_segment#1\!{}#5#5% +} + +@gdef@is_fi{@fi} + +% #1 - THE_MACRO ARG_RESULT +% #2 - PENDING_BS +% #3 - NEXT_TOKEN +% #4 is input stream until next backslash +% +% Input stream is either at the start of the argument, or just after a +% backslash sequence, either a lone backslash, or a doubled backslash. +% NEXT_TOKEN contains the first token in the input stream: if it is \finish, +% finish; otherwise, append to ARG_RESULT the segment of the argument up until +% the next backslash. PENDING_BACKSLASH contains a backslash to represent +% a backslash just before the start of the input stream that has not been +% added to ARG_RESULT. +@gdef@add_segment#1!#2#3#4\{% +@ifx#3@_finish + @call_the_macro#1!% +@else + % append the pending backslash to the result, followed by the next segment + @expandafter@is_fi@look_ahead#1#2#4!{\}@fi + % this @fi is discarded by @look_ahead. + % we can't get rid of it with \expandafter because we don't know how + % long #4 is. +} + +% #1 - THE_MACRO +% #2 - ARG_RESULT +% #3 discards the res of the conditional in @add_segment, and @is_fi ends the +% conditional. +@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} + +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% \braceorline MAC is used for a one-argument macro MAC. It checks +% whether the next non-whitespace character is a {. It sets the context +% for reading the argument (slightly different in the two cases). Then, +% to read the argument, in the whole-line case, it then calls the regular +% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. +% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup + \macroargctxt + \expandafter\passargtomacro + \else + \macrolineargctxt\expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Make them active and then expand them all to nothing. +% +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \requireauxfile + \atdummies % preserve commands, but don't expand them + % match definition in \xrdef, \refx, \xrefX. + \def\value##1{##1}% + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout + }% + \fi +} + +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref{\putwordsee{} \xrefXX} +\def\xref{\putwordSee{} \xrefXX} +\def\ref{\xrefXX} + +\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} +\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + % + % Get args without leading/trailing spaces. + \def\printedrefname{\ignorespaces #3}% + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We (should) know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + % For pdfTeX and LuaTeX + {\indexnofonts + \makevalueexpandable + \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \setpdfdestname{#1}% + % + \ifx\pdfdestname\empty + \def\pdfdestname{Top}% no empty targets + \fi + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfdestname}% + \else + goto name{\pdfmkpgn{\pdfdestname}}% + \fi + }% + \setcolor{\linkcolor}% + \else + \ifx\XeTeXrevision\thisisundefined + \else + % For XeTeX + {\indexnofonts + \makevalueexpandable + \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \setpdfdestname{#1}% + % + \ifx\pdfdestname\empty + \def\pdfdestname{Top}% no empty targets + \fi + % + \leavevmode + \ifnum\filenamelength>0 + % With default settings, + % XeTeX (xdvipdfmx) replaces link destination names with integers. + % In this case, the replaced destination names of + % remote PDFs are no longer known. In order to avoid a replacement, + % you can use xdvipdfmx's command line option `-C 0x0010'. + % If you use XeTeX 0.99996+ (TeX Live 2016+), + % this command line option is no longer necessary + % because we can use the `dvipdfmx:config' special. + \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A + << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}% + \else + \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A + << /S /GoTo /D (\pdfdestname) >> >>}% + \fi + }% + \setcolor{\linkcolor}% + \fi + \fi + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \def\value##1{##1}% + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". \iffloat distinguishes them by + % \Xthisreftitle being set to a magic string. + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd\printedrefnamebox = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % If the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd\printedmanualbox > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% + % + \else + % Reference within this manual. + % + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via the macro below so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + % Add a , if xref followed by a space + \if\space\noexpand\tokenafterxref ,% + \else\ifx\ \tokenafterxref ,% @TAB + \else\ifx\*\tokenafterxref ,% @* + \else\ifx\ \tokenafterxref ,% @SPACE + \else\ifx\ + \tokenafterxref ,% @NL + \else\ifx\tie\tokenafterxref ,% @tie + \fi\fi\fi\fi\fi\fi + \fi\fi + \fi + \endlink +\endgroup} + +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX +% is output afterwards if non-empty. +\def\refx#1#2{% + \requireauxfile + {% + \indexnofonts + \otherbackslash + \def\value##1{##1}% + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Define a control +% sequence for a cross-reference target (we prepend XR to the control sequence +% name to avoid collisions). The value is the page number. If this is a float +% type, we have more work to do. +% +\def\xrdef#1#2{% + {% Expand the node or anchor name to remove control sequences. + % \turnoffactive stops 8-bit characters being changed to commands + % like @'e. \refx does the same to retrieve the value in the definition. + \indexnofonts + \turnoffactive + \def\value##1{##1}% + \xdef\safexrefname{#1}% + }% + % + \bgroup + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% + \egroup + % We put the \gdef inside a group to avoid the definitions building up on + % TeX's save stack, which can cause it to run out of space for aux files with + % thousands of lines. \gdef doesn't use the save stack, but \csname does + % when it defines an unknown control sequence as \relax. + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate at the beginning of the file. +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% Used when writing to the aux file, or when using data from it. +\def\requireauxfile{% + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi + \global\let\requireauxfile=\relax % Only do this once. +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for Info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnotenest + % + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\txipagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + % + % Invoke rest of plain TeX footnote routine. + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +\def\errfootnotenest{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + +\def\errfootnoteheading{% + \errhelp=\EMsimple + \errmessage{Footnotes in chapters, sections, etc., are not supported} +} + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. +% +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\thisisundefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode + \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \fi + % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi + % + % Output the image. + \ifpdf + % For pdfTeX and LuaTeX <= 0.80 + \dopdfimage{#1}{#2}{#3}% + \else + \ifx\XeTeXrevision\thisisundefined + % For epsf.tex + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \else + % For XeTeX + \doxeteximage{#1}{#2}{#3}% + \fi + \fi + % + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \requireauxfile + \atdummies + % + \ifx\thisshortcaption\empty + \def\gtemp{\thiscaption}% + \else + \def\gtemp{\thisshortcaption}% + \fi + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{% + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \let_ = \normalunderscore % normal _ character for filename test + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore #1_\finish + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 + \endgroup % end raw TeX +} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 +} +}% end of special _ catcode +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} + +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% XeTeX and LuaTeX can handle Unicode natively. +% Their default I/O uses UTF-8 sequences instead of a byte-wise operation. +% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise. +% +\newif\iftxinativeunicodecapable +\newif\iftxiusebytewiseio + +\ifx\XeTeXrevision\thisisundefined + \ifx\luatexversion\thisisundefined + \txinativeunicodecapablefalse + \txiusebytewiseiotrue + \else + \txinativeunicodecapabletrue + \txiusebytewiseiofalse + \fi +\else + \txinativeunicodecapabletrue + \txiusebytewiseiofalse +\fi + +% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex +% for non-UTF-8 (byte-wise) encodings. +% +\def\setbytewiseio{% + \ifx\XeTeXrevision\thisisundefined + \else + \XeTeXdefaultencoding "bytes" % For subsequent files to be read + \XeTeXinputencoding "bytes" % For document root file + % Unfortunately, there seems to be no corresponding XeTeX command for + % output encoding. This is a problem for auxiliary index and TOC files. + % The only solution would be perhaps to write out @U{...} sequences in + % place of non-ASCII characters. + \fi + + \ifx\luatexversion\thisisundefined + \else + \directlua{ + local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub + local function convert_char (char) + return utf8_char(byte(char)) + end + + local function convert_line (line) + return gsub(line, ".", convert_char) + end + + callback.register("process_input_buffer", convert_line) + + local function convert_line_out (line) + local line_out = "" + for c in string.utfvalues(line) do + line_out = line_out .. string.char(c) + end + return line_out + end + + callback.register("process_output_buffer", convert_line_out) + } + \fi + + \txiusebytewiseiotrue +} + + +% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} +\def\documentencodingzzz#1{% + % + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \iftxinativeunicodecapable + \setbytewiseio + \fi + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \iftxinativeunicodecapable + \setbytewiseio + \fi + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \iftxinativeunicodecapable + \setbytewiseio + \fi + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \iftxinativeunicodecapable + % For native Unicode handling (XeTeX and LuaTeX) + \nativeunicodechardefs + \else + % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX) + \setnonasciicharscatcode\active + % since we already invoked \utfeightchardefs at the top level + % (below), do not re-invoke it, otherwise our check for duplicated + % definitions gets triggered. Making non-ascii chars active is + % sufficient. + \fi + % + \else + \message{Ignoring unknown document encoding: #1.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii + % + \ifx\XeTeXrevision\thisisundefined + \else + \ifx \declaredencoding \utfeight + \else + \ifx \declaredencoding \ascii + \else + \message{Warning: XeTeX with non-UTF-8 encodings cannot handle % + non-ASCII characters in auxiliary files.}% + \fi + \fi + \fi +} + +% emacs-page +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing, sorry: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% + +\def\gdefchar#1#2{% +\gdef#1{% + \ifpassthroughchars + \string#1% + \else + #2% + \fi +}} + +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdefchar^^a0{\tie} + \gdefchar^^a1{\exclamdown} + \gdefchar^^a2{{\tcfont \char162}} % cent + \gdefchar^^a3{\pounds{}} + \gdefchar^^a4{{\tcfont \char164}} % currency + \gdefchar^^a5{{\tcfont \char165}} % yen + \gdefchar^^a6{{\tcfont \char166}} % broken bar + \gdefchar^^a7{\S} + \gdefchar^^a8{\"{}} + \gdefchar^^a9{\copyright{}} + \gdefchar^^aa{\ordf} + \gdefchar^^ab{\guillemetleft{}} + \gdefchar^^ac{\ensuremath\lnot} + \gdefchar^^ad{\-} + \gdefchar^^ae{\registeredsymbol{}} + \gdefchar^^af{\={}} + % + \gdefchar^^b0{\textdegree} + \gdefchar^^b1{$\pm$} + \gdefchar^^b2{$^2$} + \gdefchar^^b3{$^3$} + \gdefchar^^b4{\'{}} + \gdefchar^^b5{$\mu$} + \gdefchar^^b6{\P} + \gdefchar^^b7{\ensuremath\cdot} + \gdefchar^^b8{\cedilla\ } + \gdefchar^^b9{$^1$} + \gdefchar^^ba{\ordm} + \gdefchar^^bb{\guillemetright{}} + \gdefchar^^bc{$1\over4$} + \gdefchar^^bd{$1\over2$} + \gdefchar^^be{$3\over4$} + \gdefchar^^bf{\questiondown} + % + \gdefchar^^c0{\`A} + \gdefchar^^c1{\'A} + \gdefchar^^c2{\^A} + \gdefchar^^c3{\~A} + \gdefchar^^c4{\"A} + \gdefchar^^c5{\ringaccent A} + \gdefchar^^c6{\AE} + \gdefchar^^c7{\cedilla C} + \gdefchar^^c8{\`E} + \gdefchar^^c9{\'E} + \gdefchar^^ca{\^E} + \gdefchar^^cb{\"E} + \gdefchar^^cc{\`I} + \gdefchar^^cd{\'I} + \gdefchar^^ce{\^I} + \gdefchar^^cf{\"I} + % + \gdefchar^^d0{\DH} + \gdefchar^^d1{\~N} + \gdefchar^^d2{\`O} + \gdefchar^^d3{\'O} + \gdefchar^^d4{\^O} + \gdefchar^^d5{\~O} + \gdefchar^^d6{\"O} + \gdefchar^^d7{$\times$} + \gdefchar^^d8{\O} + \gdefchar^^d9{\`U} + \gdefchar^^da{\'U} + \gdefchar^^db{\^U} + \gdefchar^^dc{\"U} + \gdefchar^^dd{\'Y} + \gdefchar^^de{\TH} + \gdefchar^^df{\ss} + % + \gdefchar^^e0{\`a} + \gdefchar^^e1{\'a} + \gdefchar^^e2{\^a} + \gdefchar^^e3{\~a} + \gdefchar^^e4{\"a} + \gdefchar^^e5{\ringaccent a} + \gdefchar^^e6{\ae} + \gdefchar^^e7{\cedilla c} + \gdefchar^^e8{\`e} + \gdefchar^^e9{\'e} + \gdefchar^^ea{\^e} + \gdefchar^^eb{\"e} + \gdefchar^^ec{\`{\dotless i}} + \gdefchar^^ed{\'{\dotless i}} + \gdefchar^^ee{\^{\dotless i}} + \gdefchar^^ef{\"{\dotless i}} + % + \gdefchar^^f0{\dh} + \gdefchar^^f1{\~n} + \gdefchar^^f2{\`o} + \gdefchar^^f3{\'o} + \gdefchar^^f4{\^o} + \gdefchar^^f5{\~o} + \gdefchar^^f6{\"o} + \gdefchar^^f7{$\div$} + \gdefchar^^f8{\o} + \gdefchar^^f9{\`u} + \gdefchar^^fa{\'u} + \gdefchar^^fb{\^u} + \gdefchar^^fc{\"u} + \gdefchar^^fd{\'y} + \gdefchar^^fe{\th} + \gdefchar^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdefchar^^a4{\euro{}} + \gdefchar^^a6{\v S} + \gdefchar^^a8{\v s} + \gdefchar^^b4{\v Z} + \gdefchar^^b8{\v z} + \gdefchar^^bc{\OE} + \gdefchar^^bd{\oe} + \gdefchar^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdefchar^^a0{\tie} + \gdefchar^^a1{\ogonek{A}} + \gdefchar^^a2{\u{}} + \gdefchar^^a3{\L} + \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdefchar^^a5{\v L} + \gdefchar^^a6{\'S} + \gdefchar^^a7{\S} + \gdefchar^^a8{\"{}} + \gdefchar^^a9{\v S} + \gdefchar^^aa{\cedilla S} + \gdefchar^^ab{\v T} + \gdefchar^^ac{\'Z} + \gdefchar^^ad{\-} + \gdefchar^^ae{\v Z} + \gdefchar^^af{\dotaccent Z} + % + \gdefchar^^b0{\textdegree{}} + \gdefchar^^b1{\ogonek{a}} + \gdefchar^^b2{\ogonek{ }} + \gdefchar^^b3{\l} + \gdefchar^^b4{\'{}} + \gdefchar^^b5{\v l} + \gdefchar^^b6{\'s} + \gdefchar^^b7{\v{}} + \gdefchar^^b8{\cedilla\ } + \gdefchar^^b9{\v s} + \gdefchar^^ba{\cedilla s} + \gdefchar^^bb{\v t} + \gdefchar^^bc{\'z} + \gdefchar^^bd{\H{}} + \gdefchar^^be{\v z} + \gdefchar^^bf{\dotaccent z} + % + \gdefchar^^c0{\'R} + \gdefchar^^c1{\'A} + \gdefchar^^c2{\^A} + \gdefchar^^c3{\u A} + \gdefchar^^c4{\"A} + \gdefchar^^c5{\'L} + \gdefchar^^c6{\'C} + \gdefchar^^c7{\cedilla C} + \gdefchar^^c8{\v C} + \gdefchar^^c9{\'E} + \gdefchar^^ca{\ogonek{E}} + \gdefchar^^cb{\"E} + \gdefchar^^cc{\v E} + \gdefchar^^cd{\'I} + \gdefchar^^ce{\^I} + \gdefchar^^cf{\v D} + % + \gdefchar^^d0{\DH} + \gdefchar^^d1{\'N} + \gdefchar^^d2{\v N} + \gdefchar^^d3{\'O} + \gdefchar^^d4{\^O} + \gdefchar^^d5{\H O} + \gdefchar^^d6{\"O} + \gdefchar^^d7{$\times$} + \gdefchar^^d8{\v R} + \gdefchar^^d9{\ringaccent U} + \gdefchar^^da{\'U} + \gdefchar^^db{\H U} + \gdefchar^^dc{\"U} + \gdefchar^^dd{\'Y} + \gdefchar^^de{\cedilla T} + \gdefchar^^df{\ss} + % + \gdefchar^^e0{\'r} + \gdefchar^^e1{\'a} + \gdefchar^^e2{\^a} + \gdefchar^^e3{\u a} + \gdefchar^^e4{\"a} + \gdefchar^^e5{\'l} + \gdefchar^^e6{\'c} + \gdefchar^^e7{\cedilla c} + \gdefchar^^e8{\v c} + \gdefchar^^e9{\'e} + \gdefchar^^ea{\ogonek{e}} + \gdefchar^^eb{\"e} + \gdefchar^^ec{\v e} + \gdefchar^^ed{\'{\dotless{i}}} + \gdefchar^^ee{\^{\dotless{i}}} + \gdefchar^^ef{\v d} + % + \gdefchar^^f0{\dh} + \gdefchar^^f1{\'n} + \gdefchar^^f2{\v n} + \gdefchar^^f3{\'o} + \gdefchar^^f4{\^o} + \gdefchar^^f5{\H o} + \gdefchar^^f6{\"o} + \gdefchar^^f7{$\div$} + \gdefchar^^f8{\v r} + \gdefchar^^f9{\ringaccent u} + \gdefchar^^fa{\'u} + \gdefchar^^fb{\H u} + \gdefchar^^fc{\"u} + \gdefchar^^fd{\'y} + \gdefchar^^fe{\cedilla t} + \gdefchar^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +% Give non-ASCII bytes the active definitions for processing UTF-8 sequences +\begingroup + \catcode`\~13 + \catcode`\$12 + \catcode`\"12 + + % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp + % substituting ~ and $ with a character token of that value. + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uccode`\$\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + % For bytes other than the first in a UTF-8 sequence. Not expected to + % be expanded except when writing to auxiliary files. + \countUTFx = "80 + \countUTFy = "C2 + \def\UTFviiiTmp{% + \gdef~{% + \ifpassthroughchars $\fi}}% + \UTFviiiLoop + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \gdef~{% + \ifpassthroughchars $% + \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}% + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \gdef~{% + \ifpassthroughchars $% + \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}% + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \gdef~{% + \ifpassthroughchars $% + \else\expandafter\UTFviiiFourOctets\expandafter$\fi + }}% + \UTFviiiLoop +\endgroup + +\def\globallet{\global\let} % save some \expandafter's below + +% @U{xxxx} to produce U+xxxx, if we support it. +\def\U#1{% + \expandafter\ifx\csname uni:#1\endcsname \relax + \iftxinativeunicodecapable + % All Unicode characters can be used if native Unicode handling is + % active. However, if the font does not have the glyph, + % letters are missing. + \begingroup + \uccode`\.="#1\relax + \uppercase{.} + \endgroup + \else + \errhelp = \EMsimple + \errmessage{Unicode character U+#1 not supported, sorry}% + \fi + \else + \csname uni:#1\endcsname + \fi +} + +% These macros are used here to construct the name of a control +% sequence to be defined. +\def\UTFviiiTwoOctetsName#1#2{% + \csname u8:#1\string #2\endcsname}% +\def\UTFviiiThreeOctetsName#1#2#3{% + \csname u8:#1\string #2\string #3\endcsname}% +\def\UTFviiiFourOctetsName#1#2#3#4{% + \csname u8:#1\string #2\string #3\string #4\endcsname}% + +% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX), +% provide a definition macro to replace a Unicode character; +% this gets used by the @U command +% +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + \gdef\DeclareUnicodeCharacterUTFviii#1#2{% + \countUTFz = "#1\relax + \begingroup + \parseXMLCharref + + % Give \u8:... its definition. The sequence of seven \expandafter's + % expands after the \gdef three times, e.g. + % + % 1. \UTFviiTwoOctetsName B1 B2 + % 2. \csname u8:B1 \string B2 \endcsname + % 3. \u8: B1 B2 (a single control sequence token) + % + \expandafter\expandafter + \expandafter\expandafter + \expandafter\expandafter + \expandafter\gdef \UTFviiiTmp{#2}% + % + \expandafter\ifx\csname uni:#1\endcsname \relax \else + \message{Internal error, already defined: #1}% + \fi + % + % define an additional control sequence for this code point. + \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp + \endgroup} + % + % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp + % to the corresponding UTF-8 sequence. + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctetsName.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}% + \fi\fi\fi + } + + % Extract a byte from the end of the UTF-8 representation of \countUTFx. + % It must be a non-initial byte in the sequence. + % Change \uccode of #1 for it to be used in \parseUTFviiiB as one + % of the bytes. + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz % Save to be the future value of \countUTFz. + \multiply\countUTFz by 64 + + % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract + % in order to get the last five bits. + \advance\countUTFx by -\countUTFz + + % Convert this to the byte in the UTF-8 sequence. + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + % Used to put a UTF-8 byte sequence into \UTFviiiTmp + % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8 + % sequence. + % #2 is one of the \UTFviii*OctetsName macros. + % #3 is always a full stop (.) + % #4 is a template for the other bytes in the sequence. The values for these + % bytes is substituted in here with \uppercase using the \uccode's. + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +% For native Unicode handling (XeTeX and LuaTeX), +% provide a definition macro that sets a catcode to `other' non-globally +% +\def\DeclareUnicodeCharacterNativeOther#1#2{% + \catcode"#1=\other +} + +% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M +% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) +% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) +% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A +% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B +% +% Many of our renditions are less than wonderful, and all the missing +% characters are available somewhere. Loading the necessary fonts +% awaits user request. We can't truly support Unicode without +% reimplementing everything that's been done in LaTeX for many years, +% plus probably using luatex or xetex, and who knows what else. +% We won't be doing that here in this simple file. But we can try to at +% least make most of the characters not bomb out. +% +\def\unicodechardefs{% + \DeclareUnicodeCharacter{00A0}{\tie}% + \DeclareUnicodeCharacter{00A1}{\exclamdown}% + \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent + \DeclareUnicodeCharacter{00A3}{\pounds{}}% + \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency + \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen + \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar + \DeclareUnicodeCharacter{00A7}{\S}% + \DeclareUnicodeCharacter{00A8}{\"{ }}% + \DeclareUnicodeCharacter{00A9}{\copyright{}}% + \DeclareUnicodeCharacter{00AA}{\ordf}% + \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}% + \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}% + \DeclareUnicodeCharacter{00AD}{\-}% + \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}% + \DeclareUnicodeCharacter{00AF}{\={ }}% + % + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}% + \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}% + \DeclareUnicodeCharacter{00B2}{$^2$}% + \DeclareUnicodeCharacter{00B3}{$^3$}% + \DeclareUnicodeCharacter{00B4}{\'{ }}% + \DeclareUnicodeCharacter{00B5}{$\mu$}% + \DeclareUnicodeCharacter{00B6}{\P}% + \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}% + \DeclareUnicodeCharacter{00B8}{\cedilla{ }}% + \DeclareUnicodeCharacter{00B9}{$^1$}% + \DeclareUnicodeCharacter{00BA}{\ordm}% + \DeclareUnicodeCharacter{00BB}{\guillemetright{}}% + \DeclareUnicodeCharacter{00BC}{$1\over4$}% + \DeclareUnicodeCharacter{00BD}{$1\over2$}% + \DeclareUnicodeCharacter{00BE}{$3\over4$}% + \DeclareUnicodeCharacter{00BF}{\questiondown}% + % + \DeclareUnicodeCharacter{00C0}{\`A}% + \DeclareUnicodeCharacter{00C1}{\'A}% + \DeclareUnicodeCharacter{00C2}{\^A}% + \DeclareUnicodeCharacter{00C3}{\~A}% + \DeclareUnicodeCharacter{00C4}{\"A}% + \DeclareUnicodeCharacter{00C5}{\AA}% + \DeclareUnicodeCharacter{00C6}{\AE}% + \DeclareUnicodeCharacter{00C7}{\cedilla{C}}% + \DeclareUnicodeCharacter{00C8}{\`E}% + \DeclareUnicodeCharacter{00C9}{\'E}% + \DeclareUnicodeCharacter{00CA}{\^E}% + \DeclareUnicodeCharacter{00CB}{\"E}% + \DeclareUnicodeCharacter{00CC}{\`I}% + \DeclareUnicodeCharacter{00CD}{\'I}% + \DeclareUnicodeCharacter{00CE}{\^I}% + \DeclareUnicodeCharacter{00CF}{\"I}% + % + \DeclareUnicodeCharacter{00D0}{\DH}% + \DeclareUnicodeCharacter{00D1}{\~N}% + \DeclareUnicodeCharacter{00D2}{\`O}% + \DeclareUnicodeCharacter{00D3}{\'O}% + \DeclareUnicodeCharacter{00D4}{\^O}% + \DeclareUnicodeCharacter{00D5}{\~O}% + \DeclareUnicodeCharacter{00D6}{\"O}% + \DeclareUnicodeCharacter{00D7}{\ensuremath\times}% + \DeclareUnicodeCharacter{00D8}{\O}% + \DeclareUnicodeCharacter{00D9}{\`U}% + \DeclareUnicodeCharacter{00DA}{\'U}% + \DeclareUnicodeCharacter{00DB}{\^U}% + \DeclareUnicodeCharacter{00DC}{\"U}% + \DeclareUnicodeCharacter{00DD}{\'Y}% + \DeclareUnicodeCharacter{00DE}{\TH}% + \DeclareUnicodeCharacter{00DF}{\ss}% + % + \DeclareUnicodeCharacter{00E0}{\`a}% + \DeclareUnicodeCharacter{00E1}{\'a}% + \DeclareUnicodeCharacter{00E2}{\^a}% + \DeclareUnicodeCharacter{00E3}{\~a}% + \DeclareUnicodeCharacter{00E4}{\"a}% + \DeclareUnicodeCharacter{00E5}{\aa}% + \DeclareUnicodeCharacter{00E6}{\ae}% + \DeclareUnicodeCharacter{00E7}{\cedilla{c}}% + \DeclareUnicodeCharacter{00E8}{\`e}% + \DeclareUnicodeCharacter{00E9}{\'e}% + \DeclareUnicodeCharacter{00EA}{\^e}% + \DeclareUnicodeCharacter{00EB}{\"e}% + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}% + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}% + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}% + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}% + % + \DeclareUnicodeCharacter{00F0}{\dh}% + \DeclareUnicodeCharacter{00F1}{\~n}% + \DeclareUnicodeCharacter{00F2}{\`o}% + \DeclareUnicodeCharacter{00F3}{\'o}% + \DeclareUnicodeCharacter{00F4}{\^o}% + \DeclareUnicodeCharacter{00F5}{\~o}% + \DeclareUnicodeCharacter{00F6}{\"o}% + \DeclareUnicodeCharacter{00F7}{\ensuremath\div}% + \DeclareUnicodeCharacter{00F8}{\o}% + \DeclareUnicodeCharacter{00F9}{\`u}% + \DeclareUnicodeCharacter{00FA}{\'u}% + \DeclareUnicodeCharacter{00FB}{\^u}% + \DeclareUnicodeCharacter{00FC}{\"u}% + \DeclareUnicodeCharacter{00FD}{\'y}% + \DeclareUnicodeCharacter{00FE}{\th}% + \DeclareUnicodeCharacter{00FF}{\"y}% + % + \DeclareUnicodeCharacter{0100}{\=A}% + \DeclareUnicodeCharacter{0101}{\=a}% + \DeclareUnicodeCharacter{0102}{\u{A}}% + \DeclareUnicodeCharacter{0103}{\u{a}}% + \DeclareUnicodeCharacter{0104}{\ogonek{A}}% + \DeclareUnicodeCharacter{0105}{\ogonek{a}}% + \DeclareUnicodeCharacter{0106}{\'C}% + \DeclareUnicodeCharacter{0107}{\'c}% + \DeclareUnicodeCharacter{0108}{\^C}% + \DeclareUnicodeCharacter{0109}{\^c}% + \DeclareUnicodeCharacter{010A}{\dotaccent{C}}% + \DeclareUnicodeCharacter{010B}{\dotaccent{c}}% + \DeclareUnicodeCharacter{010C}{\v{C}}% + \DeclareUnicodeCharacter{010D}{\v{c}}% + \DeclareUnicodeCharacter{010E}{\v{D}}% + \DeclareUnicodeCharacter{010F}{d'}% + % + \DeclareUnicodeCharacter{0110}{\DH}% + \DeclareUnicodeCharacter{0111}{\dh}% + \DeclareUnicodeCharacter{0112}{\=E}% + \DeclareUnicodeCharacter{0113}{\=e}% + \DeclareUnicodeCharacter{0114}{\u{E}}% + \DeclareUnicodeCharacter{0115}{\u{e}}% + \DeclareUnicodeCharacter{0116}{\dotaccent{E}}% + \DeclareUnicodeCharacter{0117}{\dotaccent{e}}% + \DeclareUnicodeCharacter{0118}{\ogonek{E}}% + \DeclareUnicodeCharacter{0119}{\ogonek{e}}% + \DeclareUnicodeCharacter{011A}{\v{E}}% + \DeclareUnicodeCharacter{011B}{\v{e}}% + \DeclareUnicodeCharacter{011C}{\^G}% + \DeclareUnicodeCharacter{011D}{\^g}% + \DeclareUnicodeCharacter{011E}{\u{G}}% + \DeclareUnicodeCharacter{011F}{\u{g}}% + % + \DeclareUnicodeCharacter{0120}{\dotaccent{G}}% + \DeclareUnicodeCharacter{0121}{\dotaccent{g}}% + \DeclareUnicodeCharacter{0122}{\cedilla{G}}% + \DeclareUnicodeCharacter{0123}{\cedilla{g}}% + \DeclareUnicodeCharacter{0124}{\^H}% + \DeclareUnicodeCharacter{0125}{\^h}% + \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}% + \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}% + \DeclareUnicodeCharacter{0128}{\~I}% + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}% + \DeclareUnicodeCharacter{012A}{\=I}% + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}% + \DeclareUnicodeCharacter{012C}{\u{I}}% + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}% + \DeclareUnicodeCharacter{012E}{\ogonek{I}}% + \DeclareUnicodeCharacter{012F}{\ogonek{i}}% + % + \DeclareUnicodeCharacter{0130}{\dotaccent{I}}% + \DeclareUnicodeCharacter{0131}{\dotless{i}}% + \DeclareUnicodeCharacter{0132}{IJ}% + \DeclareUnicodeCharacter{0133}{ij}% + \DeclareUnicodeCharacter{0134}{\^J}% + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}% + \DeclareUnicodeCharacter{0136}{\cedilla{K}}% + \DeclareUnicodeCharacter{0137}{\cedilla{k}}% + \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}% + \DeclareUnicodeCharacter{0139}{\'L}% + \DeclareUnicodeCharacter{013A}{\'l}% + \DeclareUnicodeCharacter{013B}{\cedilla{L}}% + \DeclareUnicodeCharacter{013C}{\cedilla{l}}% + \DeclareUnicodeCharacter{013D}{L'}% should kern + \DeclareUnicodeCharacter{013E}{l'}% should kern + \DeclareUnicodeCharacter{013F}{L\U{00B7}}% + % + \DeclareUnicodeCharacter{0140}{l\U{00B7}}% + \DeclareUnicodeCharacter{0141}{\L}% + \DeclareUnicodeCharacter{0142}{\l}% + \DeclareUnicodeCharacter{0143}{\'N}% + \DeclareUnicodeCharacter{0144}{\'n}% + \DeclareUnicodeCharacter{0145}{\cedilla{N}}% + \DeclareUnicodeCharacter{0146}{\cedilla{n}}% + \DeclareUnicodeCharacter{0147}{\v{N}}% + \DeclareUnicodeCharacter{0148}{\v{n}}% + \DeclareUnicodeCharacter{0149}{'n}% + \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}% + \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}% + \DeclareUnicodeCharacter{014C}{\=O}% + \DeclareUnicodeCharacter{014D}{\=o}% + \DeclareUnicodeCharacter{014E}{\u{O}}% + \DeclareUnicodeCharacter{014F}{\u{o}}% + % + \DeclareUnicodeCharacter{0150}{\H{O}}% + \DeclareUnicodeCharacter{0151}{\H{o}}% + \DeclareUnicodeCharacter{0152}{\OE}% + \DeclareUnicodeCharacter{0153}{\oe}% + \DeclareUnicodeCharacter{0154}{\'R}% + \DeclareUnicodeCharacter{0155}{\'r}% + \DeclareUnicodeCharacter{0156}{\cedilla{R}}% + \DeclareUnicodeCharacter{0157}{\cedilla{r}}% + \DeclareUnicodeCharacter{0158}{\v{R}}% + \DeclareUnicodeCharacter{0159}{\v{r}}% + \DeclareUnicodeCharacter{015A}{\'S}% + \DeclareUnicodeCharacter{015B}{\'s}% + \DeclareUnicodeCharacter{015C}{\^S}% + \DeclareUnicodeCharacter{015D}{\^s}% + \DeclareUnicodeCharacter{015E}{\cedilla{S}}% + \DeclareUnicodeCharacter{015F}{\cedilla{s}}% + % + \DeclareUnicodeCharacter{0160}{\v{S}}% + \DeclareUnicodeCharacter{0161}{\v{s}}% + \DeclareUnicodeCharacter{0162}{\cedilla{T}}% + \DeclareUnicodeCharacter{0163}{\cedilla{t}}% + \DeclareUnicodeCharacter{0164}{\v{T}}% + \DeclareUnicodeCharacter{0165}{\v{t}}% + \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}% + \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}% + \DeclareUnicodeCharacter{0168}{\~U}% + \DeclareUnicodeCharacter{0169}{\~u}% + \DeclareUnicodeCharacter{016A}{\=U}% + \DeclareUnicodeCharacter{016B}{\=u}% + \DeclareUnicodeCharacter{016C}{\u{U}}% + \DeclareUnicodeCharacter{016D}{\u{u}}% + \DeclareUnicodeCharacter{016E}{\ringaccent{U}}% + \DeclareUnicodeCharacter{016F}{\ringaccent{u}}% + % + \DeclareUnicodeCharacter{0170}{\H{U}}% + \DeclareUnicodeCharacter{0171}{\H{u}}% + \DeclareUnicodeCharacter{0172}{\ogonek{U}}% + \DeclareUnicodeCharacter{0173}{\ogonek{u}}% + \DeclareUnicodeCharacter{0174}{\^W}% + \DeclareUnicodeCharacter{0175}{\^w}% + \DeclareUnicodeCharacter{0176}{\^Y}% + \DeclareUnicodeCharacter{0177}{\^y}% + \DeclareUnicodeCharacter{0178}{\"Y}% + \DeclareUnicodeCharacter{0179}{\'Z}% + \DeclareUnicodeCharacter{017A}{\'z}% + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}% + \DeclareUnicodeCharacter{017C}{\dotaccent{z}}% + \DeclareUnicodeCharacter{017D}{\v{Z}}% + \DeclareUnicodeCharacter{017E}{\v{z}}% + \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}% + % + \DeclareUnicodeCharacter{01C4}{D\v{Z}}% + \DeclareUnicodeCharacter{01C5}{D\v{z}}% + \DeclareUnicodeCharacter{01C6}{d\v{z}}% + \DeclareUnicodeCharacter{01C7}{LJ}% + \DeclareUnicodeCharacter{01C8}{Lj}% + \DeclareUnicodeCharacter{01C9}{lj}% + \DeclareUnicodeCharacter{01CA}{NJ}% + \DeclareUnicodeCharacter{01CB}{Nj}% + \DeclareUnicodeCharacter{01CC}{nj}% + \DeclareUnicodeCharacter{01CD}{\v{A}}% + \DeclareUnicodeCharacter{01CE}{\v{a}}% + \DeclareUnicodeCharacter{01CF}{\v{I}}% + % + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}% + \DeclareUnicodeCharacter{01D1}{\v{O}}% + \DeclareUnicodeCharacter{01D2}{\v{o}}% + \DeclareUnicodeCharacter{01D3}{\v{U}}% + \DeclareUnicodeCharacter{01D4}{\v{u}}% + % + \DeclareUnicodeCharacter{01E2}{\={\AE}}% + \DeclareUnicodeCharacter{01E3}{\={\ae}}% + \DeclareUnicodeCharacter{01E6}{\v{G}}% + \DeclareUnicodeCharacter{01E7}{\v{g}}% + \DeclareUnicodeCharacter{01E8}{\v{K}}% + \DeclareUnicodeCharacter{01E9}{\v{k}}% + % + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}% + \DeclareUnicodeCharacter{01F1}{DZ}% + \DeclareUnicodeCharacter{01F2}{Dz}% + \DeclareUnicodeCharacter{01F3}{dz}% + \DeclareUnicodeCharacter{01F4}{\'G}% + \DeclareUnicodeCharacter{01F5}{\'g}% + \DeclareUnicodeCharacter{01F8}{\`N}% + \DeclareUnicodeCharacter{01F9}{\`n}% + \DeclareUnicodeCharacter{01FC}{\'{\AE}}% + \DeclareUnicodeCharacter{01FD}{\'{\ae}}% + \DeclareUnicodeCharacter{01FE}{\'{\O}}% + \DeclareUnicodeCharacter{01FF}{\'{\o}}% + % + \DeclareUnicodeCharacter{021E}{\v{H}}% + \DeclareUnicodeCharacter{021F}{\v{h}}% + % + \DeclareUnicodeCharacter{0226}{\dotaccent{A}}% + \DeclareUnicodeCharacter{0227}{\dotaccent{a}}% + \DeclareUnicodeCharacter{0228}{\cedilla{E}}% + \DeclareUnicodeCharacter{0229}{\cedilla{e}}% + \DeclareUnicodeCharacter{022E}{\dotaccent{O}}% + \DeclareUnicodeCharacter{022F}{\dotaccent{o}}% + % + \DeclareUnicodeCharacter{0232}{\=Y}% + \DeclareUnicodeCharacter{0233}{\=y}% + \DeclareUnicodeCharacter{0237}{\dotless{j}}% + % + \DeclareUnicodeCharacter{02DB}{\ogonek{ }}% + % + % Greek letters upper case + \DeclareUnicodeCharacter{0391}{{\it A}}% + \DeclareUnicodeCharacter{0392}{{\it B}}% + \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}% + \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}% + \DeclareUnicodeCharacter{0395}{{\it E}}% + \DeclareUnicodeCharacter{0396}{{\it Z}}% + \DeclareUnicodeCharacter{0397}{{\it H}}% + \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}% + \DeclareUnicodeCharacter{0399}{{\it I}}% + \DeclareUnicodeCharacter{039A}{{\it K}}% + \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}% + \DeclareUnicodeCharacter{039C}{{\it M}}% + \DeclareUnicodeCharacter{039D}{{\it N}}% + \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}% + \DeclareUnicodeCharacter{039F}{{\it O}}% + \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}% + \DeclareUnicodeCharacter{03A1}{{\it P}}% + %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma + \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}% + \DeclareUnicodeCharacter{03A4}{{\it T}}% + \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}% + \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}% + \DeclareUnicodeCharacter{03A7}{{\it X}}% + \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}% + \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}% + % + % Vowels with accents + \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}% + \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}% + \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}% + \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}% + \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}% + \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}% + % + % Standalone accent + \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}% + % + % Greek letters lower case + \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}% + \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}% + \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}% + \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}% + \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}% + \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}% + \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}% + \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}% + \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}% + \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}% + \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}% + \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}% + \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}% + \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}% + \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron + \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}% + \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}% + \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}% + \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}% + \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}% + \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}% + \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}% + \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}% + \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}% + \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}% + % + % More Greek vowels with accents + \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}% + \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}% + \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}% + \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}% + \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}% + % + % Variant Greek letters + \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}% + \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}% + \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}% + % + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}% + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}% + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}% + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}% + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}% + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}% + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}% + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}% + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}% + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}% + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}% + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}% + % + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}% + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}% + % + \DeclareUnicodeCharacter{1E20}{\=G}% + \DeclareUnicodeCharacter{1E21}{\=g}% + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}% + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}% + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}% + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}% + \DeclareUnicodeCharacter{1E26}{\"H}% + \DeclareUnicodeCharacter{1E27}{\"h}% + % + \DeclareUnicodeCharacter{1E30}{\'K}% + \DeclareUnicodeCharacter{1E31}{\'k}% + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}% + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}% + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}% + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}% + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}% + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}% + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}% + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}% + \DeclareUnicodeCharacter{1E3E}{\'M}% + \DeclareUnicodeCharacter{1E3F}{\'m}% + % + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}% + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}% + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}% + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}% + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}% + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}% + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}% + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}% + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}% + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}% + % + \DeclareUnicodeCharacter{1E54}{\'P}% + \DeclareUnicodeCharacter{1E55}{\'p}% + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}% + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}% + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}% + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}% + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}% + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}% + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}% + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}% + % + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}% + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}% + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}% + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}% + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}% + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}% + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}% + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}% + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}% + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}% + % + \DeclareUnicodeCharacter{1E7C}{\~V}% + \DeclareUnicodeCharacter{1E7D}{\~v}% + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}% + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}% + % + \DeclareUnicodeCharacter{1E80}{\`W}% + \DeclareUnicodeCharacter{1E81}{\`w}% + \DeclareUnicodeCharacter{1E82}{\'W}% + \DeclareUnicodeCharacter{1E83}{\'w}% + \DeclareUnicodeCharacter{1E84}{\"W}% + \DeclareUnicodeCharacter{1E85}{\"w}% + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}% + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}% + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}% + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}% + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}% + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}% + \DeclareUnicodeCharacter{1E8C}{\"X}% + \DeclareUnicodeCharacter{1E8D}{\"x}% + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}% + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}% + % + \DeclareUnicodeCharacter{1E90}{\^Z}% + \DeclareUnicodeCharacter{1E91}{\^z}% + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}% + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}% + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}% + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}% + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}% + \DeclareUnicodeCharacter{1E97}{\"t}% + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}% + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}% + % + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}% + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}% + % + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}% + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}% + \DeclareUnicodeCharacter{1EBC}{\~E}% + \DeclareUnicodeCharacter{1EBD}{\~e}% + % + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}% + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}% + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}% + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}% + % + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}% + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}% + % + \DeclareUnicodeCharacter{1EF2}{\`Y}% + \DeclareUnicodeCharacter{1EF3}{\`y}% + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}% + % + \DeclareUnicodeCharacter{1EF8}{\~Y}% + \DeclareUnicodeCharacter{1EF9}{\~y}% + % + % Punctuation + \DeclareUnicodeCharacter{2013}{--}% + \DeclareUnicodeCharacter{2014}{---}% + \DeclareUnicodeCharacter{2018}{\quoteleft{}}% + \DeclareUnicodeCharacter{2019}{\quoteright{}}% + \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}% + \DeclareUnicodeCharacter{201C}{\quotedblleft{}}% + \DeclareUnicodeCharacter{201D}{\quotedblright{}}% + \DeclareUnicodeCharacter{201E}{\quotedblbase{}}% + \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}% + \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}% + \DeclareUnicodeCharacter{2022}{\bullet{}}% + \DeclareUnicodeCharacter{202F}{\thinspace}% + \DeclareUnicodeCharacter{2026}{\dots{}}% + \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}% + \DeclareUnicodeCharacter{203A}{\guilsinglright{}}% + % + \DeclareUnicodeCharacter{20AC}{\euro{}}% + % + \DeclareUnicodeCharacter{2192}{\expansion{}}% + \DeclareUnicodeCharacter{21D2}{\result{}}% + % + % Mathematical symbols + \DeclareUnicodeCharacter{2200}{\ensuremath\forall}% + \DeclareUnicodeCharacter{2203}{\ensuremath\exists}% + \DeclareUnicodeCharacter{2208}{\ensuremath\in}% + \DeclareUnicodeCharacter{2212}{\minus{}}% + \DeclareUnicodeCharacter{2217}{\ast}% + \DeclareUnicodeCharacter{221E}{\ensuremath\infty}% + \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}% + \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}% + \DeclareUnicodeCharacter{2229}{\ensuremath\cap}% + \DeclareUnicodeCharacter{2261}{\equiv{}}% + \DeclareUnicodeCharacter{2264}{\ensuremath\leq}% + \DeclareUnicodeCharacter{2265}{\ensuremath\geq}% + \DeclareUnicodeCharacter{2282}{\ensuremath\subset}% + \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}% + % + \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}% + \DeclareUnicodeCharacter{2032}{\ensuremath\prime}% + \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}% + \DeclareUnicodeCharacter{2111}{\ensuremath\Im}% + \DeclareUnicodeCharacter{2113}{\ensuremath\ell}% + \DeclareUnicodeCharacter{2118}{\ensuremath\wp}% + \DeclareUnicodeCharacter{211C}{\ensuremath\Re}% + \DeclareUnicodeCharacter{2127}{\ensuremath\mho}% + \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}% + \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}% + \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}% + \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}% + \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}% + \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}% + \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}% + \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}% + \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}% + \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}% + \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}% + \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}% + \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}% + \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}% + \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}% + \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}% + \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}% + \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}% + \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}% + \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}% + \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}% + \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}% + \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}% + \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}% + \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}% + \DeclareUnicodeCharacter{2201}{\ensuremath\complement}% + \DeclareUnicodeCharacter{2202}{\ensuremath\partial}% + \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}% + \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}% + \DeclareUnicodeCharacter{2209}{\ensuremath\notin}% + \DeclareUnicodeCharacter{220B}{\ensuremath\owns}% + \DeclareUnicodeCharacter{220F}{\ensuremath\prod}% + \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}% + \DeclareUnicodeCharacter{2211}{\ensuremath\sum}% + \DeclareUnicodeCharacter{2213}{\ensuremath\mp}% + \DeclareUnicodeCharacter{2218}{\ensuremath\circ}% + \DeclareUnicodeCharacter{221A}{\ensuremath\surd}% + \DeclareUnicodeCharacter{221D}{\ensuremath\propto}% + \DeclareUnicodeCharacter{2220}{\ensuremath\angle}% + \DeclareUnicodeCharacter{2223}{\ensuremath\mid}% + \DeclareUnicodeCharacter{2228}{\ensuremath\vee}% + \DeclareUnicodeCharacter{222A}{\ensuremath\cup}% + \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}% + \DeclareUnicodeCharacter{222E}{\ensuremath\oint}% + \DeclareUnicodeCharacter{223C}{\ensuremath\sim}% + \DeclareUnicodeCharacter{2240}{\ensuremath\wr}% + \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}% + \DeclareUnicodeCharacter{2245}{\ensuremath\cong}% + \DeclareUnicodeCharacter{2248}{\ensuremath\approx}% + \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}% + \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}% + \DeclareUnicodeCharacter{2260}{\ensuremath\neq}% + \DeclareUnicodeCharacter{226A}{\ensuremath\ll}% + \DeclareUnicodeCharacter{226B}{\ensuremath\gg}% + \DeclareUnicodeCharacter{227A}{\ensuremath\prec}% + \DeclareUnicodeCharacter{227B}{\ensuremath\succ}% + \DeclareUnicodeCharacter{2283}{\ensuremath\supset}% + \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}% + \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}% + \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}% + \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}% + \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}% + \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}% + \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}% + \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}% + \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}% + \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}% + \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}% + \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}% + \DeclareUnicodeCharacter{2299}{\ensuremath\odot}% + \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}% + \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}% + \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}% + \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}% + \DeclareUnicodeCharacter{22A8}{\ensuremath\models}% + \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}% + \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}% + \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}% + \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}% + \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}% + \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}% + \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}% + \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}% + \DeclareUnicodeCharacter{22C6}{\ensuremath\star}% + \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}% + \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}% + \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}% + \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}% + \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}% + \DeclareUnicodeCharacter{2322}{\ensuremath\frown}% + \DeclareUnicodeCharacter{2323}{\ensuremath\smile}% + % + \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}% + \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}% + \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}% + \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}% + \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}% + \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}% + \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% + \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% + \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% + \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}% + \DeclareUnicodeCharacter{266D}{\ensuremath\flat}% + \DeclareUnicodeCharacter{266E}{\ensuremath\natural}% + \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}% + \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}% + \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}% + \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}% + \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}% + \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}% + \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}% + \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}% + \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}% + \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}% + \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}% + \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}% + \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}% + \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}% + \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}% + \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}% + \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}% + \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}% + \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}% + % + \global\mathchardef\checkmark="1370% actually the square root sign + \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}% +}% end of \unicodechardefs + +% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command) +% It makes the setting that replace UTF-8 byte sequence. +\def\utfeightchardefs{% + \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii + \unicodechardefs +} + +% Whether the active definitions of non-ASCII characters expand to +% non-active tokens with the same character code. This is used to +% write characters literally, instead of using active definitions for +% printing the correct glyphs. +\newif\ifpassthroughchars +\passthroughcharsfalse + +% For native Unicode handling (XeTeX and LuaTeX), +% provide a definition macro to replace/pass-through a Unicode character +% +\def\DeclareUnicodeCharacterNative#1#2{% + \catcode"#1=\active + \def\dodeclareunicodecharacternative##1##2##3{% + \begingroup + \uccode`\~="##2\relax + \uppercase{\gdef~}{% + \ifpassthroughchars + ##1% + \else + ##3% + \fi + } + \endgroup + } + \begingroup + \uccode`\.="#1\relax + \uppercase{\def\UTFNativeTmp{.}}% + \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}% + \endgroup +} + +% Native Unicode handling (XeTeX and LuaTeX) character replacing definition. +% It activates the setting that replaces Unicode characters. +\def\nativeunicodechardefs{% + \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative + \unicodechardefs +} + +% For native Unicode handling (XeTeX and LuaTeX), +% make the character token expand +% to the sequences given in \unicodechardefs for printing. +\def\DeclareUnicodeCharacterNativeAtU#1#2{% + \def\UTFAtUTmp{#2} + \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp +} + +% @U command definitions for native Unicode handling (XeTeX and LuaTeX). +\def\nativeunicodechardefsatu{% + \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU + \unicodechardefs +} + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% define all Unicode characters we know about, for the sake of @U. +\iftxinativeunicodecapable + \nativeunicodechardefsatu +\else + \utfeightchardefs +\fi + + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \txipageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \txipagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \else + \ifx\XeTeXrevision\thisisundefined + \special{papersize=#8,#7}% + \else + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % XeTeX does not have \pdfhorigin and \pdfvorigin. + \fi + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + +% Default value of \hfuzz, for suppressing warnings about overfull hboxes. +\hfuzz = 1pt + + +\message{and turning on texinfo input format.} + +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Set catcodes for Texinfo file + +% Active characters for printing the wanted glyph. +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. +% +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde +\chardef\hatchar=`\^ +\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } +\let\realunder=_ + +\catcode`\|=\active \def|{{\tt\char124}} + +\chardef \less=`\< +\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless +\chardef \gtr=`\> +\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr +\catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix +\catcode`\-=\active \let-=\normaldash + + +% used for headline/footline in the output routine, in case the page +% breaks in the middle of an @tex block. +\def\texinfochars{% + \let< = \activeless + \let> = \activegtr + \let~ = \activetilde + \let^ = \activehat + \markupsetuplqdefault \markupsetuprqdefault + \let\b = \strong + \let\i = \smartitalic + % in principle, all other definitions in \tex have to be undone too. +} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In Texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active % @ for escape char from now on. + +% Print a typewriter backslash. For math mode, we can't simply use +% \backslashcurfont: the story here is that in math mode, the \char +% of \backslashcurfont ends up printing the roman \ from the math symbol +% font (because \char in math mode uses the \mathcode, and plain.tex +% sets \mathcode`\\="026E). Hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. + +@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @passthroughcharstrue + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @let\=@ttbackslash + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } +} + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have @fixbackslash turn them back on. +@catcode`+=@other @catcode`@_=@other + +% \enablebackslashhack - allow file to begin `\input texinfo' +% +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% If the file did not have a `\input texinfo', then it is turned off after +% the first line; otherwise the first `\' in the file would cause an error. +% This is used on the very last line of this file, texinfo.tex. +% We also use @c to call @fixbackslash, in case ends of lines are hidden. +{ +@catcode`@^=7 +@catcode`@^^M=13@gdef@enablebackslashhack{% + @global@let\ = @eatinput% + @catcode`@^^M=13% + @def@c{@fixbackslash@c}% + % Definition for the newline at the end of this file. + @def ^^M{@let^^M@secondlinenl}% + % Definition for a newline in the main Texinfo file. + @gdef @secondlinenl{@fixbackslash}% + % In case the first line has a whole-line command on it + @let@originalparsearg@parsearg + @def@parsearg{@fixbackslash@originalparsearg} +}} + +{@catcode`@^=7 @catcode`@^^M=13% +@gdef@eatinput input texinfo#1^^M{@fixbackslash}} + +% Emergency active definition of newline, in case an active newline token +% appears by mistake. +{@catcode`@^=7 @catcode13=13% +@gdef@enableemergencynewline{% + @gdef^^M{% + @par% + %@par% +}}} + + +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @ttbackslash @fi + @catcode13=5 % regular end of line + @enableemergencynewline + @let@c=@texinfoc + @let@parsearg@originalparsearg + % Also turn back on active characters that might appear in the input + % file name, in case not using a pre-dumped format. + @catcode`+=@active + @catcode`@_=@active + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets + % called at the beginning of every Texinfo file. Not opening texinfo.cnf + % directly in this file, texinfo.tex, makes it possible to make a format + % file for Texinfo. + % + @openin 1 texinfo.cnf + @ifeof 1 @else @input texinfo.cnf @fi + @closein 1 +} + + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + +% These look ok in all fonts, so just make them not special. +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash + +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message\\|emacs-page" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@enablebackslashhack diff --git a/lib/ebu/others/eblook-1.6.1+media-20200414/win32.c b/lib/ebu/others/eblook-1.6.1+media-20200414/win32.c new file mode 100644 index 0000000..29e8910 --- /dev/null +++ b/lib/ebu/others/eblook-1.6.1+media-20200414/win32.c @@ -0,0 +1,149 @@ +/* + * win32.c + * functions used in Win32 (or DOS) environment + * written by Satomi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#if defined(WIN32) && !defined(DOS_FILE_PATH) +#define DOS_FILE_PATH 1 +#endif + +#ifdef DOS_FILE_PATH + +#include +#include + +size_t euc_to_sjis(const char *, char *, size_t); +size_t sjis_to_euc(const char *, char *, size_t); +void dos_fix_path(char *, int); + +/* + * NOTE: euc_to_sjis() and sjis_to_euc() may be moved to codeconv.c, + * but their prototypes are rather different from other codeconv + * functions, which is the reason why I placed them here. + * euc_to_current() or current_to_euc() cannot be used as an alternative + * because the target kanji-code is always SJIS. + */ +size_t euc_to_sjis(const char *euc, char *sjis, size_t sjis_len) +{ + size_t len = 0; + unsigned char c1, c2; + + while (*euc) { + c1 = (unsigned char)(*euc++); + if (!(c1 & 0x80)) { + /* ASCII char. */ + if (++len < sjis_len) *sjis++ = c1; + continue; + } + + c2 = (unsigned char)(*euc++); + if (0x8e == c1) { + /* possibly single-byte kana. */ + if (0x21 <= c2 && c2 <= 0x5f) *sjis++ = c2 | 0x80; + continue; + } + + /* double-byte char. */ + len += 2; + if (sjis_len <= len) continue; + c1 &= 0x7f; + c2 &= 0x7f; + if (c1 & 0x01) { + c2 += 0x1f; + if (c2 > 0x7e) c2++; + } else { + c2 += 0x7e; + } + c1 = (c1 + 0xe1) >> 1; + if (c1 > 0x9f) c1 += 0x40; + *sjis++ = c1; + *sjis++ = c2; + } + + if (sjis) *sjis = 0; + return(len); +} + +size_t sjis_to_euc(const char *sjis, char *euc, size_t euc_len) +{ + size_t len = 0; + unsigned char c1, c2; + + while (*sjis) { + c1 = (unsigned char)(*sjis++); + if (!(c1 & 0x80)) { + /* ASCII char. */ + if (++len < euc_len) *euc++ = c1; + continue; + } + + if (0xa1 <= c1 && c1 <= 0xdf) { + /* single-byte kana. */ + len += 2; + if (euc_len <= len) continue; + c2 = c1 - 0x80; + c1 = 0x8e; + + } else if ((0x81 <= c1 && c1 <= 0x9f) + || (0xe0 <= c1 && c1 <= 0xfc)) { + /* double-byte char (not strictly checked). */ + c2 = *sjis++; + if (!c2) break; + len += 2; + if (euc_len <= len) continue; + if (c2 < 0x9f) { + if (c1 < 0xdf) c1 = ((c1 - 0x30) << 1) - 1; + else c1 = ((c1 - 0x70) << 1) - 1; + if (c2 < 0x7f) c2 += 0x61; + else c2 += 0x60; + } else { + if (c1 < 0xdf) c1 = (c1 - 0x30) << 1; + else c1 = (c1 - 0x70) << 1; + c2 += 0x02; + } + } + + *euc++ = c1; + *euc++ = c2; + } + + if (euc) *euc = 0; + return(len); +} + +void dos_fix_path(char *path, int path_is_euc) +{ + unsigned char *p = (unsigned char *)path; + + if (path_is_euc) euc_to_sjis(path, path, strlen(path) + 1); + + /* eb-3.0 does not accept '/' as a path delimitor. */ + while (*p) { + if ((0x81 <= *p && *p <= 0x9f) || + (0xe0 <= *p && *p <= 0xfc)) + p++; + else if ('/' == *p) *p = '\\'; + p++; + } +} + +#endif /* DOS_FILE_PATH */ diff --git a/lib/ebu/po-eb/Makefile b/lib/ebu/po-eb/Makefile new file mode 100644 index 0000000..cc74fa3 --- /dev/null +++ b/lib/ebu/po-eb/Makefile @@ -0,0 +1,154 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +## Note that the following macros must be set by your hand. +top_builddir = .. +subdir = po-eb + +TEXTDOMAIN = ebu +POFILES = ja.po +MOFILES = ja.mo +POTFILES = \ + $(top_srcdir)/ebu/error.c +## end + +PACKAGE = ebu +VERSION = 4.5-20200413 + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. + +prefix = /usr/local +datarootdir = ${prefix}/share +datadir = ${datarootdir} +localedir = $(datadir)/locale + +mkdir_p = /usr/bin/mkdir -p +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +mkinstalldirs = $(install_sh) -d +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh + +MSGFMT = : +XGETTEXT = : +MSGMERGE = msgmerge + +DISTFILES = Makefile.in $(TEXTDOMAIN).pot $(MOFILES) $(POFILES) + +.SUFFIXES: +.SUFFIXES: .po .pox .mo + +.po.pox: + $(MAKE) $(TEXTDOMAIN).pot + $(MSGMERGE) $< $(srcdir)/$(TEXTDOMAIN).pot -o $*.pox + +.po.mo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.mo \ + && rm -f $$file && $(MSGFMT) -o $$file $< + +all: all-yes + +all-yes: $(MOFILES) +all-no: + +$(TEXTDOMAIN).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(TEXTDOMAIN) --add-comments \ + --keyword=_ --keyword=N_ $(POTFILES) \ + && test ! -f $(TEXTDOMAIN).po \ + || ( rm -f $(srcdir)/$(TEXTDOMAIN).pot \ + && mv $(TEXTDOMAIN).po $(srcdir)/$(TEXTDOMAIN).pot ) + +install: install-exec install-data +install-exec: +install-data: install-data-yes +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat \ + $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $(srcdir)/$$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + fi; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo; \ + done + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in + +check: all + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(TEXTDOMAIN).po *.old.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f *.mo + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(TEXTDOMAIN).pot + cd $(srcdir); \ + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(TEXTDOMAIN).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +Makefile: Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/po-eb/Makefile.in b/lib/ebu/po-eb/Makefile.in new file mode 100644 index 0000000..57ba6dd --- /dev/null +++ b/lib/ebu/po-eb/Makefile.in @@ -0,0 +1,154 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +## Note that the following macros must be set by your hand. +top_builddir = .. +subdir = po-eb + +TEXTDOMAIN = ebu +POFILES = ja.po +MOFILES = ja.mo +POTFILES = \ + $(top_srcdir)/ebu/error.c +## end + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ + +mkdir_p = @mkdir_p@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +mkinstalldirs = $(install_sh) -d +install_sh = @install_sh@ + +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge + +DISTFILES = Makefile.in $(TEXTDOMAIN).pot $(MOFILES) $(POFILES) + +.SUFFIXES: +.SUFFIXES: .po .pox .mo + +.po.pox: + $(MAKE) $(TEXTDOMAIN).pot + $(MSGMERGE) $< $(srcdir)/$(TEXTDOMAIN).pot -o $*.pox + +.po.mo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.mo \ + && rm -f $$file && $(MSGFMT) -o $$file $< + +all: all-@ENABLE_NLS@ + +all-yes: $(MOFILES) +all-no: + +$(TEXTDOMAIN).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(TEXTDOMAIN) --add-comments \ + --keyword=_ --keyword=N_ $(POTFILES) \ + && test ! -f $(TEXTDOMAIN).po \ + || ( rm -f $(srcdir)/$(TEXTDOMAIN).pot \ + && mv $(TEXTDOMAIN).po $(srcdir)/$(TEXTDOMAIN).pot ) + +install: install-exec install-data +install-exec: +install-data: install-data-@ENABLE_NLS@ +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat \ + $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $(srcdir)/$$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + fi; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo; \ + done + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in + +check: all + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(TEXTDOMAIN).po *.old.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f *.mo + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(TEXTDOMAIN).pot + cd $(srcdir); \ + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(TEXTDOMAIN).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +Makefile: Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/po-eb/ebu.pot b/lib/ebu/po-eb/ebu.pot new file mode 100644 index 0000000..1ac36fa --- /dev/null +++ b/lib/ebu/po-eb/ebu.pot @@ -0,0 +1,316 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-13 13:56+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. 0 -- 4 +#: ../eb/error.c:168 +msgid "no error" +msgstr "" + +#: ../eb/error.c:169 +msgid "memory exhausted" +msgstr "" + +#: ../eb/error.c:170 +msgid "an empty file name" +msgstr "" + +#: ../eb/error.c:171 +msgid "too long file name" +msgstr "" + +#: ../eb/error.c:172 +msgid "bad file name" +msgstr "" + +#. 5 -- 9 +#: ../eb/error.c:175 +msgid "bad directory name" +msgstr "" + +#: ../eb/error.c:176 +msgid "too long word" +msgstr "" + +#: ../eb/error.c:177 +msgid "a word contains bad character" +msgstr "" + +#: ../eb/error.c:178 +msgid "an empty word" +msgstr "" + +#: ../eb/error.c:179 +msgid "failed to get the current working directory" +msgstr "" + +#. 10 -- 14 +#: ../eb/error.c:182 +msgid "failed to open a catalog file" +msgstr "" + +#: ../eb/error.c:183 +msgid "failed to open an appendix catalog file" +msgstr "" + +#: ../eb/error.c:184 +msgid "failed to open a text file" +msgstr "" + +#: ../eb/error.c:185 +msgid "failed to open a font file" +msgstr "" + +#: ../eb/error.c:186 +msgid "failed to open an appendix file" +msgstr "" + +#. 15 -- 19 +#: ../eb/error.c:189 +msgid "failed to open a binary file" +msgstr "" + +#: ../eb/error.c:190 +msgid "failed to read a catalog file" +msgstr "" + +#: ../eb/error.c:191 +msgid "failed to read an appendix catalog file" +msgstr "" + +#: ../eb/error.c:192 +msgid "failed to read a text file" +msgstr "" + +#: ../eb/error.c:193 +msgid "failed to read a font file" +msgstr "" + +#. 20 -- 24 +#: ../eb/error.c:196 +msgid "failed to read an appendix file" +msgstr "" + +#: ../eb/error.c:197 +msgid "failed to read a binary file" +msgstr "" + +#: ../eb/error.c:198 +msgid "failed to seek a catalog file" +msgstr "" + +#: ../eb/error.c:199 +msgid "failed to seek an appendix catalog file" +msgstr "" + +#: ../eb/error.c:200 +msgid "failed to seek a text file" +msgstr "" + +#. 25 -- 29 +#: ../eb/error.c:203 +msgid "failed to seek a font file" +msgstr "" + +#: ../eb/error.c:204 +msgid "failed to seek an appendix file" +msgstr "" + +#: ../eb/error.c:205 +msgid "failed to seek a binary file" +msgstr "" + +#: ../eb/error.c:206 +msgid "unexpected format in a catalog file" +msgstr "" + +#: ../eb/error.c:207 +msgid "unexpected format in an appendix catalog file" +msgstr "" + +#. 30 -- 34 +#: ../eb/error.c:210 +msgid "unexpected format in a text file" +msgstr "" + +#: ../eb/error.c:211 +msgid "unexpected format in a font file" +msgstr "" + +#: ../eb/error.c:212 +msgid "unexpected format in an appendix file" +msgstr "" + +#: ../eb/error.c:213 +msgid "unexpected format in a binary file" +msgstr "" + +#: ../eb/error.c:214 +msgid "book not bound" +msgstr "" + +#. 35 -- 39 +#: ../eb/error.c:217 +msgid "appendix not bound" +msgstr "" + +#: ../eb/error.c:218 +msgid "no subbook" +msgstr "" + +#: ../eb/error.c:219 +msgid "no subbook in the appendix" +msgstr "" + +#: ../eb/error.c:220 +msgid "no font" +msgstr "" + +#: ../eb/error.c:221 +msgid "no text file" +msgstr "" + +#. 40 -- 44 +#: ../eb/error.c:224 +msgid "no stop-code" +msgstr "" + +#: ../eb/error.c:225 +msgid "no alternation string" +msgstr "" + +#: ../eb/error.c:226 +msgid "no current subbook" +msgstr "" + +#: ../eb/error.c:227 +msgid "no current appendix subbook" +msgstr "" + +#: ../eb/error.c:228 +msgid "no current font" +msgstr "" + +#. 45 -- 49 +#: ../eb/error.c:231 +msgid "no current binary" +msgstr "" + +#: ../eb/error.c:232 +msgid "no such subbook" +msgstr "" + +#: ../eb/error.c:233 +msgid "no such appendix subbook" +msgstr "" + +#: ../eb/error.c:234 +msgid "no such font" +msgstr "" + +#: ../eb/error.c:235 +msgid "no such character bitmap" +msgstr "" + +#. 50 -- 54 +#: ../eb/error.c:238 +msgid "no such character text" +msgstr "" + +#: ../eb/error.c:239 +msgid "no such search method" +msgstr "" + +#: ../eb/error.c:240 +msgid "no such hook" +msgstr "" + +#: ../eb/error.c:241 +msgid "no such binary" +msgstr "" + +#: ../eb/error.c:242 +msgid "different content type" +msgstr "" + +#. 55 -- 59 +#: ../eb/error.c:245 +msgid "no previous search" +msgstr "" + +#: ../eb/error.c:246 +msgid "no such multi search" +msgstr "" + +#: ../eb/error.c:247 +msgid "no such multi search entry" +msgstr "" + +#: ../eb/error.c:248 +msgid "too many words specified" +msgstr "" + +#: ../eb/error.c:249 +msgid "no word specified" +msgstr "" + +#. 60 -- 64 +#: ../eb/error.c:252 +msgid "no candidates" +msgstr "" + +#: ../eb/error.c:253 +msgid "end of content" +msgstr "" + +#: ../eb/error.c:254 +msgid "no previous seek" +msgstr "" + +#: ../eb/error.c:255 +msgid "ebnet is not supported" +msgstr "" + +#: ../eb/error.c:256 +msgid "failed to connect to an ebnet server" +msgstr "" + +#. 65 -- 69 +#: ../eb/error.c:259 +msgid "ebnet server is busy" +msgstr "" + +#: ../eb/error.c:260 +msgid "no access permission" +msgstr "" + +#: ../eb/error.c:261 +msgid "booklist not bound" +msgstr "" + +#: ../eb/error.c:262 +msgid "no such book" +msgstr "" + +#: ../eb/error.c:263 +msgid "no such color" +msgstr "" + +#: ../eb/error.c:279 +msgid "unknown error" +msgstr "" diff --git a/lib/ebu/po-eb/ja.mo b/lib/ebu/po-eb/ja.mo new file mode 100644 index 0000000..e3344e6 Binary files /dev/null and b/lib/ebu/po-eb/ja.mo differ diff --git a/lib/ebu/po-eb/ja.po b/lib/ebu/po-eb/ja.po new file mode 100644 index 0000000..b7f21f4 --- /dev/null +++ b/lib/ebu/po-eb/ja.po @@ -0,0 +1,313 @@ +# +# Copyright (C) 2004-2006 Motoyuki Kasahara +# +msgid "" +msgstr "" +"Project-Id-Version: eb 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-13 13:56+0900\n" +"PO-Revision-Date: 2001-03-31 22:10+0900\n" +"Last-Translator: Motoyuki Kasahara \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Transfer-Encoding: 8bit\n" + +#. 0 -- 4 +#: ../eb/error.c:168 +msgid "no error" +msgstr "顼Ϥޤ" + +#: ../eb/error.c:169 +msgid "memory exhausted" +msgstr "Ȥ̤ޤ" + +#: ../eb/error.c:170 +msgid "an empty file name" +msgstr "Υե̾Ǥ" + +#: ../eb/error.c:171 +msgid "too long file name" +msgstr "ե̾Ĺޤ" + +#: ../eb/error.c:172 +msgid "bad file name" +msgstr "ʥե̾Ǥ" + +#. 5 -- 9 +#: ../eb/error.c:175 +msgid "bad directory name" +msgstr "ʥǥ쥯ȥ̾Ǥ" + +#: ../eb/error.c:176 +msgid "too long word" +msgstr "ñ줬Ĺޤ" + +#: ../eb/error.c:177 +msgid "a word contains bad character" +msgstr "ñ줬ʸޤǤޤ" + +#: ../eb/error.c:178 +msgid "an empty word" +msgstr "ñ줬Ǥ" + +#: ../eb/error.c:179 +msgid "failed to get the current working directory" +msgstr "ȥǥ쥯ȥ꤬ʬޤǤ" + +#. 10 -- 14 +#: ../eb/error.c:182 +msgid "failed to open a catalog file" +msgstr "ե뤬ޤǤ" + +#: ../eb/error.c:183 +msgid "failed to open an appendix catalog file" +msgstr "ϿΥե뤬ޤǤ" + +#: ../eb/error.c:184 +msgid "failed to open a text file" +msgstr "ʸե뤬ޤǤ" + +#: ../eb/error.c:185 +msgid "failed to open a font file" +msgstr "եȥե뤬ޤǤ" + +#: ../eb/error.c:186 +msgid "failed to open an appendix file" +msgstr "Ͽե뤬ޤǤ" + +#. 15 -- 19 +#: ../eb/error.c:189 +msgid "failed to open a binary file" +msgstr "Хʥե뤬ޤǤ" + +#: ../eb/error.c:190 +msgid "failed to read a catalog file" +msgstr "ե뤬ɤޤǤ" + +#: ../eb/error.c:191 +msgid "failed to read an appendix catalog file" +msgstr "ϿΥե뤬ɤޤǤ" + +#: ../eb/error.c:192 +msgid "failed to read a text file" +msgstr "ʸե뤬ɤޤǤ" + +#: ../eb/error.c:193 +msgid "failed to read a font file" +msgstr "եȥե뤬ɤޤǤ" + +#. 20 -- 24 +#: ../eb/error.c:196 +msgid "failed to read an appendix file" +msgstr "Ͽե뤬ޤǤ" + +#: ../eb/error.c:197 +msgid "failed to read a binary file" +msgstr "Хʥե뤬ɤޤǤ" + +#: ../eb/error.c:198 +msgid "failed to seek a catalog file" +msgstr "ե뤬ǤޤǤ" + +#: ../eb/error.c:199 +msgid "failed to seek an appendix catalog file" +msgstr "ϿΥե뤬ǤޤǤ" + +#: ../eb/error.c:200 +msgid "failed to seek a text file" +msgstr "ʸե뤬ǤޤǤ" + +#. 25 -- 29 +#: ../eb/error.c:203 +msgid "failed to seek a font file" +msgstr "եȥե뤬ǤޤǤ" + +#: ../eb/error.c:204 +msgid "failed to seek an appendix file" +msgstr "Ͽե뤬ɤޤǤ" + +#: ../eb/error.c:205 +msgid "failed to seek a binary file" +msgstr "Хʥե뤬ǤޤǤ" + +#: ../eb/error.c:206 +msgid "unexpected format in a catalog file" +msgstr "եη곰Ǥ" + +#: ../eb/error.c:207 +msgid "unexpected format in an appendix catalog file" +msgstr "ϿΥեη곰Ǥ" + +#. 30 -- 34 +#: ../eb/error.c:210 +msgid "unexpected format in a text file" +msgstr "ʸեη곰Ǥ" + +#: ../eb/error.c:211 +msgid "unexpected format in a font file" +msgstr "եȥեη곰Ǥ" + +#: ../eb/error.c:212 +msgid "unexpected format in an appendix file" +msgstr "Ͽեη곰Ǥ" + +#: ../eb/error.c:213 +msgid "unexpected format in a binary file" +msgstr "Хʥեη곰Ǥ" + +#: ../eb/error.c:214 +msgid "book not bound" +msgstr "ҤϷդƤޤ" + +#. 35 -- 39 +#: ../eb/error.c:217 +msgid "appendix not bound" +msgstr "appendix ϷդƤޤ" + +#: ../eb/error.c:218 +msgid "no subbook" +msgstr "ܤϤޤ" + +#: ../eb/error.c:219 +msgid "no subbook in the appendix" +msgstr "Ͽˤܤޤ" + +#: ../eb/error.c:220 +msgid "no font" +msgstr "եȤϤޤ" + +#: ../eb/error.c:221 +msgid "no text file" +msgstr "ʸեϤޤ" + +#. 40 -- 44 +#: ../eb/error.c:224 +msgid "no stop-code" +msgstr "ڤꥳɤϤޤ" + +#: ../eb/error.c:225 +msgid "no alternation string" +msgstr "ʸϤޤ" + +#: ../eb/error.c:226 +msgid "no current subbook" +msgstr "ܤ򤷤Ƥޤ" + +#: ../eb/error.c:227 +msgid "no current appendix subbook" +msgstr "Ͽܤ򤷤Ƥޤ" + +#: ../eb/error.c:228 +msgid "no current font" +msgstr "ǥեȤ򤷤Ƥޤ" + +#. 45 -- 49 +#: ../eb/error.c:231 +msgid "no current binary" +msgstr "ǥХʥ򤷤Ƥޤ" + +#: ../eb/error.c:232 +msgid "no such subbook" +msgstr "Τ褦ܤϤޤ" + +#: ../eb/error.c:233 +msgid "no such appendix subbook" +msgstr "ϿˤΤ褦ܤϤޤ" + +#: ../eb/error.c:234 +msgid "no such font" +msgstr "Τ褦ʥեȤϤޤ" + +#: ../eb/error.c:235 +msgid "no such character bitmap" +msgstr "Τ褦ʸΥӥåȥޥåפϤޤ" + +#. 50 -- 54 +#: ../eb/error.c:238 +msgid "no such character text" +msgstr "Τ褦ʸΥƥȤϤޤ" + +#: ../eb/error.c:239 +msgid "no such search method" +msgstr "Τ褦ʸϤޤ" + +#: ../eb/error.c:240 +msgid "no such hook" +msgstr "Τ褦ʥեåϤޤ" + +#: ../eb/error.c:241 +msgid "no such binary" +msgstr "Τ褦ʥХʥϤޤ" + +#: ../eb/error.c:242 +msgid "different content type" +msgstr "ǡηۤʤäƤޤ" + +#. 55 -- 59 +#: ../eb/error.c:245 +msgid "no previous search" +msgstr "äƻꤵƤޤ" + +#: ../eb/error.c:246 +msgid "no such multi search" +msgstr "Τ褦ʣ縡Ϥޤ" + +#: ../eb/error.c:247 +msgid "no such multi search entry" +msgstr "Τ褦ʣ縡ΥȥϤޤ" + +#: ../eb/error.c:248 +msgid "too many words specified" +msgstr "ꤷƤñο¿ޤ" + +#: ../eb/error.c:249 +msgid "no word specified" +msgstr "ñ줬ĤꤵƤޤ" + +#. 60 -- 64 +#: ../eb/error.c:252 +msgid "no candidates" +msgstr "Ϥޤ" + +#: ../eb/error.c:253 +msgid "end of content" +msgstr "ʸϽǤ" + +#: ../eb/error.c:254 +msgid "no previous seek" +msgstr "˥¹ԤƤޤ" + +#: ../eb/error.c:255 +msgid "ebnet is not supported" +msgstr "ebnet ˤбƤޤ" + +#: ../eb/error.c:256 +msgid "failed to connect to an ebnet server" +msgstr "ebnet Ф³ǤޤǤ" + +#. 65 -- 69 +#: ../eb/error.c:259 +msgid "ebnet server is busy" +msgstr "ebnet Фӥ֤Ǥ" + +#: ../eb/error.c:260 +msgid "no access permission" +msgstr "Ĥޤ" + +#: ../eb/error.c:261 +msgid "booklist not bound" +msgstr "ҰϷդƤޤ" + +#: ../eb/error.c:262 +msgid "no such book" +msgstr "Τ褦ʽҤϤޤ" + +#: ../eb/error.c:263 +msgid "no such color" +msgstr "Τ褦ʿܤϤޤ" + +#: ../eb/error.c:279 +msgid "unknown error" +msgstr "̤ΤΥ顼Ǥ" diff --git a/lib/ebu/po-ebutils/Makefile b/lib/ebu/po-ebutils/Makefile new file mode 100644 index 0000000..6f38800 --- /dev/null +++ b/lib/ebu/po-ebutils/Makefile @@ -0,0 +1,171 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +## Note that the following macros must be set by your hand. +top_builddir = .. +subdir = po-ebutils + +TEXTDOMAIN = ebuutils +POFILES = ja.po +MOFILES = ja.mo +POTFILES = \ + $(top_srcdir)/libebutils/ebutils.c \ + $(top_srcdir)/libebutils/getopt.c \ + $(top_srcdir)/ebfont/ebfont.c \ + $(top_srcdir)/ebinfo/ebinfo.c \ + $(top_srcdir)/ebrefile/ebrefile.c \ + $(top_srcdir)/ebstopcode/ebstopcode.c \ + $(top_srcdir)/ebzip/copyfile.c \ + $(top_srcdir)/ebzip/ebzip.c \ + $(top_srcdir)/ebzip/ebzip1.c \ + $(top_srcdir)/ebzip/sebxa.c \ + $(top_srcdir)/ebzip/speedup.c \ + $(top_srcdir)/ebzip/unlinkfile.c \ + $(top_srcdir)/ebzip/unzipbook.c \ + $(top_srcdir)/ebzip/unzipfile.c \ + $(top_srcdir)/ebzip/zipbook.c \ + $(top_srcdir)/ebzip/zipfile.c \ + $(top_srcdir)/ebzip/zipinfobook.c \ + $(top_srcdir)/ebzip/zipinfofile.c +## end + +PACKAGE = ebu +VERSION = 4.5-20200413 + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. + +prefix = /usr/local +datarootdir = ${prefix}/share +datadir = ${datarootdir} +localedir = $(datadir)/locale + +mkdir_p = /usr/bin/mkdir -p +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +mkinstalldirs = $(install_sh) -d +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh + +MSGFMT = : +XGETTEXT = : +MSGMERGE = msgmerge + +DISTFILES = Makefile.in $(TEXTDOMAIN).pot $(MOFILES) $(POFILES) + +.SUFFIXES: +.SUFFIXES: .po .pox .mo + +.po.pox: + $(MAKE) $(TEXTDOMAIN).pot + $(MSGMERGE) $< $(srcdir)/$(TEXTDOMAIN).pot -o $*.pox + +.po.mo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.mo \ + && rm -f $$file && $(MSGFMT) -o $$file $< + +all: all-yes + +all-yes: $(MOFILES) +all-no: + +$(TEXTDOMAIN).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(TEXTDOMAIN) --add-comments \ + --keyword=_ --keyword=N_ $(POTFILES) \ + && test ! -f $(TEXTDOMAIN).po \ + || ( rm -f $(srcdir)/$(TEXTDOMAIN).pot \ + && mv $(TEXTDOMAIN).po $(srcdir)/$(TEXTDOMAIN).pot ) + +install: install-exec install-data +install-exec: +install-data: install-data-yes +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat \ + $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $(srcdir)/$$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + fi; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo; \ + done + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in + +check: all + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(TEXTDOMAIN).po *.old.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f *.mo + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(TEXTDOMAIN).pot + cd $(srcdir); \ + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(TEXTDOMAIN).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +Makefile: Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/po-ebutils/Makefile.in b/lib/ebu/po-ebutils/Makefile.in new file mode 100644 index 0000000..56acde2 --- /dev/null +++ b/lib/ebu/po-ebutils/Makefile.in @@ -0,0 +1,171 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +## Note that the following macros must be set by your hand. +top_builddir = .. +subdir = po-ebutils + +TEXTDOMAIN = ebuutils +POFILES = ja.po +MOFILES = ja.mo +POTFILES = \ + $(top_srcdir)/libebutils/ebutils.c \ + $(top_srcdir)/libebutils/getopt.c \ + $(top_srcdir)/ebfont/ebfont.c \ + $(top_srcdir)/ebinfo/ebinfo.c \ + $(top_srcdir)/ebrefile/ebrefile.c \ + $(top_srcdir)/ebstopcode/ebstopcode.c \ + $(top_srcdir)/ebzip/copyfile.c \ + $(top_srcdir)/ebzip/ebzip.c \ + $(top_srcdir)/ebzip/ebzip1.c \ + $(top_srcdir)/ebzip/sebxa.c \ + $(top_srcdir)/ebzip/speedup.c \ + $(top_srcdir)/ebzip/unlinkfile.c \ + $(top_srcdir)/ebzip/unzipbook.c \ + $(top_srcdir)/ebzip/unzipfile.c \ + $(top_srcdir)/ebzip/zipbook.c \ + $(top_srcdir)/ebzip/zipfile.c \ + $(top_srcdir)/ebzip/zipinfobook.c \ + $(top_srcdir)/ebzip/zipinfofile.c +## end + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ + +mkdir_p = @mkdir_p@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +mkinstalldirs = $(install_sh) -d +install_sh = @install_sh@ + +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge + +DISTFILES = Makefile.in $(TEXTDOMAIN).pot $(MOFILES) $(POFILES) + +.SUFFIXES: +.SUFFIXES: .po .pox .mo + +.po.pox: + $(MAKE) $(TEXTDOMAIN).pot + $(MSGMERGE) $< $(srcdir)/$(TEXTDOMAIN).pot -o $*.pox + +.po.mo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.mo \ + && rm -f $$file && $(MSGFMT) -o $$file $< + +all: all-@ENABLE_NLS@ + +all-yes: $(MOFILES) +all-no: + +$(TEXTDOMAIN).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(TEXTDOMAIN) --add-comments \ + --keyword=_ --keyword=N_ $(POTFILES) \ + && test ! -f $(TEXTDOMAIN).po \ + || ( rm -f $(srcdir)/$(TEXTDOMAIN).pot \ + && mv $(TEXTDOMAIN).po $(srcdir)/$(TEXTDOMAIN).pot ) + +install: install-exec install-data +install-exec: +install-data: install-data-@ENABLE_NLS@ +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat \ + $(DESTDIR)$$dir/$(TEXTDOMAIN).mo; \ + echo "installing $(srcdir)/$$cat as" \ + "$(DESTDIR)$$dir/$(TEXTDOMAIN).mo"; \ + fi; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo; \ + done + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in + +check: all + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(TEXTDOMAIN).po *.old.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f *.mo + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(TEXTDOMAIN).pot + cd $(srcdir); \ + catalogs='$(MOFILES)'; \ + for cat in $$catalogs; do \ + cat=`echo $$cat | sed 's/^.*\/\([^\/]*\)$$/\1/'` ; \ + lang=`echo $$cat | sed 's/\.mo$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(TEXTDOMAIN).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +Makefile: Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/po-ebutils/ebuutils.pot b/lib/ebu/po-ebutils/ebuutils.pot new file mode 100644 index 0000000..a01f060 --- /dev/null +++ b/lib/ebu/po-ebutils/ebuutils.pot @@ -0,0 +1,1029 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-13 11:53+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../libebutils/ebutils.c:114 +#, c-format +msgid "try `%s --help' for more information\n" +msgstr "" + +#: ../libebutils/ebutils.c:207 +#, c-format +msgid "%s: too many subbooks\n" +msgstr "" + +#: ../libebutils/ebutils.c:228 +#, c-format +msgid "%s: invalid subbook name `%s...'\n" +msgstr "" + +#: ../libebutils/getopt.c:105 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "" + +#: ../libebutils/getopt.c:107 +#, c-format +msgid "%s: option `%.*s' requires an argument\n" +msgstr "" + +#: ../libebutils/getopt.c:109 +#, c-format +msgid "%s: option `--%.*s' is ambiguous\n" +msgstr "" + +#: ../libebutils/getopt.c:111 +#, c-format +msgid "%s: option `--%.*s' doesn't allow an argument\n" +msgstr "" + +#: ../libebutils/getopt.c:113 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "" + +#: ../libebutils/getopt.c:115 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "" + +#: ../libebutils/getopt.c:117 +#, c-format +msgid "%s: unrecognized option `--%.*s'\n" +msgstr "" + +#: ../ebfont/ebfont.c:311 +#: ../ebfont/ebfont.c:320 +#: ../ebrefile/ebrefile.c:225 +#: ../ebrefile/ebrefile.c:233 +#: ../ebzip/ebzip.c:286 +#: ../ebzip/ebzip.c:296 +#, c-format +msgid "%s: too long output directory path\n" +msgstr "" + +#: ../ebfont/ebfont.c:354 +#: ../ebinfo/ebinfo.c:176 +#: ../ebrefile/ebrefile.c:265 +#: ../ebstopcode/ebstopcode.c:261 +#: ../ebzip/ebzip.c:390 +#, c-format +msgid "%s: too many arguments\n" +msgstr "" + +#: ../ebfont/ebfont.c:402 +#: ../ebzip/unzipbook.c:93 +#: ../ebzip/zipbook.c:94 +#: ../ebzip/zipinfobook.c:95 +#, c-format +msgid "%s: unknown subbook name `%s'\n" +msgstr "" + +#: ../ebfont/ebfont.c:465 +#, c-format +msgid "%s: unknown font height `%s...'\n" +msgstr "" + +#: ../ebfont/ebfont.c:482 +#, c-format +msgid "%s: unknown font height `%s'\n" +msgstr "" + +#: ../ebfont/ebfont.c:543 +#, c-format +msgid "%s: unknown image format name `%s...'\n" +msgstr "" + +#: ../ebfont/ebfont.c:556 +#, c-format +msgid "%s: unknown image format name `%s'\n" +msgstr "" + +#: ../ebfont/ebfont.c:593 +#: ../ebinfo/ebinfo.c:616 +#: ../ebrefile/ebrefile.c:332 +#: ../ebzip/ebzip.c:567 +#, c-format +msgid "Usage: %s [option...] [book-directory]\n" +msgstr "" + +#: ../ebfont/ebfont.c:594 +#: ../ebinfo/ebinfo.c:618 +#: ../ebrefile/ebrefile.c:333 +#: ../ebstopcode/ebstopcode.c:451 +#: ../ebzip/ebzip.c:568 +#, c-format +msgid "Options:\n" +msgstr "" + +#: ../ebfont/ebfont.c:595 +#, c-format +msgid " -d --debug --verbose degug mode\n" +msgstr "" + +#: ../ebfont/ebfont.c:596 +#, c-format +msgid " -f HEIGHT[,HEIGHT...] --font-height HEIGHT[,HEIGHT...]\n" +msgstr "" + +#: ../ebfont/ebfont.c:597 +#, c-format +msgid "" +" generate fonts with HEIGHT; 16, 24, 30 or 48\n" +msgstr "" + +#: ../ebfont/ebfont.c:598 +#: ../ebfont/ebfont.c:604 +#: ../ebfont/ebfont.c:608 +#: ../ebfont/ebfont.c:616 +#: ../ebinfo/ebinfo.c:625 +#: ../ebrefile/ebrefile.c:337 +#: ../ebrefile/ebrefile.c:345 +#: ../ebstopcode/ebstopcode.c:465 +#: ../ebzip/ebzip.c:588 +#: ../ebzip/ebzip.c:606 +#, c-format +msgid " (default: %s)\n" +msgstr "" + +#: ../ebfont/ebfont.c:600 +#: ../ebinfo/ebinfo.c:619 +#: ../ebrefile/ebrefile.c:334 +#: ../ebstopcode/ebstopcode.c:454 +#: ../ebzip/ebzip.c:571 +#, c-format +msgid " -h --help display this help, then exit\n" +msgstr "" + +#: ../ebfont/ebfont.c:601 +#, c-format +msgid " -i FORMAT[,FORMAT...] --image-format FORMAT[,FORMAT...]\n" +msgstr "" + +#: ../ebfont/ebfont.c:602 +#, c-format +msgid " generate fonts as FORMAT;\n" +msgstr "" + +#: ../ebfont/ebfont.c:603 +#, c-format +msgid " xbm, xpm, gif, bmp or png\n" +msgstr "" + +#: ../ebfont/ebfont.c:606 +#: ../ebrefile/ebrefile.c:335 +#: ../ebzip/ebzip.c:586 +#, c-format +msgid " -o DIRECTORY --output-directory DIRECTORY\n" +msgstr "" + +#: ../ebfont/ebfont.c:607 +#, c-format +msgid " output fonts under DIRECTORY\n" +msgstr "" + +#: ../ebfont/ebfont.c:610 +#: ../ebrefile/ebrefile.c:339 +#: ../ebzip/ebzip.c:594 +#, c-format +msgid " -S SUBBOOK[,SUBBOOK...] --subbook SUBBOOK[,SUBBOOK...]\n" +msgstr "" + +#: ../ebfont/ebfont.c:611 +#: ../ebrefile/ebrefile.c:340 +#: ../ebzip/ebzip.c:595 +#, c-format +msgid " target subbook\n" +msgstr "" + +#: ../ebfont/ebfont.c:612 +#: ../ebrefile/ebrefile.c:341 +#: ../ebzip/ebzip.c:596 +#, c-format +msgid " (default: all subbooks)\n" +msgstr "" + +#: ../ebfont/ebfont.c:613 +#: ../ebinfo/ebinfo.c:622 +#: ../ebrefile/ebrefile.c:342 +#: ../ebstopcode/ebstopcode.c:462 +#: ../ebzip/ebzip.c:599 +#, c-format +msgid " -v --version display version number, then exit\n" +msgstr "" + +#: ../ebfont/ebfont.c:614 +#: ../ebinfo/ebinfo.c:623 +#: ../ebrefile/ebrefile.c:343 +#: ../ebstopcode/ebstopcode.c:463 +#: ../ebzip/ebzip.c:604 +#, c-format +msgid "" +"\n" +"Argument:\n" +msgstr "" + +#: ../ebfont/ebfont.c:615 +#: ../ebinfo/ebinfo.c:624 +#: ../ebrefile/ebrefile.c:344 +#: ../ebstopcode/ebstopcode.c:464 +#: ../ebzip/ebzip.c:605 +#, c-format +msgid " book-directory top directory of a CD-ROM book\n" +msgstr "" + +#: ../ebfont/ebfont.c:618 +#: ../ebinfo/ebinfo.c:627 +#: ../ebrefile/ebrefile.c:348 +#: ../ebstopcode/ebstopcode.c:467 +#: ../ebzip/ebzip.c:613 +#, c-format +msgid "" +"\n" +"Report bugs to %s.\n" +msgstr "" + +#: ../ebfont/ebfont.c:1034 +#: ../ebrefile/ebrefile.c:465 +#: ../ebrefile/ebrefile.c:481 +#: ../ebrefile/ebrefile.c:696 +#: ../ebrefile/ebrefile.c:709 +#: ../ebzip/copyfile.c:148 +#: ../ebzip/copyfile.c:172 +#: ../ebzip/sebxa.c:69 +#: ../ebzip/sebxa.c:211 +#: ../ebzip/zipfile.c:219 +#, c-format +msgid "%s: failed to open the file, %s: %s\n" +msgstr "" + +#: ../ebfont/ebfont.c:1039 +#: ../ebfont/ebfont.c:1044 +#: ../ebrefile/ebrefile.c:736 +#: ../ebzip/copyfile.c:209 +#: ../ebzip/unzipfile.c:287 +#: ../ebzip/zipfile.c:471 +#: ../ebzip/zipfile.c:544 +#, c-format +msgid "%s: failed to write to the file, %s: %s\n" +msgstr "" + +#: ../ebfont/ebfont.c:1057 +#, c-format +msgid "%s: failed to close the file, %s: %s\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:239 +msgid "Name" +msgstr "" + +#: ../ebinfo/ebinfo.c:239 +msgid "Title" +msgstr "" + +#: ../ebinfo/ebinfo.c:322 +#, c-format +msgid "disc type: " +msgstr "" + +#: ../ebinfo/ebinfo.c:337 +#, c-format +msgid "character code: " +msgstr "" + +#: ../ebinfo/ebinfo.c:352 +#, c-format +msgid "unknown\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:365 +#, c-format +msgid "" +"the number of subbooks: %d\n" +"\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:371 +#, c-format +msgid "subbook %d:\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:381 +msgid " title: " +msgstr "" + +#: ../ebinfo/ebinfo.c:393 +#, c-format +msgid " directory: %s\n" +msgstr "" + +#. +#. * Output supported methods. +#. +#: ../ebinfo/ebinfo.c:408 +#, c-format +msgid " search methods: " +msgstr "" + +#: ../ebinfo/ebinfo.c:410 +msgid "word " +msgstr "" + +#: ../ebinfo/ebinfo.c:412 +msgid "endword " +msgstr "" + +#: ../ebinfo/ebinfo.c:414 +msgid "keyword " +msgstr "" + +#: ../ebinfo/ebinfo.c:416 +msgid "cross " +msgstr "" + +#: ../ebinfo/ebinfo.c:418 +msgid "multi " +msgstr "" + +#: ../ebinfo/ebinfo.c:420 +msgid "menu " +msgstr "" + +#: ../ebinfo/ebinfo.c:422 +msgid "image-menu " +msgstr "" + +#: ../ebinfo/ebinfo.c:424 +msgid "copyright " +msgstr "" + +#: ../ebinfo/ebinfo.c:426 +msgid "color-chart " +msgstr "" + +#. +#. * Output a font list. +#. +#: ../ebinfo/ebinfo.c:432 +msgid " font sizes: " +msgstr "" + +#. +#. * Output character range of the narrow font. +#. +#: ../ebinfo/ebinfo.c:454 +msgid " narrow font characters: " +msgstr "" + +#. +#. * Output character range of the wide font. +#. +#: ../ebinfo/ebinfo.c:482 +#, c-format +msgid " wide font characters: " +msgstr "" + +#: ../ebinfo/ebinfo.c:565 +#, c-format +msgid " multi search %d:\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:579 +msgid " title: " +msgstr "" + +#: ../ebinfo/ebinfo.c:592 +#, c-format +msgid " label %d: " +msgstr "" + +#: ../ebinfo/ebinfo.c:596 +msgid " candidates: " +msgstr "" + +#: ../ebinfo/ebinfo.c:598 +msgid "exist\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:600 +msgid "not-exist\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:620 +#, c-format +msgid "" +" -l --book-list output a list of books on an EBENT server\n" +msgstr "" + +#: ../ebinfo/ebinfo.c:621 +#, c-format +msgid " -m --multi-search also output multi-search information\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:287 +#, c-format +msgid "%s: too long book directory path\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:336 +#: ../ebzip/ebzip.c:587 +#, c-format +msgid " ouput files under DIRECTORY\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:381 +#, c-format +msgid "%s: no catalog file: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:420 +#, c-format +msgid "%s: failed to move the file, %s: %s -> %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:490 +#: ../ebrefile/ebrefile.c:511 +#: ../ebrefile/ebrefile.c:559 +#: ../ebrefile/ebrefile.c:599 +#: ../ebzip/sebxa.c:90 +#: ../ebzip/sebxa.c:232 +#, c-format +msgid "%s: failed to read the file, %s: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:497 +#: ../ebrefile/ebrefile.c:545 +#: ../ebrefile/ebrefile.c:566 +#: ../ebrefile/ebrefile.c:604 +#: ../ebrefile/ebrefile.c:620 +#: ../ebrefile/ebrefile.c:642 +#: ../ebzip/sebxa.c:142 +#, c-format +msgid "%s: failed to write the file, %s: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:584 +#, c-format +msgid "%s: warning: no such subbook: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:637 +#: ../ebzip/sebxa.c:78 +#: ../ebzip/sebxa.c:130 +#: ../ebzip/sebxa.c:220 +#: ../ebzip/zipfile.c:390 +#: ../ebzip/zipfile.c:465 +#: ../ebzip/zipfile.c:538 +#, c-format +msgid "%s: failed to seek the file, %s: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:686 +#: ../ebzip/copyfile.c:74 +#: ../ebzip/unzipfile.c:130 +#: ../ebzip/zipfile.c:115 +#, c-format +msgid "%s: no such file: %s\n" +msgstr "" + +#: ../ebrefile/ebrefile.c:727 +#: ../ebzip/copyfile.c:191 +#, c-format +msgid "%s: failed to read from the file, %s: %s\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:256 +#, c-format +msgid "%s: too few argument\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:345 +#, c-format +msgid "%s: invalid stop code `%s'\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:380 +#, c-format +msgid "%s: invalid text length `%s'\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:437 +#, c-format +msgid "%s: invalid text position `%s'\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:449 +#, c-format +msgid "Usage: %s [option...] [book-directory] subbook\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:452 +#, c-format +msgid " -c CODE, --code CODE\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:453 +#, c-format +msgid " set stop code manually\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:455 +#, c-format +msgid " -l LENGTH, --text-length LENGTH\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:456 +#, c-format +msgid " maximum length of output text\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:457 +#: ../ebzip/ebzip.c:577 +#: ../ebzip/ebzip.c:582 +#, c-format +msgid " (default: %d)\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:459 +#, c-format +msgid " -n --no-candidates suppress stop code candidates\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:460 +#, c-format +msgid " -p PAGE:OFFSET, --text-position PAGE:OFFSET\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:461 +#, c-format +msgid " start position of text\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:503 +#, c-format +msgid "%s: failed to bind the book, %s: %s\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:522 +#, c-format +msgid "%s: failed to set the current subbook, %s\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:557 +#, c-format +msgid "%s: failed to get text information, %s\n" +msgstr "" + +#: ../ebstopcode/ebstopcode.c:587 +#, c-format +msgid "%s: failed to read text, %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:65 +#, c-format +msgid "==> copy %s <==\n" +msgstr "" + +#: ../ebzip/copyfile.c:66 +#: ../ebzip/unzipfile.c:122 +#: ../ebzip/zipfile.c:107 +#, c-format +msgid "output to %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:85 +#: ../ebzip/unzipfile.c:141 +#: ../ebzip/zipfile.c:126 +#, c-format +msgid "" +"the input and output files are the same, skipped.\n" +"\n" +msgstr "" + +#: ../ebzip/copyfile.c:96 +#: ../ebzip/copyfile.c:244 +#: ../ebzip/sebxa.c:152 +#: ../ebzip/unzipfile.c:323 +#: ../ebzip/zipfile.c:557 +#, c-format +msgid "completed (%llu / %llu bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:100 +#: ../ebzip/copyfile.c:248 +#: ../ebzip/sebxa.c:156 +#: ../ebzip/unzipfile.c:327 +#: ../ebzip/zipfile.c:572 +msgid "completed (%I64u / %I64u bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:104 +#: ../ebzip/copyfile.c:252 +#: ../ebzip/sebxa.c:160 +#: ../ebzip/zipfile.c:586 +#, c-format +msgid "completed (%lu / %lu bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:120 +#: ../ebzip/unzipfile.c:164 +#: ../ebzip/zipfile.c:155 +msgid "" +"already exists, skip the file\n" +"\n" +msgstr "" + +#: ../ebzip/copyfile.c:128 +#: ../ebzip/unzipfile.c:171 +#: ../ebzip/zipfile.c:162 +#, c-format +msgid "" +"\n" +"the file already exists: %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:130 +#: ../ebzip/unzipfile.c:173 +#: ../ebzip/zipfile.c:164 +msgid "do you wish to overwrite (y or n)? " +msgstr "" + +#: ../ebzip/copyfile.c:137 +#: ../ebzip/unzipfile.c:180 +#: ../ebzip/zipfile.c:171 +#, c-format +msgid "%s: failed to unlink the file: %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:195 +#: ../ebzip/copyfile.c:200 +#: ../ebzip/sebxa.c:94 +#: ../ebzip/sebxa.c:236 +#: ../ebzip/unzipfile.c:261 +#: ../ebzip/unzipfile.c:266 +#: ../ebzip/zipfile.c:319 +#: ../ebzip/zipfile.c:324 +#, c-format +msgid "%s: unexpected EOF: %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:220 +#: ../ebzip/unzipfile.c:299 +#: ../ebzip/zipfile.c:484 +#, c-format +msgid "%4.1f%% done (%llu / %llu bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:225 +#: ../ebzip/unzipfile.c:304 +#: ../ebzip/zipfile.c:489 +msgid "%4.1f%% done (%I64u / %I64u bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:230 +#: ../ebzip/unzipfile.c:309 +#: ../ebzip/zipfile.c:494 +#, c-format +msgid "%4.1f%% done (%lu / %lu bytes)\n" +msgstr "" + +#: ../ebzip/copyfile.c:341 +#: ../ebzip/unzipbook.c:172 +#: ../ebzip/unzipbook.c:290 +#: ../ebzip/unzipbook.c:302 +#: ../ebzip/unzipbook.c:379 +#: ../ebzip/zipbook.c:174 +#: ../ebzip/zipbook.c:296 +#: ../ebzip/zipbook.c:308 +#: ../ebzip/zipbook.c:387 +#, c-format +msgid "%s: failed to create a directory, %s: %s\n" +msgstr "" + +#: ../ebzip/copyfile.c:351 +#, c-format +msgid "%s: failed to open the directory, %s: %s\n" +msgstr "" + +#: ../ebzip/ebzip.c:358 +#, c-format +msgid "%s: invalid overwrite mode: %s\n" +msgstr "" + +#: ../ebzip/ebzip.c:463 +#, c-format +msgid "%s: invalid compression level `%s'\n" +msgstr "" + +#: ../ebzip/ebzip.c:489 +#, c-format +msgid "%s: invalid slice number `%s'\n" +msgstr "" + +#: ../ebzip/ebzip.c:531 +#: ../ebzip/ebzip.c:550 +#, c-format +msgid "%s: invalid content name `%s'\n" +msgstr "" + +#: ../ebzip/ebzip.c:569 +#, c-format +msgid " -f --force-overwrite set overwrite mode to `force'\n" +msgstr "" + +#: ../ebzip/ebzip.c:570 +#, c-format +msgid " (same as `--overwrite force')\n" +msgstr "" + +#: ../ebzip/ebzip.c:572 +#, c-format +msgid " -i --information list information of compressed files\n" +msgstr "" + +#: ../ebzip/ebzip.c:573 +#, c-format +msgid " -k --keep don't delete original files\n" +msgstr "" + +#: ../ebzip/ebzip.c:574 +#, c-format +msgid " -l INTEGER --level INTEGER\n" +msgstr "" + +#: ../ebzip/ebzip.c:575 +#, c-format +msgid " compression level; 0..%d\n" +msgstr "" + +#: ../ebzip/ebzip.c:579 +#, c-format +msgid " -r INTEGER --slice-number INTEGER\n" +msgstr "" + +#: ../ebzip/ebzip.c:580 +#, c-format +msgid "" +" set a number of slices to load at a time; 1.." +"%d\n" +msgstr "" + +#: ../ebzip/ebzip.c:584 +#, c-format +msgid " -n --no-overwrite set overwrite mode to `no'\n" +msgstr "" + +#: ../ebzip/ebzip.c:585 +#, c-format +msgid " (same as `--overwrite no')\n" +msgstr "" + +#: ../ebzip/ebzip.c:590 +#, c-format +msgid " -q --quiet --silence suppress all warnings\n" +msgstr "" + +#: ../ebzip/ebzip.c:591 +#, c-format +msgid " -s TYPE[,TYPE] --skip-content TYPE[,TYPE...]\n" +msgstr "" + +#: ../ebzip/ebzip.c:592 +#, c-format +msgid "" +" skip content; font, graphic, sound or movie\n" +msgstr "" + +#: ../ebzip/ebzip.c:593 +#, c-format +msgid " (default: none is skipped)\n" +msgstr "" + +#: ../ebzip/ebzip.c:597 +#, c-format +msgid " -t --test only check for input files\n" +msgstr "" + +#: ../ebzip/ebzip.c:598 +#, c-format +msgid " -u --uncompress uncompress files\n" +msgstr "" + +#: ../ebzip/ebzip.c:600 +#, c-format +msgid " -w MODE --overwrite MODE set overwrite mode of output files;\n" +msgstr "" + +#: ../ebzip/ebzip.c:601 +#, c-format +msgid " confirm, force or no\n" +msgstr "" + +#: ../ebzip/ebzip.c:602 +#, c-format +msgid " (default: confirm)\n" +msgstr "" + +#: ../ebzip/ebzip.c:603 +#, c-format +msgid " -z --compress compress files\n" +msgstr "" + +#: ../ebzip/ebzip.c:609 +#, c-format +msgid "" +"\n" +"Default action:\n" +msgstr "" + +#: ../ebzip/ebzip.c:610 +#, c-format +msgid " When invoked as `ebuunzip', uncompression is the default action.\n" +msgstr "" + +#: ../ebzip/ebzip.c:611 +#, c-format +msgid "" +" When invoked as `ebuzipinfo', listing information is the default action.\n" +msgstr "" + +#: ../ebzip/ebzip.c:612 +#, c-format +msgid " Otherwise, compression is the default action.\n" +msgstr "" + +#: ../ebzip/sebxa.c:60 +#, c-format +msgid "==> rewrite %s <==\n" +msgstr "" + +#: ../ebzip/speedup.c:79 +#: ../ebzip/unzipfile.c:190 +#: ../ebzip/unzipfile.c:228 +#: ../ebzip/zipfile.c:181 +#: ../ebzip/zipinfofile.c:104 +#, c-format +msgid "%s: failed to open the file: %s\n" +msgstr "" + +#: ../ebzip/speedup.c:85 +#: ../ebzip/speedup.c:90 +#: ../ebzip/speedup.c:120 +#: ../ebzip/speedup.c:125 +#, c-format +msgid "%s: failed to read the file: %s\n" +msgstr "" + +#: ../ebzip/unlinkfile.c:39 +#, c-format +msgid "%s: warning: memory exhausted, file %s is not to be unlinked\n" +msgstr "" + +#: ../ebzip/unlinkfile.c:56 +#, c-format +msgid "%s: warning: failed to unlink the file: %s\n" +msgstr "" + +#: ../ebzip/unzipfile.c:121 +#, c-format +msgid "==> uncompress %s <==\n" +msgstr "" + +#: ../ebzip/unzipfile.c:152 +#: ../ebzip/zipfile.c:138 +#: ../ebzip/zipfile.c:368 +#, c-format +msgid "%s: memory exhausted\n" +msgstr "" + +#: ../ebzip/unzipfile.c:251 +#: ../ebzip/zipfile.c:308 +#, c-format +msgid "%s: failed to seek the file: %s\n" +msgstr "" + +#: ../ebzip/unzipfile.c:257 +#: ../ebzip/zipfile.c:315 +#, c-format +msgid "%s: failed to read from the file: %s\n" +msgstr "" + +#: ../ebzip/unzipfile.c:331 +#: ../ebzip/zipfile.c:595 +#, c-format +msgid "" +"%lu -> %lu bytes\n" +"\n" +msgstr "" + +#: ../ebzip/unzipfile.c:365 +#, c-format +msgid "%s: CRC error: %s\n" +msgstr "" + +#: ../ebzip/zipfile.c:106 +#, c-format +msgid "==> compress %s <==\n" +msgstr "" + +#: ../ebzip/zipfile.c:275 +#: ../ebzip/zipfile.c:282 +#: ../ebzip/zipfile.c:397 +#, c-format +msgid "%s: failed to write to the file: %s\n" +msgstr "" + +#: ../ebzip/zipfile.c:561 +#, c-format +msgid "" +"%llu -> %llu bytes (%4.1f%%)\n" +"\n" +msgstr "" + +#: ../ebzip/zipfile.c:567 +#, c-format +msgid "" +"%llu -> %llu bytes\n" +"\n" +msgstr "" + +#: ../ebzip/zipfile.c:576 +msgid "" +"%I64u -> %I64u bytes (%4.1f%%)\n" +"\n" +msgstr "" + +#: ../ebzip/zipfile.c:581 +msgid "" +"%I64u -> %I64u bytes\n" +"\n" +msgstr "" + +#: ../ebzip/zipfile.c:590 +#, c-format +msgid "" +"%lu -> %lu bytes (%4.1f%%)\n" +"\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:132 +#, c-format +msgid "%llu bytes (not compressed)\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:135 +msgid "%I64u bytes (not compressed)\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:138 +#, c-format +msgid "%lu bytes (not compressed)\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:143 +#, c-format +msgid "%llu -> %llu bytes " +msgstr "" + +#: ../ebzip/zipinfofile.c:147 +msgid "%I64u -> %I64u bytes " +msgstr "" + +#: ../ebzip/zipinfofile.c:151 +#, c-format +msgid "%lu -> %lu bytes " +msgstr "" + +#: ../ebzip/zipinfofile.c:156 +msgid "(empty original file, " +msgstr "" + +#: ../ebzip/zipinfofile.c:162 +#, c-format +msgid "ebzip level %d compression)\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:164 +#, c-format +msgid "S-EBXA compression)\n" +msgstr "" + +#: ../ebzip/zipinfofile.c:166 +#, c-format +msgid "EPWING compression)\n" +msgstr "" diff --git a/lib/ebu/po-ebutils/ja.mo b/lib/ebu/po-ebutils/ja.mo new file mode 100644 index 0000000..3e5622e Binary files /dev/null and b/lib/ebu/po-ebutils/ja.mo differ diff --git a/lib/ebu/po-ebutils/ja.po b/lib/ebu/po-ebutils/ja.po new file mode 100644 index 0000000..af22774 --- /dev/null +++ b/lib/ebu/po-ebutils/ja.po @@ -0,0 +1,954 @@ +# +# Copyright (C) 2004-2006 Motoyuki Kasahara +# +# +msgid "" +msgstr "" +"Project-Id-Version: ebutils 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-13 11:53+0900\n" +"PO-Revision-Date: 2001-03-18 23:28+0900\n" +"Last-Translator: Motoyuki Kasahara \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../libebutils/ebutils.c:114 +#, c-format +msgid "try `%s --help' for more information\n" +msgstr "`%s --help' Ǥܤޤ\n" + +#: ../libebutils/ebutils.c:207 +#, c-format +msgid "%s: too many subbooks\n" +msgstr "%s: ܤο¿ޤ\n" + +#: ../libebutils/ebutils.c:228 +#, c-format +msgid "%s: invalid subbook name `%s...'\n" +msgstr "%s: `%s...' Ȥܤ̾ΤǤ\n" + +#: ../libebutils/getopt.c:105 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: ץˤϰɬפǤ -- %c\n" + +#: ../libebutils/getopt.c:107 +#, c-format +msgid "%s: option `%.*s' requires an argument\n" +msgstr "%s: ץ `%.*s' ˤϰɬפǤ\n" + +#: ../libebutils/getopt.c:109 +#, c-format +msgid "%s: option `--%.*s' is ambiguous\n" +msgstr "%s: ץ `--%.*s' ۣǤ\n" + +#: ../libebutils/getopt.c:111 +#, c-format +msgid "%s: option `--%.*s' doesn't allow an argument\n" +msgstr "%s: ץ `--%.*s' ϰƤޤ\n" + +#: ../libebutils/getopt.c:113 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ʥץǤ -- %c\n" + +#: ../libebutils/getopt.c:115 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ʥץǤ -- %c\n" + +#: ../libebutils/getopt.c:117 +#, c-format +msgid "%s: unrecognized option `--%.*s'\n" +msgstr "%s: `--%.*s' ̤ΤΥץǤ\n" + +#: ../ebfont/ebfont.c:311 ../ebfont/ebfont.c:320 ../ebrefile/ebrefile.c:225 +#: ../ebrefile/ebrefile.c:233 ../ebzip/ebzip.c:286 ../ebzip/ebzip.c:296 +#, c-format +msgid "%s: too long output directory path\n" +msgstr "%s: Υǥ쥯ȥΥѥ̾Ĺޤ\n" + +#: ../ebfont/ebfont.c:354 ../ebinfo/ebinfo.c:176 ../ebrefile/ebrefile.c:265 +#: ../ebstopcode/ebstopcode.c:261 ../ebzip/ebzip.c:390 +#, c-format +msgid "%s: too many arguments\n" +msgstr "%s: ¿ޤ\n" + +#: ../ebfont/ebfont.c:402 ../ebzip/unzipbook.c:93 ../ebzip/zipbook.c:94 +#: ../ebzip/zipinfobook.c:95 +#, c-format +msgid "%s: unknown subbook name `%s'\n" +msgstr "%s: `%s' ̤Τ̾Ǥ\n" + +#: ../ebfont/ebfont.c:465 +#, c-format +msgid "%s: unknown font height `%s...'\n" +msgstr "%s: `%s...' ̤Τι⤵ΥեȤǤ\n" + +#: ../ebfont/ebfont.c:482 +#, c-format +msgid "%s: unknown font height `%s'\n" +msgstr "%s: `%s' ̤Τι⤵ΥեȤǤ\n" + +#: ../ebfont/ebfont.c:543 +#, c-format +msgid "%s: unknown image format name `%s...'\n" +msgstr "%s: `%s...' ̤Τβ̾Ǥ\n" + +#: ../ebfont/ebfont.c:556 +#, c-format +msgid "%s: unknown image format name `%s'\n" +msgstr "%s: `%s' ̤Τβ̾Ǥ\n" + +#: ../ebfont/ebfont.c:593 ../ebinfo/ebinfo.c:616 ../ebrefile/ebrefile.c:332 +#: ../ebzip/ebzip.c:567 +#, c-format +msgid "Usage: %s [option...] [book-directory]\n" +msgstr "ˡ: %s [ץ...] [ҤΥǥ쥯ȥ]\n" + +#: ../ebfont/ebfont.c:594 ../ebinfo/ebinfo.c:618 ../ebrefile/ebrefile.c:333 +#: ../ebstopcode/ebstopcode.c:451 ../ebzip/ebzip.c:568 +#, c-format +msgid "Options:\n" +msgstr "ץ:\n" + +#: ../ebfont/ebfont.c:595 +#, c-format +msgid " -d --debug --verbose degug mode\n" +msgstr " -d --debug --verbose ǥХå⡼\n" + +#: ../ebfont/ebfont.c:596 +#, c-format +msgid " -f HEIGHT[,HEIGHT...] --font-height HEIGHT[,HEIGHT...]\n" +msgstr " -f ⤵[,⤵...] --font-height ⤵[,⤵...]\n" + +#: ../ebfont/ebfont.c:597 +#, c-format +msgid "" +" generate fonts with HEIGHT; 16, 24, 30 or 48\n" +msgstr "" +" ֹ⤵פΥեȤ\n" +" ⤵ 16, 24, 30, 48 Τ줫\n" + +#: ../ebfont/ebfont.c:598 ../ebfont/ebfont.c:604 ../ebfont/ebfont.c:608 +#: ../ebfont/ebfont.c:616 ../ebinfo/ebinfo.c:625 ../ebrefile/ebrefile.c:337 +#: ../ebrefile/ebrefile.c:345 ../ebstopcode/ebstopcode.c:465 +#: ../ebzip/ebzip.c:588 ../ebzip/ebzip.c:606 +#, c-format +msgid " (default: %s)\n" +msgstr " (ά: %s)\n" + +#: ../ebfont/ebfont.c:600 ../ebinfo/ebinfo.c:619 ../ebrefile/ebrefile.c:334 +#: ../ebstopcode/ebstopcode.c:454 ../ebzip/ebzip.c:571 +#, c-format +msgid " -h --help display this help, then exit\n" +msgstr " -h --help Υإפɽƽλ\n" + +#: ../ebfont/ebfont.c:601 +#, c-format +msgid " -i FORMAT[,FORMAT...] --image-format FORMAT[,FORMAT...]\n" +msgstr " -i [,...] --image-format [,...]\n" + +#: ../ebfont/ebfont.c:602 +#, c-format +msgid " generate fonts as FORMAT;\n" +msgstr " ֲפΥեȤ\n" + +#: ../ebfont/ebfont.c:603 +#, c-format +msgid " xbm, xpm, gif, bmp or png\n" +msgstr " xbm, xpm, gif, bmp, png Τ줫\n" + +#: ../ebfont/ebfont.c:606 ../ebrefile/ebrefile.c:335 ../ebzip/ebzip.c:586 +#, c-format +msgid " -o DIRECTORY --output-directory DIRECTORY\n" +msgstr " -o ǥ쥯ȥ --output-directory ǥ쥯ȥ\n" + +#: ../ebfont/ebfont.c:607 +#, c-format +msgid " output fonts under DIRECTORY\n" +msgstr " եȤ֥ǥ쥯ȥפβ\n" + +#: ../ebfont/ebfont.c:610 ../ebrefile/ebrefile.c:339 ../ebzip/ebzip.c:594 +#, c-format +msgid " -S SUBBOOK[,SUBBOOK...] --subbook SUBBOOK[,SUBBOOK...]\n" +msgstr " -S [,...] --subbook [,...]\n" + +#: ../ebfont/ebfont.c:611 ../ebrefile/ebrefile.c:340 ../ebzip/ebzip.c:595 +#, c-format +msgid " target subbook\n" +msgstr " оݤ\n" + +#: ../ebfont/ebfont.c:612 ../ebrefile/ebrefile.c:341 ../ebzip/ebzip.c:596 +#, c-format +msgid " (default: all subbooks)\n" +msgstr " (ά: ٤Ƥ)\n" + +#: ../ebfont/ebfont.c:613 ../ebinfo/ebinfo.c:622 ../ebrefile/ebrefile.c:342 +#: ../ebstopcode/ebstopcode.c:462 ../ebzip/ebzip.c:599 +#, c-format +msgid " -v --version display version number, then exit\n" +msgstr " -v --version Сֹɽƽλ\n" + +#: ../ebfont/ebfont.c:614 ../ebinfo/ebinfo.c:623 ../ebrefile/ebrefile.c:343 +#: ../ebstopcode/ebstopcode.c:463 ../ebzip/ebzip.c:604 +#, c-format +msgid "" +"\n" +"Argument:\n" +msgstr "" +"\n" +":\n" + +#: ../ebfont/ebfont.c:615 ../ebinfo/ebinfo.c:624 ../ebrefile/ebrefile.c:344 +#: ../ebstopcode/ebstopcode.c:464 ../ebzip/ebzip.c:605 +#, c-format +msgid " book-directory top directory of a CD-ROM book\n" +msgstr " ҤΥǥ쥯ȥ CD-ROM ҤΥȥåץǥ쥯ȥ\n" + +#: ../ebfont/ebfont.c:618 ../ebinfo/ebinfo.c:627 ../ebrefile/ebrefile.c:348 +#: ../ebstopcode/ebstopcode.c:467 ../ebzip/ebzip.c:613 +#, c-format +msgid "" +"\n" +"Report bugs to %s.\n" +msgstr "" +"\n" +"Х %s 𤷤Ʋ\n" + +#: ../ebfont/ebfont.c:1034 ../ebrefile/ebrefile.c:465 +#: ../ebrefile/ebrefile.c:481 ../ebrefile/ebrefile.c:696 +#: ../ebrefile/ebrefile.c:709 ../ebzip/copyfile.c:148 ../ebzip/copyfile.c:172 +#: ../ebzip/sebxa.c:69 ../ebzip/sebxa.c:211 ../ebzip/zipfile.c:219 +#, c-format +msgid "%s: failed to open the file, %s: %s\n" +msgstr "%s: ե򳫤ޤǤ, %s: %s\n" + +#: ../ebfont/ebfont.c:1039 ../ebfont/ebfont.c:1044 ../ebrefile/ebrefile.c:736 +#: ../ebzip/copyfile.c:209 ../ebzip/unzipfile.c:287 ../ebzip/zipfile.c:471 +#: ../ebzip/zipfile.c:544 +#, c-format +msgid "%s: failed to write to the file, %s: %s\n" +msgstr "%s: եؽ񤭹ޤǤ, %s: %s\n" + +#: ../ebfont/ebfont.c:1057 +#, c-format +msgid "%s: failed to close the file, %s: %s\n" +msgstr "%s: եĤޤǤ, %s: %s\n" + +#: ../ebinfo/ebinfo.c:239 +msgid "Name" +msgstr "̾" + +#: ../ebinfo/ebinfo.c:239 +msgid "Title" +msgstr "̾" + +#: ../ebinfo/ebinfo.c:322 +#, c-format +msgid "disc type: " +msgstr "ǥη: " + +#: ../ebinfo/ebinfo.c:337 +#, c-format +msgid "character code: " +msgstr "ʸ: " + +#: ../ebinfo/ebinfo.c:352 +#, c-format +msgid "unknown\n" +msgstr "̤\n" + +#: ../ebinfo/ebinfo.c:365 +#, c-format +msgid "" +"the number of subbooks: %d\n" +"\n" +msgstr "" +"ܤο: %d\n" +"\n" + +#: ../ebinfo/ebinfo.c:371 +#, c-format +msgid "subbook %d:\n" +msgstr " %d:\n" + +#: ../ebinfo/ebinfo.c:381 +msgid " title: " +msgstr " ̾: " + +#: ../ebinfo/ebinfo.c:393 +#, c-format +msgid " directory: %s\n" +msgstr " ǥ쥯ȥ: %s\n" + +#. +#. * Output supported methods. +#. +#: ../ebinfo/ebinfo.c:408 +#, c-format +msgid " search methods: " +msgstr " : " + +#: ../ebinfo/ebinfo.c:410 +msgid "word " +msgstr " " + +#: ../ebinfo/ebinfo.c:412 +msgid "endword " +msgstr " " + +#: ../ebinfo/ebinfo.c:414 +msgid "keyword " +msgstr " " + +#: ../ebinfo/ebinfo.c:416 +msgid "cross " +msgstr " " + +#: ../ebinfo/ebinfo.c:418 +msgid "multi " +msgstr "ʣ " + +#: ../ebinfo/ebinfo.c:420 +msgid "menu " +msgstr "˥塼 " + +#: ../ebinfo/ebinfo.c:422 +msgid "image-menu " +msgstr "˥塼 " + +#: ../ebinfo/ebinfo.c:424 +msgid "copyright " +msgstr "ɽ " + +#: ../ebinfo/ebinfo.c:426 +msgid "color-chart " +msgstr " " + +#. +#. * Output a font list. +#. +#: ../ebinfo/ebinfo.c:432 +msgid " font sizes: " +msgstr " եȤ礭: " + +#. +#. * Output character range of the narrow font. +#. +#: ../ebinfo/ebinfo.c:454 +msgid " narrow font characters: " +msgstr " ȾѥեȤʸ: " + +#. +#. * Output character range of the wide font. +#. +#: ../ebinfo/ebinfo.c:482 +#, c-format +msgid " wide font characters: " +msgstr " ѥեȤʸ: " + +#: ../ebinfo/ebinfo.c:565 +#, c-format +msgid " multi search %d:\n" +msgstr " ʣ縡 %d:\n" + +#: ../ebinfo/ebinfo.c:579 +msgid " title: " +msgstr " ̾: " + +#: ../ebinfo/ebinfo.c:592 +#, c-format +msgid " label %d: " +msgstr " ٥ %d: " + +#: ../ebinfo/ebinfo.c:596 +msgid " candidates: " +msgstr " : " + +#: ../ebinfo/ebinfo.c:598 +msgid "exist\n" +msgstr "ͭ\n" + +#: ../ebinfo/ebinfo.c:600 +msgid "not-exist\n" +msgstr "̵\n" + +#: ../ebinfo/ebinfo.c:620 +#, c-format +msgid "" +" -l --book-list output a list of books on an EBENT server\n" +msgstr " -l --book-list EBNET оνҥꥹȤ\n" + +#: ../ebinfo/ebinfo.c:621 +#, c-format +msgid " -m --multi-search also output multi-search information\n" +msgstr " -m --multi-search ʣ縡ξ\n" + +#: ../ebrefile/ebrefile.c:287 +#, c-format +msgid "%s: too long book directory path\n" +msgstr "%s: ҤΥǥ쥯ȥΥѥ̾Ĺޤ\n" + +#: ../ebrefile/ebrefile.c:336 ../ebzip/ebzip.c:587 +#, c-format +msgid " ouput files under DIRECTORY\n" +msgstr " ե֥ǥ쥯ȥפ˽Ϥ\n" + +#: ../ebrefile/ebrefile.c:381 +#, c-format +msgid "%s: no catalog file: %s\n" +msgstr "%s: ե뤬Ĥޤ: %s\n" + +#: ../ebrefile/ebrefile.c:420 +#, c-format +msgid "%s: failed to move the file, %s: %s -> %s\n" +msgstr "%s: եưǤޤǤ, %s: %s -> %s\n" + +#: ../ebrefile/ebrefile.c:490 ../ebrefile/ebrefile.c:511 +#: ../ebrefile/ebrefile.c:559 ../ebrefile/ebrefile.c:599 ../ebzip/sebxa.c:90 +#: ../ebzip/sebxa.c:232 +#, c-format +msgid "%s: failed to read the file, %s: %s\n" +msgstr "%s: եɤ߹ޤǤ, %s: %s\n" + +#: ../ebrefile/ebrefile.c:497 ../ebrefile/ebrefile.c:545 +#: ../ebrefile/ebrefile.c:566 ../ebrefile/ebrefile.c:604 +#: ../ebrefile/ebrefile.c:620 ../ebrefile/ebrefile.c:642 ../ebzip/sebxa.c:142 +#, c-format +msgid "%s: failed to write the file, %s: %s\n" +msgstr "%s: եؽ񤭹ޤǤ, %s: %s\n" + +#: ../ebrefile/ebrefile.c:584 +#, c-format +msgid "%s: warning: no such subbook: %s\n" +msgstr "%s: ٹ: Τ褦ܤϤޤ: %s\n" + +#: ../ebrefile/ebrefile.c:637 ../ebzip/sebxa.c:78 ../ebzip/sebxa.c:130 +#: ../ebzip/sebxa.c:220 ../ebzip/zipfile.c:390 ../ebzip/zipfile.c:465 +#: ../ebzip/zipfile.c:538 +#, c-format +msgid "%s: failed to seek the file, %s: %s\n" +msgstr "%s: ե򥷡ǤޤǤ, %s: %s\n" + +#: ../ebrefile/ebrefile.c:686 ../ebzip/copyfile.c:74 ../ebzip/unzipfile.c:130 +#: ../ebzip/zipfile.c:115 +#, c-format +msgid "%s: no such file: %s\n" +msgstr "%s: Τ褦ʥեϤޤ: %s\n" + +#: ../ebrefile/ebrefile.c:727 ../ebzip/copyfile.c:191 +#, c-format +msgid "%s: failed to read from the file, %s: %s\n" +msgstr "%s: եɤ߹ޤǤ, %s: %s\n" + +#: ../ebstopcode/ebstopcode.c:256 +#, c-format +msgid "%s: too few argument\n" +msgstr "%s: ʤޤ\n" + +#: ../ebstopcode/ebstopcode.c:345 +#, c-format +msgid "%s: invalid stop code `%s'\n" +msgstr "%s: `%s' ȤڤꥳɤλǤ\n" + +#: ../ebstopcode/ebstopcode.c:380 +#, c-format +msgid "%s: invalid text length `%s'\n" +msgstr "%s: `%s' ȤĹλǤ\n" + +#: ../ebstopcode/ebstopcode.c:437 +#, c-format +msgid "%s: invalid text position `%s'\n" +msgstr "%s: `%s' ȤʸΰֻǤ\n" + +#: ../ebstopcode/ebstopcode.c:449 +#, c-format +msgid "Usage: %s [option...] [book-directory] subbook\n" +msgstr "ˡ: %s [ץ...] [ҤΥǥ쥯ȥ] \n" + +#: ../ebstopcode/ebstopcode.c:452 +#, c-format +msgid " -c CODE, --code CODE\n" +msgstr " -c , --code \n" + +#: ../ebstopcode/ebstopcode.c:453 +#, c-format +msgid " set stop code manually\n" +msgstr " ڤꥳɤꤹ\n" + +#: ../ebstopcode/ebstopcode.c:455 +#, c-format +msgid " -l LENGTH, --text-length LENGTH\n" +msgstr " -l Ĺ, --text-length Ĺ\n" + +#: ../ebstopcode/ebstopcode.c:456 +#, c-format +msgid " maximum length of output text\n" +msgstr " ϤʸκĹ\n" + +#: ../ebstopcode/ebstopcode.c:457 ../ebzip/ebzip.c:577 ../ebzip/ebzip.c:582 +#, c-format +msgid " (default: %d)\n" +msgstr " (ά: %d)\n" + +#: ../ebstopcode/ebstopcode.c:459 +#, c-format +msgid " -n --no-candidates suppress stop code candidates\n" +msgstr " -n --no-candidates ڤꥳɤθϤʤ\n" + +#: ../ebstopcode/ebstopcode.c:460 +#, c-format +msgid " -p PAGE:OFFSET, --text-position PAGE:OFFSET\n" +msgstr " -p ڡ:եå, --text-position ڡ:եå\n" + +#: ../ebstopcode/ebstopcode.c:461 +#, c-format +msgid " start position of text\n" +msgstr " ʸγϰ\n" + +#: ../ebstopcode/ebstopcode.c:503 +#, c-format +msgid "%s: failed to bind the book, %s: %s\n" +msgstr "%s: ҤѤǤޤ, %s: %s\n" + +#: ../ebstopcode/ebstopcode.c:522 +#, c-format +msgid "%s: failed to set the current subbook, %s\n" +msgstr "%s: ܤǤޤǤ, %s: %s\n" + +#: ../ebstopcode/ebstopcode.c:557 +#, c-format +msgid "%s: failed to get text information, %s\n" +msgstr "%s: ʸ˴ؤǤޤǤ, %s: %s\n" + +#: ../ebstopcode/ebstopcode.c:587 +#, c-format +msgid "%s: failed to read text, %s\n" +msgstr "%s: ʸɤ߹ޤǤ, %s: %s\n" + +#: ../ebzip/copyfile.c:65 +#, c-format +msgid "==> copy %s <==\n" +msgstr "==> %s 򥳥ԡ <==\n" + +#: ../ebzip/copyfile.c:66 ../ebzip/unzipfile.c:122 ../ebzip/zipfile.c:107 +#, c-format +msgid "output to %s\n" +msgstr "%s ˽\n" + +#: ../ebzip/copyfile.c:85 ../ebzip/unzipfile.c:141 ../ebzip/zipfile.c:126 +#, c-format +msgid "" +"the input and output files are the same, skipped.\n" +"\n" +msgstr "" +"ϤȽϥե뤬ƱʤΤǡޤ\n" +"\n" + +#: ../ebzip/copyfile.c:96 ../ebzip/copyfile.c:244 ../ebzip/sebxa.c:152 +#: ../ebzip/unzipfile.c:323 ../ebzip/zipfile.c:557 +#, c-format +msgid "completed (%llu / %llu bytes)\n" +msgstr "λ (%llu / %llu Х)\n" + +#: ../ebzip/copyfile.c:100 ../ebzip/copyfile.c:248 ../ebzip/sebxa.c:156 +#: ../ebzip/unzipfile.c:327 ../ebzip/zipfile.c:572 +msgid "completed (%I64u / %I64u bytes)\n" +msgstr "λ (%I64u / %I64u Х)\n" + +#: ../ebzip/copyfile.c:104 ../ebzip/copyfile.c:252 ../ebzip/sebxa.c:160 +#: ../ebzip/zipfile.c:586 +#, c-format +msgid "completed (%lu / %lu bytes)\n" +msgstr "λ (%lu / %lu Х)\n" + +#: ../ebzip/copyfile.c:120 ../ebzip/unzipfile.c:164 ../ebzip/zipfile.c:155 +msgid "" +"already exists, skip the file\n" +"\n" +msgstr "" +"ΥեϤǤ¸ߤΤǡޤ\n" +"\n" + +#: ../ebzip/copyfile.c:128 ../ebzip/unzipfile.c:171 ../ebzip/zipfile.c:162 +#, c-format +msgid "" +"\n" +"the file already exists: %s\n" +msgstr "" +"\n" +"ե뤬Ǥ¸ߤޤ: %s\n" + +#: ../ebzip/copyfile.c:130 ../ebzip/unzipfile.c:173 ../ebzip/zipfile.c:164 +msgid "do you wish to overwrite (y or n)? " +msgstr "񤭤ޤ (Ϥ:y, :n)? " + +#: ../ebzip/copyfile.c:137 ../ebzip/unzipfile.c:180 ../ebzip/zipfile.c:171 +#, c-format +msgid "%s: failed to unlink the file: %s\n" +msgstr "%s: եǤޤǤ: %s\n" + +#: ../ebzip/copyfile.c:195 ../ebzip/copyfile.c:200 ../ebzip/sebxa.c:94 +#: ../ebzip/sebxa.c:236 ../ebzip/unzipfile.c:261 ../ebzip/unzipfile.c:266 +#: ../ebzip/zipfile.c:319 ../ebzip/zipfile.c:324 +#, c-format +msgid "%s: unexpected EOF: %s\n" +msgstr "%s: ͽ EOF ɤ߹ߤޤ: %s\n" + +#: ../ebzip/copyfile.c:220 ../ebzip/unzipfile.c:299 ../ebzip/zipfile.c:484 +#, c-format +msgid "%4.1f%% done (%llu / %llu bytes)\n" +msgstr "%4.1f%% Ѥ (%llu / %llu Х)\n" + +#: ../ebzip/copyfile.c:225 ../ebzip/unzipfile.c:304 ../ebzip/zipfile.c:489 +msgid "%4.1f%% done (%I64u / %I64u bytes)\n" +msgstr "%4.1f%% Ѥ (%I64u / %I64u Х)\n" + +#: ../ebzip/copyfile.c:230 ../ebzip/unzipfile.c:309 ../ebzip/zipfile.c:494 +#, c-format +msgid "%4.1f%% done (%lu / %lu bytes)\n" +msgstr "%4.1f%% Ѥ (%lu / %lu Х)\n" + +#: ../ebzip/copyfile.c:341 ../ebzip/unzipbook.c:172 ../ebzip/unzipbook.c:290 +#: ../ebzip/unzipbook.c:302 ../ebzip/unzipbook.c:379 ../ebzip/zipbook.c:174 +#: ../ebzip/zipbook.c:296 ../ebzip/zipbook.c:308 ../ebzip/zipbook.c:387 +#, c-format +msgid "%s: failed to create a directory, %s: %s\n" +msgstr "%s: ǥ쥯ȥǤޤǤ, %s: %s\n" + +#: ../ebzip/copyfile.c:351 +#, c-format +msgid "%s: failed to open the directory, %s: %s\n" +msgstr "%s: ǥ쥯ȥ򳫤ޤǤ, %s: %s\n" + +#: ../ebzip/ebzip.c:358 +#, c-format +msgid "%s: invalid overwrite mode: %s\n" +msgstr "%s: `%s' Ȥ񤭥⡼ɤǤ\n" + +#: ../ebzip/ebzip.c:463 +#, c-format +msgid "%s: invalid compression level `%s'\n" +msgstr "%s: `%s' ʰ̥٥Ǥ\n" + +#: ../ebzip/ebzip.c:489 +#, c-format +msgid "%s: invalid slice number `%s'\n" +msgstr "%s: `%s' ͤǤ\n" + +#: ../ebzip/ebzip.c:531 ../ebzip/ebzip.c:550 +#, c-format +msgid "%s: invalid content name `%s'\n" +msgstr "%s: `%s' Ȥǡ̾ΤǤ\n" + +#: ../ebzip/ebzip.c:569 +#, c-format +msgid " -f --force-overwrite set overwrite mode to `force'\n" +msgstr " -f --force-overwrite 񤭥⡼ɤ `force' ˥åȤ\n" + +#: ../ebzip/ebzip.c:570 +#, c-format +msgid " (same as `--overwrite force')\n" +msgstr " (`--overwrite force' )\n" + +#: ../ebzip/ebzip.c:572 +#, c-format +msgid " -i --information list information of compressed files\n" +msgstr " -i --information ̤줿եξ\n" + +#: ../ebzip/ebzip.c:573 +#, c-format +msgid " -k --keep don't delete original files\n" +msgstr " -k --keep Υեõʤ\n" + +#: ../ebzip/ebzip.c:574 +#, c-format +msgid " -l INTEGER --level INTEGER\n" +msgstr " -l --level \n" + +#: ../ebzip/ebzip.c:575 +#, c-format +msgid " compression level; 0..%d\n" +msgstr " ̥٥; 0..%d\n" + +#: ../ebzip/ebzip.c:579 +#, c-format +msgid " -r INTEGER --slice-number INTEGER\n" +msgstr " -l --slice-number \n" + +#: ../ebzip/ebzip.c:580 +#, c-format +msgid "" +" set a number of slices to load at a time; 1.." +"%d\n" +msgstr " 饤ΡؤƱɤ߹߿\n" + +#: ../ebzip/ebzip.c:584 +#, c-format +msgid " -n --no-overwrite set overwrite mode to `no'\n" +msgstr " -n --no-overwrite 񤭥⡼ɤ `no' ˥åȤ\n" + +#: ../ebzip/ebzip.c:585 +#, c-format +msgid " (same as `--overwrite no')\n" +msgstr " (`--overwrite no' )\n" + +#: ../ebzip/ebzip.c:590 +#, c-format +msgid " -q --quiet --silence suppress all warnings\n" +msgstr " -q --quiet --silence ٹ\n" + +#: ../ebzip/ebzip.c:591 +#, c-format +msgid " -s TYPE[,TYPE] --skip-content TYPE[,TYPE...]\n" +msgstr " -s [,...] --skip-content [,...]\n" + +#: ../ebzip/ebzip.c:592 +#, c-format +msgid "" +" skip content; font, graphic, sound or movie\n" +msgstr "" +" ǡ\n" +" font, graphic, sound, movie Τ줫\n" + +#: ../ebzip/ebzip.c:593 +#, c-format +msgid " (default: none is skipped)\n" +msgstr " (ά: ʤ)\n" + +#: ../ebzip/ebzip.c:597 +#, c-format +msgid " -t --test only check for input files\n" +msgstr " -t --test ϥեΥåԤ\n" + +#: ../ebzip/ebzip.c:598 +#, c-format +msgid " -u --uncompress uncompress files\n" +msgstr " -u --uncompress եĹ\n" + +#: ../ebzip/ebzip.c:600 +#, c-format +msgid " -w MODE --overwrite MODE set overwrite mode of output files;\n" +msgstr "" +" -w ⡼ --overwrite ⡼\n" +" ϥեξ񤭥⡼ɤꤹ롣\n" + +#: ../ebzip/ebzip.c:601 +#, c-format +msgid " confirm, force or no\n" +msgstr "" +" ⡼ɤ confirm (ǧ)force (¹)\n" +" no (񤭤ʤ) Τ줫\n" + +#: ../ebzip/ebzip.c:602 +#, c-format +msgid " (default: confirm)\n" +msgstr " (ά: confirm)\n" + +#: ../ebzip/ebzip.c:603 +#, c-format +msgid " -z --compress compress files\n" +msgstr " -z --compress ե򰵽\n" + +#: ../ebzip/ebzip.c:609 +#, c-format +msgid "" +"\n" +"Default action:\n" +msgstr "" +"\n" +"άư:\n" + +#: ../ebzip/ebzip.c:610 +#, c-format +msgid " When invoked as `ebuunzip', uncompression is the default action.\n" +msgstr " `ebuunzip' ȤƵư줿ȤϡάưϿĹˤʤ롣\n" + +#: ../ebzip/ebzip.c:611 +#, c-format +msgid "" +" When invoked as `ebuzipinfo', listing information is the default action.\n" +msgstr "" +" `ebuzipinfo' ȤƵư줿ȤϡάưϾνϤˤʤ롣\n" + +#: ../ebzip/ebzip.c:612 +#, c-format +msgid " Otherwise, compression is the default action.\n" +msgstr " ʳΤȤϡ̤άưˤʤ롣\n" + +#: ../ebzip/sebxa.c:60 +#, c-format +msgid "==> rewrite %s <==\n" +msgstr "==> %s 񤭴 <==\n" + +#: ../ebzip/speedup.c:79 ../ebzip/unzipfile.c:190 ../ebzip/unzipfile.c:228 +#: ../ebzip/zipfile.c:181 ../ebzip/zipinfofile.c:104 +#, c-format +msgid "%s: failed to open the file: %s\n" +msgstr "%s: ե򳫤ޤǤ: %s\n" + +#: ../ebzip/speedup.c:85 ../ebzip/speedup.c:90 ../ebzip/speedup.c:120 +#: ../ebzip/speedup.c:125 +#, c-format +msgid "%s: failed to read the file: %s\n" +msgstr "%s: եɤ߹ޤǤ: %s\n" + +#: ../ebzip/unlinkfile.c:39 +#, c-format +msgid "%s: warning: memory exhausted, file %s is not to be unlinked\n" +msgstr "" + +#: ../ebzip/unlinkfile.c:56 +#, c-format +msgid "%s: warning: failed to unlink the file: %s\n" +msgstr "%s: ٹ: եǤޤǤ: %s\n" + +#: ../ebzip/unzipfile.c:121 +#, c-format +msgid "==> uncompress %s <==\n" +msgstr "==> %s Ĺ <==\n" + +#: ../ebzip/unzipfile.c:152 ../ebzip/zipfile.c:138 ../ebzip/zipfile.c:368 +#, c-format +msgid "%s: memory exhausted\n" +msgstr "%s: Ȥ̤ޤ\n" + +#: ../ebzip/unzipfile.c:251 ../ebzip/zipfile.c:308 +#, c-format +msgid "%s: failed to seek the file: %s\n" +msgstr "%s: ե򥷡ǤޤǤ: %s\n" + +#: ../ebzip/unzipfile.c:257 ../ebzip/zipfile.c:315 +#, c-format +msgid "%s: failed to read from the file: %s\n" +msgstr "%s: եɤ߹ޤǤ: %s\n" + +#: ../ebzip/unzipfile.c:331 ../ebzip/zipfile.c:595 +#, c-format +msgid "" +"%lu -> %lu bytes\n" +"\n" +msgstr "" +"%lu -> %lu Х\n" +"\n" + +#: ../ebzip/unzipfile.c:365 +#, c-format +msgid "%s: CRC error: %s\n" +msgstr "%s: CRC 顼: %s\n" + +#: ../ebzip/zipfile.c:106 +#, c-format +msgid "==> compress %s <==\n" +msgstr "==> %s 򰵽 <==\n" + +#: ../ebzip/zipfile.c:275 ../ebzip/zipfile.c:282 ../ebzip/zipfile.c:397 +#, c-format +msgid "%s: failed to write to the file: %s\n" +msgstr "%s: ե˽񤭹ޤǤ: %s\n" + +#: ../ebzip/zipfile.c:561 +#, c-format +msgid "" +"%llu -> %llu bytes (%4.1f%%)\n" +"\n" +msgstr "" +"%llu -> %llu Х (%4.1f%%)\n" +"\n" + +#: ../ebzip/zipfile.c:567 +#, c-format +msgid "" +"%llu -> %llu bytes\n" +"\n" +msgstr "" +"%llu -> %llu Х\n" +"\n" + +#: ../ebzip/zipfile.c:576 +msgid "" +"%I64u -> %I64u bytes (%4.1f%%)\n" +"\n" +msgstr "" +"%I64u -> %I64u Х (%4.1f%%)\n" +"\n" + +#: ../ebzip/zipfile.c:581 +msgid "" +"%I64u -> %I64u bytes\n" +"\n" +msgstr "" +"%I64u -> %I64u Х\n" +"\n" + +#: ../ebzip/zipfile.c:590 +#, c-format +msgid "" +"%lu -> %lu bytes (%4.1f%%)\n" +"\n" +msgstr "" +"%lu -> %lu Х (%4.1f%%)\n" +"\n" + +#: ../ebzip/zipinfofile.c:132 +#, c-format +msgid "%llu bytes (not compressed)\n" +msgstr "%llu Х (󰵽)\n" + +#: ../ebzip/zipinfofile.c:135 +msgid "%I64u bytes (not compressed)\n" +msgstr "%I64u Х (󰵽)\n" + +#: ../ebzip/zipinfofile.c:138 +#, c-format +msgid "%lu bytes (not compressed)\n" +msgstr "%lu Х (󰵽)\n" + +#: ../ebzip/zipinfofile.c:143 +#, c-format +msgid "%llu -> %llu bytes " +msgstr "%llu -> %llu Х " + +#: ../ebzip/zipinfofile.c:147 +msgid "%I64u -> %I64u bytes " +msgstr "%I64u -> %I64u Х " + +#: ../ebzip/zipinfofile.c:151 +#, c-format +msgid "%lu -> %lu bytes " +msgstr "%lu -> %lu Х " + +#: ../ebzip/zipinfofile.c:156 +msgid "(empty original file, " +msgstr "(ȤΥե϶, " + +#: ../ebzip/zipinfofile.c:162 +#, c-format +msgid "ebzip level %d compression)\n" +msgstr "ebzip ̥٥ %d)\n" + +#: ../ebzip/zipinfofile.c:164 +#, c-format +msgid "S-EBXA compression)\n" +msgstr "S-EBXA )\n" + +#: ../ebzip/zipinfofile.c:166 +#, c-format +msgid "EPWING compression)\n" +msgstr "EPWING )\n" + +#~ msgid "" +#~ " When invoked as `ebunzip.exe', uncompression is the default action.\n" +#~ msgstr "" +#~ " `ebunzip.exe' ȤƵư줿ȤϡάưϿĹˤʤ롣\n" + +#~ msgid "" +#~ " When invoked as `ebzipinf.exe', listing information is the default " +#~ "action.\n" +#~ msgstr "" +#~ " `ebunzipinf.exe' ȤƵư줿ȤϡάưϾνϤˤ" +#~ "롣\n" diff --git a/lib/ebu/samples/.deps/appendix.Po b/lib/ebu/samples/.deps/appendix.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/appendix.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/booklist.Po b/lib/ebu/samples/.deps/booklist.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/booklist.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/disctype.Po b/lib/ebu/samples/.deps/disctype.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/disctype.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/font.Po b/lib/ebu/samples/.deps/font.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/font.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/initexit.Po b/lib/ebu/samples/.deps/initexit.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/initexit.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/subbook.Po b/lib/ebu/samples/.deps/subbook.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/subbook.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/text.Po b/lib/ebu/samples/.deps/text.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/text.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/.deps/word.Po b/lib/ebu/samples/.deps/word.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/lib/ebu/samples/.deps/word.Po @@ -0,0 +1 @@ +# dummy diff --git a/lib/ebu/samples/Makefile b/lib/ebu/samples/Makefile new file mode 100644 index 0000000..8fd9b4f --- /dev/null +++ b/lib/ebu/samples/Makefile @@ -0,0 +1,562 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# samples/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/ebu +pkglibdir = $(libdir)/ebu +pkgincludedir = $(includedir)/ebu +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +noinst_PROGRAMS = initexit$(EXEEXT) disctype$(EXEEXT) subbook$(EXEEXT) \ + word$(EXEEXT) text$(EXEEXT) font$(EXEEXT) appendix$(EXEEXT) \ + booklist$(EXEEXT) +subdir = samples +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_appendix_OBJECTS = appendix.$(OBJEXT) +appendix_OBJECTS = $(am_appendix_OBJECTS) +am__DEPENDENCIES_1 = +am_booklist_OBJECTS = booklist.$(OBJEXT) +booklist_OBJECTS = $(am_booklist_OBJECTS) +am_disctype_OBJECTS = disctype.$(OBJEXT) +disctype_OBJECTS = $(am_disctype_OBJECTS) +am_font_OBJECTS = font.$(OBJEXT) +font_OBJECTS = $(am_font_OBJECTS) +am_initexit_OBJECTS = initexit.$(OBJEXT) +initexit_OBJECTS = $(am_initexit_OBJECTS) +am_subbook_OBJECTS = subbook.$(OBJEXT) +subbook_OBJECTS = $(am_subbook_OBJECTS) +am_text_OBJECTS = text.$(OBJEXT) +text_OBJECTS = $(am_text_OBJECTS) +am_word_OBJECTS = word.$(OBJEXT) +word_OBJECTS = $(am_word_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(appendix_SOURCES) $(booklist_SOURCES) $(disctype_SOURCES) \ + $(font_SOURCES) $(initexit_SOURCES) $(subbook_SOURCES) \ + $(text_SOURCES) $(word_SOURCES) +DIST_SOURCES = $(appendix_SOURCES) $(booklist_SOURCES) \ + $(disctype_SOURCES) $(font_SOURCES) $(initexit_SOURCES) \ + $(subbook_SOURCES) $(text_SOURCES) $(word_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run aclocal-1.10 +AMTAR = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoconf +AUTOHEADER = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run autoheader +AUTOMAKE = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -fopenmp +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +EBCONF_EBINCS = -I$(includedir) +EBCONF_EBLIBS = -L$(libdir) -lebu +EBCONF_INTLINCS = +EBCONF_INTLLIBS = +EBCONF_ZLIBINCS = +EBCONF_ZLIBLIBS = -lz +EB_VERSION_MAJOR = 4 +EB_VERSION_MINOR = 5 +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ENABLE_EBNET = yes +ENABLE_LIBDEFLATE = no +ENABLE_NLS = yes +ENABLE_PTHREAD = no +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +ICONVINCS = +ICONVLIBS = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLINCS = +INTLLIBS = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBEB_VERSION_INFO = 17:0:0 +LIBOBJS = +LIBS = -lnsl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAILING_ADDRESS = kzhr@d1.dion.ne.jp +MAKEINFO = ${SHELL} /mnt/d/files/projects/ebclient/lib/ebu/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +MSGFMT = : +MSGMERGE = msgmerge +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMP_CFLAGS = -fopenmp +OTOOL = +OTOOL64 = +PACKAGE = ebu +PACKAGE_BUGREPORT = +PACKAGE_NAME = ebu +PACKAGE_STRING = ebu 4.5-20200413 +PACKAGE_TARNAME = ebu +PACKAGE_URL = +PACKAGE_VERSION = 4.5-20200413 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PTHREAD_CFLAGS = +PTHREAD_CPPFLAGS = +PTHREAD_LDFLAGS = +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 4.5-20200413 +XGETTEXT = : +ZLIBDEPS = +ZLIBINCS = +ZLIBLIBS = -lz +abs_builddir = /mnt/d/files/projects/ebclient/lib/ebu/samples +abs_srcdir = /mnt/d/files/projects/ebclient/lib/ebu/samples +abs_top_builddir = /mnt/d/files/projects/ebclient/lib/ebu +abs_top_srcdir = /mnt/d/files/projects/ebclient/lib/ebu +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /mnt/d/files/projects/ebclient/lib/ebu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = $(datadir)/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /usr/bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgdocdir = ${datadir}/ebu/doc +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +AUTOMAKE_OPTIONS = foreign +LIBEB = ../eb/libeb.la +initexit_SOURCES = initexit.c +initexit_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +initexit_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +disctype_SOURCES = disctype.c +disctype_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +disctype_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +subbook_SOURCES = subbook.c +subbook_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +subbook_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +word_SOURCES = word.c +word_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +word_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +text_SOURCES = text.c +text_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +text_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +font_SOURCES = font.c +font_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +font_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +appendix_SOURCES = appendix.c +appendix_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +appendix_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +booklist_SOURCES = booklist.c +booklist_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +booklist_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +EXTRA_DIST = README +INCLUDES = -I$(srcdir)/.. +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign samples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign samples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +appendix$(EXEEXT): $(appendix_OBJECTS) $(appendix_DEPENDENCIES) + @rm -f appendix$(EXEEXT) + $(LINK) $(appendix_OBJECTS) $(appendix_LDADD) $(LIBS) +booklist$(EXEEXT): $(booklist_OBJECTS) $(booklist_DEPENDENCIES) + @rm -f booklist$(EXEEXT) + $(LINK) $(booklist_OBJECTS) $(booklist_LDADD) $(LIBS) +disctype$(EXEEXT): $(disctype_OBJECTS) $(disctype_DEPENDENCIES) + @rm -f disctype$(EXEEXT) + $(LINK) $(disctype_OBJECTS) $(disctype_LDADD) $(LIBS) +font$(EXEEXT): $(font_OBJECTS) $(font_DEPENDENCIES) + @rm -f font$(EXEEXT) + $(LINK) $(font_OBJECTS) $(font_LDADD) $(LIBS) +initexit$(EXEEXT): $(initexit_OBJECTS) $(initexit_DEPENDENCIES) + @rm -f initexit$(EXEEXT) + $(LINK) $(initexit_OBJECTS) $(initexit_LDADD) $(LIBS) +subbook$(EXEEXT): $(subbook_OBJECTS) $(subbook_DEPENDENCIES) + @rm -f subbook$(EXEEXT) + $(LINK) $(subbook_OBJECTS) $(subbook_LDADD) $(LIBS) +text$(EXEEXT): $(text_OBJECTS) $(text_DEPENDENCIES) + @rm -f text$(EXEEXT) + $(LINK) $(text_OBJECTS) $(text_LDADD) $(LIBS) +word$(EXEEXT): $(word_OBJECTS) $(word_DEPENDENCIES) + @rm -f word$(EXEEXT) + $(LINK) $(word_OBJECTS) $(word_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/appendix.Po +include ./$(DEPDIR)/booklist.Po +include ./$(DEPDIR)/disctype.Po +include ./$(DEPDIR)/font.Po +include ./$(DEPDIR)/initexit.Po +include ./$(DEPDIR)/subbook.Po +include ./$(DEPDIR)/text.Po +include ./$(DEPDIR)/word.Po + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/samples/Makefile.am b/lib/ebu/samples/Makefile.am new file mode 100644 index 0000000..6afa573 --- /dev/null +++ b/lib/ebu/samples/Makefile.am @@ -0,0 +1,41 @@ +AUTOMAKE_OPTIONS = foreign + +LIBEB = ../eb/libeb.la + +noinst_PROGRAMS = initexit disctype subbook word text font appendix booklist + +initexit_SOURCES = initexit.c +initexit_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +initexit_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +disctype_SOURCES = disctype.c +disctype_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +disctype_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +subbook_SOURCES = subbook.c +subbook_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +subbook_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +word_SOURCES = word.c +word_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +word_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +text_SOURCES = text.c +text_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +text_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +font_SOURCES = font.c +font_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +font_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +appendix_SOURCES = appendix.c +appendix_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +appendix_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +booklist_SOURCES = booklist.c +booklist_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +booklist_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) + +EXTRA_DIST = README + +INCLUDES = -I$(srcdir)/.. diff --git a/lib/ebu/samples/Makefile.in b/lib/ebu/samples/Makefile.in new file mode 100644 index 0000000..7831eec --- /dev/null +++ b/lib/ebu/samples/Makefile.in @@ -0,0 +1,562 @@ +# Makefile.in generated by automake 1.10.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = initexit$(EXEEXT) disctype$(EXEEXT) subbook$(EXEEXT) \ + word$(EXEEXT) text$(EXEEXT) font$(EXEEXT) appendix$(EXEEXT) \ + booklist$(EXEEXT) +subdir = samples +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/in6addr.m4 $(top_srcdir)/m4/largefile.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/sockaddrin6.m4 \ + $(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_appendix_OBJECTS = appendix.$(OBJEXT) +appendix_OBJECTS = $(am_appendix_OBJECTS) +am__DEPENDENCIES_1 = +am_booklist_OBJECTS = booklist.$(OBJEXT) +booklist_OBJECTS = $(am_booklist_OBJECTS) +am_disctype_OBJECTS = disctype.$(OBJEXT) +disctype_OBJECTS = $(am_disctype_OBJECTS) +am_font_OBJECTS = font.$(OBJEXT) +font_OBJECTS = $(am_font_OBJECTS) +am_initexit_OBJECTS = initexit.$(OBJEXT) +initexit_OBJECTS = $(am_initexit_OBJECTS) +am_subbook_OBJECTS = subbook.$(OBJEXT) +subbook_OBJECTS = $(am_subbook_OBJECTS) +am_text_OBJECTS = text.$(OBJEXT) +text_OBJECTS = $(am_text_OBJECTS) +am_word_OBJECTS = word.$(OBJEXT) +word_OBJECTS = $(am_word_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(appendix_SOURCES) $(booklist_SOURCES) $(disctype_SOURCES) \ + $(font_SOURCES) $(initexit_SOURCES) $(subbook_SOURCES) \ + $(text_SOURCES) $(word_SOURCES) +DIST_SOURCES = $(appendix_SOURCES) $(booklist_SOURCES) \ + $(disctype_SOURCES) $(font_SOURCES) $(initexit_SOURCES) \ + $(subbook_SOURCES) $(text_SOURCES) $(word_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +EBCONF_EBINCS = @EBCONF_EBINCS@ +EBCONF_EBLIBS = @EBCONF_EBLIBS@ +EBCONF_INTLINCS = @EBCONF_INTLINCS@ +EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ +EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ +EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ +EB_VERSION_MAJOR = @EB_VERSION_MAJOR@ +EB_VERSION_MINOR = @EB_VERSION_MINOR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_EBNET = @ENABLE_EBNET@ +ENABLE_LIBDEFLATE = @ENABLE_LIBDEFLATE@ +ENABLE_NLS = @ENABLE_NLS@ +ENABLE_PTHREAD = @ENABLE_PTHREAD@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONVINCS = @ICONVINCS@ +ICONVLIBS = @ICONVLIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLINCS = @INTLINCS@ +INTLLIBS = @INTLLIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEB_VERSION_INFO = @LIBEB_VERSION_INFO@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAILING_ADDRESS = @MAILING_ADDRESS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ +PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZLIBDEPS = @ZLIBDEPS@ +ZLIBINCS = @ZLIBINCS@ +ZLIBLIBS = @ZLIBLIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgdocdir = @pkgdocdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +LIBEB = ../eb/libeb.la +initexit_SOURCES = initexit.c +initexit_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +initexit_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +disctype_SOURCES = disctype.c +disctype_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +disctype_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +subbook_SOURCES = subbook.c +subbook_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +subbook_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +word_SOURCES = word.c +word_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +word_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +text_SOURCES = text.c +text_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +text_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +font_SOURCES = font.c +font_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +font_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +appendix_SOURCES = appendix.c +appendix_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +appendix_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +booklist_SOURCES = booklist.c +booklist_LDADD = $(LIBEB) $(ZLIBLIBS) $(INTLLIBS) +booklist_DEPENDENCIES = $(LIBEB) $(ZLIBDEPS) $(INTLDEPS) +EXTRA_DIST = README +INCLUDES = -I$(srcdir)/.. +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign samples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign samples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +appendix$(EXEEXT): $(appendix_OBJECTS) $(appendix_DEPENDENCIES) + @rm -f appendix$(EXEEXT) + $(LINK) $(appendix_OBJECTS) $(appendix_LDADD) $(LIBS) +booklist$(EXEEXT): $(booklist_OBJECTS) $(booklist_DEPENDENCIES) + @rm -f booklist$(EXEEXT) + $(LINK) $(booklist_OBJECTS) $(booklist_LDADD) $(LIBS) +disctype$(EXEEXT): $(disctype_OBJECTS) $(disctype_DEPENDENCIES) + @rm -f disctype$(EXEEXT) + $(LINK) $(disctype_OBJECTS) $(disctype_LDADD) $(LIBS) +font$(EXEEXT): $(font_OBJECTS) $(font_DEPENDENCIES) + @rm -f font$(EXEEXT) + $(LINK) $(font_OBJECTS) $(font_LDADD) $(LIBS) +initexit$(EXEEXT): $(initexit_OBJECTS) $(initexit_DEPENDENCIES) + @rm -f initexit$(EXEEXT) + $(LINK) $(initexit_OBJECTS) $(initexit_LDADD) $(LIBS) +subbook$(EXEEXT): $(subbook_OBJECTS) $(subbook_DEPENDENCIES) + @rm -f subbook$(EXEEXT) + $(LINK) $(subbook_OBJECTS) $(subbook_LDADD) $(LIBS) +text$(EXEEXT): $(text_OBJECTS) $(text_DEPENDENCIES) + @rm -f text$(EXEEXT) + $(LINK) $(text_OBJECTS) $(text_LDADD) $(LIBS) +word$(EXEEXT): $(word_OBJECTS) $(word_DEPENDENCIES) + @rm -f word$(EXEEXT) + $(LINK) $(word_OBJECTS) $(word_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appendix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/booklist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disctype.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initexit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subbook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/word.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/ebu/samples/README b/lib/ebu/samples/README new file mode 100644 index 0000000..fb969eb --- /dev/null +++ b/lib/ebu/samples/README @@ -0,0 +1,17 @@ +$B$3$N%G%#%l%/%H%j$K$O(B EB $B%i%$%V%i%j$N%5%s%W%k%W%m%0%i%`$,4v$D$+CV$+$l$F(B +$B$$$^$9!#(B + +`configure' $B$r(B `--enable-samples' $B%*%W%7%g%sL5$7$Gl9g$O!" + * : + * font /cdrom 0 + * : + * ǻꤷ appendix ܤӡ + * ܤƤȾѳʸ򤹤٤ɽޤ + * + * appendix ȾѳʸƤʤȡ + * 顼ˤʤޤ + * + * ˤϡоݤܤΥǥåꤷ + * ǥåϡҤκǽܤ 012 ... + * ʤޤ + */ +#include +#include + +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Appendix app; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + int subbook_count; + int subbook_index; + int alt_start; + char text[EB_MAX_ALTERNATION_TEXT_LENGTH + 1]; + int i; + + /* ޥɹ԰å*/ + if (argc != 3) { + fprintf(stderr, "Usage: %s appendix-path subbook-index\n", + argv[0]); + exit(1); + } + + /* EB 饤֥ `app' */ + eb_initialize_library(); + eb_initialize_appendix(&app); + + /* appendix `app' ˷դ롣*/ + error_code = eb_bind_appendix(&app, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the app, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ܤΰ*/ + error_code = eb_appendix_subbook_list(&app, subbook_list, + &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the subbook list, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ܤΥǥå*/ + subbook_index = atoi(argv[2]); + + /*ָߤ (current subbook)פꡣ*/ + if (eb_set_appendix_subbook(&app, subbook_list[subbook_index]) + < 0) { + fprintf(stderr, "%s: failed to set the current subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* γϰ֤*/ + error_code = eb_narrow_alt_start(&app, &alt_start); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get font information, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + i = alt_start; + for (;;) { + /* ʸ*/ + error_code = eb_narrow_alt_character_text(&app, i, text); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get font data, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ʸϡ*/ + printf("%04x: %s\n", i, text); + + /* ʸֹĿʤ롣*/ + error_code = eb_forward_narrow_alt_character(&app, 1, &i); + if (error_code != EB_SUCCESS) + break; + } + + /* appendix EB 饤֥Ѥλ*/ + eb_finalize_appendix(&app); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_appendix(&app); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/booklist.c b/lib/ebu/samples/booklist.c new file mode 100644 index 0000000..a1af543 --- /dev/null +++ b/lib/ebu/samples/booklist.c @@ -0,0 +1,111 @@ +/* -*- C -*- + * Copyright (c) 2003-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * booklist + * : + * booklist ebnet://localhost + * : + * ǻꤷ EBNET Ф³ + * ơФ󶡤ҡappendix ΰɽޤ + */ +#include +#include + +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_BookList bl; + int book_count; + char *name, *title; + int i; + + /* ޥɹ԰å*/ + if (argc != 2) { + fprintf(stderr, "Usage: %s book-path remote-access-identifier\n", + argv[0]); + exit(1); + } + + /* EB 饤֥ `bl' */ + eb_initialize_library(); + eb_initialize_booklist(&bl); + + /* EBNET Ф `bl' ˷դ롣*/ + error_code = eb_bind_booklist(&bl, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the EBNET server, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* оνҡappendix θĿ*/ + error_code = eb_booklist_book_count(&bl, &book_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the number of books, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + for (i = 0; i < book_count; i++) { + /* ҡappendix ̾Τ*/ + error_code = eb_booklist_book_name(&bl, i, &name); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get book name #%d, %s\n", + argv[0], i, eb_error_message(error_code)); + goto die; + } + + /* ҡappendix ̾*/ + error_code = eb_booklist_book_name(&bl, i, &title); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get book title #%d, %s\n", + argv[0], i, eb_error_message(error_code)); + goto die; + } + + printf("%-20s %s\n", name, title); + } + + /* `bl' EB 饤֥Ѥλ*/ + eb_finalize_booklist(&bl); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_booklist(&bl); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/disctype.c b/lib/ebu/samples/disctype.c new file mode 100644 index 0000000..072ecf7 --- /dev/null +++ b/lib/ebu/samples/disctype.c @@ -0,0 +1,100 @@ +/* -*- C -*- + * Copyright (c) 1999-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * disctype + * : + * disctype /cdrom + * : + * ǻꤵ줿 CD-ROM ҤμबEB EPWING + * Ĵ٤ɽޤ + */ +#include +#include + +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Disc_Code disc_code; + + /* ޥɹ԰å*/ + if (argc != 2) { + fprintf(stderr, "Usage: %s book-path\n", argv[0]); + exit(1); + } + + /* EB 饤֥ `book' */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + eb_initialize_book(&book); + + /* `book' Ҥ˷դ롣Ԥ齪λ*/ + error_code = eb_bind(&book, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the book, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ҤμĴ٤ɽ*/ + error_code = eb_disc_type(&book, &disc_code); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get disc type, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + if (disc_code == EB_DISC_EB) { + fputs("EB\n", stdout); + } else if (disc_code == EB_DISC_EPWING) { + fputs("EPWING\n", stdout); + } else { + fputs("unknown\n", stdout); + } + + /* Ҥ EB 饤֥Ѥλ*/ + eb_finalize_book(&book); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/font.c b/lib/ebu/samples/font.c new file mode 100644 index 0000000..b8bd538 --- /dev/null +++ b/lib/ebu/samples/font.c @@ -0,0 +1,160 @@ +/* -*- C -*- + * Copyright (c) 2002-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * font + * : + * font /cdrom 0 + * : + * ǻꤷ CD-ROM Ҥܤӡ + * ܤƤȾѳ (⤵ 16 ԥ) 򤹤٤ƥ + * Ȥɽޤ + * + * ܤ⤵ 16 ԥȾѳƤʤȡ + * 顼ˤʤޤ + * + * ˤϡоݤܤΥǥåꤷ + * ǥåϡҤκǽܤ 012 ... + * ʤޤ + */ +#include +#include + +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + int subbook_count; + int subbook_index; + int font_start; + unsigned char bitmap[EB_SIZE_NARROW_FONT_16]; + int i, j; + + /* ޥɹ԰å*/ + if (argc != 3) { + fprintf(stderr, "Usage: %s book-path subbook-index\n", + argv[0]); + exit(1); + } + + /* EB 饤֥ `book' */ + eb_initialize_library(); + eb_initialize_book(&book); + + /* Ҥ `book' ˷դ롣*/ + error_code = eb_bind(&book, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the book, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ܤΰ*/ + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the subbbook list, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ܤΥǥå*/ + subbook_index = atoi(argv[2]); + + /*ָߤ (current subbook)פꡣ*/ + error_code = eb_set_subbook(&book, subbook_list[subbook_index]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to set the current subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /*ָߤγ礭פꡣ*/ + if (eb_set_font(&book, EB_FONT_16) < 0) { + fprintf(stderr, "%s: failed to set the font size, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* γϰ֤*/ + error_code = eb_narrow_font_start(&book, &font_start); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get font information, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + i = font_start; + for (;;) { + /* Υӥåȥޥåץǡ*/ + error_code = eb_narrow_font_character_bitmap(&book, i, + (char *)bitmap); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get font data, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ӥåȥޥåפ򥢥Ȥˤƽϡ*/ + printf("code point=%04x\n", i); + for (j = 0; j < 16; j++) { + fputc((bitmap[j] & 0x80) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x40) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x20) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x10) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x08) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x04) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x02) ? '*' : ' ', stdout); + fputc((bitmap[j] & 0x01) ? '*' : ' ', stdout); + fputc('\n', stdout); + } + fputs("--------\n", stdout); + + /* ʸֹĿʤ롣*/ + error_code = eb_forward_narrow_font_character(&book, 1, &i); + if (error_code != EB_SUCCESS) + break; + } + + /* Ҥ EB 饤֥Ѥλ*/ + eb_finalize_book(&book); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/initexit.c b/lib/ebu/samples/initexit.c new file mode 100644 index 0000000..f0a9190 --- /dev/null +++ b/lib/ebu/samples/initexit.c @@ -0,0 +1,60 @@ +/* -*- C -*- + * Copyright (c) 2001-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * initexit + * : + * initexit + * : + * EB 饤֥ν򤷤Ƥߤޤ + * ץγ¦鸫Сϲΰ̣ʤưǤ + */ +#include +#include + +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + + /* EB 饤֥*/ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + exit(1); + } + + /* EB 饤֥Ѥλ*/ + eb_finalize_library(); + exit(0); +} diff --git a/lib/ebu/samples/subbook.c b/lib/ebu/samples/subbook.c new file mode 100644 index 0000000..2810544 --- /dev/null +++ b/lib/ebu/samples/subbook.c @@ -0,0 +1,106 @@ +/* -*- C -*- + * Copyright (c) 1999-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * subbook + * : + * subbook /cdrom + * : + * ǻꤵ CD-ROM Ҥ˴ޤޤƤ뤹٤Ƥܤ + * ̾ɽޤ + */ +#include +#include + +#include +#include + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + int subbook_count; + char title[EB_MAX_TITLE_LENGTH + 1]; + int i; + + /* ޥɹ԰å*/ + if (argc != 2) { + fprintf(stderr, "Usage: %s book-path\n", argv[0]); + exit(1); + } + + /* EB 饤֥ `book' */ + error_code = eb_initialize_library(); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to initialize EB Library, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + eb_initialize_book(&book); + + /* Ҥ `book' ˷դ롣*/ + error_code = eb_bind(&book, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the book, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ܤΰ*/ + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the subbbook list, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* Ҥ˴ޤޤƤܤ̾ϡ*/ + for (i = 0; i < subbook_count; i++) { + error_code = eb_subbook_title2(&book, subbook_list[i], title); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the title, %s\n", + argv[0], eb_error_message(error_code)); + continue; + } + printf("%d: %s\n", i, title); + } + + /* Ҥ EB 饤֥Ѥλ*/ + eb_finalize_book(&book); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/text.c b/lib/ebu/samples/text.c new file mode 100644 index 0000000..32b82dd --- /dev/null +++ b/lib/ebu/samples/text.c @@ -0,0 +1,159 @@ +/* -*- C -*- + * Copyright (c) 1999-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * text + * : + * text /cdrom 0 10 + * : + * ǻꤷ CD-ROM Ҥܤӡʸ + * Ƭ ʬñϤޤ + * + * ˤϡоݤܤΥǥåꤷ + * ǥåϡҤκǽܤ 012 ... + * ʤޤ + */ +#include +#include + +#include +#include +#include + +#define MAXLEN_TEXT 1023 + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + int subbook_count; + int subbook_index; + EB_Position text_position; + char text[MAXLEN_TEXT + 1]; + ssize_t text_length; + int text_count; + int i; + + /* ޥɹ԰å*/ + if (argc != 4) { + fprintf(stderr, "Usage: %s book-path subbook-index number\n", + argv[0]); + exit(1); + } + text_count = atoi(argv[3]); + + /* EB 饤֥ `book' */ + eb_initialize_library(); + eb_initialize_book(&book); + + /* Ҥ `book' ˷դ롣*/ + error_code = eb_bind(&book, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the book, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ܤΰ*/ + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the subbbook list, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ܤΥǥå*/ + subbook_index = atoi(argv[2]); + + /*ָߤ (current subbook)פꡣ*/ + error_code = eb_set_subbook(&book, subbook_list[subbook_index]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to set the current subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ƥȤγϰ֤*/ + error_code = eb_text(&book, &text_position); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get text information, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ƥȤ򥷡*/ + error_code = eb_seek_text(&book, &text_position); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to seek text, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + i = 0; + while (i < text_count) { + /* ƥȤ*/ + error_code = eb_read_text(&book, NULL, NULL, NULL, MAXLEN_TEXT, + text, &text_length); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to read text, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + fputs(text, stdout); + + if (!eb_is_text_stopped(&book)) + continue; + + fputs("\n----------------------------------------\n", stdout); + + /* ñذư*/ + error_code = eb_forward_text(&book, NULL); + if (error_code == EB_ERR_END_OF_CONTENT) + fputs("\n[END]\n", stdout); + else if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to read text, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + i++; + } + + /* Ҥ EB 饤֥Ѥλ*/ + eb_finalize_book(&book); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/samples/word.c b/lib/ebu/samples/word.c new file mode 100644 index 0000000..c20e0d4 --- /dev/null +++ b/lib/ebu/samples/word.c @@ -0,0 +1,155 @@ +/* -*- C -*- + * Copyright (c) 1999-2006 Motoyuki Kasahara + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + */ + +/* + * ˡ: + * word + * : + * word /cdrom 0 apple + * : + * ǻꤷ CD-ROM Ҥܤ椫 + * Ȥñ׸õҥåȤ٤ƤΥȥ + * Фɽޤ + * + * ˤϡоݤܤΥǥåꤷ + * ǥåϡҤκǽܤ 012 ... + * ʤޤ + */ +#include +#include + +#include +#include +#include + +#define MAX_HITS 50 +#define MAXLEN_HEADING 127 + +int +main(int argc, char *argv[]) +{ + EB_Error_Code error_code; + EB_Book book; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; + EB_Hit hits[MAX_HITS]; + char heading[MAXLEN_HEADING + 1]; + int subbook_count; + int subbook_index; + int hit_count; + ssize_t heading_length; + int i; + + /* ޥɹ԰å*/ + if (argc != 4) { + fprintf(stderr, "Usage: %s book-path subbook-index word\n", + argv[0]); + exit(1); + } + + /* EB 饤֥ `book' */ + eb_initialize_library(); + eb_initialize_book(&book); + + /* Ҥ `book' ˷դ롣*/ + error_code = eb_bind(&book, argv[1]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to bind the book, %s: %s\n", + argv[0], eb_error_message(error_code), argv[1]); + goto die; + } + + /* ܤΰ*/ + error_code = eb_subbook_list(&book, subbook_list, &subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get the subbbook list, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ܤΥǥå*/ + subbook_index = atoi(argv[2]); + + /*ָߤ (current subbook)פꡣ*/ + error_code = eb_set_subbook(&book, subbook_list[subbook_index]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to set the current subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* ñ측ΥꥯȤС*/ + error_code = eb_search_exactword(&book, argv[3]); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to search for the word, %s: %s\n", + argv[0], eb_error_message(error_code), argv[3]); + goto die; + } + + for (;;) { + /* ĤäƤҥåȥȥ*/ + error_code = eb_hit_list(&book, MAX_HITS, hits, &hit_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to get hit entries, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + if (hit_count == 0) + break; + + for (i = 0; i < hit_count; i++) { + /* Фΰ֤ذư*/ + error_code = eb_seek_text(&book, &(hits[i].heading)); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to seek the subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + + /* Фɽ*/ + error_code = eb_read_heading(&book, NULL, NULL, NULL, + MAXLEN_HEADING, heading, &heading_length); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "%s: failed to read the subbook, %s\n", + argv[0], eb_error_message(error_code)); + goto die; + } + printf("%s\n", heading); + } + } + + /* Ҥ EB 饤֥Ѥλ*/ + eb_finalize_book(&book); + eb_finalize_library(); + exit(0); + + /* 顼ȯǽλȤν*/ + die: + eb_finalize_book(&book); + eb_finalize_library(); + exit(1); +} diff --git a/lib/ebu/stamp-h1 b/lib/ebu/stamp-h1 new file mode 100644 index 0000000..4547fe1 --- /dev/null +++ b/lib/ebu/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/lib/libmxml/.gitignore b/lib/libmxml/.gitignore new file mode 100644 index 0000000..0edaa8c --- /dev/null +++ b/lib/libmxml/.gitignore @@ -0,0 +1,29 @@ +*.o +Makefile +autom4te.cache +config.h +config.log +config.status +doc/mxml.d +libmxml.1.dylib +libmxml.a +libmxml.dylib +libmxml.sl +libmxml.sl.1 +libmxml.so +libmxml.so.1 +libmxml.so.1.5 +mxml.epub +mxml.pc +mxml.xml +mxmldoc +mxmldoc-static +org.msweet.mxml.atom +org.msweet.mxml.docset +org.msweet.mxml.xar +temp1.xmlfd +test.xmlfd +testmxml +test1.xml +xcode/mxml.xcodeproj/project.xcworkspace +xcode/mxml.xcodeproj/xcuserdata diff --git a/lib/libmxml/ANNOUNCEMENT b/lib/libmxml/ANNOUNCEMENT new file mode 100644 index 0000000..d2783ac --- /dev/null +++ b/lib/libmxml/ANNOUNCEMENT @@ -0,0 +1,17 @@ +Mini-XML 2.10 is now available for download from: + + http://www.msweet.org/downloads.php/Mini-XML + +Mini-XML 2.10 fixes some stack overflow, XML, and API issues. Changes include: + +- The version number in mxml.h was wrong (Bug #532) +- The mxml.spec file was out of date (Bug #521) +- Mini-XML no longer allows malformed element names (Bug #509) +- mxmlLoad* and mxmlSAXLoad* did not properly create text nodes when + MXML_TEXT_CALLBACK was specified (Bug #531) +- mxmlDelete used a recursive algorithm which could require large amounts of + stack space depending on the file (Bug #549, CVE-2016-4570) +- mxmlWrite* used a recursive algorithm which could require large amounts of + stack space depending on the file (Bug #549, CVE-2016-4571) + +Enjoy! diff --git a/lib/libmxml/CHANGES.md b/lib/libmxml/CHANGES.md new file mode 100644 index 0000000..e3347d7 --- /dev/null +++ b/lib/libmxml/CHANGES.md @@ -0,0 +1,227 @@ +# Changes in Mini-XML 2.11 + +- CDATA nodes now omit the trailing "]]" for convenience (Issue #170) +- Fixed a memory leak in mxmlDelete (Issue #183) +- `mxmlElementSetAttrf` did not work with some versions of Visual Studio + (Issue #184) +- Added `mxmlElementGetAttrByIndex` and `mxmlELementGetAttrCount` functions + (Issue #185) +- The configure script now properly supports cross-compilation (Issue #188) +- The mxmldoc utility now supports generation of EPUB files (Issue #189) +- The mxmldoc utility now supports the `SOURCE_DATE_EPOCH` environment + variable for reproducible builds (Issue #193) +- The mxmldoc utility now supports Markdown (Issue #194) +- Added `mxmlNewOpaquef` and `mxmlSetOpaquef` functions to add and set formatted + opaque string values. +- The mxmldoc utility scanned and loaded descriptive text differently, causing + the detailed descriptions ("discussion") to be lost in generated + documentation. +- The mxmldoc utility now supports `@exclude format@` comments to exclude + documentation based on the output format. The format string can be `all` to + exclude documentation for all formats or a comma-delimited list such as + `@exclude man,html@`. + + +# Changes in Mini-XML 2.10 + +- The version number in mxml.h was wrong. +- The mxml.spec file was out of date. +- Mini-XML no longer allows malformed element names. +- `mxmlLoad*` and `mxmlSAXLoad*` did not properly create text nodes when + MXML_TEXT_CALLBACK was specified. +- `mxmlDelete` used a recursive algorithm which could require large amounts of + stack space depending on the file. (CVE-2016-4570) +- `mxmlWrite*` used a recursive algorithm which could require large amounts of + stack space depending on the file. (CVE-2016-4571) + + +# Changes in Mini-XML 2.9 + +- `mxmlLoad*` did not correctly load value nodes with `MXML_NO_CALLBACK` or + `MXML_TEXT_CALLBACK`. + + +# Changes in Mini-XML 2.8 + +- Now call docsetutil using xcrun on macOS. +- mxmldoc did not escape special HTML characters inside @code foo@ comments. +- Fixed a memory leak in `mxmlElementDeleteAttr`. +- Added `MXML_MAJOR/MINOR_VERSION` definitions to mxml.h. +- Fixed a bug reading UTF-16 characters from a file. +- Fixed a memory leak when loading invalid XML. +- Fixed an XML fragment loading problem. + + +# Changes in Mini-XML 2.7 + +- Added 64-bit configurations to the VC++ project files. +- Fixed conformance of mxmldoc's HTML and CSS output. +- Added data accessor ("get") functions and made the `mxml_node_t` and + `mxml_index_t` structures private but still available in the Mini-XML header to + preserve source compatibility. +- Updated the source headers to reference the Mini-XML license and its + exceptions to the LGPL2. +- Fixed a memory leak when loading a badly-formed XML file. +- Added a new mxmlFindPath function to find the value node of a named element. +- Building a static version of the library did not work on Windows. +- The shared library did not include a destructor for the thread-specific data + key on UNIX-based operating systems. +- mxmlLoad* did not error out on XML with multiple root nodes. +- Fixed an issue with the `_mxml_vstrdupf` function. +- `mxmlSave*` no longer write all siblings of the passed node, just that node + and its children. + + +# Changes in Mini-XML 2.6 + +- Documentation fixes. +- The mxmldoc program did not handle typedef comments properly. +- Added support for "long long" printf formats. +- The XML parser now ignores BOMs in UTF-8 XML files. +- The mxmldoc program now supports generating Xcode documentation sets. +- `mxmlSave*` did not output UTF-8 correctly on some platforms. +- `mxmlNewXML` now adds encoding="utf-8" in the ?xml directive to avoid + problems with non-conformant XML parsers that assume something other + than UTF-8 as the default encoding. +- Wrapping was not disabled when mxmlSetWrapMargin(0) was called, and + "" was always followed by a newline. +- The mxml.pc.in file was broken. +- The mxmldoc program now handles "typedef enum name {} name" correctly. + + +# Changes in Mini-XML 2.5 + +- The mxmldoc program now makes greater use of CSS and supports a `--css` option + to embed an alternate stylesheet. +- The mxmldoc program now supports `--header` and `--footer` options to insert + documentation content before and after the generated content. +- The mxmldoc program now supports a `--framed` option to generate framed HTML + output. +- The mxmldoc program now creates a table of contents including any headings in + the `--intro` file when generating HTML output. +- The man pages and man page output from mxmldoc did not use "\-" for dashes. +- The debug version of the Mini-XML DLL could not be built. +- Processing instructions and directives did not work when not at the top level + of a document. +- Spaces around the "=" in attributes were not supported. + + +# Changes in Mini-XML 2.4 + +- Fixed shared library build problems on HP-UX and Mac macOS. +- The mxmldoc program did not output argument descriptions for functions + properly. +- All global settings (custom, error, and entity callbacks and the wrap margin) + are now managed separately for each thread. +- Added `mxmlElementDeleteAttr` function. +- `mxmlElementSetAttrf` did not work. +- `mxmlLoad*` incorrectly treated declarations as parent elements. +- `mxmlLoad*` incorrectly allowed attributes without values. +- Fixed Visual C++ build problems. +- `mxmlLoad*` did not return NULL when an element contained an error. +- Added support for the apos character entity. +- Fixed whitespace detection with Unicode characters. +- `mxmlWalkNext` and `mxmlWalkPrev` did not work correctly when called with a + node with no children as the top node. + + +# Changes in Mini-XML 2.3 + +- Added two exceptions to the LGPL to support static linking of applications + against Mini-XML. +- The mxmldoc utility can now generate man pages, too. +- Added a mxmlNewXML function. +- Added a mxmlElementSetAttrf function. +- Added snprintf() emulation function for test program. +- Added the _CRT_SECURE_NO_DEPRECATE definition when building on VC++ 2005. +- mxmlLoad* did not detect missing > characters in elements. +- mxmlLoad* did not detect missing close tags at the end of an XML document. +- Added user_data and ref_count members to mxml_node_t structure. +- Added mxmlReleaseNode() and mxmlRetainNode() APIs for reference-counted nodes. +- Added mxmlSetWrapMargin() to control the wrapping of XML output. +- Added conditional check for EINTR error code for certain Windows compilers + that do not define it. +- The mxmldoc program now generates correct HTML 4.0 output - previously it + generated invalid XHTML. +- The mxmldoc program now supports "@deprecated@, "@private@", and "@since + version@" comments. +- Fixed function and enumeration type bugs in mxmldoc. +- Fixed the XML schema for mxmldoc. +- The mxmldoc program now supports `--intro`, `--section`, and `--title` + options. +- The `mxmlLoad*` functions could leak a node on an error. +- The `mxml_vsnprintf` function could get in an infinite loop on a buffer + overflow. +- Added new `mxmlNewCDATA` and `mxmlSetCDATA` functions to create and set CDATA + nodes, which are really just special element nodes. +- Added new `MXML_IGNORE` type and `MXML_IGNORE_CB` callback to ignore non- + element nodes, e.g. whitespace. +- `mxmlLoad*` crashed when reporting an error in some invalid XML. + + +# Changes in Mini-XML 2.2.2 + +- `mxmlLoad*` did not treat custom data as opaque, so whitespace characters + would be lost. + + +# Changes in Mini-XML 2.2.1 + +- `mxmlLoad*` now correctly return NULL on error. +- `mxmlNewInteger`, `mxmlNewOpaque`, `mxmlNewReal`, `mxmlNewText`, and + `mxmlNewTextf` incorrectly required a parent node. +- Fixed an XML output bug in mxmldoc. +- The "make install" target now uses the install command to set the proper + permissions on UNIX/Linux/macOS. +- Fixed a MingW/Cygwin compilation problem. + + +# Changes in Mini-XML 2.2 + +- Added shared library support. +- `mxmlLoad*` now return an error when an XML stream contains illegal control + characters. +- `mxmlLoad*` now return an error when an element contains two attributes with + the same name in conformance with the XML spec. +- Added support for CDATA. +- Updated comment and processing instruction handling - no entity support per + XML specification. +- Added checking for invalid comment termination: "--->" is not allowed. + + +# Changes in Mini-XML 2.1 + +- Added support for custom data nodes. +- Now treat UTF-8 sequences which are longer than necessary as an error. +- Fixed entity number support. +- Fixed mxmlLoadString() bug with UTF-8. +- Fixed entity lookup bug. +- Added `mxmlLoadFd` and `mxmlSaveFd` functions. +- Fixed multi-word UTF-16 handling. + + +# Changes in Mini-XML 2.0 + +- New programmers manual. +- Added Visual C++ project files for Microsoft Windows users. +- Added optimizations to mxmldoc, `mxmlSaveFile`, and `mxmlIndexNew`. +- `mxmlEntityAddCallback` now returns an integer status. +- Added UTF-16 support (input only; all output is UTF-8). +- Added index functions to build a searchable index of XML nodes. +- Added character entity callback interface to support additional character + entities beyond those defined in the XHTML specification. +- Added support for XHTML character entities. +- The mxmldoc utility now produces XML output which conforms to an updated XML + schema, described in the file "doc/mxmldoc.xsd". +- Changed the whitespace callback interface to return strings instead of a + single character, allowing for greater control over the formatting of XML + files written using Mini-XML. THIS CHANGE WILL REQUIRE CHANGES TO YOUR 1.x + CODE IF YOU USE WHITESPACE CALLBACKS. +- The mxmldoc utility is now capable of documenting C++ classes, functions, and + structures, and correctly handles C++ comments. +- Added new modular tests for mxmldoc. +- Updated the mxmldoc output to be more compatible with embedding in manuals + produced with HTMLDOC. +- The makefile incorrectly included a "/" separator between the destination path + and install path. This caused problems when building and installing with + MingW. diff --git a/lib/libmxml/COPYING b/lib/libmxml/COPYING new file mode 100644 index 0000000..4d0aa78 --- /dev/null +++ b/lib/libmxml/COPYING @@ -0,0 +1,507 @@ + Mini-XML License + September 18, 2010 + + +The Mini-XML library and included programs are provided under the +terms of the GNU Library General Public License version 2 (LGPL2) +with the following exceptions: + + 1. Static linking of applications to the Mini-XML library +does not constitute a derivative work and does not require +the author to provide source code for the application, use +the shared Mini-XML libraries, or link their applications +against a user-supplied version of Mini-XML. + +If you link the application to a modified version of +Mini-XML, then the changes to Mini-XML must be provided +under the terms of the LGPL2 in sections 1, 2, and 4. + + 2. You do not have to provide a copy of the Mini-XML license +with programs that are linked to the Mini-XML library, nor +do you have to identify the Mini-XML license in your +program or documentation as required by section 6 of the +LGPL2. + + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/lib/libmxml/Makefile.in b/lib/libmxml/Makefile.in new file mode 100644 index 0000000..eef14fe --- /dev/null +++ b/lib/libmxml/Makefile.in @@ -0,0 +1,419 @@ +# +# Makefile for Mini-XML, a small XML-like file parsing library. +# +# Copyright 2003-2017 by Michael R Sweet. +# +# These coded instructions, statements, and computer programs are the +# property of Michael R Sweet and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "COPYING" +# which should have been included with this file. If this file is +# missing or damaged, see the license at: +# +# https://michaelrsweet.github.io/mxml +# + +# +# Compiler tools definitions... +# + +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARCHFLAGS = @ARCHFLAGS@ +CC = @CC@ +CFLAGS = $(OPTIM) $(ARCHFLAGS) @CFLAGS@ @CPPFLAGS@ @PTHREAD_FLAGS@ +CP = @CP@ +DSO = @DSO@ +DSOFLAGS = @DSOFLAGS@ +LDFLAGS = $(OPTIM) $(ARCHFLAGS) @LDFLAGS@ +INSTALL = @INSTALL@ +LIBMXML = @LIBMXML@ +LIBS = @LIBS@ @PTHREAD_LIBS@ +LN = @LN@ -s +MKDIR = @MKDIR@ +OPTIM = @OPTIM@ +RANLIB = @RANLIB@ +RM = @RM@ -f +SHELL = /bin/sh + + +# +# Configured directories... +# + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +datarootdir = @datarootdir@ +includedir = @includedir@ +libdir = @libdir@ +mandir = @mandir@ +docdir = @docdir@ +BUILDROOT = $(DSTROOT) + + +# +# Install commands... +# + +INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 +INSTALL_DATA = $(INSTALL) -m 644 +INSTALL_DIR = $(INSTALL) -d +INSTALL_LIB = $(LIBTOOL) $(INSTALL) -m 755 +INSTALL_MAN = $(INSTALL) -m 644 +INSTALL_SCRIPT = $(INSTALL) -m 755 + + +# +# Rules... +# + +.SILENT: +.SUFFIXES: .c .man .o +.c.o: + echo Compiling $< + $(CC) $(CFLAGS) -c -o $@ $< + + +# +# Targets... +# + +DOCFILES = doc/mxml.html doc/mxmldoc.xsd README.md COPYING CHANGES.md +PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-get.o \ + mxml-index.o mxml-node.o mxml-search.o mxml-set.o +LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o +OBJS = mmd.o mxmldoc.o testmxml.o zipc.o $(LIBOBJS) +ALLTARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml @MXML_EPUB@ +CROSSTARGETS = $(LIBMXML) mxmldoc +TARGETS = $(@TARGETS@) + + +# +# Make everything... +# + +all: $(TARGETS) + + +# +# Clean everything... +# + +clean: + echo Cleaning build files... + $(RM) $(OBJS) $(ALLTARGETS) + $(RM) mxmldoc-static + $(RM) mxml1.dll + $(RM) libmxml.a + $(RM) libmxml.so.1.6 + $(RM) libmxml.sl.1 + $(RM) libmxml.1.dylib + + +# +# Really clean everything... +# + +distclean: clean + echo Cleaning distribution files... + $(RM) config.cache config.log config.status + $(RM) Makefile config.h + $(RM) -r autom4te*.cache + $(RM) *.bck *.bak + $(RM) -r clang + + +# +# Run the clang.llvm.org static code analysis tool on the C sources. +# + +.PHONY: clang clang-changes +clang: + echo Doing static code analysis of all code using CLANG... + $(RM) -r clang + scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) clean all +clang-changes: + echo Doing static code analysis of changed code using CLANG... + scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all + + +# +# Install everything... +# + +install: $(TARGETS) install-$(LIBMXML) install-libmxml.a + echo Installing mxmldoc in $(BUILDROOT)$(bindir)... + $(INSTALL_DIR) $(BUILDROOT)$(bindir) + $(INSTALL_BIN) mxmldoc $(BUILDROOT)$(bindir) + echo Installing documentation in $(BUILDROOT)$(docdir)... + $(INSTALL_DIR) $(BUILDROOT)$(docdir) + for file in $(DOCFILES); do \ + $(INSTALL_MAN) $$file $(BUILDROOT)$(docdir)/`basename $$file .md`; \ + done + echo Installing header files in $(BUILDROOT)$(includedir)... + $(INSTALL_DIR) $(BUILDROOT)$(includedir) + $(INSTALL_DATA) mxml.h $(BUILDROOT)$(includedir) + echo Installing pkgconfig files in $(BUILDROOT)$(libdir)/pkgconfig... + $(INSTALL_DIR) $(BUILDROOT)$(libdir)/pkgconfig + $(INSTALL_DATA) mxml.pc $(BUILDROOT)$(libdir)/pkgconfig + echo Installing man pages in $(BUILDROOT)$(mandir)... + $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man1 + $(INSTALL_MAN) doc/mxmldoc.man $(BUILDROOT)$(mandir)/man1/mxmldoc.1 + $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 + $(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3 + +install-libmxml.a: + echo Installing libmxml.a to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml.a $(BUILDROOT)$(libdir) + $(RANLIB) $(BUILDROOT)$(libdir)/libmxml.a + +install-libmxml.so.1.6: + echo Installing libmxml.so to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml.so.1.6 $(BUILDROOT)$(libdir) + $(RM) $(BUILDROOT)$(libdir)/libmxml.so + $(LN) libmxml.so.1.6 $(BUILDROOT)$(libdir)/libmxml.so + $(RM) $(BUILDROOT)$(libdir)/libmxml.so.1 + $(LN) libmxml.so.1.6 $(BUILDROOT)$(libdir)/libmxml.so.1 + +install-libmxml.sl.1: + echo Installing libmxml.sl to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml.sl.1 $(BUILDROOT)$(libdir) + $(RM) $(BUILDROOT)$(libdir)/libmxml.so + $(LN) libmxml.sl.1 $(BUILDROOT)$(libdir)/libmxml.sl + +install-libmxml.1.dylib: + echo Installing libmxml.dylib to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml.1.dylib $(BUILDROOT)$(libdir) + $(RM) $(BUILDROOT)$(libdir)/libmxml.dylib + $(LN) libmxml.1.dylib $(BUILDROOT)$(libdir)/libmxml.dylib + + +# +# Uninstall everything... +# + +uninstall: uninstall-$(LIBMXML) uninstall-libmxml.a + echo Uninstalling mxmldoc from $(BUILDROOT)$(bindir)... + $(RM) $(BUILDROOT)$(bindir)/mxmldoc + echo Uninstalling documentation from $(BUILDROOT)$(docdir)... + $(RM) -r $(BUILDROOT)$(docdir) + echo Uninstalling headers from $(BUILDROOT)$(includedir)... + $(RM) $(BUILDROOT)$(includedir)/mxml.h + echo Uninstalling pkgconfig files from $(BUILDROOT)$(libdir)/pkgconfig... + $(RM) $(BUILDROOT)$(libdir)/pkgconfig/mxml.pc + echo Uninstalling man pages from $(BUILDROOT)$(mandir)... + $(RM) $(BUILDROOT)$(mandir)/man1/mxmldoc.1 + $(RM) $(BUILDROOT)$(mandir)/man3/mxml.3 + +uninstall-libmxml.a: + echo Uninstalling libmxml.a from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml.a + +uninstall-libmxml.so.1.6: + echo Uninstalling libmxml.so from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml.so + $(RM) $(BUILDROOT)$(libdir)/libmxml.so.1 + $(RM) $(BUILDROOT)$(libdir)/libmxml.so.1.4 + +uninstall-libmxml.sl.1: + echo Uninstalling libmxml.sl from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml.sl + $(RM) $(BUILDROOT)$(libdir)/libmxml.sl.1 + +uninstall-libmxml.1.dylib: + echo Uninstalling libmxml.dylib from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml.dylib + $(RM) $(BUILDROOT)$(libdir)/libmxml.1.dylib + + +# +# Figure out lines-of-code... +# + +.PHONY: sloc + +sloc: + echo "libmxml: \c" + sloccount $(LIBOBJS:.o=.c) mxml-private.c mxml.h 2>/dev/null | \ + grep "Total Physical" | awk '{print $$9}' + + +# +# libmxml.a +# + +libmxml.a: $(LIBOBJS) + echo Creating $@... + $(RM) $@ + $(AR) $(ARFLAGS) $@ $(LIBOBJS) + $(RANLIB) $@ + +$(LIBOBJS): mxml.h +mxml-entity.o mxml-file.o mxml-private.o: mxml-private.h + + +# +# mxml1.dll +# + +mxml1.dll: $(LIBOBJS) + echo Creating $@... + $(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS) + + +# +# libmxml.so.1.6 +# + +libmxml.so.1.6: $(LIBOBJS) + echo Creating $@... + $(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS) + $(RM) libmxml.so libmxml.so.1 + $(LN) libmxml.so.1.6 libmxml.so + $(LN) libmxml.so.1.6 libmxml.so.1 + + +# +# libmxml.sl.1 +# + +libmxml.sl.1: $(LIBOBJS) + echo Creating $@... + $(DSO) $(DSOFLAGS) -o libmxml.sl.1 $(LIBOBJS) + $(RM) libmxml.sl + $(LN) libmxml.sl.1 libmxml.sl + + +# +# libmxml.1.dylib +# + +libmxml.1.dylib: $(LIBOBJS) + echo Creating $@... + $(DSO) $(DSOFLAGS) -o libmxml.1.dylib \ + -install_name $(libdir)/libmxml.dylib \ + -current_version 1.6.0 \ + -compatibility_version 1.0.0 \ + $(LIBOBJS) + $(RM) libmxml.dylib + $(LN) libmxml.1.dylib libmxml.dylib + + +# +# mxmldoc +# + +mxmldoc: $(LIBMXML) mxmldoc.o mmd.o @ZIPC@ + echo Linking $@... + $(CC) -L. $(LDFLAGS) -o $@ mxmldoc.o mmd.o @ZIPC@ -lmxml $(LIBS) + +mxmldoc-static: libmxml.a mxmldoc.o mmd.o @ZIPC@ + echo Linking $@... + $(CC) $(LDFLAGS) -o $@ mxmldoc.o mmd.o @ZIPC@ libmxml.a $(LIBS) + +mxmldoc.o: mxml.h zipc.h mmd.h +zipc.o: zipc.h +mmd.o: mmd.h + + +# +# testmxml +# + +testmxml: libmxml.a testmxml.o + echo Linking $@... + $(CC) $(LDFLAGS) -o $@ testmxml.o libmxml.a $(LIBS) + @echo Testing library... + ./testmxml test.xml temp1s.xml >temp1.xml + ./testmxml temp1.xml temp2s.xml >temp2.xml + @if cmp temp1.xml temp2.xml; then \ + echo Stdio file test passed!; \ + $(RM) temp2.xml temp2s.xml; \ + else \ + echo Stdio file test failed!; \ + fi + @if cmp temp1.xml temp1s.xml; then \ + echo String test passed!; \ + $(RM) temp1.xml temp1s.xml; \ + else \ + echo String test failed!; \ + fi + @if cmp test.xml test.xmlfd; then \ + echo File descriptor test passed!; \ + $(RM) test.xmlfd; \ + else \ + echo File descriptor test failed!; \ + fi + +testmxml-vg: $(LIBOBJS) testmxml.o + echo Linking $@... + $(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBOBJS) $(LIBS) + +testmxml.o: mxml.h + + +# +# mxml.xml +# + +mxml.xml: mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c) \ + doc/body.man doc/body.md \ + doc/docset.css doc/docset.header \ + doc/reference.header + echo Generating API documentation... + $(RM) mxml.xml + ./mxmldoc-static --header doc/reference.header \ + --docversion @VERSION@ --author "Michael R Sweet" \ + --copyright "Copyright 2003-2017, All Rights Reserved." \ + --title "Mini-XML API Reference" \ + mxml.xml mxml.h $(PUBLIBOBJS:.o=.c) >doc/reference.html + ./mxmldoc-static --man mxml --title "Mini-XML API" \ + --body doc/body.man --footer doc/footer.man \ + mxml.xml >doc/mxml.man + if test "x`uname`" = xDarwin; then \ + ./mxmldoc-static --docset org.msweet.mxml.docset \ + --docversion @VERSION@ --feedname org.msweet.mxml \ + --feedurl https://michaelrsweet.github.io/mxml/org.msweet.mxml.atom \ + --header doc/docset.header --body doc/body.md \ + --css doc/docset.css \ + mxml.xml || exit 1; \ + $(RM) org.msweet.mxml.atom; \ + xcrun docsetutil package --output org.msweet.mxml.xar \ + --atom org.msweet.mxml.atom \ + --download-url https://michaelrsweet.github.io/mxml/org.msweet.mxml.xar \ + org.msweet.mxml.docset || exit 1; \ + fi + + +# +# mxml.epub +# + +mxml.epub: mxml.xml doc/body.md doc/mxml-cover.png + echo Generating EPUB API documentation... + ./mxmldoc-static --body doc/body.md \ + --coverimage doc/mxml-cover.png \ + --epub mxml.epub mxml.xml + + +# +# Use Valgrind (http://valgrind.org) to check for problems in mxmldoc. +# + +valgrind: mxmldoc-static + echo Doing dynamic code analysis using Valgrind... + $(RM) valgrind.xml + valgrind --tool=memcheck --leak-check=yes ./mxmldoc-static \ + valgrind.xml mxml.h $(PUBLIBOBJS:.o=.c) \ + >valgrind.html 2>valgrind.out + + +# +# All object files depend on the makefile and config header... +# + +$(OBJS): Makefile config.h diff --git a/lib/libmxml/README.md b/lib/libmxml/README.md new file mode 100644 index 0000000..266da85 --- /dev/null +++ b/lib/libmxml/README.md @@ -0,0 +1,188 @@ +# Mini-XML Version 2.11 + +Mini-XML is a small XML parsing library that you can use to read XML data files +or strings in your application without requiring large non-standard libraries. +Mini-XML only requires a "make" program and an ANSI C compatible compiler - GCC +works, as do most vendors' ANSI C compilers. + +Mini-XML provides the following functionality: + +- Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and + strings. +- Data is stored in a linked-list tree structure, preserving the XML data + hierarchy. +- SAX (streamed) reading of XML files and strings to minimize memory usage. +- Supports arbitrary element names, attributes, and attribute values with no + preset limits, just available memory. +- Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes. +- Functions for creating and managing trees of data. +- "Find" and "walk" functions for easily locating and navigating trees of data. + +Mini-XML doesn't do validation or other types of processing on the data +based upon schema files or other sources of definition information. + + +## Building Mini-XML + +Mini-XML comes with an autoconf-based configure script; just type the +following command to get things going: + + ./configure + +The default install prefix is `/usr/local`, which can be overridden using the +`--prefix` option: + + ./configure --prefix=/foo + +Other configure options can be found using the `--help` option: + + ./configure --help + +Once you have configured the software, type `make` to do the build and run +the test program to verify that things are working, as follows: + + make + +If you are using Mini-XML under Microsoft Windows with Visual C++, use the +included project files in the `vcnet` subdirectory to build the library +instead. Note: The static library on Windows is NOT thread-safe. + + +## Installing Mini-XML + +The `install` target will install Mini-XML in the lib and include +directories: + + make install + +Once you have installed it, use the `-lmxml` option to link your application +against it. + + +## Documentation + +The documentation is available in the `doc` subdirectory in the files +`mxml.html` (HTML) and `mxml.pdf` (PDF). You can also look at the +`testmxml.c` and `mxmldoc.c` source files for examples of using Mini-XML. + +Mini-XML provides a single header file which you include: + + #include + +Nodes are defined by the `mxml_node_t` structure; the `type` member defines the +node type (`element`, `integer`, `opaque`, `real`, or `text`) which determines +which value you want to look at in the `value` union. New nodes can be created +using the `mxmlNewElement()`, `mxmlNewInteger()`, `mxmlNewOpaque()`, +`mxmlNewReal()`, and `mxmlNewText()` functions. Only elements can have child +nodes, and the top node must be an element, usually "?xml". + +You load an XML file using the `mxmlLoadFile()` function: + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "r"); + tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); + fclose(fp); + +Similarly, you save an XML file using the `mxmlSaveFile()` function: + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "w"); + mxmlSaveFile(tree, fp, MXML_NO_CALLBACK); + fclose(fp); + +The `mxmlLoadString()`, `mxmlSaveAllocString()`, and `mxmlSaveString()` +functions load XML node trees from and save XML node trees to strings: + + char buffer[8192]; + char *ptr; + mxml_node_t *tree; + + ... + tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK); + + ... + mxmlSaveString(tree, buffer, sizeof(buffer), MXML_NO_CALLBACK); + + ... + ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK); + +You can find a named element/node using the `mxmlFindElement()` function: + + mxml_node_t *node = mxmlFindElement(tree, tree, "name", "attr", + "value", MXML_DESCEND); + +The `name`, `attr`, and `value` arguments can be passed as `NULL` to act as +wildcards, e.g.: + + /* Find the first "a" element */ + node = mxmlFindElement(tree, tree, "a", NULL, NULL, MXML_DESCEND); + + /* Find the first "a" element with "href" attribute */ + node = mxmlFindElement(tree, tree, "a", "href", NULL, MXML_DESCEND); + + /* Find the first "a" element with "href" to a URL */ + node = mxmlFindElement(tree, tree, "a", "href", + "http://www.minixml.org/", + MXML_DESCEND); + + /* Find the first element with a "src" attribute*/ + node = mxmlFindElement(tree, tree, NULL, "src", NULL, MXML_DESCEND); + + /* Find the first element with a "src" = "foo.jpg" */ + node = mxmlFindElement(tree, tree, NULL, "src", "foo.jpg", + MXML_DESCEND); + +You can also iterate with the same function: + + mxml_node_t *node; + + for (node = mxmlFindElement(tree, tree, "name", NULL, NULL, + MXML_DESCEND); + node != NULL; + node = mxmlFindElement(node, tree, "name", NULL, NULL, + MXML_DESCEND)) + { + ... do something ... + } + +The `mxmlFindPath()` function finds the (first) value node under a specific +element using an XPath: + + mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar"); + +The `mxmlGetInteger()`, `mxmlGetOpaque()`, `mxmlGetReal()`, and +`mxmlGetText()` functions retrieve the value from a node: + + mxml_node_t *node; + + int intvalue = mxmlGetInteger(node); + + const char *opaquevalue = mxmlGetOpaque(node); + + double realvalue = mxmlGetReal(node); + + int whitespacevalue; + const char *textvalue = mxmlGetText(node, &whitespacevalue); + +Finally, once you are done with the XML data, use the `mxmlDelete()` +function to recursively free the memory that is used for a particular node +or the entire tree: + + mxmlDelete(tree); + + +## Getting Help And Reporting Problems + +The Mini-XML project page provides access to the Github issue tracking page: + + https://michaelrsweet.github.io/mxml + + +## Legal Stuff + +The Mini-XML library is Copyright 2003-2017 by Michael R Sweet. License terms +are described in the file "COPYING". diff --git a/lib/libmxml/config.guess b/lib/libmxml/config.guess new file mode 100644 index 0000000..9afd676 --- /dev/null +++ b/lib/libmxml/config.guess @@ -0,0 +1,1568 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-11-29' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/libmxml/config.h.in b/lib/libmxml/config.h.in new file mode 100644 index 0000000..9dd5e78 --- /dev/null +++ b/lib/libmxml/config.h.in @@ -0,0 +1,109 @@ +/* + * Configuration file for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include +#include +#include +#include +#include + + +/* + * Version number... + */ + +#define MXML_VERSION "" + + +/* + * Inline function support... + */ + +#define inline + + +/* + * Long long support... + */ + +#undef HAVE_LONG_LONG + + +/* + * Do we have ? + */ + +#undef HAVE_ZLIB_H + + +/* + * Do we have the *printf() functions? + */ + +#undef HAVE_SNPRINTF +#undef HAVE_VASPRINTF +#undef HAVE_VSNPRINTF + + +/* + * Do we have the strXXX() functions? + */ + +#undef HAVE_STRDUP +#undef HAVE_STRLCAT +#undef HAVE_STRLCPY + + +/* + * Do we have threading support? + */ + +#undef HAVE_PTHREAD_H + + +/* + * Define prototypes for string functions as needed... + */ + +# ifndef HAVE_STRDUP +extern char *_mxml_strdup(const char *); +# define strdup _mxml_strdup +# endif /* !HAVE_STRDUP */ + +# ifndef HAVE_STRLCAT +extern size_t _mxml_strlcat(char *, const char *, size_t); +# define strlcat _mxml_strlcat +# endif /* !HAVE_STRLCAT */ + +# ifndef HAVE_STRLCPY +extern size_t _mxml_strlcpy(char *, const char *, size_t); +# define strlcpy _mxml_strlcpy +# endif /* !HAVE_STRLCPY */ + +extern char *_mxml_strdupf(const char *, ...); +extern char *_mxml_vstrdupf(const char *, va_list); + +# ifndef HAVE_SNPRINTF +extern int _mxml_snprintf(char *, size_t, const char *, ...); +# define snprintf _mxml_snprintf +# endif /* !HAVE_SNPRINTF */ + +# ifndef HAVE_VSNPRINTF +extern int _mxml_vsnprintf(char *, size_t, const char *, va_list); +# define vsnprintf _mxml_vsnprintf +# endif /* !HAVE_VSNPRINTF */ diff --git a/lib/libmxml/config.sub b/lib/libmxml/config.sub new file mode 100644 index 0000000..61cb4bc --- /dev/null +++ b/lib/libmxml/config.sub @@ -0,0 +1,1793 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-10-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/libmxml/configure b/lib/libmxml/configure new file mode 100644 index 0000000..18389e6 --- /dev/null +++ b/lib/libmxml/configure @@ -0,0 +1,5982 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for Mini-XML 2.11. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/michaelrsweet/mxml/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Mini-XML' +PACKAGE_TARNAME='mxml' +PACKAGE_VERSION='2.11' +PACKAGE_STRING='Mini-XML 2.11' +PACKAGE_BUGREPORT='https://github.com/michaelrsweet/mxml/issues' +PACKAGE_URL='https://michaelrsweet.github.io/mxml' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +PC_LIBS +PC_CFLAGS +TARGETS +PICFLAG +LIBMXML +DSOFLAGS +DSO +PTHREAD_LIBS +PTHREAD_FLAGS +EGREP +GREP +CPP +ZIPC +MXML_EPUB +ARFLAGS +RM +MKDIR +LN +CP +AR +RANLIB +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +ac_ct_CXX +CXXFLAGS +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +CFLAGS +CC +ARCHFLAGS +OPTIM +LDFLAGS +VERSION +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_ansi +with_archflags +enable_debug +with_docdir +with_vsnprintf +enable_threads +enable_shared +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Mini-XML 2.11 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/mxml] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Mini-XML 2.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-debug turn on debugging, default=no + --enable-threads enable multi-threading support + --enable-shared turn on shared libraries, default=no + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-ansi set full ANSI C mode, default=no + --with-archflags set additional architecture flags, default=none + --with-docdir set directory for documentation, default=${prefix}/share/doc/mxml + --with-vsnprintf use vsnprintf emulation functions, default=auto + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +Mini-XML home page: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Mini-XML configure 2.11 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------------------- ## +## Report this to https://github.com/michaelrsweet/mxml/issues ## +## ----------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Mini-XML $as_me 2.11, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'` +host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g'` + +ac_config_headers="$ac_config_headers config.h" + + +VERSION="2.11" + +cat >>confdefs.h <<_ACEOF +#define MXML_VERSION "Mini-XML v$VERSION" +_ACEOF + + +CFLAGS="${CFLAGS:=}" +CXXFLAGS="${CXXFLAGS:=}" +LDFLAGS="${LDFLAGS:=}" + +OPTIM="" + + + +# Check whether --with-ansi was given. +if test "${with_ansi+set}" = set; then : + withval=$with_ansi; use_ansi="$withval" +else + use_ansi="no" +fi + + + +# Check whether --with-archflags was given. +if test "${with_archflags+set}" = set; then : + withval=$with_archflags; ARCHFLAGS="$withval" +else + ARCHFLAGS="" +fi + + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then + OPTIM="-g" +fi +fi + + + +# Check whether --with-docdir was given. +if test "${with_docdir+set}" = set; then : + withval=$with_docdir; docdir="$withval" +else + docdir="NONE" +fi + + + + + +# Check whether --with-vsnprintf was given. +if test "${with_vsnprintf+set}" = set; then : + withval=$with_vsnprintf; use_vsnprintf="$withval" +else + use_vsnprintf="no" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +if test "$INSTALL" = "$ac_install_sh"; then + # Use full path to install-sh script... + INSTALL="`pwd`/install-sh -c" +fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +# Extract the first word of "cp", so it can be a program name with args. +set dummy cp; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CP="$CP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CP=$ac_cv_path_CP +if test -n "$CP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 +$as_echo "$CP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "ln", so it can be a program name with args. +set dummy ln; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LN in + [\\/]* | ?:[\\/]*) + ac_cv_path_LN="$LN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +LN=$ac_cv_path_LN +if test -n "$LN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 +$as_echo "$LN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "mkdir", so it can be a program name with args. +set dummy mkdir; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MKDIR+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MKDIR in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +MKDIR=$ac_cv_path_MKDIR +if test -n "$MKDIR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 +$as_echo "$MKDIR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_RM+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +RM=$ac_cv_path_RM +if test -n "$RM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 +$as_echo "$RM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +case "$host_os_name" in + darwin* | *bsd) + ARFLAGS="-rcv" + ;; + *) + ARFLAGS="crvs" + ;; +esac + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + +if test "x$use_ansi" != xyes; then + for ac_func in strdup strlcat strlcpy +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + +if test "x$use_vsnprintf" != xyes; then + for ac_func in snprintf vasprintf vsnprintf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_c_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$GCC" = yes; then + ac_cv_c_long_long=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +long long int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_long_long=yes +else + ac_cv_c_long_long=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_long_long" >&5 +$as_echo "$ac_cv_c_long_long" >&6; } + +if test $ac_cv_c_long_long = yes; then + $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h + +fi + +MXML_EPUB="" + +ZIPC="" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gzgets" >&5 +$as_echo_n "checking for library containing gzgets... " >&6; } +if ${ac_cv_search_gzgets+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gzgets (); +int +main () +{ +return gzgets (); + ; + return 0; +} +_ACEOF +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gzgets=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gzgets+:} false; then : + break +fi +done +if ${ac_cv_search_gzgets+:} false; then : + +else + ac_cv_search_gzgets=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzgets" >&5 +$as_echo "$ac_cv_search_gzgets" >&6; } +ac_res=$ac_cv_search_gzgets +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h + + ZIPC="zipc.o" + MXML_EPUB="mxml.epub" + LIBS="-lz $LIBS" +fi + + +# Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; +fi + + +have_pthread=no +PTHREAD_FLAGS="" +PTHREAD_LIBS="" + +if test "x$enable_threads" != xno; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + $as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h + +fi + + + + if test x$ac_cv_header_pthread_h = xyes; then + for flag in -lpthreads -lpthread -pthread; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create using $flag" >&5 +$as_echo_n "checking for pthread_create using $flag... " >&6; } + SAVELIBS="$LIBS" + LIBS="$flag $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_create(0, 0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_pthread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread" >&5 +$as_echo "$have_pthread" >&6; } + LIBS="$SAVELIBS" + + if test $have_pthread = yes; then + PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT" + PTHREAD_LIBS="$flag" + + # Solaris requires -D_POSIX_PTHREAD_SEMANTICS to + # be POSIX-compliant... :( + case "$host_os_name" in + sunos) + PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + break + fi + done + fi +fi + + + + +DSO="${DSO:=:}" +DSOFLAGS="${DSOFLAGS:=}" + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; +fi + + +if test x$enable_shared != xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library support" >&5 +$as_echo_n "checking for shared library support... " >&6; } + PICFLAG=1 + + case "$host_os_name" in + sunos | unix_s) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-h,libmxml.so.1 -G -R\$(libdir) \$(OPTIM)" + LDFLAGS="$LDFLAGS -R\$(libdir)" + ;; + + hp-ux) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.sl.1" + DSO="ld" + DSOFLAGS="$DSOFLAGS -b -z +h libmxml.sl.1 +s +b \$(libdir)" + LDFLAGS="$LDFLAGS -Wl,+s,+b,\$(libdir)" + ;; + + irix) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)" + ;; + + osf | linux* | gnu) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-rpath,\$(libdir) -shared \$(OPTIM)" + LDFLAGS="$LDFLAGS -Wl,-rpath,\$(libdir)" + ;; + + *bsd) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-R\$(libdir) -shared \$(OPTIM)" + LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" + ;; + + darwin) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="libmxml.1.dylib" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS \$(RC_CFLAGS) -dynamiclib -lc" + ;; + + mingw) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBMXML="mxml1.dll" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,libmxml1.a,--no-undefined,--enable-runtime-pseudo-reloc" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared libraries not supported on this platform." >&5 +$as_echo "$as_me: WARNING: shared libraries not supported on this platform." >&2;} + PICFLAG=0 + LIBMXML="libmxml.a" + ;; + esac +else + PICFLAG=0 + LIBMXML="libmxml.a" +fi + + + + + + +if test -n "$GCC"; then + CFLAGS="-Wall -D_GNU_SOURCE $CFLAGS" + + if test "x$OPTIM" = x; then + OPTIM="-Os -g" + fi + + if test "x$use_ansi" = xyes; then + CFLAGS="-ansi -pedantic $CFLAGS" + fi + + if test $PICFLAG = 1 -a "$host_os_name" != aix; then + OPTIM="-fPIC $OPTIM" + fi +else + case "$host_os_name" in + hp-ux) + CFLAGS="-Ae $CFLAGS" + + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + + OPTIM="+DAportable $OPTIM" + + if test $PICFLAG = 1; then + OPTIM="+z $OPTIM" + fi + ;; + + unix_svr | sunos) + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + + if test $PICFLAG = 1; then + OPTIM="-KPIC $OPTIM" + fi + ;; + + *) + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + ;; + esac +fi + +if test "$build" = "$host"; then + TARGETS="ALLTARGETS" +else + TARGETS="CROSSTARGETS" +fi + + +if test "$prefix" = "NONE"; then + prefix="/usr/local" +fi + +if test "$exec_prefix" = "NONE"; then + exec_prefix="$prefix" +fi + +if test "$docdir" = "NONE"; then + docdir="$datadir/doc/mxml" +fi + +if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then + case "$host_os_name" in + *bsd | darwin | linux*) + # *BSD, Darwin (macOS), and Linux + mandir="/usr/share/man" + ;; + irix) + # SGI IRIX + mandir="/usr/share/catman/u_man" + ;; + *) + # All others + mandir="/usr/man" + ;; + esac +fi + +if test "$includedir" != /usr/include; then + PC_CFLAGS="-I$includedir" +else + PC_CFLAGS="" +fi + +if test "$libdir" != /usr/lib; then + PC_LIBS="-L$libdir -lmxml" +else + PC_LIBS="-lmxml" +fi + + + + +ac_config_files="$ac_config_files Makefile mxml.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Mini-XML $as_me 2.11, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to . +Mini-XML home page: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Mini-XML config.status 2.11 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "mxml.pc") CONFIG_FILES="$CONFIG_FILES mxml.pc" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/lib/libmxml/configure.ac b/lib/libmxml/configure.ac new file mode 100644 index 0000000..47a0d41 --- /dev/null +++ b/lib/libmxml/configure.ac @@ -0,0 +1,360 @@ +dnl +dnl Configuration script for Mini-XML, a small XML-like file parsing library. +dnl +dnl Copyright 2003-2017 by Michael R Sweet. +dnl +dnl These coded instructions, statements, and computer programs are the +dnl property of Michael R Sweet and are protected by Federal copyright +dnl law. Distribution and use rights are outlined in the file "COPYING" +dnl which should have been included with this file. If this file is +dnl missing or damaged, see the license at: +dnl +dnl https://michaelrsweet.github.io/mxml +dnl + +dnl Package name and version... +AC_INIT([Mini-XML], [2.11], [https://github.com/michaelrsweet/mxml/issues], [mxml], [https://michaelrsweet.github.io/mxml]) + +dnl Get the build and host platforms and split the host_os value +AC_CANONICAL_BUILD +AC_CANONICAL_HOST + +[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`] +[host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g'`] + +dnl Set the name of the config header file... +AC_CONFIG_HEADER(config.h) + +dnl Version number... +VERSION="AC_PACKAGE_VERSION" +AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(MXML_VERSION, "Mini-XML v$VERSION") + +dnl Clear default debugging options and set normal optimization by +dnl default unless the user asks for debugging specifically. +CFLAGS="${CFLAGS:=}" +CXXFLAGS="${CXXFLAGS:=}" +LDFLAGS="${LDFLAGS:=}" +AC_SUBST(LDFLAGS) +OPTIM="" +AC_SUBST(OPTIM) + +AC_ARG_WITH(ansi, [ --with-ansi set full ANSI C mode, default=no], + use_ansi="$withval", + use_ansi="no") + +AC_ARG_WITH(archflags, [ --with-archflags set additional architecture flags, default=none], + ARCHFLAGS="$withval", + ARCHFLAGS="") +AC_SUBST(ARCHFLAGS) + +AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no], +if eval "test x$enable_debug = xyes"; then + OPTIM="-g" +fi) + +AC_ARG_WITH(docdir, [ --with-docdir set directory for documentation, default=${prefix}/share/doc/mxml], + docdir="$withval", + docdir="NONE") + +AC_SUBST(docdir) + +AC_ARG_WITH(vsnprintf, [ --with-vsnprintf use vsnprintf emulation functions, default=auto], + use_vsnprintf="$withval", + use_vsnprintf="no") + +dnl Checks for programs... +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +if test "$INSTALL" = "$ac_install_sh"; then + # Use full path to install-sh script... + INSTALL="`pwd`/install-sh -c" +fi +AC_PROG_RANLIB +AC_CHECK_TOOL(AR,ar) +AC_PATH_PROG(CP,cp) +AC_PATH_PROG(LN,ln) +AC_PATH_PROG(MKDIR,mkdir) +AC_PATH_PROG(RM,rm) + +dnl Flags for "ar" command... +case "$host_os_name" in + darwin* | *bsd) + ARFLAGS="-rcv" + ;; + *) + ARFLAGS="crvs" + ;; +esac + +AC_SUBST(ARFLAGS) + +dnl Inline functions... +AC_C_INLINE + +dnl Checks for string functions. +if test "x$use_ansi" != xyes; then + AC_CHECK_FUNCS(strdup strlcat strlcpy) +fi + +if test "x$use_vsnprintf" != xyes; then + AC_CHECK_FUNCS(snprintf vasprintf vsnprintf) +fi + +dnl Check for "long long" support... +AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, + [if test "$GCC" = yes; then + ac_cv_c_long_long=yes + else + AC_TRY_COMPILE(,[long long int i;], + ac_cv_c_long_long=yes, + ac_cv_c_long_long=no) + fi]) + +if test $ac_cv_c_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG) +fi + +dnl EPUB support (via libz and zipc) +MXML_EPUB="" +AC_SUBST(MXML_EPUB) +ZIPC="" +AC_SUBST(ZIPC) +AC_SEARCH_LIBS(gzgets,z,[ + AC_DEFINE(HAVE_ZLIB_H) + ZIPC="zipc.o" + MXML_EPUB="mxml.epub" + LIBS="-lz $LIBS"]) + +dnl Threading support +AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support]) + +have_pthread=no +PTHREAD_FLAGS="" +PTHREAD_LIBS="" + +if test "x$enable_threads" != xno; then + AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H)) + + if test x$ac_cv_header_pthread_h = xyes; then + dnl Check various threading options for the platforms we support + for flag in -lpthreads -lpthread -pthread; do + AC_MSG_CHECKING([for pthread_create using $flag]) + SAVELIBS="$LIBS" + LIBS="$flag $LIBS" + AC_TRY_LINK([#include ], + [pthread_create(0, 0, 0, 0);], + have_pthread=yes) + AC_MSG_RESULT([$have_pthread]) + LIBS="$SAVELIBS" + + if test $have_pthread = yes; then + PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT" + PTHREAD_LIBS="$flag" + + # Solaris requires -D_POSIX_PTHREAD_SEMANTICS to + # be POSIX-compliant... :( + case "$host_os_name" in + sunos) + PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + break + fi + done + fi +fi + +AC_SUBST(PTHREAD_FLAGS) +AC_SUBST(PTHREAD_LIBS) + +dnl Shared library support... +DSO="${DSO:=:}" +DSOFLAGS="${DSOFLAGS:=}" + +AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries, default=no]) + +if test x$enable_shared != xno; then + AC_MSG_CHECKING(for shared library support) + PICFLAG=1 + + case "$host_os_name" in + sunos | unix_s) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-h,libmxml.so.1 -G -R\$(libdir) \$(OPTIM)" + LDFLAGS="$LDFLAGS -R\$(libdir)" + ;; + + hp-ux) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.sl.1" + DSO="ld" + DSOFLAGS="$DSOFLAGS -b -z +h libmxml.sl.1 +s +b \$(libdir)" + LDFLAGS="$LDFLAGS -Wl,+s,+b,\$(libdir)" + ;; + + irix) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)" + ;; + + osf | linux* | gnu) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-rpath,\$(libdir) -shared \$(OPTIM)" + LDFLAGS="$LDFLAGS -Wl,-rpath,\$(libdir)" + ;; + + *bsd) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.so.1.6" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-R\$(libdir) -shared \$(OPTIM)" + LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" + ;; + + darwin) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.1.dylib" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS \$(RC_CFLAGS) -dynamiclib -lc" + ;; + + mingw) + AC_MSG_RESULT(yes) + LIBMXML="mxml1.dll" + DSO="\$(CC)" + DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,libmxml1.a,--no-undefined,--enable-runtime-pseudo-reloc" + ;; + + *) + AC_MSG_RESULT(no) + AC_MSG_WARN(shared libraries not supported on this platform.) + PICFLAG=0 + LIBMXML="libmxml.a" + ;; + esac +else + PICFLAG=0 + LIBMXML="libmxml.a" +fi + +AC_SUBST(DSO) +AC_SUBST(DSOFLAGS) +AC_SUBST(LIBMXML) +AC_SUBST(PICFLAG) + +dnl Add -Wall for GCC... +if test -n "$GCC"; then + CFLAGS="-Wall -D_GNU_SOURCE $CFLAGS" + + if test "x$OPTIM" = x; then + OPTIM="-Os -g" + fi + + if test "x$use_ansi" = xyes; then + CFLAGS="-ansi -pedantic $CFLAGS" + fi + + if test $PICFLAG = 1 -a "$host_os_name" != aix; then + OPTIM="-fPIC $OPTIM" + fi +else + case "$host_os_name" in + hp-ux) + CFLAGS="-Ae $CFLAGS" + + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + + OPTIM="+DAportable $OPTIM" + + if test $PICFLAG = 1; then + OPTIM="+z $OPTIM" + fi + ;; + + unix_svr | sunos) + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + + if test $PICFLAG = 1; then + OPTIM="-KPIC $OPTIM" + fi + ;; + + *) + if test "x$OPTIM" = x; then + OPTIM="-O" + fi + ;; + esac +fi + +dnl Determine whether we are cross-compiling... +if test "$build" = "$host"; then + TARGETS="ALLTARGETS" +else + TARGETS="CROSSTARGETS" +fi +AC_SUBST(TARGETS) + +dnl Fix "prefix" variable if it hasn't been specified... +if test "$prefix" = "NONE"; then + prefix="/usr/local" +fi + +dnl Fix "exec_prefix" variable if it hasn't been specified... +if test "$exec_prefix" = "NONE"; then + exec_prefix="$prefix" +fi + +dnl Fix "docdir" variable if it hasn't been specified... +if test "$docdir" = "NONE"; then + docdir="$datadir/doc/mxml" +fi + +dnl Fix "mandir" variable if it hasn't been specified... +if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then + case "$host_os_name" in + *bsd | darwin | linux*) + # *BSD, Darwin (macOS), and Linux + mandir="/usr/share/man" + ;; + irix) + # SGI IRIX + mandir="/usr/share/catman/u_man" + ;; + *) + # All others + mandir="/usr/man" + ;; + esac +fi + +dnl pkg-config stuff... +if test "$includedir" != /usr/include; then + PC_CFLAGS="-I$includedir" +else + PC_CFLAGS="" +fi + +if test "$libdir" != /usr/lib; then + PC_LIBS="-L$libdir -lmxml" +else + PC_LIBS="-lmxml" +fi + +AC_SUBST(PC_CFLAGS) +AC_SUBST(PC_LIBS) + +dnl Output the makefile, etc... +AC_OUTPUT(Makefile mxml.pc) diff --git a/lib/libmxml/doc/advanced.html b/lib/libmxml/doc/advanced.html new file mode 100644 index 0000000..0456386 --- /dev/null +++ b/lib/libmxml/doc/advanced.html @@ -0,0 +1,633 @@ + + + +

Chapter 3 - More Mini-XML +Programming Techniques

+ +

This chapter shows additional ways to use the Mini-XML +library in your programs.

+ +

Load Callbacks

+ +

Chapter 2 introduced the mxmlLoadFile() and mxmlLoadString() functions. +The last argument to these functions is a callback function +which is used to determine the value type of each data node in +an XML document.

+ +

Mini-XML defines several standard callbacks for simple +XML data files:

+ +
    + +
  • MXML_INTEGER_CALLBACK - All data nodes + contain whitespace-separated integers.
  • + +
  • MXML_OPAQUE_CALLBACK - All data nodes + contain opaque strings ("CDATA").
  • + +
  • MXML_REAL_CALLBACK - All data nodes contain + whitespace-separated floating-point numbers.
  • + +
  • MXML_TEXT_CALLBACK - All data nodes contain + whitespace-separated strings.
  • + +
+ +

You can provide your own callback functions for more complex +XML documents. Your callback function will receive a pointer to +the current element node and must return the value type of the +immediate children for that element node: MXML_INTEGER, +MXML_OPAQUE, MXML_REAL, or MXML_TEXT. +The function is called after the element and its +attributes have been read, so you can look at the element name, +attributes, and attribute values to determine the proper value +type to return.

+ + +

The following callback function looks for an attribute named +"type" or the element name to determine the value type for its +child nodes:

+ +
+    mxml_type_t
+    type_cb(mxml_node_t *node)
+    {
+      const char *type;
+
+     /*
+      * You can lookup attributes and/or use the
+      * element name, hierarchy, etc...
+      */
+
+      type = mxmlElementGetAttr(node, "type");
+      if (type == NULL)
+	type = mxmlGetElement(node);
+
+      if (!strcmp(type, "integer"))
+	return (MXML_INTEGER);
+      else if (!strcmp(type, "opaque"))
+	return (MXML_OPAQUE);
+      else if (!strcmp(type, "real"))
+	return (MXML_REAL);
+      else
+	return (MXML_TEXT);
+    }
+
+ +

To use this callback function, simply use the name when you +call any of the load functions:

+ +
+    FILE *fp;
+    mxml_node_t *tree;
+
+    fp = fopen("filename.xml", "r");
+    tree = mxmlLoadFile(NULL, fp, type_cb);
+    fclose(fp);
+
+ + +

Save Callbacks

+ +

Chapter 2 also introduced the mxmlSaveFile(), mxmlSaveString(), and mxmlSaveAllocString() +functions. The last argument to these functions is a callback +function which is used to automatically insert whitespace in an +XML document.

+ +

Your callback function will be called up to four times for +each element node with a pointer to the node and a "where" value +of MXML_WS_BEFORE_OPEN, MXML_WS_AFTER_OPEN, +MXML_WS_BEFORE_CLOSE, or MXML_WS_AFTER_CLOSE. +The callback function should return NULL if no +whitespace should be added and the string to insert (spaces, +tabs, carriage returns, and newlines) otherwise.

+ +

The following whitespace callback can be used to add +whitespace to XHTML output to make it more readable in a standard +text editor:

+ +
+    const char *
+    whitespace_cb(mxml_node_t *node,
+                  int where)
+    {
+      const char *name;
+
+     /*
+      * We can conditionally break to a new line
+      * before or after any element. These are
+      * just common HTML elements...
+      */
+
+      name = mxmlGetElement(node);
+
+      if (!strcmp(name, "html") ||
+          !strcmp(name, "head") ||
+          !strcmp(name, "body") ||
+	  !strcmp(name, "pre") ||
+          !strcmp(name, "p") ||
+	  !strcmp(name, "h1") ||
+          !strcmp(name, "h2") ||
+          !strcmp(name, "h3") ||
+	  !strcmp(name, "h4") ||
+          !strcmp(name, "h5") ||
+          !strcmp(name, "h6"))
+      {
+       /*
+	* Newlines before open and after
+        * close...
+	*/
+
+	if (where == MXML_WS_BEFORE_OPEN ||
+            where == MXML_WS_AFTER_CLOSE)
+	  return ("\n");
+      }
+      else if (!strcmp(name, "dl") ||
+               !strcmp(name, "ol") ||
+               !strcmp(name, "ul"))
+      {
+       /*
+	* Put a newline before and after list
+        * elements...
+	*/
+
+	return ("\n");
+      }
+      else if (!strcmp(name, "dd") ||
+               !strcmp(name, "dt") ||
+               !strcmp(name, "li"))
+      {
+       /*
+	* Put a tab before <li>'s, * <dd>'s,
+        * and <dt>'s, and a newline after them...
+	*/
+
+	if (where == MXML_WS_BEFORE_OPEN)
+	  return ("\t");
+	else if (where == MXML_WS_AFTER_CLOSE)
+	  return ("\n");
+      }
+
+     /*
+      * Return NULL for no added whitespace...
+      */
+
+      return (NULL);
+    }
+
+ +

To use this callback function, simply use the name when you +call any of the save functions:

+ +
+    FILE *fp;
+    mxml_node_t *tree;
+
+    fp = fopen("filename.xml", "w");
+    mxmlSaveFile(tree, fp, whitespace_cb);
+    fclose(fp);
+
+ + + +

Custom Data Types

+ +

Mini-XML supports custom data types via global load and save +callbacks. Only a single set of callbacks can be active at any +time, however your callbacks can store additional information in +order to support multiple custom data types as needed. The +MXML_CUSTOM node type identifies custom data nodes.

+ +

The load callback receives a pointer to the current data node +and a string of opaque character data from the XML source with +character entities converted to the corresponding UTF-8 +characters. For example, if we wanted to support a custom +date/time type whose value is encoded as "yyyy-mm-ddThh:mm:ssZ" +(ISO format), the load callback would look like the +following:

+ +
+    typedef struct
+    {
+      unsigned      year,    /* Year */
+                    month,   /* Month */
+                    day,     /* Day */
+                    hour,    /* Hour */
+                    minute,  /* Minute */
+                    second;  /* Second */
+      time_t        unix;    /* UNIX time */
+    } iso_date_time_t;
+
+    int
+    load_custom(mxml_node_t *node,
+                const char *data)
+    {
+      iso_date_time_t *dt;
+      struct tm tmdata;
+
+     /*
+      * Allocate data structure...
+      */
+
+      dt = calloc(1, sizeof(iso_date_time_t));
+
+     /*
+      * Try reading 6 unsigned integers from the
+      * data string...
+      */
+
+      if (sscanf(data, "%u-%u-%uT%u:%u:%uZ",
+                 &(dt->year), &(dt->month),
+                 &(dt->day), &(dt->hour),
+                 &(dt->minute),
+                 &(dt->second)) != 6)
+      {
+       /*
+        * Unable to read numbers, free the data
+        * structure and return an error...
+        */
+
+        free(dt);
+
+        return (-1);
+      }
+
+     /*
+      * Range check values...
+      */
+
+      if (dt->month < 1 || dt->month > 12 ||
+          dt->day < 1 || dt->day > 31 ||
+          dt->hour < 0 || dt->hour > 23 ||
+          dt->minute < 0 || dt->minute > 59 ||
+          dt->second < 0 || dt->second > 59)
+      {
+       /*
+        * Date information is out of range...
+        */
+
+        free(dt);
+
+        return (-1);
+      }
+
+     /*
+      * Convert ISO time to UNIX time in
+      * seconds...
+      */
+
+      tmdata.tm_year = dt->year - 1900;
+      tmdata.tm_mon  = dt->month - 1;
+      tmdata.tm_day  = dt->day;
+      tmdata.tm_hour = dt->hour;
+      tmdata.tm_min  = dt->minute;
+      tmdata.tm_sec  = dt->second;
+
+      dt->unix = gmtime(&tmdata);
+
+     /*
+      * Assign custom node data and destroy
+      * function pointers...
+      */
+
+      mxmlSetCustom(node, data, destroy);
+
+     /*
+      * Return with no errors...
+      */
+
+      return (0);
+    }
+
+ +

The function itself can return 0 on success or -1 if it is +unable to decode the custom data or the data contains an error. +Custom data nodes contain a void pointer to the +allocated custom data for the node and a pointer to a destructor +function which will free the custom data when the node is +deleted.

+ + +

The save callback receives the node pointer and returns an +allocated string containing the custom data value. The following +save callback could be used for our ISO date/time type:

+ +
+    char *
+    save_custom(mxml_node_t *node)
+    {
+      char data[255];
+      iso_date_time_t *dt;
+
+
+      dt = (iso_date_time_t *)mxmlGetCustom(node);
+
+      snprintf(data, sizeof(data),
+               "%04u-%02u-%02uT%02u:%02u:%02uZ",
+               dt->year, dt->month, dt->day,
+               dt->hour, dt->minute, dt->second);
+
+      return (strdup(data));
+    }
+
+ +

You register the callback functions using the mxmlSetCustomHandlers() +function:

+ +
+    mxmlSetCustomHandlers(load_custom,
+                          save_custom);
+
+ + + +

Changing Node Values

+ +

All of the examples so far have concentrated on creating and +loading new XML data nodes. Many applications, however, need to +manipulate or change the nodes during their operation, so +Mini-XML provides functions to change node values safely and +without leaking memory.

+ +

Existing nodes can be changed using the mxmlSetElement(), mxmlSetInteger(), mxmlSetOpaque(), mxmlSetReal(), mxmlSetText(), and mxmlSetTextf() functions. For +example, use the following function call to change a text node +to contain the text "new" with leading whitespace:

+ +
+    mxml_node_t *node;
+
+    mxmlSetText(node, 1, "new");
+
+ + +

Formatted Text

+ +

The mxmlNewTextf() and mxmlSetTextf() functions create +and change text nodes, respectively, using printf-style +format strings and arguments. For example, use the following +function call to create a new text node containing a constructed +filename:

+ +
+    mxml_node_t *node;
+
+    node = mxmlNewTextf(node, 1, "%s/%s",
+                        path, filename);
+
+ + +

Indexing

+ +

Mini-XML provides functions for managing indices of nodes. +The current implementation provides the same functionality as +mxmlFindElement(). +The advantage of using an index is that searching and +enumeration of elements is significantly faster. The only +disadvantage is that each index is a static snapshot of the XML +document, so indices are not well suited to XML data that is +updated more often than it is searched. The overhead of creating +an index is approximately equal to walking the XML document +tree. Nodes in the index are sorted by element name and +attribute value.

+ +

Indices are stored in mxml_index_t +structures. The mxmlIndexNew() function +creates a new index:

+ +
+    mxml_node_t *tree;
+    mxml_index_t *ind;
+
+    ind = mxmlIndexNew(tree, "element",
+                       "attribute");
+
+ +

The first argument is the XML node tree to index. Normally this +will be a pointer to the ?xml element.

+ +

The second argument contains the element to index; passing +NULL indexes all element nodes alphabetically.

+ +

The third argument contains the attribute to index; passing +NULL causes only the element name to be indexed.

+ +

Once the index is created, the mxmlIndexEnum(), mxmlIndexFind(), and mxmlIndexReset() functions +are used to access the nodes in the index. The mxmlIndexReset() function +resets the "current" node pointer in the index, allowing you to +do new searches and enumerations on the same index. Typically +you will call this function prior to your calls to mxmlIndexEnum() and mxmlIndexFind().

+ +

The mxmlIndexEnum() +function enumerates each of the nodes in the index and can be +used in a loop as follows:

+ +
+    mxml_node_t *node;
+
+    mxmlIndexReset(ind);
+
+    while ((node = mxmlIndexEnum(ind)) != NULL)
+    {
+      // do something with node
+    }
+
+ +

The mxmlIndexFind() +function locates the next occurrence of the named element and +attribute value in the index. It can be used to find all +matching elements in an index, as follows:

+ +
+    mxml_node_t *node;
+
+    mxmlIndexReset(ind);
+
+    while ((node = mxmlIndexFind(ind, "element",
+                                 "attr-value"))
+                != NULL)
+    {
+      // do something with node
+    }
+
+ +

The second and third arguments represent the element name and +attribute value, respectively. A NULL pointer is used +to return all elements or attributes in the index. Passing +NULL for both the element name and attribute value +is equivalent to calling mxmlIndexEnum.

+ +

When you are done using the index, delete it using the +mxmlIndexDelete() +function:

+ +
+    mxmlIndexDelete(ind);
+
+ +

SAX (Stream) Loading of Documents

+ +

Mini-XML supports an implementation of the Simple API for XML +(SAX) which allows you to load and process an XML document as a +stream of nodes. Aside from allowing you to process XML documents of +any size, the Mini-XML implementation also allows you to retain +portions of the document in memory for later processing.

+ +

The mxmlSAXLoadFd, mxmlSAXLoadFile, and mxmlSAXLoadString functions +provide the SAX loading APIs. Each function works like the +corresponding mxmlLoad function but uses a callback to +process each node as it is read.

+ +

The callback function receives the node, an event code, and +a user data pointer you supply:

+ +
+    void
+    sax_cb(mxml_node_t *node,
+           mxml_sax_event_t event,
+           void *data)
+    {
+      ... do something ...
+    }
+
+ +

The event will be one of the following:

+ +
    + +
  • MXML_SAX_CDATA - CDATA was just read
  • + +
  • MXML_SAX_COMMENT - A comment was just read
  • + +
  • MXML_SAX_DATA - Data (custom, integer, opaque, real, or text) was just read
  • + +
  • MXML_SAX_DIRECTIVE - A processing directive was just read
  • + +
  • MXML_SAX_ELEMENT_CLOSE - A close element was just read (</element>)
  • + +
  • MXML_SAX_ELEMENT_OPEN - An open element was just read (<element>)
  • + +
+ +

Elements are released after the close element is +processed. All other nodes are released after they are processed. +The SAX callback can retain the node using the mxmlRetain function. For example, +the following SAX callback will retain all nodes, effectively +simulating a normal in-memory load:

+ +
+    void
+    sax_cb(mxml_node_t *node,
+           mxml_sax_event_t event,
+           void *data)
+    {
+      if (event != MXML_SAX_ELEMENT_CLOSE)
+        mxmlRetain(node);
+    }
+
+ +

More typically the SAX callback will only retain a small portion +of the document that is needed for post-processing. For example, the +following SAX callback will retain the title and headings in an +XHTML file. It also retains the (parent) elements like <html>, <head>, and <body>, and processing +directives like <?xml ... ?> and <!DOCTYPE ... >:

+ + +
+    void
+    sax_cb(mxml_node_t *node,
+           mxml_sax_event_t event,
+           void *data)
+    {
+      if (event == MXML_SAX_ELEMENT_OPEN)
+      {
+       /*
+        * Retain headings and titles...
+        */
+
+        char *name = mxmlGetElement(node);
+
+        if (!strcmp(name, "html") ||
+            !strcmp(name, "head") ||
+            !strcmp(name, "title") ||
+            !strcmp(name, "body") ||
+            !strcmp(name, "h1") ||
+            !strcmp(name, "h2") ||
+            !strcmp(name, "h3") ||
+            !strcmp(name, "h4") ||
+            !strcmp(name, "h5") ||
+            !strcmp(name, "h6"))
+          mxmlRetain(node);
+      }
+      else if (event == MXML_SAX_DIRECTIVE)
+        mxmlRetain(node);
+      else if (event == MXML_SAX_DATA)
+      {
+        if (mxmlGetRefCount(mxmlGetParent(node)) > 1)
+        {
+         /*
+          * If the parent was retained, then retain
+          * this data node as well.
+          */
+
+          mxmlRetain(node);
+        }
+      }
+    }
+
+ +

The resulting skeleton document tree can then be searched just +like one loaded using the mxmlLoad functions. For example, +a filter that reads an XHTML document from stdin and then shows the +title and headings in the document would look like:

+ +
+    mxml_node_t *doc, *title, *body, *heading;
+
+    doc = mxmlSAXLoadFd(NULL, 0,
+                        MXML_TEXT_CALLBACK,
+                        sax_cb, NULL);
+
+    title = mxmlFindElement(doc, doc, "title",
+                            NULL, NULL,
+                            MXML_DESCEND);
+
+    if (title)
+      print_children(title);
+
+    body = mxmlFindElement(doc, doc, "body",
+                           NULL, NULL,
+                           MXML_DESCEND);
+
+    if (body)
+    {
+      for (heading = mxmlGetFirstChild(body);
+           heading;
+           heading = mxmlGetNextSibling(heading))
+        print_children(heading);
+    }
+
+ + + diff --git a/lib/libmxml/doc/basics.html b/lib/libmxml/doc/basics.html new file mode 100644 index 0000000..1b705fc --- /dev/null +++ b/lib/libmxml/doc/basics.html @@ -0,0 +1,590 @@ + + + +

Chapter 2 - Getting Started +with Mini-XML

+ +

This chapter describes how to write programs that use Mini-XML to +access data in an XML file. Mini-XML provides the following +functionality:

+ +
    +
  • Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings.
  • +
  • Data is stored in a linked-list tree structure, preserving the XML data hierarchy.
  • +
  • SAX (streamed) reading of XML files and strings to minimize memory usage.
  • +
  • Supports arbitrary element names, attributes, and attribute values with no preset limits, just available memory.
  • +
  • Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes.
  • +
  • Functions for creating and managing trees of data.
  • +
  • "Find" and "walk" functions for easily locating and navigating trees of data.
  • +
+ +

Mini-XML doesn't do validation or other types of processing on the data based upon schema files or other sources of definition information.

+ + +

The Basics

+ +

Mini-XML provides a single header file which you include:

+ +
+    #include <mxml.h>
+
+ +

The Mini-XML library is included with your program using the +-lmxml option:

+ +
+    gcc -o myprogram myprogram.c -lmxml ENTER
+
+ +

If you have the pkg-config(1) software installed, +you can use it to determine the proper compiler and linker options +for your installation:

+ +
+    pkg-config --cflags mxml ENTER
+    pkg-config --libs mxml ENTER
+
+ +

Nodes

+ +

Every piece of information in an XML file is stored in memory in "nodes". +Nodes are defined by the mxml_node_t +structure. Each node has a typed value, optional user data, a parent node, +sibling nodes (previous and next), and potentially child nodes.

+ +

For example, if you have an XML file like the following:

+ +
+    <?xml version="1.0" encoding="utf-8"?>
+    <data>
+        <node>val1</node>
+        <node>val2</node>
+        <node>val3</node>
+        <group>
+            <node>val4</node>
+            <node>val5</node>
+            <node>val6</node>
+        </group>
+        <node>val7</node>
+        <node>val8</node>
+    </data>
+
+ +

the node tree for the file would look like the following in memory:

+ +
+    ?xml version="1.0" encoding="utf-8"?
+      |
+    data
+      |
+    node - node - node - group - node - node
+      |      |      |      |       |      |
+    val1   val2   val3     |     val7   val8
+                           |
+                         node - node - node
+                           |      |      |
+                         val4   val5   val6
+
+ +

where "-" is a pointer to the sibling node and "|" is a pointer +to the first child or parent node.

+ +

The mxmlGetType function gets the type of +a node, one of MXML_CUSTOM, MXML_ELEMENT, +MXML_INTEGER, MXML_OPAQUE, MXML_REAL, or +MXML_TEXT. The parent and sibling nodes are accessed using the +mxmlGetParent, +mxmlGetNext, and +mxmlGetPrevious functions. The +mxmlGetUserData function gets any user +data associated with the node.

+ +

CDATA Nodes

+ +

CDATA (MXML_ELEMENT) nodes are created using the +mxmlNewCDATA function. The +mxmlGetCDATA function retrieves the +CDATA string pointer for a node.

+ +
Note: + +

CDATA nodes are currently stored in memory as special elements. This will +be changed in a future major release of Mini-XML.

+
+ +

Custom Nodes

+ +

Custom (MXML_CUSTOM) nodes are created using the +mxmlNewCustom function or using a custom +load callback specified using the +mxmlSetCustomHandlers function. +The mxmlGetCustom function retrieves the +custom value pointer for a node.

+ +

Comment Nodes

+ +

Comment (MXML_ELEMENT) nodes are created using the +mxmlNewElement function. The +mxmlGetElement function retrieves the +comment string pointer for a node, including the surrounding "!--" and "--" +characters.

+ +
Note: + +

Comment nodes are currently stored in memory as special elements. This will +be changed in a future major release of Mini-XML.

+
+ +

Element Nodes

+ +

Element (MXML_ELEMENT) nodes are created using the +mxmlNewElement function. The +mxmlGetElement function retrieves the +element name, the +mxmlElementGetAttr function retrieves +the value string for a named attribute associated with the element, and the +mxmlGetFirstChild and +mxmlGetLastChild functions retrieve the +first and last child nodes for the element, respectively.

+ +

Integer Nodes

+ +

Integer (MXML_INTEGER) nodes are created using the +mxmlNewInteger function. The +mxmlGetInteger function retrieves the +integer value for a node.

+ +

Opaque Nodes

+ +

Opaque (MXML_OPAQUE) nodes are created using the +mxmlNewOpaque function. The +mxmlGetOpaque function retrieves the +opaque string pointer for a node. Opaque nodes are like string nodes but +preserve all whitespace between nodes.

+ +

Text Nodes

+ +

Text (MXML_TEXT) nodes are created using the +mxmlNewText and +mxmlNewTextf functions. Each text node +consists of a text string and (leading) whitespace value - the +mxmlGetText function retrieves the +text string pointer and whitespace value for a node.

+ + +

Processing Instruction Nodes

+ +

Processing instruction (MXML_ELEMENT) nodes are created using the +mxmlNewElement function. The +mxmlGetElement function retrieves the +processing instruction string for a node, including the surrounding "?" +characters.

+ +
Note: + +

Processing instruction nodes are currently stored in memory as special +elements. This will be changed in a future major release of Mini-XML.

+
+ +

Real Number Nodes

+ +

Real number (MXML_REAL) nodes are created using the +mxmlNewReal function. The +mxmlGetReal function retrieves the +CDATA string pointer for a node.

+ + +

XML Declaration Nodes

+ +

XML declaration (MXML_ELEMENT) nodes are created using the +mxmlNewXML function. The +mxmlGetElement function retrieves the +XML declaration string for a node, including the surrounding "?" characters.

+ +
Note: + +

XML declaration nodes are currently stored in memory as special elements. +This will be changed in a future major release of Mini-XML.

+
+ + + +

Creating XML Documents

+ +

You can create and update XML documents in memory using the +various mxmlNew functions. The following code will +create the XML document described in the previous section:

+ +
+    mxml_node_t *xml;    /* <?xml ... ?> */
+    mxml_node_t *data;   /* <data> */
+    mxml_node_t *node;   /* <node> */
+    mxml_node_t *group;  /* <group> */
+
+    xml = mxmlNewXML("1.0");
+
+    data = mxmlNewElement(xml, "data");
+
+        node = mxmlNewElement(data, "node");
+        mxmlNewText(node, 0, "val1");
+        node = mxmlNewElement(data, "node");
+        mxmlNewText(node, 0, "val2");
+        node = mxmlNewElement(data, "node");
+        mxmlNewText(node, 0, "val3");
+
+        group = mxmlNewElement(data, "group");
+
+            node = mxmlNewElement(group, "node");
+            mxmlNewText(node, 0, "val4");
+            node = mxmlNewElement(group, "node");
+            mxmlNewText(node, 0, "val5");
+            node = mxmlNewElement(group, "node");
+            mxmlNewText(node, 0, "val6");
+
+        node = mxmlNewElement(data, "node");
+        mxmlNewText(node, 0, "val7");
+        node = mxmlNewElement(data, "node");
+        mxmlNewText(node, 0, "val8");
+
+ + +

We start by creating the declaration node common to all XML files using the +mxmlNewXML function:

+ +
+    xml = mxmlNewXML("1.0");
+
+ +

We then create the <data> node used for this document using +the mxmlNewElement function. The first +argument specifies the parent node (xml) while the second specifies the +element name (data):

+ +
+    data = mxmlNewElement(xml, "data");
+
+ +

Each <node>...</node> in the file is created using the +mxmlNewElement and mxmlNewText +functions. The first argument of mxmlNewText specifies the parent node +(node). The second argument specifies whether whitespace appears before +the text - 0 or false in this case. The last argument specifies the actual text +to add:

+ +
+    node = mxmlNewElement(data, "node");
+    mxmlNewText(node, 0, "val1");
+
+ +

The resulting in-memory XML document can then be saved or processed just like +one loaded from disk or a string.

+ + +

Loading XML

+ +

You load an XML file using the mxmlLoadFile +function:

+ +
+    FILE *fp;
+    mxml_node_t *tree;
+
+    fp = fopen("filename.xml", "r");
+    tree = mxmlLoadFile(NULL, fp,
+                        MXML_TEXT_CALLBACK);
+    fclose(fp);
+
+ +

The first argument specifies an existing XML parent node, if +any. Normally you will pass NULL for this argument +unless you are combining multiple XML sources. The XML file must +contain a complete XML document including the ?xml +element if the parent node is NULL.

+ +

The second argument specifies the stdio file to read from, as +opened by fopen() or popen(). You can also use +stdin if you are implementing an XML filter +program.

+ +

The third argument specifies a callback function which returns +the value type of the immediate children for a new element node: +MXML_CUSTOM, MXML_IGNORE, +MXML_INTEGER, MXML_OPAQUE, MXML_REAL, +or MXML_TEXT. Load callbacks are described in detail in +Chapter 3. The example code uses +the MXML_TEXT_CALLBACK constant which specifies that all +data nodes in the document contain whitespace-separated text +values. Other standard callbacks include +MXML_IGNORE_CALLBACK, MXML_INTEGER_CALLBACK, +MXML_OPAQUE_CALLBACK, and +MXML_REAL_CALLBACK.

+ +

The mxmlLoadString +function loads XML node trees from a string:

+ + +
+    char buffer[8192];
+    mxml_node_t *tree;
+
+    ...
+    tree = mxmlLoadString(NULL, buffer,
+                          MXML_TEXT_CALLBACK);
+
+ +

The first and third arguments are the same as used for +mxmlLoadFile(). The second argument specifies the +string or character buffer to load and must be a complete XML +document including the ?xml element if the parent node +is NULL.

+ + + +

Saving XML

+ +

You save an XML file using the mxmlSaveFile function:

+ +
+    FILE *fp;
+    mxml_node_t *tree;
+
+    fp = fopen("filename.xml", "w");
+    mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
+    fclose(fp);
+
+ +

The first argument is the XML node tree to save. It should +normally be a pointer to the top-level ?xml node in +your XML document.

+ +

The second argument is the stdio file to write to, as opened +by fopen() or popen(). You can also use +stdout if you are implementing an XML filter +program.

+ +

The third argument is the whitespace callback to use when +saving the file. Whitespace callbacks are covered in detail in Chapter 3. The previous example code +uses the MXML_NO_CALLBACK constant to specify that no +special whitespace handling is required.

+ +

The mxmlSaveAllocString, +and mxmlSaveString +functions save XML node trees to strings:

+ +
+    char buffer[8192];
+    char *ptr;
+    mxml_node_t *tree;
+
+    ...
+    mxmlSaveString(tree, buffer, sizeof(buffer),
+                   MXML_NO_CALLBACK);
+
+    ...
+    ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
+
+ +

The first and last arguments are the same as used for +mxmlSaveFile(). The mxmlSaveString function +takes pointer and size arguments for saving the XML document to +a fixed-size buffer, while mxmlSaveAllocString() +returns a string buffer that was allocated using +malloc().

+ + +

Controlling Line Wrapping

+ +

When saving XML documents, Mini-XML normally wraps output +lines at column 75 so that the text is readable in terminal +windows. The mxmlSetWrapMargin function +overrides the default wrap margin:

+ +
+    /* Set the margin to 132 columns */
+    mxmlSetWrapMargin(132);
+
+    /* Disable wrapping */
+    mxmlSetWrapMargin(0);
+
+ +

Memory Management

+ +

Once you are done with the XML data, use the mxmlDelete function to recursively +free the memory that is used for a particular node or the entire +tree:

+ +
+    mxmlDelete(tree);
+
+ +

You can also use reference counting to manage memory usage. The +mxmlRetain and +mxmlRelease functions increment and +decrement a node's use count, respectively. When the use count goes to 0, +mxmlRelease will automatically call mxmlDelete to actually +free the memory used by the node tree. New nodes automatically start with a +use count of 1.

+ + + +

Finding and Iterating Nodes

+ +

The mxmlWalkPrev +and mxmlWalkNextfunctions +can be used to iterate through the XML node tree:

+ +
+    mxml_node_t *node;
+
+    node = mxmlWalkPrev(current, tree,
+                        MXML_DESCEND);
+
+    node = mxmlWalkNext(current, tree,
+                        MXML_DESCEND);
+
+ +

In addition, you can find a named element/node using the mxmlFindElement +function:

+ +
+    mxml_node_t *node;
+
+    node = mxmlFindElement(tree, tree, "name",
+                           "attr", "value",
+                           MXML_DESCEND);
+
+ +

The name, attr, and value +arguments can be passed as NULL to act as wildcards, +e.g.:

+ + +
+    /* Find the first "a" element */
+    node = mxmlFindElement(tree, tree, "a",
+                           NULL, NULL,
+                           MXML_DESCEND);
+
+ +
+    /* Find the first "a" element with "href"
+       attribute */
+    node = mxmlFindElement(tree, tree, "a",
+                           "href", NULL,
+                           MXML_DESCEND);
+
+ +
+    /* Find the first "a" element with "href"
+       to a URL */
+    node = mxmlFindElement(tree, tree, "a",
+                           "href",
+                           "http://www.easysw.com/",
+                           MXML_DESCEND);
+
+ +
+    /* Find the first element with a "src"
+       attribute */
+    node = mxmlFindElement(tree, tree, NULL,
+                           "src", NULL,
+                           MXML_DESCEND);
+
+ +
+    /* Find the first element with a "src"
+       = "foo.jpg" */
+    node = mxmlFindElement(tree, tree, NULL,
+                           "src", "foo.jpg",
+                           MXML_DESCEND);
+
+ +

You can also iterate with the same function:

+ +
+    mxml_node_t *node;
+
+    for (node = mxmlFindElement(tree, tree,
+                                "name",
+                                NULL, NULL,
+                                MXML_DESCEND);
+         node != NULL;
+         node = mxmlFindElement(node, tree,
+                                "name",
+                                NULL, NULL,
+                                MXML_DESCEND))
+    {
+      ... do something ...
+    }
+
+ + +

The MXML_DESCEND argument can actually be one of +three constants:

+ +
    + +
  • MXML_NO_DESCEND means to not to look at any + child nodes in the element hierarchy, just look at + siblings at the same level or parent nodes until the top + node or top-of-tree is reached. + +

    The previous node from "group" would be the "node" + element to the left, while the next node from "group" would + be the "node" element to the right.

  • + +
  • MXML_DESCEND_FIRST means that it is OK to + descend to the first child of a node, but not to descend + further when searching. You'll normally use this when + iterating through direct children of a parent node, e.g. all + of the "node" and "group" elements under the "?xml" parent + node in the example above. + +

    This mode is only applicable to the search function; the + walk functions treat this as MXML_DESCEND since + every call is a first time.

  • + +
  • MXML_DESCEND means to keep descending until + you hit the bottom of the tree. The previous node from + "group" would be the "val3" node and the next node would + be the first node element under "group". + +

    If you were to walk from the root node "?xml" to the end + of the tree with mxmlWalkNext(), the order would + be:

    + +

    ?xml data node val1 node val2 node val3 group node + val4 node val5 node val6 node val7 node val8

    + +

    If you started at "val8" and walked using + mxmlWalkPrev(), the order would be reversed, + ending at "?xml".

  • + +
+ +

Finding Specific Nodes

+ +

You can find specific nodes in the tree using the mxmlFindPath, for example: + +

+    mxml_node_t *value;
+
+    value = mxmlFindPath(tree, "path/to/*/foo/bar");
+
+ +

The second argument is a "path" to the parent node. Each component of the +path is separated by a slash (/) and represents a named element in the document +tree or a wildcard (*) path representing 0 or more intervening nodes.

+ + + diff --git a/lib/libmxml/doc/body.man b/lib/libmxml/doc/body.man new file mode 100644 index 0000000..55bf45a --- /dev/null +++ b/lib/libmxml/doc/body.man @@ -0,0 +1,173 @@ +.SH INCLUDE FILE +#include +.SH LIBRARY +\-lmxml +.SH DESCRIPTION +Mini-XML is a small XML parsing library that you can use to +read XML and XML-like data files in your application without +requiring large non-standard libraries. Mini-XML only +requires an ANSI C compatible compiler (GCC works, as do +most vendors' ANSI C compilers) and a "make" program. +.PP +Mini-XML provides the following functionality: +.IP \(bu 4 +Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings. +.IP \(bu 4 +Data is stored in a linked-list tree structure, +preserving the XML data hierarchy. +.IP \(bu 4 +Supports arbitrary element names, attributes, and attribute +values with no preset limits, just available memory. +.IP \(bu 4 +Supports integer, real, opaque ("CDATA"), and text data types in +"leaf" nodes. +.IP \(bu 4 +Functions for creating, indexing, and managing trees of data. +.IP \(bu 4 +"Find" and "walk" functions for easily locating and navigating +trees of data. +.PP +Mini-XML doesn't do validation or other types of processing +on the data based upon schema files or other sources of +definition information, nor does it support character +entities other than those required by the XML +specification. +.SH USING MINI-XML +Mini-XML provides a single header file which you include: +.nf + + #include +.fi +.PP +Nodes are defined by the "mxml_node_t" structure; the "type" +member defines the node type (element, integer, opaque, +real, or text) which determines which value you want to look +at in the "value" union. New nodes can be created using the +"mxmlNewElement()", "mxmlNewInteger()", "mxmlNewOpaque()", +"mxmlNewReal()", and "mxmlNewText()" functions. Only +elements can have child nodes, and the top node must be an +element, usually "?xml". +.PP +You load an XML file using the "mxmlLoadFile()" function: +.nf + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "r"); + tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); + fclose(fp); +.fi +.PP +Similarly, you save an XML file using the "mxmlSaveFile()" +function: +.nf + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "w"); + mxmlSaveFile(tree, fp, MXML_NO_CALLBACK); + fclose(fp); +.fi +.PP +The "mxmlLoadString()", "mxmlSaveAllocString()", and +"mxmlSaveString()" functions load XML node trees from and save +XML node trees to strings: +.nf + + char buffer[8192]; + char *ptr; + mxml_node_t *tree; + + ... + tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK); + + ... + mxmlSaveString(tree, buffer, sizeof(buffer), + MXML_NO_CALLBACK); + + ... + ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK); +.fi +.PP +You can find a named element/node using the "mxmlFindElement()" +function: +.nf + + mxml_node_t *node = mxmlFindElement(tree, tree, "name", + "attr", "value", + MXML_DESCEND); +.fi +.PP +The "name", "attr", and "value" arguments can be passed as +NULL to act as wildcards, e.g.: +.nf + + /* Find the first "a" element */ + node = mxmlFindElement(tree, tree, "a", NULL, NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" attribute */ + node = mxmlFindElement(tree, tree, "a", "href", NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" to a URL */ + node = mxmlFindElement(tree, tree, "a", "href", + "http://www.easysw.com/~mike/mxml/", + MXML_DESCEND); + + /* Find the first element with a "src" attribute*/ + node = mxmlFindElement(tree, tree, NULL, "src", NULL, + MXML_DESCEND); + + /* Find the first element with a "src" = "foo.jpg" */ + node = mxmlFindElement(tree, tree, NULL, "src", + "foo.jpg", MXML_DESCEND); +.fi +.PP +You can also iterate with the same function: +.nf + + mxml_node_t *node; + + for (node = mxmlFindElement(tree, tree, "name", NULL, + NULL, MXML_DESCEND); + node != NULL; + node = mxmlFindElement(node, tree, "name", NULL, + NULL, MXML_DESCEND)) + { + ... do something ... + } +.fi +.PP +To find the value of a specific node in the tree, use the "mxmlFindPath()" +function: +.nf + + mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar"); +.fi +.PP +The "mxmlGetInteger()", "mxmlGetOpaque()", "mxmlGetReal()", and "mxmlGetText()" +functions retrieve the value from a node: +.nf + + mxml_node_t *node; + + int intvalue = mxmlGetInteger(node); + + const char *opaquevalue = mxmlGetOpaque(node); + + double realvalue = mxmlGetReal(node); + + int whitespacevalue; + const char *textvalue = mxmlGetText(node, &whitespacevalue); +.fi +.PP +Finally, once you are done with the XML data, use the +"mxmlDelete()" function to recursively free the memory that +is used for a particular node or the entire tree: +.nf + + mxmlDelete(tree); +.fi diff --git a/lib/libmxml/doc/body.md b/lib/libmxml/doc/body.md new file mode 100644 index 0000000..0385663 --- /dev/null +++ b/lib/libmxml/doc/body.md @@ -0,0 +1,1153 @@ +--- +title: Mini-XML API Reference +author: Michael R Sweet +copyright: Copyright © 2003-2017, All Rights Reserved. +docversion: 2.11 +... + +# Introduction + +Mini-XML is a small XML parsing library that you can use to read XML data files +or strings in your application without requiring large non-standard libraries. +Mini-XML provides the following functionality: + +- Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and + strings. +- Data is stored in a linked-list tree structure, preserving the XML data + hierarchy. +- SAX (streamed) reading of XML files and strings to minimize memory usage. +- Supports arbitrary element names, attributes, and attribute values with no + preset limits, just available memory. +- Supports integer, real, opaque ("cdata"), and text data types in "leaf" + nodes. +- Functions for creating and managing trees of data. +- "Find" and "walk" functions for easily locating and navigating trees of + data. + +Mini-XML doesn't do validation or other types of processing on the data based +upon schema files or other sources of definition information. + + +## History + +Mini-XML was initially developed for the [Gutenprint](http://gutenprint.sf.net/) +project to replace the rather large and unwieldy `libxml2` library with +something substantially smaller and easier-to-use. It all began one morning in +June of 2003 when Robert posted the following sentence to the developer's list: + +> It's bad enough that we require libxml2, but rolling our own XML parser is a +> bit more than we can handle. + +I then replied with: + +> Given the limited scope of what you use in XML, it should be trivial to code a +> mini-XML API in a few hundred lines of code. + +I took my own challenge and coded furiously for two days to produced the initial +public release of Mini-XML, total lines of code: 696. Robert promptly +integrated Mini-XML into Gutenprint and removed libxml2. + +Thanks to lots of feedback and support from various developers, Mini-XML has +evolved since then to provide a more complete XML implementation and now stands +at a whopping 4,115 lines of code, compared to 140,410 lines of code for libxml2 +version 2.9.1. + + +## Resources + +The Mini-XML home page can be found at: + + https://michaelrsweet.github.io/mxml + +From here you can download the current version of Mini-XML, the issue tracker, +and other resources. + + +## Legal Stuff + +The Mini-XML library is copyright © 2003-2017 by Michael R Sweet and is provided +under version 2 of the GNU Library General Public License (LGPL2) with the +following exceptions: + +1. Static linking of applications to the Mini-XML library does not constitute a + derivative work and does not require the author to provide source code for + the application, use the shared Mini-XML libraries, or link their + applications against a user-supplied version of Mini-XML. + + If you link the application to a modified version of Mini-XML, then the + changes to Mini-XML must be provided under the terms of the LGPL2 in sections + 1, 2, and 4. + +2. You do not have to provide a copy of the Mini-XML license with programs that + are linked to the Mini-XML library, nor do you have to identify the Mini-XML + license in your program or documentation as required by section 6 of the + LGPL2. + +A copy of the complete license is available in the file `COPYING` provided with +the source code. + + +# Using Mini-XML + +Mini-XML provides a single header file which you include: + + #include + +The Mini-XML library is included with your program using the `-lmxml` option: + + gcc -o myprogram myprogram.c -lmxml + +If you have the `pkg-config` software installed, you can use it to determine the +proper compiler and linker options for your installation: + + gcc `pkg-config --cflags mxml` -o myprogram myprogram.c `pkg-config --libs mxml` + + +## Loading an XML File + +You load an XML file using the `mxmlLoadFile` function: + + mxml_node_t * + mxmlLoadFile(mxml_node_t *top, FILE *fp, + mxml_type_t (*cb)(mxml_node_t *)); + +The `cb` argument specifies a function that assigns child (value) node types for +each element in the document. The callback can be a function you provide or one +of the standard functions provided with Mini-XML. For example, to load the XML +file "filename.xml" containing text strings you can use the +`MXML_OPAQUE_CALLBACK` function: + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "r"); + tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK); + fclose(fp); + +Mini-XML also provides functions to load from a file descriptor or string: + + mxml_node_t * + mxmlLoadFd(mxml_node_t *top, int fd, + mxml_type_t (*cb)(mxml_node_t *)); + + mxml_node_t * + mxmlLoadString(mxml_node_t *top, const char *s, + mxml_type_t (*cb)(mxml_node_t *)); + + +### Load Callbacks + +The last argument to the `mxmlLoad` functions is a callback function which is +used to determine the value type of each data node in an XML document. Mini-XML +defines several standard callbacks for simple XML data files: + +- `MXML_INTEGER_CALLBACK`: All data nodes contain whitespace-separated integers. +- `MXML_OPAQUE_CALLBACK`: All data nodes contain opaque strings with whitespace preserved. +- `MXML_REAL_CALLBACK` - All data nodes contain whitespace-separated floating-point numbers. +- `MXML_TEXT_CALLBACK` - All data nodes contain whitespace-separated strings. + +You can provide your own callback functions for more complex XML documents. +Your callback function will receive a pointer to the current element node and +must return the value type of the immediate children for that element node: +`MXML_CUSTOM`, `MXML_INTEGER`, `MXML_OPAQUE`, `MXML_REAL`, or `MXML_TEXT`. The +function is called *after* the element and its attributes have been read, so you +can look at the element name, attributes, and attribute values to determine the +proper value type to return. + +The following callback function looks for an attribute named "type" or the +element name to determine the value type for its child nodes: + + mxml_type_t + type_cb(mxml_node_t *node) + { + const char *type; + + /* + * You can lookup attributes and/or use the element name, + * hierarchy, etc... + */ + + type = mxmlElementGetAttr(node, "type"); + if (type == NULL) + type = mxmlGetElement(node); + + if (!strcmp(type, "integer")) + return (MXML_INTEGER); + else if (!strcmp(type, "opaque")) + return (MXML_OPAQUE); + else if (!strcmp(type, "real")) + return (MXML_REAL); + else + return (MXML_TEXT); + } + +To use this callback function, simply use the name when you call any of the load +functions: + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "r"); + tree = mxmlLoadFile(NULL, fp, type_cb); + fclose(fp); + + +## Nodes + +Every piece of information in an XML file is stored in memory in "nodes". Nodes +are defined by the `mxml_node_t` structure. Each node has a typed value, +optional user data, a parent node, sibling nodes (previous and next), and +potentially child nodes. + +For example, if you have an XML file like the following: + + + + val1 + val2 + val3 + + val4 + val5 + val6 + + val7 + val8 + + +the node tree for the file would look like the following in memory: + + ?xml version="1.0" encoding="utf-8"? + | + data + | + node - node - node - group - node - node + | | | | | | + val1 val2 val3 | val7 val8 + | + node - node - node + | | | + val4 val5 val6 + +where "-" is a pointer to the sibling node and "|" is a pointer to the first +child or parent node. + +The `mxmlGetType` function gets the type of a node: + + mxml_type_t + mxmlGetType(mxml_node_t *node); + +- `MXML_CUSTOM` : A custom value defined by your application, +- `MXML_ELEMENT` : An XML element, CDATA, comment, or processing instruction, +- `MXML_INTEGER` : A whitespace-delimited integer value, +- `MXML_OPAQUE` : An opaque string value that preserves all whitespace, +- `MXML_REAL` : A whitespace-delimited floating point value, or +- `MXML_TEXT` : A whitespace-delimited text (fragment) value. + +> Note: CDATA, comment, and processing directive nodes are currently stored in +> memory as special elements. This will be changed in a future major release of +> Mini-XML. + +The parent and sibling nodes are accessed using the `mxmlGetParent`, +`mxmlGetNextSibling`, and `mxmlGetPreviousSibling` functions, while the children +of an element node are accessed using the `mxmlGetFirstChild` or +`mxmlGetLastChild` functions: + + mxml_node_t * + mxmlGetFirstChild(mxml_node_t *node); + + mxml_node_t * + mxmlGetLastChild(mxml_node_t *node); + + mxml_node_t * + mxmlGetNextSibling(mxml_node_t *node); + + mxml_node_t * + mxmlGetParent(mxml_node_t *node); + + mxml_node_t * + mxmlGetPrevSibling(mxml_node_t *node); + +The `mxmlGetUserData` function gets any user (application) data associated with +the node: + + void * + mxmlGetUserData(mxml_node_t *node); + + +## Creating XML Documents + +You can create and update XML documents in memory using the various `mxmlNew` +functions. The following code will create the XML document described in the +previous section: + + mxml_node_t *xml; /* */ + mxml_node_t *data; /* */ + mxml_node_t *node; /* */ + mxml_node_t *group; /* */ + + xml = mxmlNewXML("1.0"); + + data = mxmlNewElement(xml, "data"); + + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val1"); + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val2"); + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val3"); + + group = mxmlNewElement(data, "group"); + + node = mxmlNewElement(group, "node"); + mxmlNewText(node, 0, "val4"); + node = mxmlNewElement(group, "node"); + mxmlNewText(node, 0, "val5"); + node = mxmlNewElement(group, "node"); + mxmlNewText(node, 0, "val6"); + + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val7"); + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val8"); + +We start by creating the declaration node common to all XML files using the +`mxmlNewXML` function: + + xml = mxmlNewXML("1.0"); + +We then create the `` node used for this document using the +`mxmlNewElement` function. The first argument specifies the parent node +\(`xml`) while the second specifies the element name \(`data`): + + data = mxmlNewElement(xml, "data"); + +Each `...` in the file is created using the `mxmlNewElement` and +`mxmlNewText` functions. The first argument of `mxmlNewText` specifies the +parent node \(`node`). The second argument specifies whether whitespace appears +before the text - 0 or false in this case. The last argument specifies the +actual text to add: + + node = mxmlNewElement(data, "node"); + mxmlNewText(node, 0, "val1"); + +The resulting in-memory XML document can then be saved or processed just like +one loaded from disk or a string. + + +## Saving an XML File + +You save an XML file using the `mxmlSaveFile` function: + + int + mxmlSaveFile(mxml_node_t *node, FILE *fp, + mxml_save_cb_t cb); + +The `cb` argument specifies a function that returns the whitespace (if any) that +is inserted before and after each element node. The `MXML_NO_CALLBACK` constant +tells Mini-XML to not include any extra whitespace. For example, so save an XML +file to the file "filename.xml" with no extra whitespace: + + FILE *fp; + + fp = fopen("filename.xml", "w"); + mxmlSaveFile(xml, fp, MXML_NO_CALLBACK); + fclose(fp); + +Mini-XML also provides functions to save to a file descriptor or strings: + + char * + mxmlSaveAllocString(mxml_node_t *node, mxml_save_cb_t cb); + + int + mxmlSaveFd(mxml_node_t *node, int fd, mxml_save_cb_t cb); + + int + mxmlSaveString(mxml_node_t *node, char *buffer, int bufsize, + mxml_save_cb_t cb); + + +### Controlling Line Wrapping + +When saving XML documents, Mini-XML normally wraps output lines at column 75 so +that the text is readable in terminal windows. The `mxmlSetWrapMargin` function +overrides the default wrap margin for the current thread: + + void mxmlSetWrapMargin(int column); + +For example, the following code sets the margin to 132 columns: + + mxmlSetWrapMargin(132); + +while the following code disables wrapping by setting the margin to 0: + + mxmlSetWrapMargin(0); + + +### Save Callbacks + +The last argument to the `mxmlSave` functions is a callback function which is +used to automatically insert whitespace in an XML document. Your callback +function will be called up to four times for each element node with a pointer to +the node and a "where" value of `MXML_WS_BEFORE_OPEN`, `MXML_WS_AFTER_OPEN`, +`MXML_WS_BEFORE_CLOSE`, or `MXML_WS_AFTER_CLOSE`. The callback function should +return `NULL` if no whitespace should be added or the string to insert (spaces, +tabs, carriage returns, and newlines) otherwise. + +The following whitespace callback can be used to add whitespace to XHTML output +to make it more readable in a standard text editor: + + const char * + whitespace_cb(mxml_node_t *node, int where) + { + const char *element; + + /* + * We can conditionally break to a new line before or after + * any element. These are just common HTML elements... + */ + + element = mxmlGetElement(node); + + if (!strcmp(element, "html") || + !strcmp(element, "head") || + !strcmp(element, "body") || + !strcmp(element, "pre") || + !strcmp(element, "p") || + !strcmp(element, "h1") || + !strcmp(element, "h2") || + !strcmp(element, "h3") || + !strcmp(element, "h4") || + !strcmp(element, "h5") || + !strcmp(element, "h6")) + { + /* + * Newlines before open and after close... + */ + + if (where == MXML_WS_BEFORE_OPEN || + where == MXML_WS_AFTER_CLOSE) + return ("\n"); + } + else if (!strcmp(element, "dl") || + !strcmp(element, "ol") || + !strcmp(element, "ul")) + { + /* + * Put a newline before and after list elements... + */ + + return ("\n"); + } + else if (!strcmp(element, "dd") || + !strcmp(element, "dt") || + !strcmp(element, "li")) + { + /* + * Put a tab before
  • 's,
    's, and
    's, and a + * newline after them... + */ + + if (where == MXML_WS_BEFORE_OPEN) + return ("\t"); + else if (where == MXML_WS_AFTER_CLOSE) + return ("\n"); + } + + /* + * Otherwise return NULL for no added whitespace... + */ + + return (NULL); + } + +To use this callback function, simply use the name when you call any of the save +functions: + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "w"); + mxmlSaveFile(tree, fp, whitespace_cb); + fclose(fp); + + +## Memory Management + +Once you are done with the XML data, use the `mxmlDelete` function to +recursively free the memory that is used for a particular node or the entire +tree: + + void + mxmlDelete(mxml_node_t *tree); + +You can also use reference counting to manage memory usage. The `mxmlRetain` +and `mxmlRelease` functions increment and decrement a node's use count, +respectively. When the use count goes to zero, `mxmlRelease` automatically +calls `mxmlDelete` to actually free the memory used by the node tree. New nodes +start with a use count of 1. + + +# More About Nodes + +## Element Nodes + +Element \(`MXML_ELEMENT`) nodes are created using the `mxmlNewElement` function. +Element attributes are set using the `mxmlElementSetAttr` and +`mxmlElementSetAttrf` functions and cleared using the `mxmlElementDeleteAttr` +function: + + mxml_node_t * + mxmlNewElement(mxml_node_t *parent, const char *name); + + void + mxmlElementDeleteAttr(mxml_node_t *node, const char *name); + + void + mxmlElementSetAttr(mxml_node_t *node, const char *name, + const char *value); + + void + mxmlElementSetAttrf(mxml_node_t *node, const char *name, + const char *format, ...); + +Child nodes are added using the various `mxmlNew` functions. The top (root) +node must be an element, usually created by the `mxmlNewXML` function: + + mxml_node_t * + mxmlNewXML(const char *version); + +The `mxmlGetElement` function retrieves the element name, the +`mxmlElementGetAttr` function retrieves the value string for a named attribute +associated with the element. The `mxmlElementGetAttrByIndex` and +`mxmlElementGetAttrCount` functions retrieve attributes by index: + + const char * + mxmlGetElement(mxml_node_t *node); + + const char * + mxmlElementGetAttr(mxml_node_t *node, const char *name); + + const char * + mxmlElementGetAttrByIndex(mxml_node_t *node, int idx, + const char **name); + + int + mxmlElementGetAttrCount(mxml_node_t *node); + + +## CDATA Nodes + +CDATA \(`MXML_ELEMENT`) nodes are created using the `mxmlNewCDATA` function: + + mxml_node_t *mxmlNewCDATA(mxml_node_t *parent, const char *string); + +The `mxmlGetCDATA` function retrieves the CDATA string pointer for a node: + + const char *mxmlGetCDATA(mxml_node_t *node); + + +## Comment Nodes + +Because comments are currently stored as element nodes, comment +\(`MXML_ELEMENT`) nodes are created using the `mxmlNewElement` function by +including the surrounding "!--" and "--" characters in the element name, for +example: + + mxml_node_t *node = mxmlNewElement("!-- This is a comment --"); + +Similarly, the `mxmlGetElement` function retrieves the comment string pointer +for a node, which includes the surrounding "!--" and "--" characters. + + const char *comment = mxmlGetElement(node); + /* returns "!-- This is a comment --" */ + + +## Processing Instruction Nodes + +Because processing instructions are currently stored as element nodes, +processing instruction \(`MXML_ELEMENT`) nodes are created using the +`mxmlNewElement` function including the surrounding "?" characters: + + mxml_node_t *node = mxmlNewElement("?xml-stylesheet type=\"text/css\" href=\"style.css\"?"); + +The `mxmlGetElement` function retrieves the processing instruction string for a +node, including the surrounding "?" characters: + + const char *instr = mxmlGetElement(node); + /* returned "?xml-stylesheet type=\"text/css\" href=\"style.css\"?" */ + + +## Integer Nodes + +Integer \(`MXML_INTEGER`) nodes are created using the `mxmlNewInteger` function: + + mxml_node_t * + mxmlNewInteger(mxml_node_t *parent, int integer); + +The `mxmlGetInteger` function retrieves the integer value for a node: + + int + mxmlGetInteger(mxml_node_t *node); + + +## Opaque String Nodes + +Opaque string \(`MXML_OPAQUE`) nodes are created using the `mxmlNewOpaque` +function: + + mxml_node_t * + mxmlNewOpaque(mxml_node_t *parent, const char *opaque); + +The `mxmlGetOpaque` function retrieves the opaque string pointer for a node: + + const char * + mxmlGetOpaque(mxml_node_t *node); + + +## Text Nodes + +Whitespace-delimited text string \(`MXML_TEXT`) nodes are created using the +`mxmlNewText` and `mxmlNewTextf` functions. Each text node consists of a text +string and (leading) whitespace flag value. + + mxml_node_t * + mxmlNewText(mxml_node_t *parent, int whitespace, + const char *string); + + mxml_node_t * + mxmlNewTextf(mxml_node_t *parent, int whitespace, + const char *format, ...); + +The `mxmlGetText` function retrieves the text string pointer and whitespace +flag value for a node: + + const char * + mxmlGetText(mxml_node_t *node, int *whitespace); + + +## Real Number Nodes + +Real number \(`MXML_REAL`) nodes are created using the `mxmlNewReal` function: + + mxml_node_t * + mxmlNewReal(mxml_node_t *parent, double real); + +The `mxmlGetReal` function retrieves the real number for a node: + + double + mxmlGetReal(mxml_node_t *node); + + +# Locating Data in an XML Document + +Mini-XML provides many functions for enumerating, searching, and indexing XML +documents. + + +## Finding Nodes + +The `mxmlFindPath` function finds the (first) value node under a specific +element using a "path": + + mxml_node_t * + mxmlFindPath(mxml_node_t *node, const char *path); + +The `path` string can contain the "*" wildcard to match a single element node in +the hierarchy. For example, the following code will find the first "node" +element under the "group" element, first using an explicit path and then using a +wildcard: + + mxml_node_t *value = mxmlFindPath(xml, "data/group/node"); + + mxml_node_t *value = mxmlFindPath(xml, "data/*/node"); + +The `mxmlFindElement` function can be used to find a named element, optionally +matching an attribute and value: + + mxml_node_t * + mxmlFindElement(mxml_node_t *node, mxml_node_t *top, + const char *element, const char *attr, + const char *value, int descend); + +The "element", "attr", and "value" arguments can be passed as `NULL` to act as +wildcards, e.g.: + + /* Find the first "a" element */ + node = mxmlFindElement(tree, tree, "a", NULL, NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" attribute */ + node = mxmlFindElement(tree, tree, "a", "href", NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" to a URL */ + node = mxmlFindElement(tree, tree, "a", "href", + "http://michaelrsweet.github.io/", + MXML_DESCEND); + + /* Find the first element with a "src" attribute*/ + node = mxmlFindElement(tree, tree, NULL, "src", NULL, + MXML_DESCEND); + + /* Find the first element with a "src" = "foo.jpg" */ + node = mxmlFindElement(tree, tree, NULL, "src", "foo.jpg", + MXML_DESCEND); + +You can also iterate with the same function: + + mxml_node_t *node; + + for (node = mxmlFindElement(tree, tree, "element", NULL, + NULL, MXML_DESCEND); + node != NULL; + node = mxmlFindElement(node, tree, "element", NULL, + NULL, MXML_DESCEND)) + { + ... do something ... + } + +The `descend` argument \(`MXML_DESCEND` in the examples above) can be one of +three constants: + +- `MXML_NO_DESCEND`: ignore child nodes in the element hierarchy, instead using + siblings (same level) or parent nodes (above) until the top (root) node is + reached. + +- `MXML_DESCEND_FIRST`: start the search with the first child of the node, and + then search siblings. You'll normally use this when iterating through direct + children of a parent node, e.g. all of the "node" and "group" elements under + the "?xml" parent node in the previous example. + +- `MXML_DESCEND`: search child nodes first, then sibling nodes, and then parent + nodes. + + +## Iterating Nodes + +While the `mxmlFindNode` and `mxmlFindPath` functions will find a particular +element node, sometimes you need to iterate over all nodes. The `mxmlWalkNext` +and `mxmlWalkPrev` functions can be used to iterate through the XML node +tree: + + mxml_node_t * + mxmlWalkNext(mxml_node_t *node, mxml_node_t *top, + int descend); + + mxml_node_t * + mxmlWalkPrev(mxml_node_t *node, mxml_node_t *top, + int descend); + +Depending on the value of the `descend` argument, these functions will +automatically traverse child, sibling, and parent nodes until the `top` node is +reached. For example, the following code will iterate over all of the nodes in +the sample XML document in the previous section: + + mxml_node_t *node; + + for (node = xml; + node != NULL; + node = mxmlWalkNext(node, xml, MXML_DESCEND)) + { + ... do something ... + } + +The nodes will be returned in the following order: + + + + + val1 + + val2 + + val3 + + + val4 + + val5 + + val6 + + val7 + + val8 + + +## Indexing + +The `mxmlIndexNew` function allows you to create an index of nodes for faster +searching and enumeration: + + mxml_index_t * + mxmlIndexNew(mxml_node_t *node, const char *element, + const char *attr); + +The `element` and `attr` arguments control which elements are included in the +index. If `element` is not `NULL` then only elements with the specified name +are added to the index. Similarly, if `attr` is not `NULL` then only elements +containing the specified attribute are added to the index. The nodes are sorted +in the index. + +For example, the following code creates an index of all "id" values in an XML +document: + + mxml_index_t *ind = mxmlIndexNew(xml, NULL, "id"); + +Once the index is created, the `mxmlIndexFind` function can be used to find a +matching node: + + mxml_node_t * + mxmlIndexFind(mxml_index_t *ind, const char *element, + const char *value); + +For example, the following code will find the element whose "id" string is "42": + + mxml_node_t *node = mxmlIndexFind(ind, NULL, "42"); + +Alternately, the `mxmlIndexReset` and `mxmlIndexEnum` functions can be used to +enumerate the nodes in the index: + + mxml_node_t * + mxmlIndexReset(mxml_index_t *ind); + + mxml_node_t * + mxmlIndexEnum(mxml_index_t *ind); + +Typically these functions will be used in a `for` loop: + + mxml_node_t *node; + + for (node = mxmlIndexReset(ind); + node != NULL; + node = mxmlIndexEnum(ind)) + { + ... do something ... + } + +The `mxmlIndexCount` function returns the number of nodes in the index: + + int + mxmlIndexGetCount(mxml_index_t *ind); + +Finally, the `mxmlIndexDelete` function frees all memory associated with the +index: + + void + mxmlIndexDelete(mxml_index_t *ind); + + +# Custom Data Types + +Mini-XML supports custom data types via per-thread load and save callbacks. +Only a single set of callbacks can be active at any time for the current thread, +however your callbacks can store additional information in order to support +multiple custom data types as needed. The `MXML_CUSTOM` node type identifies +custom data nodes. + +The `mxmlGetCustom` function retrieves the custom value pointer for a node. + + const void * + mxmlGetCustom(mxml_node_t *node); + +Custom \(`MXML_CUSTOM`) nodes are created using the `mxmlNewCustom` function or +using a custom per-thread load callbacks specified using the +`mxmlSetCustomHandlers` function: + + typedef void (*mxml_custom_destroy_cb_t)(void *); + typedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *); + typedef char *(*mxml_custom_save_cb_t)(mxml_node_t *); + + mxml_node_t * + mxmlNewCustom(mxml_node_t *parent, void *data, + mxml_custom_destroy_cb_t destroy); + + int + mxmlSetCustom(mxml_node_t *node, void *data, + mxml_custom_destroy_cb_t destroy); + + void + mxmlSetCustomHandlers(mxml_custom_load_cb_t load, + mxml_custom_save_cb_t save); + +The load callback receives a pointer to the current data node and a string of +opaque character data from the XML source with character entities converted to +the corresponding UTF-8 characters. For example, if we wanted to support a +custom date/time type whose value is encoded as "yyyy-mm-ddThh:mm:ssZ" (ISO +format), the load callback would look like the following: + + typedef struct + { + unsigned year, /* Year */ + month, /* Month */ + day, /* Day */ + hour, /* Hour */ + minute, /* Minute */ + second; /* Second */ + time_t unix; /* UNIX time */ + } iso_date_time_t; + + int + load_custom(mxml_node_t *node, const char *data) + { + iso_date_time_t *dt; + struct tm tmdata; + + /* + * Allocate data structure... + */ + + dt = calloc(1, sizeof(iso_date_time_t)); + + /* + * Try reading 6 unsigned integers from the data string... + */ + + if (sscanf(data, "%u-%u-%uT%u:%u:%uZ", &(dt->year), + &(dt->month), &(dt->day), &(dt->hour), + &(dt->minute), &(dt->second)) != 6) + { + /* + * Unable to read numbers, free the data structure and + * return an error... + */ + + free(dt); + + return (-1); + } + + /* + * Range check values... + */ + + if (dt->month < 1 || dt->month > 12 || + dt->day < 1 || dt->day > 31 || + dt->hour < 0 || dt->hour > 23 || + dt->minute < 0 || dt->minute > 59 || + dt->second < 0 || dt->second > 60) + { + /* + * Date information is out of range... + */ + + free(dt); + + return (-1); + } + + /* + * Convert ISO time to UNIX time in seconds... + */ + + tmdata.tm_year = dt->year - 1900; + tmdata.tm_mon = dt->month - 1; + tmdata.tm_day = dt->day; + tmdata.tm_hour = dt->hour; + tmdata.tm_min = dt->minute; + tmdata.tm_sec = dt->second; + + dt->unix = gmtime(&tmdata); + + /* + * Assign custom node data and destroy (free) function + * pointers... + */ + + mxmlSetCustom(node, data, free); + + /* + * Return with no errors... + */ + + return (0); + } + +The function itself can return 0 on success or -1 if it is unable to decode the +custom data or the data contains an error. Custom data nodes contain a `void` +pointer to the allocated custom data for the node and a pointer to a destructor +function which will free the custom data when the node is deleted. In this +example, we use the standard `free` function since everything is contained in a +single calloc'd block. + +The save callback receives the node pointer and returns an allocated string +containing the custom data value. The following save callback could be used for +our ISO date/time type: + + char * + save_custom(mxml_node_t *node) + { + char data[255]; + iso_date_time_t *dt; + + + dt = (iso_date_time_t *)mxmlGetCustom(node); + + snprintf(data, sizeof(data), + "%04u-%02u-%02uT%02u:%02u:%02uZ", + dt->year, dt->month, dt->day, dt->hour, + dt->minute, dt->second); + + return (strdup(data)); + } + +You register the callback functions using the `mxmlSetCustomHandlers` function: + + mxmlSetCustomHandlers(load_custom, save_custom); + + +# SAX (Stream) Loading of Documents + +Mini-XML supports an implementation of the Simple API for XML (SAX) which allows +you to load and process an XML document as a stream of nodes. Aside from +allowing you to process XML documents of any size, the Mini-XML implementation +also allows you to retain portions of the document in memory for later +processing. + +The `mxmlSAXLoadFd`, `mxmlSAXLoadFile`, and `mxmlSAXLoadString` functions +provide the SAX loading APIs: + + mxml_node_t * + mxmlSAXLoadFd(mxml_node_t *top, int fd, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); + + mxml_node_t * + mxmlSAXLoadFile(mxml_node_t *top, FILE *fp, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); + + mxml_node_t * + mxmlSAXLoadString(mxml_node_t *top, const char *s, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); + +Each function works like the corresponding `mxmlLoad` function but uses a +callback to process each node as it is read. The callback function receives the +node, an event code, and a user data pointer you supply: + + void + sax_cb(mxml_node_t *node, mxml_sax_event_t event, + void *data) + { + ... do something ... + } + +The event will be one of the following: + +- `MXML_SAX_CDATA`: CDATA was just read. +- `MXML_SAX_COMMENT`: A comment was just read. +- `MXML_SAX_DATA`: Data (custom, integer, opaque, real, or text) was just read. +- `MXML_SAX_DIRECTIVE`: A processing directive/instruction was just read. +- `MXML_SAX_ELEMENT_CLOSE` - A close element was just read \(``) +- `MXML_SAX_ELEMENT_OPEN` - An open element was just read \(``) + +Elements are *released* after the close element is processed. All other nodes +are released after they are processed. The SAX callback can *retain* the node +using the `mxmlRetain` function. For example, the following SAX callback will +retain all nodes, effectively simulating a normal in-memory load: + + void + sax_cb(mxml_node_t *node, mxml_sax_event_t event, + void *data) + { + if (event != MXML_SAX_ELEMENT_CLOSE) + mxmlRetain(node); + } + +More typically the SAX callback will only retain a small portion of the document +that is needed for post-processing. For example, the following SAX callback +will retain the title and headings in an XHTML file. It also retains the (parent) elements like ``, ``, and ``, and processing +directives like `` and ``: + + void + sax_cb(mxml_node_t *node, mxml_sax_event_t event, + void *data) + { + if (event == MXML_SAX_ELEMENT_OPEN) + { + /* + * Retain headings and titles... + */ + + const char *element = mxmlGetElement(node); + + if (!strcmp(element, "html") || + !strcmp(element, "head") || + !strcmp(element, "title") || + !strcmp(element, "body") || + !strcmp(element, "h1") || + !strcmp(element, "h2") || + !strcmp(element, "h3") || + !strcmp(element, "h4") || + !strcmp(element, "h5") || + !strcmp(element, "h6")) + mxmlRetain(node); + } + else if (event == MXML_SAX_DIRECTIVE) + mxmlRetain(node); + else if (event == MXML_SAX_DATA) + { + if (mxmlGetRefCount(mxmlGetParent(node)) > 1) + { + /* + * If the parent was retained, then retain this data + * node as well. + */ + + mxmlRetain(node); + } + } + } + +The resulting skeleton document tree can then be searched just like one loaded +using the `mxmlLoad` functions. For example, a filter that reads an XHTML +document from stdin and then shows the title and headings in the document would +look like: + + mxml_node_t *doc, *title, *body, *heading; + + doc = mxmlSAXLoadFd(NULL, 0, MXML_TEXT_CALLBACK, sax_cb, + NULL); + + title = mxmlFindElement(doc, doc, "title", NULL, NULL, + MXML_DESCEND); + + if (title) + print_children(title); + + body = mxmlFindElement(doc, doc, "body", NULL, NULL, + MXML_DESCEND); + + if (body) + { + for (heading = mxmlGetFirstChild(body); + heading; + heading = mxmlGetNextSibling(heading)) + print_children(heading); + } + +The `print_children` function is: + + void + print_children(mxml_node_t *parent) + { + mxml_node_t *node; + const char *text; + int whitespace; + + for (node = mxmlGetFirstChild(parent); + node != NULL; + node = mxmlGetNextSibling(node)) + { + text = mxmlGettext(node, &whitespace); + + if (whitespace) + putchar(' '); + + fputs(text, stdout); + } + + putchar('\n'); + } diff --git a/lib/libmxml/doc/docset.css b/lib/libmxml/doc/docset.css new file mode 100644 index 0000000..677dcc6 --- /dev/null +++ b/lib/libmxml/doc/docset.css @@ -0,0 +1,113 @@ +body { + background: white; + color: black; + font-family: sans-serif; +} + +h1, h2, h3, h4, h5, h6, p, td, th { + font-family: sans-serif; +} + +kbd { + color: #006600; + font-family: monospace; + font-weight: bold; +} + +pre { + font-family: monospace; +} + +pre.example { + background: white; + border: dotted thin #999999; + padding: 10px; +} + +pre.example em { + color: #3f0000; + font-family: sans-serif; +} + +div.summary table { + border: solid thin #999999; + border-collapse: collapse; + border-spacing: 0; + margin: 10px; + width: 33%; +} + +div.summary table td, div.summary table th { + background: white; + border: solid thin #999999; + border-spacing: 0; + padding: 5px; + text-align: left; + vertical-align: top; +} + +div.summary table thead th { + background: #f0f0f0; +} + +div.body h1 { + margin: 0; +} +div.body h2 { + margin-top: 1.5em; +} +div.body h3, div.body h4, div.body h5 { + margin-bottom: 0.5em; + margin-top: 1.5em; +} +.class, .enumeration, .function, .struct, .typedef, .union { + border-bottom: solid thin #999999; + margin-bottom: 0; + margin-top: 2em; +} +.description { + margin-top: 0.5em; +} +code, p.code, pre, ul.code li { + font-family: monaco, courier, monospace; + font-size: 90%; +} +ul.code, ul.contents, ul.subcontents { + list-style-type: none; + margin: 0; + padding-left: 0; +} +ul.code li { + margin: 0; +} +ul.contents > li { + margin-top: 1em; +} +ul.contents li ul.code, ul.contents li ul.subcontents { + padding-left: 2em; +} +div.body dl { + margin-left: 0; + margin-top: 0; +} +div.body dt { + font-style: italic; + margin-left: 0; + margin-top: 0; +} +div.body dd { + margin-bottom: 0.5em; +} +span.info { + background: black; + border: thin solid black; + color: white; + font-size: 80%; + font-style: italic; + font-weight: bold; + white-space: nowrap; +} +h2 span.info, h3 span.info, h4 span.info { + float: right; + font-size: 100%; +} diff --git a/lib/libmxml/doc/docset.header b/lib/libmxml/doc/docset.header new file mode 100644 index 0000000..37dc00e --- /dev/null +++ b/lib/libmxml/doc/docset.header @@ -0,0 +1,18 @@ +

    Mini-XML API Reference

    + +
    + + + + + + + + + + + + + +
    Headermxml.h
    Library-lmxml
    +
    diff --git a/lib/libmxml/doc/docset.intro b/lib/libmxml/doc/docset.intro new file mode 100644 index 0000000..d1fa0eb --- /dev/null +++ b/lib/libmxml/doc/docset.intro @@ -0,0 +1,141 @@ +

    Introduction

    + +

    Mini-XML is a small XML parsing library that you can use to read XML data files or strings in your application without requiring large non-standard libraries. Mini-XML provides the following functionality:

    + +
      +
    • Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings.
    • +
    • Data is stored in a linked-list tree structure, preserving the XML data hierarchy.
    • +
    • SAX (streamed) reading of XML files and strings to minimize memory usage.
    • +
    • Supports arbitrary element names, attributes, and attribute values with no preset limits, just available memory.
    • +
    • Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes.
    • +
    • Functions for creating and managing trees of data.
    • +
    • "Find" and "walk" functions for easily locating and navigating trees of data.
    • +
    + +

    Mini-XML doesn't do validation or other types of processing on the data based upon schema files or other sources of definition information.

    + + +

    Using Mini-XML

    + +

    Mini-XML provides a single header file which you include:

    + +
    +#include <mxml.h>
    +
    + +

    Nodes are defined by the "mxml_node_t" structure; the "type" member defines the node type (element, integer, opaque, real, or text) which determines which value you want to look at in the "value" union. New nodes can be created using the "mxmlNewElement()", "mxmlNewInteger()", "mxmlNewOpaque()", "mxmlNewReal()", and "mxmlNewText()" functions. Only elements can have child nodes, and the top node must be an element, usually "?xml".

    + +

    You load an XML file using the "mxmlLoadFile()" function:

    + +
    +FILE *fp;
    +mxml_node_t *tree;
    +
    +fp = fopen("filename.xml", "r");
    +tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK);
    +fclose(fp);
    +
    + +

    Similarly, you save an XML file using the "mxmlSaveFile()" function:

    + +
    +FILE *fp;
    +mxml_node_t *tree;
    +
    +fp = fopen("filename.xml", "w");
    +mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
    +fclose(fp);
    +
    + +

    The "mxmlLoadString()", "mxmlSaveAllocString()", and "mxmlSaveString()" functions load XML node trees from and save XML node trees to strings:

    + +
    +char buffer[8192];
    +char *ptr;
    +mxml_node_t *tree;
    +
    +...
    +tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK);
    +
    +...
    +mxmlSaveString(tree, buffer, sizeof(buffer),
    +	       MXML_NO_CALLBACK);
    +
    +...
    +ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
    +
    + +

    You can find a named element/node using the "mxmlFindElement()" function:

    + +
    +mxml_node_t *node = mxmlFindElement(tree, tree, "name",
    +				    "attr", "value",
    +				    MXML_DESCEND);
    +
    + +

    The "name", "attr", and "value" arguments can be passed as NULL to act as wildcards, e.g.:

    + +
    +/* Find the first "a" element */
    +node = mxmlFindElement(tree, tree, "a", NULL, NULL,
    +		       MXML_DESCEND);
    +
    +/* Find the first "a" element with "href" attribute */
    +node = mxmlFindElement(tree, tree, "a", "href", NULL,
    +		       MXML_DESCEND);
    +
    +/* Find the first "a" element with "href" to a URL */
    +node = mxmlFindElement(tree, tree, "a", "href",
    +		       "http://www.easysw.com/~mike/mxml/",
    +		       MXML_DESCEND);
    +
    +/* Find the first element with a "src" attribute*/
    +node = mxmlFindElement(tree, tree, NULL, "src", NULL,
    +		       MXML_DESCEND);
    +
    +/* Find the first element with a "src" = "foo.jpg" */
    +node = mxmlFindElement(tree, tree, NULL, "src",
    +		       "foo.jpg", MXML_DESCEND);
    +
    + +

    You can also iterate with the same function:

    + +
    +mxml_node_t *node;
    +
    +for (node = mxmlFindElement(tree, tree, "name", NULL,
    +			    NULL, MXML_DESCEND);
    +     node != NULL;
    +     node = mxmlFindElement(node, tree, "name", NULL,
    +			    NULL, MXML_DESCEND))
    +{
    +  ... do something ...
    +}
    +
    + +

    The "mxmlFindPath()" function finds the (first) value node under a specific element using a "path":

    + +
    +mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar");
    +
    + +

    The "mxmlGetInteger()", "mxmlGetOpaque()", "mxmlGetReal()", and "mxmlGetText()" functions retrieve the value from a node:

    + +
    +mxml_node_t *node;
    +
    +int intvalue = mxmlGetInteger(node);
    +
    +const char *opaquevalue = mxmlGetOpaque(node);
    +
    +double realvalue = mxmlGetReal(node);
    +
    +int whitespacevalue;
    +const char *textvalue = mxmlGetText(node, &whitespacevalue);
    +
    + +

    Finally, once you are done with the XML data, use the "mxmlDelete()" function to recursively free the memory that is used for a particular node or the entire tree:

    + +
    +mxmlDelete(tree);
    +
    diff --git a/lib/libmxml/doc/footer.man b/lib/libmxml/doc/footer.man new file mode 100644 index 0000000..1dafcdc --- /dev/null +++ b/lib/libmxml/doc/footer.man @@ -0,0 +1,4 @@ +.SH SEE ALSO +mxmldoc(1), Mini-XML Programmers Manual, https://michaelrsweet.github.io/mxml +.SH COPYRIGHT +Copyright \[co] 2003-2017 by Michael R Sweet. diff --git a/lib/libmxml/doc/hires/mxml.png b/lib/libmxml/doc/hires/mxml.png new file mode 100644 index 0000000..68088fb Binary files /dev/null and b/lib/libmxml/doc/hires/mxml.png differ diff --git a/lib/libmxml/doc/install.html b/lib/libmxml/doc/install.html new file mode 100644 index 0000000..5f7c876 --- /dev/null +++ b/lib/libmxml/doc/install.html @@ -0,0 +1,118 @@ + + + +

    Chapter 1 - Building, +Installing, and Packaging Mini-XML

    + +

    This chapter describes how to build, install, and package +Mini-XML on your system from the source archive. You will need an +ANSI/ISO-C compatible compiler to build Mini-XML - GCC works, as +do most vendors' C compilers. If you are building Mini-XML on +Windows, we recommend using the Visual C++ environment with the +supplied solution file. For other operating systems, you'll need a +POSIX-compatible shell and make program in addition to +the C compiler.

    + +

    Compiling Mini-XML

    + +

    Mini-XML comes with both an autoconf-based configure script +and a Visual C++ solution that can be used to compile the library +and associated tools.

    + +

    Compiling with Visual C++

    + +

    Open the mxml.sln solution in the vcnet +folder. Choose the desired build configuration, "Debug" (the +default) or "Release", and then choose Build Solution +from the Build menu.

    + +

    Compiling with Command-Line Tools

    + +

    Type the following command to configure the Mini-XML source +code for your system:

    + +
    +    ./configure ENTER
    +
    + +

    The default install prefix is /usr/local, which +can be overridden using the --prefix option:

    + +
    +    ./configure --prefix=/foo ENTER
    +
    + +

    Other configure options can be found using the +--help option:

    + +
    +    ./configure --help ENTER
    +
    + +

    Once you have configured the software, use the +make(1) program to do the build and run the test +program to verify that things are working, as follows:

    + +
    +    make ENTER
    +
    + + +

    Installing Mini-XML

    + +

    If you are using Visual C++, copy the mxml.lib and +and mxml.h files to the Visual C++ lib and +include directories, respectively.

    + +

    Otherwise, use the make command with the +install target to install Mini-XML in the configured +directories:

    + +
    +    make install ENTER
    +
    + + +

    Creating Mini-XML Packages

    + +

    Mini-XML includes two files that can be used to create binary +packages. The first file is mxml.spec which is used +by the rpmbuild(8) software to create Red Hat Package +Manager ("RPM") packages which are commonly used on Linux. Since +rpmbuild wants to compile the software on its own, you +can provide it with the Mini-XML tar file to build the +package:

    + +
    +    rpmbuild -ta mxml-version.tar.gz ENTER
    +
    + +

    The second file is mxml.list which is used by the +epm(1) program to create software packages in a variety +of formats. The epm program is available from the +following URL:

    + +
    +    http://www.epmhome.org/
    +
    + +

    Use the make command with the epm target +to create portable and native packages for your system:

    + +
    +    make epm ENTER
    +
    + +

    The packages are stored in a subdirectory named +dist for your convenience. The portable packages +utilize scripts and tar files to install the software on the +target system. After extracting the package archive, use the +mxml.install script to install the software.

    + +

    The native packages will be in the local OS's native format: +RPM for Red Hat Linux, DPKG for Debian Linux, PKG for Solaris, +and so forth. Use the corresponding commands to install the +native packages.

    + + + diff --git a/lib/libmxml/doc/intro.html b/lib/libmxml/doc/intro.html new file mode 100644 index 0000000..8b5e95a --- /dev/null +++ b/lib/libmxml/doc/intro.html @@ -0,0 +1,190 @@ + + + Mini-XML Programmers Manual, Version 2.11 + + + + + + +

    Introduction

    + +

    This programmers manual describes Mini-XML version 2.11, a small +XML parsing library that you can use to read and write XML data +files in your C and C++ applications.

    + +

    Mini-XML was initially developed for the Gutenprint project to replace +the rather large and unwieldy libxml2 library with +something substantially smaller and easier-to-use. It all began one +morning in June of 2003 when Robert posted the following sentence to +the developer's list:

    + +
    It's bad enough that we require libxml2, but rolling +our own XML parser is a bit more than we can handle.
    + +

    I then replied with:

    + +
    Given the limited scope of what you use in XML, it +should be trivial to code a mini-XML API in a few hundred lines of +code.
    + +

    I took my own challenge and coded furiously for two days to +produced the initial public release of Mini-XML, total lines of +code: 696. Robert promptly integrated Mini-XML into Gutenprint +and removed libxml2.

    + +

    Thanks to lots of feedback and support from various +developers, Mini-XML has evolved since then to provide a more +complete XML implementation and now stands at a whopping 3,792 +lines of code, compared to 140,410 lines of code for libxml2 +version 2.9.1.

    + +

    Aside from Gutenprint, Mini-XML is used for the +following projects/software applications:

    + + + +

    Please file a bug on Github if you would like your project added or +removed from this list, or if you have any comments/quotes you would like me to +publish about your experiences with Mini-XML.

    + + +

    Organization of This Document

    + +

    This manual is organized into the following chapters and +appendices:

    + + + + +

    Notation Conventions

    + +

    Various font and syntax conventions are used in this guide. +Examples and their meanings and uses are explained below:

    + +
    + +
    mxmldoc
    + mxmldoc(1)
    + +
    The names of commands; the first mention of a command + or function in a chapter is followed by a manual page + section number.

    + +
    /var
    + /etc/hosts
    + +
    File and directory names.

    + +
    Request ID is Printer-123
    + +
    Screen output.

    + +
    lp -d printer filename ENTER
    + +
    Literal user input; special keys like + ENTER are in ALL CAPS.

    + +
    12.3
    + +
    Numbers in the text are written using the period (.) + to indicate the decimal point.

    + +
    + + +

    Abbreviations

    + +

    The following abbreviations are used throughout this +manual:

    + +
    + +
    Gb
    +
    Gigabytes, or 1073741824 bytes

    + +
    kb
    +
    Kilobytes, or 1024 bytes

    + +
    Mb
    +
    Megabytes, or 1048576 bytes

    + +
    UTF-8, UTF-16
    +
    Unicode Transformation Format, 8-bit or 16-bit

    + +
    W3C
    +
    World Wide Web Consortium

    + +
    XML
    +
    Extensible Markup Language

    + +
    + + +

    Other References

    + +
    + +
    The Unicode Standard, Version 4.0, Addison-Wesley, + ISBN 0-321-18578-1
    + +
    The definition of the Unicode character set which is + used for XML.

    + +
    Extensible + Markup Language (XML) 1.0 (Third Edition)
    + +
    The XML specification from the World Wide Web + Consortium (W3C)

    + +
    + + +

    Legal Stuff

    + +

    The Mini-XML library is copyright 2003-2017 by Michael R Sweet. License terms +are described in Appendix A - Mini-XML License.

    + + + diff --git a/lib/libmxml/doc/license.html b/lib/libmxml/doc/license.html new file mode 100644 index 0000000..3aa11ea --- /dev/null +++ b/lib/libmxml/doc/license.html @@ -0,0 +1,593 @@ + + + +

    Appendix A - Mini-XML +License

    + +

    The Mini-XML library and included programs are provided under +the terms of the GNU Library General Public License version 2 +(LGPL2) with the following exceptions:

    + +

    1. Static linking of applications to the Mini-XML +library does not constitute a derivative work and does +not require the author to provide source code for the +application, use the shared Mini-XML libraries, or link +their applications against a user-supplied version of +Mini-XML.

    + +

    If you link the application to a modified version +of Mini-XML, then the changes to Mini-XML must be +provided under the terms of the LGPL2 in sections 1, 2, +and 4.

    + +

    2. You do not have to provide a copy of the Mini-XML +license with programs that are linked to the Mini-XML +library, nor do you have to identify the Mini-XML license +in your program or documentation as required by section 6 +of the LGPL2.

    + +

     

    + +

    GNU LIBRARY GENERAL PUBLIC LICENSE

    +

    Version 2, June 1991 +
    Copyright (C) 1991 Free Software Foundation, Inc. +
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +
    Everyone is permitted to copy and distribute verbatim copies of +this license document, but changing it is not allowed. +
    [This is the first released version of the library GPL. It is +numbered 2 because it goes with version 2 of the ordinary GPL.]

    + +

    Preamble

    + +

    The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public Licenses +are intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users.

    + +

    This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too.

    + +

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

    + +

    To protect your rights, we need to make restrictions that +forbid anyone to deny you these rights or to ask you to +surrender the rights. These restrictions translate to certain +responsibilities for you if you distribute copies of the +library, or if you modify it.

    + +

    For example, if you distribute copies of the library, whether +gratis or for a fee, you must give the recipients all the rights +that we gave you. You must make sure that they, too, receive or +can get the source code. If you link a program with the library, +you must provide complete object files to the recipients so that +they can relink them with the library, after making changes to +the library and recompiling it. And you must show them these +terms so they know their rights.

    + +

    Our method of protecting your rights has two steps: (1) +copyright the library, and (2) offer you this license which +gives you legal permission to copy, distribute and/or modify the +library.

    + +

    Also, for each distributor's protection, we want to make +certain that everyone understands that there is no warranty for +this free library. If the library is modified by someone else +and passed on, we want its recipients to know that what they +have is not the original version, so that any problems +introduced by others will not reflect on the original authors' +reputations.

    + +

    Finally, any free program is threatened constantly by +software patents. We wish to avoid the danger that companies +distributing free software will individually obtain patent +licenses, thus in effect transforming the program into +proprietary software. To prevent this, we have made it clear +that any patent must be licensed for everyone's free use or not +licensed at all.

    + +

    Most GNU software, including some libraries, is covered by +the ordinary GNU General Public License, which was designed for +utility programs. This license, the GNU Library General Public +License, applies to certain designated libraries. This license +is quite different from the ordinary one; be sure to read it in +full, and don't assume that anything in it is the same as in the +ordinary license.

    + +

    The reason we have a separate public license for some +libraries is that they blur the distinction we usually make +between modifying or adding to a program and simply using it. +Linking a program with a library, without changing the library, +is in some sense simply using the library, and is analogous to +running a utility program or application program. However, in a +textual and legal sense, the linked executable is a combined +work, a derivative of the original library, and the ordinary +General Public License treats it as such.

    + +

    Because of this blurred distinction, using the ordinary +General Public License for libraries did not effectively promote +software sharing, because most developers did not use the +libraries. We concluded that weaker conditions might promote +sharing better.

    + +

    However, unrestricted linking of non-free programs would +deprive the users of those programs of all benefit from the free +status of the libraries themselves. This Library General Public +License is intended to permit developers of non-free programs to +use free libraries, while preserving your freedom as a user of +such programs to change the free libraries that are incorporated +in them. (We have not seen how to achieve this as regards +changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is +that this will lead to faster development of free libraries.

    + +

    The precise terms and conditions for copying, distribution +and modification follow. Pay close attention to the difference +between a "work based on the libary" and a "work +that uses the library". The former contains code derived +from the library, while the latter only works together with the +library.

    + +

    Note that it is possible for a library to be covered by the +ordinary General Public License rather than by this special +one.

    + +

    TERMS AND CONDITIONS FOR COPYING, +DISTRIBUTION AND MODIFICATION

    + +

    0. This License Agreement applies to any +software library which contains a notice placed by the copyright +holder or other authorized party saying it may be distributed +under the terms of this Library General Public License (also +called "this License"). Each licensee is addressed as +"you". + +

    A "library" means a collection of software +functions and/or data prepared so as to be conveniently linked +with application programs (which use some of those functions and +data) to form executables.

    + +

    The "Library", below, refers to any such software +library or work which has been distributed under these terms. A +"work based on the Library" means either the Library +or any derivative work under copyright law: that is to say, a +work containing the Library or a portion of it, either verbatim +or with modifications and/or translated straightforwardly into +another language. (Hereinafter, translation is included without +limitation in the term "modification".)

    + +

    "Source code" for a work means the preferred form +of the work for making modifications to it. For a library, +complete source code means all the source code for all modules +it contains, plus any associated interface definition files, +plus the scripts used to control compilation and installation of +the library.

    + +

    Activities other than copying, distribution and modification +are not covered by this License; they are outside its scope. The +act of running a program using the Library is not restricted, +and output from such a program is covered only if its contents +constitute a work based on the Library (independent of the use +of the Library in a tool for writing it). Whether that is true +depends on what the Library does and what the program that uses +the Library does.

    + +

    1. You may copy and distribute verbatim +copies of the Library's complete source code as you receive it, +in any medium, provided that you conspicuously and appropriately +publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer +to this License and to the absence of any warranty; and +distribute a copy of this License along with the Library.

    + +

    You may charge a fee for the physical act of transferring a +copy, and you may at your option offer warranty protection in +exchange for a fee.

    + +

    2. You may modify your copy or copies of the +Library or any portion of it, thus forming a work based on the +Library, and copy and distribute such modifications or work +under the terms of Section 1 above, provided that you also meet +all of these conditions:

    + +
      + +

      a) The modified work must itself be + a software library. + +

      b) You must cause the files modified + to carry prominent notices stating that you changed the + files and the date of any change.

      + +

      c) You must cause the whole of the + work to be licensed at no charge to all third parties + under the terms of this License.

      + +

      d) If a facility in the modified + Library refers to a function or a table of data to be + supplied by an application program that uses the + facility, other than as an argument passed when the + facility is invoked, then you must make a good faith + effort to ensure that, in the event an application does + not supply such function or table, the facility still + operates, and performs whatever part of its purpose + remains meaningful.

      + +

      (For example, a function in a library to compute + square roots has a purpose that is entirely well-defined + independent of the application. Therefore, Subsection 2d + requires that any application-supplied function or table + used by this function must be optional: if the + application does not supply it, the square root function + must still compute square roots.)

      + +
    + +

    These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the +Library, and can be reasonably considered independent and +separate works in themselves, then this License, and its terms, +do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as +part of a whole which is a work based on the Library, the +distribution of the whole must be on the terms of this License, +whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote +it.

    + +

    Thus, it is not the intent of this section to claim rights or +contest your rights to work written entirely by you; rather, the +intent is to exercise the right to control the distribution of +derivative or collective works based on the Library.

    + +

    In addition, mere aggregation of another work not based on +the Library with the Library (or with a work based on the +Library) on a volume of a storage or distribution medium does +not bring the other work under the scope of this License.

    + +

    3. You may opt to apply the terms of the +ordinary GNU General Public License instead of this License to a +given copy of the Library. To do this, you must alter all the +notices that refer to this License, so that they refer to the +ordinary GNU General Public License, version 2, instead of to +this License. (If a newer version than version 2 of the ordinary +GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change +in these notices.

    + +

    Once this change is made in a given copy, it is irreversible +for that copy, so the ordinary GNU General Public License +applies to all subsequent copies and derivative works made from +that copy.

    + +

    This option is useful when you wish to copy part of the code +of the Library into a program that is not a library.

    + +

    4. You may copy and distribute the Library +(or a portion or derivative of it, under Section 2) in object +code or executable form under the terms of Sections 1 and 2 +above provided that you accompany it with the complete +corresponding machine-readable source code, which must be +distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange.

    + +

    If distribution of object code is made by offering access to +copy from a designated place, then offering equivalent access to +copy the source code from the same place satisfies the +requirement to distribute the source code, even though third +parties are not compelled to copy the source along with the +object code.

    + +

    5. A program that contains no derivative of +any portion of the Library, but is designed to work with the +Library by being compiled or linked with it, is called a +"work that uses the Library". Such a work, in +isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License.

    + +

    However, linking a "work that uses the Library" +with the Library creates an executable that is a derivative of +the Library (because it contains portions of the Library), +rather than a "work that uses the library". The +executable is therefore covered by this License. Section 6 +states terms for distribution of such executables.

    + +

    When a "work that uses the Library" uses material +from a header file that is part of the Library, the object code +for the work may be a derivative work of the Library even though +the source code is not. Whether this is true is especially +significant if the work can be linked without the Library, or if +the work is itself a library. The threshold for this to be true +is not precisely defined by law.

    + +

    If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small +inline functions (ten lines or less in length), then the use of +the object file is unrestricted, regardless of whether it is +legally a derivative work. (Executables containing this object +code plus portions of the Library will still fall under Section +6.)

    + +

    Otherwise, if the work is a derivative of the Library, you +may distribute the object code for the work under the terms of +Section 6. Any executables containing that work also fall under +Section 6, whether or not they are linked directly with the +Library itself.

    + +

    6. As an exception to the Sections above, +you may also compile or link a "work that uses the +Library" with the Library to produce a work containing +portions of the Library, and distribute that work under terms of +your choice, provided that the terms permit modification of the +work for the customer's own use and reverse engineering for +debugging such modifications.

    + +

    You must give prominent notice with each copy of the work +that the Library is used in it and that the Library and its use +are covered by this License. You must supply a copy of this +License. If the work during execution displays copyright +notices, you must include the copyright notice for the Library +among them, as well as a reference directing the user to the +copy of this License. Also, you must do one of these things:

    + +
      + + a) Accompany the work with the complete + corresponding machine-readable source code for the + Library including whatever changes were used in the work + (which must be distributed under Sections 1 and 2 + above); and, if the work is an executable linked with + the Library, with the complete machine-readable + "work that uses the Library", as object code + and/or source code, so that the user can modify the + Library and then relink to produce a modified executable + containing the modified Library. (It is understood that + the user who changes the contents of definitions files + in the Library will not necessarily be able to recompile + the application to use the modified definitions.) + +

      b) Accompany the work with a written + offer, valid for at least three years, to give the same + user the materials specified in Subsection 6a, above, + for a charge no more than the cost of performing this + distribution.

      + +

      c) If distribution of the work is + made by offering access to copy from a designated place, + offer equivalent access to copy the above specified + materials from the same place.

      + +

      d) Verify that the user has already + received a copy of these materials or that you have + already sent this user a copy.

      + +
    + +

    For an executable, the required form of the "work that +uses the Library" must include any data and utility +programs needed for reproducing the executable from it. However, +as a special exception, the source code distributed need not +include anything that is normally distributed (in either source +or binary form) with the major components (compiler, kernel, and +so on) of the operating system on which the executable runs, +unless that component itself accompanies the executable.

    + +

    It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you +cannot use both them and the Library together in an executable +that you distribute.

    + +

    7. You may place library facilities that are +a work based on the Library side-by-side in a single library +together with other library facilities not covered by this +License, and distribute such a combined library, provided that +the separate distribution of the work based on the Library and +of the other library facilities is otherwise permitted, and +provided that you do these two things:

    + +
      + + a) Accompany the combined library with + a copy of the same work based on the Library, uncombined + with any other library facilities. This must be + distributed under the terms of the Sections above. + +

      b) Give prominent notice with the + combined library of the fact that part of it is a work + based on the Library, and explaining where to find the + accompanying uncombined form of the same work.

      + +
    + +

    8. You may not copy, modify, sublicense, +link with, or distribute the Library except as expressly +provided under this License. Any attempt otherwise to copy, +modify, sublicense, link with, or distribute the Library is +void, and will automatically terminate your rights under this +License. However, parties who have received copies, or rights, +from you under this License will not have their licenses +terminated so long as such parties remain in full +compliance.

    + +

    9. You are not required to accept this +License, since you have not signed it. However, nothing else +grants you permission to modify or distribute the Library or its +derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing +the Library (or any work based on the Library), you indicate +your acceptance of this License to do so, and all its terms and +conditions for copying, distributing or modifying the Library or +works based on it.

    + +

    10. Each time you redistribute the Library +(or any work based on the Library), the recipient automatically +receives a license from the original licensor to copy, +distribute, link with or modify the Library subject to these +terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted +herein. You are not responsible for enforcing compliance by +third parties to this License.

    + +

    11. If, as a consequence of a court judgment +or allegation of patent infringement or for any other reason +(not limited to patent issues), conditions are imposed on you +(whether by court order, agreement or otherwise) that contradict +the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to +satisfy simultaneously your obligations under this License and +any other pertinent obligations, then as a consequence you may +not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the +Library by all those who receive copies directly or indirectly +through you, then the only way you could satisfy both it and +this License would be to refrain entirely from distribution of +the Library.

    + +

    If any portion of this section is held invalid or +unenforceable under any particular circumstance, the balance of +the section is intended to apply, and the section as a whole is +intended to apply in other circumstances.

    + +

    It is not the purpose of this section to induce you to +infringe any patents or other property right claims or to +contest validity of any such claims; this section has the sole +purpose of protecting the integrity of the free software +distribution system which is implemented by public license +practices. Many people have made generous contributions to the +wide range of software distributed through that system in +reliance on consistent application of that system; it is up to +the author/donor to decide if he or she is willing to distribute +software through any other system and a licensee cannot impose +that choice.

    + +

    This section is intended to make thoroughly clear what is +believed to be a consequence of the rest of this License.

    + +

    12. If the distribution and/or use of the +Library is restricted in certain countries either by patents or +by copyrighted interfaces, the original copyright holder who +places the Library under this License may add an explicit +geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not +thus excluded. In such case, this License incorporates the +limitation as if written in the body of this License.

    + +

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

    + +

    Each version is given a distinguishing version number. If the +Library specifies a version number of this License which applies +to it and "any later version", you have the option of +following the terms and conditions either of that version or of +any later version published by the Free Software Foundation. If +the Library does not specify a license version number, you may +choose any version ever published by the Free Software +Foundation.

    + +

    14. If you wish to incorporate parts of the +Library into other free programs whose distribution conditions +are incompatible with these, write to the author to ask for +permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we +sometimes make exceptions for this. Our decision will be guided +by the two goals of preserving the free status of all +derivatives of our free software and of promoting the sharing +and reuse of software generally.

    + +

    NO WARRANTY

    + +

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

    + +

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

    + +

    END OF TERMS AND CONDITIONS

    + +

    How to Apply These Terms to Your New Libraries

    + +

    If you develop a new library, and you want it to be of the +greatest possible use to the public, we recommend making it free +software that everyone can redistribute and change. You can do so +by permitting redistribution under these terms (or, alternatively, +under the terms of the ordinary General Public License). + +

    To apply these terms, attach the following notices to the +library. It is safest to attach them to the start of each source +file to most effectively convey the exclusion of warranty; and each +file should have at least the "copyright" line and a pointer to +where the full notice is found. + +

      + +

      one line to give the library's name and an idea of what it +does.
      +Copyright (C) year name of author + +

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

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

      You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA + +

    + +

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

    You should also get your employer (if you work as a programmer) +or your school, if any, to sign a "copyright disclaimer" for the +library, if necessary. Here is a sample; alter the names: + +

      + +

      Yoyodyne, Inc., hereby disclaims all copyright interest in the +library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + +

      signature of Ty Coon, 1 April 1990 Ty Coon, President +of Vice + +

    + +

    That's all there is to it! + + + diff --git a/lib/libmxml/doc/makedocs.sh b/lib/libmxml/doc/makedocs.sh new file mode 100644 index 0000000..f072ea8 --- /dev/null +++ b/lib/libmxml/doc/makedocs.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Script to make documentation... +# +# Copyright 2003-2010 by Michael R Sweet. +# +# These coded instructions, statements, and computer programs are the +# property of Michael R Sweet and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "COPYING" +# which should have been included with this file. If this file is +# missing or damaged, see the license at: +# +# https://michaelrsweet.github.io/mxml +# + +htmldoc --verbose --path "hires;." --batch mxml.book -f mxml.pdf + +htmldoc --verbose --batch mxml.book --no-title -f mxml.html + +rm -rf mxml.d +mkdir mxml.d +htmldoc --verbose --batch mxml.book --no-title -t html -d mxml.d diff --git a/lib/libmxml/doc/mxml-cover.jpg b/lib/libmxml/doc/mxml-cover.jpg new file mode 100644 index 0000000..f89cfd8 Binary files /dev/null and b/lib/libmxml/doc/mxml-cover.jpg differ diff --git a/lib/libmxml/doc/mxml-cover.opacity b/lib/libmxml/doc/mxml-cover.opacity new file mode 100644 index 0000000..c635102 Binary files /dev/null and b/lib/libmxml/doc/mxml-cover.opacity differ diff --git a/lib/libmxml/doc/mxml-cover.png b/lib/libmxml/doc/mxml-cover.png new file mode 100644 index 0000000..7260385 Binary files /dev/null and b/lib/libmxml/doc/mxml-cover.png differ diff --git a/lib/libmxml/doc/mxml.book b/lib/libmxml/doc/mxml.book new file mode 100644 index 0000000..2ca502c --- /dev/null +++ b/lib/libmxml/doc/mxml.book @@ -0,0 +1,10 @@ +#HTMLDOC 1.8.30 +-t pdf14 -f "mxml.pdf" --book --toclevels 3 --no-numbered --toctitle "Table of Contents" --title --titleimage "title.html" --linkstyle plain --size 4.25x6.875in --left 0.750in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --header1 ... --footer h.1 --nup 1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=95 --fontsize 9.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Helvetica --headfootsize 8.0 --headfootfont Helvetica-Oblique --charset iso-8859-1 --links --embedfonts --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 300 --no-strict --no-overflow +intro.html +install.html +basics.html +advanced.html +mxmldoc.html +license.html +reference.html +schema.html diff --git a/lib/libmxml/doc/mxml.html b/lib/libmxml/doc/mxml.html new file mode 100644 index 0000000..e54fc02 --- /dev/null +++ b/lib/libmxml/doc/mxml.html @@ -0,0 +1,3920 @@ + + + +Mini-XML Programmers Manual, Version 2.11 + + + + + + +

    Table of Contents

    +
    +
    Introduction + +Chapter 1 - Building, Installing, and Packaging + Mini-XML + +Chapter 2 - Getting Started with Mini-XML + +Chapter 3 - More Mini-XML Programming Techniques + + +Chapter 4 - Using the mxmldoc Utility + +Appendix A - Mini-XML License +
    +
    Appendix B - Library Reference + +Appendix C - XML Schema +
      +
      +

      Introduction

      +

      This programmers manual describes Mini-XML version 2.11, a small XML + parsing library that you can use to read and write XML data files in + your C and C++ applications.

      +

      Mini-XML was initially developed for the +Gutenprint project to replace the rather large and unwieldy +libxml2 library with something substantially smaller and + easier-to-use. It all began one morning in June of 2003 when Robert + posted the following sentence to the developer's list:

      +
      It's bad enough that we require libxml2, but rolling our + own XML parser is a bit more than we can handle.
      +

      I then replied with:

      +
      Given the limited scope of what you use in XML, it + should be trivial to code a mini-XML API in a few hundred lines of + code.
      +

      I took my own challenge and coded furiously for two days to produced + the initial public release of Mini-XML, total lines of code: 696. + Robert promptly integrated Mini-XML into Gutenprint and removed + libxml2.

      +

      Thanks to lots of feedback and support from various developers, + Mini-XML has evolved since then to provide a more complete XML + implementation and now stands at a whopping 3,792 lines of code, + compared to 140,410 lines of code for libxml2 version 2.9.1.

      +

      Aside from Gutenprint, Mini-XML is used for the following + projects/software applications:

      + +

      Please file a bug on Github if you would like your project added or + removed from this list, or if you have any comments/quotes you would + like me to publish about your experiences with Mini-XML.

      + + +

      Organization of This Document

      +

      This manual is organized into the following chapters and appendices:

      + + + +

      Notation Conventions

      +

      Various font and syntax conventions are used in this guide. Examples + and their meanings and uses are explained below:

      +
      +
      mxmldoc +
      mxmldoc(1)
      +
      The names of commands; the first mention of a command or function in + a chapter is followed by a manual page section number. +
      +
      +
      /var +
      /etc/hosts
      +
      File and directory names. +
      +
      +
      Request ID is Printer-123
      +
      Screen output. +
      +
      +
      lp -d printer filename ENTER
      +
      Literal user input; special keys like ENTER are in ALL + CAPS. +
      +
      +
      12.3
      +
      Numbers in the text are written using the period (.) to indicate the + decimal point. +
      +
      +
      + + +

      Abbreviations

      +

      The following abbreviations are used throughout this manual:

      +
      +
      Gb
      +
      Gigabytes, or 1073741824 bytes +
      +
      +
      kb
      +
      Kilobytes, or 1024 bytes +
      +
      +
      Mb
      +
      Megabytes, or 1048576 bytes +
      +
      +
      UTF-8, UTF-16
      +
      Unicode Transformation Format, 8-bit or 16-bit +
      +
      +
      W3C
      +
      World Wide Web Consortium +
      +
      +
      XML
      +
      Extensible Markup Language +
      +
      +
      + + +

      Other References

      +
      +
      The Unicode Standard, Version 4.0, Addison-Wesley, ISBN + 0-321-18578-1
      +
      The definition of the Unicode character set which is used for XML. +
      +
      +
      Extensible + Markup Language (XML) 1.0 (Third Edition)
      +
      The XML specification from the World Wide Web Consortium (W3C) +
      +
      +
      + + +

      Legal Stuff

      +

      The Mini-XML library is copyright 2003-2017 by Michael R Sweet. + License terms are described in Appendix A - Mini-XML + License.

      +
      +

      Chapter 1 - Building, Installing, + and Packaging Mini-XML

      +

      This chapter describes how to build, install, and package Mini-XML on + your system from the source archive. You will need an ANSI/ISO-C + compatible compiler to build Mini-XML - GCC works, as do most vendors' + C compilers. If you are building Mini-XML on Windows, we recommend + using the Visual C++ environment with the supplied solution file. For + other operating systems, you'll need a POSIX-compatible shell and +make program in addition to the C compiler.

      +

      Compiling Mini-XML

      +

      Mini-XML comes with both an autoconf-based configure script and a + Visual C++ solution that can be used to compile the library and + associated tools.

      +

      Compiling with Visual C++

      +

      Open the mxml.sln solution in the vcnet folder. + Choose the desired build configuration, "Debug" (the default) or + "Release", and then choose Build Solution from the + Build menu.

      +

      Compiling with Command-Line Tools

      +

      Type the following command to configure the Mini-XML source code for + your system:

      +
      +    ./configure ENTER
      +
      +

      The default install prefix is /usr/local, which can be + overridden using the --prefix option:

      +
      +    ./configure --prefix=/foo ENTER
      +
      +

      Other configure options can be found using the --help + option:

      +
      +    ./configure --help ENTER
      +
      +

      Once you have configured the software, use the make(1) + program to do the build and run the test program to verify that things + are working, as follows:

      +
      +    make ENTER
      +
      +

      Installing Mini-XML

      +

      If you are using Visual C++, copy the mxml.lib and and + mxml.h files to the Visual C++ lib and include + directories, respectively.

      +

      Otherwise, use the make command with the install + target to install Mini-XML in the configured directories:

      +
      +    make install ENTER
      +
      +

      Creating Mini-XML Packages

      +

      Mini-XML includes two files that can be used to create binary + packages. The first file is mxml.spec which is used by the +rpmbuild(8) software to create Red Hat Package Manager ("RPM") + packages which are commonly used on Linux. Since rpmbuild + wants to compile the software on its own, you can provide it with the + Mini-XML tar file to build the package:

      +
      +    rpmbuild -ta mxml-version.tar.gz ENTER
      +
      +

      The second file is mxml.list which is used by the +epm(1) program to create software packages in a variety of formats. + The epm program is available from the following URL:

      +
      +    http://www.epmhome.org/
      +
      +

      Use the make command with the epm target to + create portable and native packages for your system:

      +
      +    make epm ENTER
      +
      +

      The packages are stored in a subdirectory named dist for + your convenience. The portable packages utilize scripts and tar files + to install the software on the target system. After extracting the + package archive, use the mxml.install script to install the + software.

      +

      The native packages will be in the local OS's native format: RPM for + Red Hat Linux, DPKG for Debian Linux, PKG for Solaris, and so forth. + Use the corresponding commands to install the native packages.

      +
      +

      Chapter 2 - Getting Started with + Mini-XML

      +

      This chapter describes how to write programs that use Mini-XML to + access data in an XML file. Mini-XML provides the following + functionality:

      +
        +
      • Functions for creating and managing XML documents in memory.
      • +
      • Reading of UTF-8 and UTF-16 encoded XML files and strings.
      • +
      • Writing of UTF-8 encoded XML files and strings.
      • +
      • Support for arbitrary element names, attributes, and attribute + values with no preset limits, just available memory.
      • +
      • Support for integer, real, opaque ("CDATA"), and text data types in + "leaf" nodes.
      • +
      • "Find", "index", and "walk" functions for easily accessing data in + an XML document.
      • +
      +

      Mini-XML doesn't do validation or other types of processing on the + data based upon schema files or other sources of definition + information, nor does it support character entities other than those + required by the XML specification.

      +

      The Basics

      +

      Mini-XML provides a single header file which you include:

      +
      +    #include <mxml.h>
      +
      +

      The Mini-XML library is included with your program using the +-lmxml option:

      +
      +    gcc -o myprogram myprogram.c -lmxml ENTER
      +
      +

      If you have the pkg-config(1) software installed, you can + use it to determine the proper compiler and linker options for your + installation:

      +
      +    pkg-config --cflags mxml ENTER
      +    pkg-config --libs mxml ENTER
      +
      +

      Nodes

      +

      Every piece of information in an XML file is stored in memory in + "nodes". Nodes are defined by the +mxml_node_t structure. Each node has a typed value, optional + user data, a parent node, sibling nodes (previous and next), and + potentially child nodes.

      +

      For example, if you have an XML file like the following:

      +
      +    <?xml version="1.0" encoding="utf-8"?>
      +    <data>
      +        <node>val1</node>
      +        <node>val2</node>
      +        <node>val3</node>
      +        <group>
      +            <node>val4</node>
      +            <node>val5</node>
      +            <node>val6</node>
      +        </group>
      +        <node>val7</node>
      +        <node>val8</node>
      +    </data>
      +
      +

      the node tree for the file would look like the following in memory:

      +
      +    ?xml version="1.0" encoding="utf-8"?
      +      |
      +    data
      +      |
      +    node - node - node - group - node - node
      +      |      |      |      |       |      |
      +    val1   val2   val3     |     val7   val8
      +                           |
      +                         node - node - node
      +                           |      |      |
      +                         val4   val5   val6
      +
      +

      where "-" is a pointer to the sibling node and "|" is a pointer to + the first child or parent node.

      +

      The mxmlGetType function gets the + type of a node, one of MXML_CUSTOM, MXML_ELEMENT, +MXML_INTEGER, MXML_OPAQUE, MXML_REAL, or +MXML_TEXT. The parent and sibling nodes are accessed using the +mxmlGetParent, mxmlGetNext +, and mxmlGetPrevious functions. + The mxmlGetUserData function + gets any user data associated with the node.

      +

      CDATA Nodes

      +

      CDATA (MXML_ELEMENT) nodes are created using the +mxmlNewCDATA function. The +mxmlGetCDATA function retrieves the CDATA string pointer for a + node.

      +
      Note: +

      CDATA nodes are currently stored in memory as special elements. This + will be changed in a future major release of Mini-XML.

      +
      +

      Custom Nodes

      +

      Custom (MXML_CUSTOM) nodes are created using the +mxmlNewCustom function or using a custom load callback + specified using the +mxmlSetCustomHandlers function. The +mxmlGetCustom function retrieves the custom value pointer for a + node.

      +

      Comment Nodes

      +

      Comment (MXML_ELEMENT) nodes are created using the +mxmlNewElement function. The +mxmlGetElement function retrieves the comment string pointer + for a node, including the surrounding "!--" and "--" characters.

      +
      Note: +

      Comment nodes are currently stored in memory as special elements. + This will be changed in a future major release of Mini-XML.

      +
      +

      Element Nodes

      +

      Element (MXML_ELEMENT) nodes are created using the +mxmlNewElement function. The +mxmlGetElement function retrieves the element name, the +mxmlElementGetAttr function retrieves the value string for + a named attribute associated with the element, and the +mxmlGetFirstChild and +mxmlGetLastChild functions retrieve the first and last child + nodes for the element, respectively.

      +

      Integer Nodes

      +

      Integer (MXML_INTEGER) nodes are created using the +mxmlNewInteger function. The +mxmlGetInteger function retrieves the integer value for a node.

      +

      Opaque Nodes

      +

      Opaque (MXML_OPAQUE) nodes are created using the +mxmlNewOpaque function. The +mxmlGetOpaque function retrieves the opaque string pointer for + a node. Opaque nodes are like string nodes but preserve all whitespace + between nodes.

      +

      Text Nodes

      +

      Text (MXML_TEXT) nodes are created using the +mxmlNewText and mxmlNewTextf + functions. Each text node consists of a text string and (leading) + whitespace value - the mxmlGetText + function retrieves the text string pointer and whitespace value for a + node.

      + + +

      Processing Instruction Nodes

      +

      Processing instruction (MXML_ELEMENT) nodes are created + using the mxmlNewElement + function. The mxmlGetElement + function retrieves the processing instruction string for a node, + including the surrounding "?" characters.

      +
      Note: +

      Processing instruction nodes are currently stored in memory as + special elements. This will be changed in a future major release of + Mini-XML.

      +
      +

      Real Number Nodes

      +

      Real number (MXML_REAL) nodes are created using the +mxmlNewReal function. The +mxmlGetReal function retrieves the CDATA string pointer for a + node.

      + + +

      XML Declaration Nodes

      +

      XML declaration (MXML_ELEMENT) nodes are created using the mxmlNewXML function. The +mxmlGetElement function retrieves the XML declaration + string for a node, including the surrounding "?" characters.

      +
      Note: +

      XML declaration nodes are currently stored in memory as special + elements. This will be changed in a future major release of Mini-XML.

      +
      + +

      Creating XML Documents

      +

      You can create and update XML documents in memory using the various +mxmlNew functions. The following code will create the XML document + described in the previous section:

      +
      +    mxml_node_t *xml;    /* <?xml ... ?> */
      +    mxml_node_t *data;   /* <data> */
      +    mxml_node_t *node;   /* <node> */
      +    mxml_node_t *group;  /* <group> */
      +
      +    xml = mxmlNewXML("1.0");
      +
      +    data = mxmlNewElement(xml, "data");
      +
      +        node = mxmlNewElement(data, "node");
      +        mxmlNewText(node, 0, "val1");
      +        node = mxmlNewElement(data, "node");
      +        mxmlNewText(node, 0, "val2");
      +        node = mxmlNewElement(data, "node");
      +        mxmlNewText(node, 0, "val3");
      +
      +        group = mxmlNewElement(data, "group");
      +
      +            node = mxmlNewElement(group, "node");
      +            mxmlNewText(node, 0, "val4");
      +            node = mxmlNewElement(group, "node");
      +            mxmlNewText(node, 0, "val5");
      +            node = mxmlNewElement(group, "node");
      +            mxmlNewText(node, 0, "val6");
      +
      +        node = mxmlNewElement(data, "node");
      +        mxmlNewText(node, 0, "val7");
      +        node = mxmlNewElement(data, "node");
      +        mxmlNewText(node, 0, "val8");
      +
      + + +

      We start by creating the declaration node common to all XML files + using the mxmlNewXML function:

      +
      +    xml = mxmlNewXML("1.0");
      +
      +

      We then create the <data> node used for this document using + the mxmlNewElement function. The + first argument specifies the parent node (xml) while the + second specifies the element name (data):

      +
      +    data = mxmlNewElement(xml, "data");
      +
      +

      Each <node>...</node> in the file is created using the +mxmlNewElement and mxmlNewText + functions. The first argument of mxmlNewText specifies the + parent node (node). The second argument specifies whether + whitespace appears before the text - 0 or false in this case. The last + argument specifies the actual text to add:

      +
      +    node = mxmlNewElement(data, "node");
      +    mxmlNewText(node, 0, "val1");
      +
      +

      The resulting in-memory XML document can then be saved or processed + just like one loaded from disk or a string.

      + + +

      Loading XML

      +

      You load an XML file using the +mxmlLoadFile function:

      +
      +    FILE *fp;
      +    mxml_node_t *tree;
      +
      +    fp = fopen("filename.xml", "r");
      +    tree = mxmlLoadFile(NULL, fp,
      +                        MXML_TEXT_CALLBACK);
      +    fclose(fp);
      +
      +

      The first argument specifies an existing XML parent node, if any. + Normally you will pass NULL for this argument unless you are + combining multiple XML sources. The XML file must contain a complete + XML document including the ?xml element if the parent node is +NULL.

      +

      The second argument specifies the stdio file to read from, as opened + by fopen() or popen(). You can also use stdin + if you are implementing an XML filter program.

      +

      The third argument specifies a callback function which returns the + value type of the immediate children for a new element node: +MXML_CUSTOM, MXML_IGNORE, MXML_INTEGER, +MXML_OPAQUE, MXML_REAL, or MXML_TEXT. Load + callbacks are described in detail in Chapter + 3. The example code uses the MXML_TEXT_CALLBACK constant + which specifies that all data nodes in the document contain + whitespace-separated text values. Other standard callbacks include +MXML_IGNORE_CALLBACK, MXML_INTEGER_CALLBACK, +MXML_OPAQUE_CALLBACK, and MXML_REAL_CALLBACK.

      +

      The mxmlLoadString function + loads XML node trees from a string:

      + + +
      +    char buffer[8192];
      +    mxml_node_t *tree;
      +
      +    ...
      +    tree = mxmlLoadString(NULL, buffer,
      +                          MXML_TEXT_CALLBACK);
      +
      +

      The first and third arguments are the same as used for +mxmlLoadFile(). The second argument specifies the string or + character buffer to load and must be a complete XML document including + the ?xml element if the parent node is NULL.

      + + +

      Saving XML

      +

      You save an XML file using the +mxmlSaveFile function:

      +
      +    FILE *fp;
      +    mxml_node_t *tree;
      +
      +    fp = fopen("filename.xml", "w");
      +    mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
      +    fclose(fp);
      +
      +

      The first argument is the XML node tree to save. It should normally + be a pointer to the top-level ?xml node in your XML document.

      +

      The second argument is the stdio file to write to, as opened by +fopen() or popen(). You can also use stdout if + you are implementing an XML filter program.

      +

      The third argument is the whitespace callback to use when saving the + file. Whitespace callbacks are covered in detail in +Chapter 3. The previous example code uses the MXML_NO_CALLBACK + constant to specify that no special whitespace handling is required.

      +

      The mxmlSaveAllocString, + and mxmlSaveString functions + save XML node trees to strings:

      +
      +    char buffer[8192];
      +    char *ptr;
      +    mxml_node_t *tree;
      +
      +    ...
      +    mxmlSaveString(tree, buffer, sizeof(buffer),
      +                   MXML_NO_CALLBACK);
      +
      +    ...
      +    ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
      +
      +

      The first and last arguments are the same as used for +mxmlSaveFile(). The mxmlSaveString function takes pointer + and size arguments for saving the XML document to a fixed-size buffer, + while mxmlSaveAllocString() returns a string buffer that was + allocated using malloc().

      + + +

      Controlling Line Wrapping

      +

      When saving XML documents, Mini-XML normally wraps output lines at + column 75 so that the text is readable in terminal windows. The +mxmlSetWrapMargin function overrides the default wrap + margin:

      +
      +    /* Set the margin to 132 columns */
      +    mxmlSetWrapMargin(132);
      +
      +    /* Disable wrapping */
      +    mxmlSetWrapMargin(0);
      +
      +

      Memory Management

      +

      Once you are done with the XML data, use the +mxmlDelete function to recursively free the memory that is used + for a particular node or the entire tree:

      +
      +    mxmlDelete(tree);
      +
      +

      You can also use reference counting to manage memory usage. The +mxmlRetain and mxmlRelease + functions increment and decrement a node's use count, respectively. + When the use count goes to 0, mxmlRelease will automatically + call mxmlDelete to actually free the memory used by the node + tree. New nodes automatically start with a use count of 1.

      + + +

      Finding and Iterating Nodes

      +

      The mxmlWalkPrev and +mxmlWalkNextfunctions can be used to iterate through the + XML node tree:

      +
      +    mxml_node_t *node;
      +
      +    node = mxmlWalkPrev(current, tree,
      +                        MXML_DESCEND);
      +
      +    node = mxmlWalkNext(current, tree,
      +                        MXML_DESCEND);
      +
      +

      In addition, you can find a named element/node using the +mxmlFindElement function:

      +
      +    mxml_node_t *node;
      +
      +    node = mxmlFindElement(tree, tree, "name",
      +                           "attr", "value",
      +                           MXML_DESCEND);
      +
      +

      The name, attr, and value arguments can be + passed as NULL to act as wildcards, e.g.:

      + + +
      +    /* Find the first "a" element */
      +    node = mxmlFindElement(tree, tree, "a",
      +                           NULL, NULL,
      +                           MXML_DESCEND);
      +
      + + +
      +    /* Find the first "a" element with "href"
      +       attribute */
      +    node = mxmlFindElement(tree, tree, "a",
      +                           "href", NULL,
      +                           MXML_DESCEND);
      +
      + + +
      +    /* Find the first "a" element with "href"
      +       to a URL */
      +    node = mxmlFindElement(tree, tree, "a",
      +                           "href",
      +                           "http://www.easysw.com/",
      +                           MXML_DESCEND);
      +
      + + +
      +    /* Find the first element with a "src"
      +       attribute */
      +    node = mxmlFindElement(tree, tree, NULL,
      +                           "src", NULL,
      +                           MXML_DESCEND);
      +
      + + +
      +    /* Find the first element with a "src"
      +       = "foo.jpg" */
      +    node = mxmlFindElement(tree, tree, NULL,
      +                           "src", "foo.jpg",
      +                           MXML_DESCEND);
      +
      +

      You can also iterate with the same function:

      +
      +    mxml_node_t *node;
      +
      +    for (node = mxmlFindElement(tree, tree,
      +                                "name",
      +                                NULL, NULL,
      +                                MXML_DESCEND);
      +         node != NULL;
      +         node = mxmlFindElement(node, tree,
      +                                "name",
      +                                NULL, NULL,
      +                                MXML_DESCEND))
      +    {
      +      ... do something ...
      +    }
      +
      + + +

      The MXML_DESCEND argument can actually be one of three + constants:

      +
        +
      • MXML_NO_DESCEND means to not to look at any child nodes in + the element hierarchy, just look at siblings at the same level or + parent nodes until the top node or top-of-tree is reached. +

        The previous node from "group" would be the "node" element to the + left, while the next node from "group" would be the "node" element to + the right. +
        +

        +
      • +
      • MXML_DESCEND_FIRST means that it is OK to descend to the + first child of a node, but not to descend further when searching. + You'll normally use this when iterating through direct children of a + parent node, e.g. all of the "node" and "group" elements under the + "?xml" parent node in the example above. +

        This mode is only applicable to the search function; the walk + functions treat this as MXML_DESCEND since every call is a + first time. +
        +

        +
      • +
      • MXML_DESCEND means to keep descending until you hit the + bottom of the tree. The previous node from "group" would be the "val3" + node and the next node would be the first node element under "group". +

        If you were to walk from the root node "?xml" to the end of the tree + with mxmlWalkNext(), the order would be:

        +

        ?xml data node val1 node val2 node val3 group node val4 node val5 + node val6 node val7 node val8

        +

        If you started at "val8" and walked using mxmlWalkPrev(), + the order would be reversed, ending at "?xml".

        +
      • +
      +

      Finding Specific Nodes

      +

      You can find specific nodes in the tree using the +mxmlFindPath, for example:

      +
      +    mxml_node_t *value;
      +
      +    value = mxmlFindPath(tree, "path/to/*/foo/bar");
      +
      +

      The second argument is a "path" to the parent node. Each component of + the path is separated by a slash (/) and represents a named element in + the document tree or a wildcard (*) path representing 0 or more + intervening nodes.

      +
      +

      Chapter 3 - More Mini-XML + Programming Techniques

      +

      This chapter shows additional ways to use the Mini-XML library in + your programs.

      +

      Load Callbacks

      +

      Chapter 2 introduced the +mxmlLoadFile() and +mxmlLoadString() functions. The last argument to these + functions is a callback function which is used to determine the value + type of each data node in an XML document.

      +

      Mini-XML defines several standard callbacks for simple XML data + files:

      +
        +
      • MXML_INTEGER_CALLBACK - All data nodes contain + whitespace-separated integers.
      • +
      • MXML_OPAQUE_CALLBACK - All data nodes contain opaque + strings ("CDATA").
      • +
      • MXML_REAL_CALLBACK - All data nodes contain + whitespace-separated floating-point numbers.
      • +
      • MXML_TEXT_CALLBACK - All data nodes contain + whitespace-separated strings.
      • +
      +

      You can provide your own callback functions for more complex XML + documents. Your callback function will receive a pointer to the current + element node and must return the value type of the immediate children + for that element node: MXML_INTEGER, MXML_OPAQUE, +MXML_REAL, or MXML_TEXT. The function is called after + the element and its attributes have been read, so you can look at the + element name, attributes, and attribute values to determine the proper + value type to return.

      + + +

      The following callback function looks for an attribute named "type" + or the element name to determine the value type for its child nodes:

      +
      +    mxml_type_t
      +    type_cb(mxml_node_t *node)
      +    {
      +      const char *type;
      +
      +     /*
      +      * You can lookup attributes and/or use the
      +      * element name, hierarchy, etc...
      +      */
      +
      +      type = mxmlElementGetAttr(node, "type");
      +      if (type == NULL)
      +	type = mxmlGetElement(node);
      +
      +      if (!strcmp(type, "integer"))
      +	return (MXML_INTEGER);
      +      else if (!strcmp(type, "opaque"))
      +	return (MXML_OPAQUE);
      +      else if (!strcmp(type, "real"))
      +	return (MXML_REAL);
      +      else
      +	return (MXML_TEXT);
      +    }
      +
      +

      To use this callback function, simply use the name when you call any + of the load functions:

      +
      +    FILE *fp;
      +    mxml_node_t *tree;
      +
      +    fp = fopen("filename.xml", "r");
      +    tree = mxmlLoadFile(NULL, fp, type_cb);
      +    fclose(fp);
      +
      +

      Save Callbacks

      +

      Chapter 2 also introduced the +mxmlSaveFile(), +mxmlSaveString(), and +mxmlSaveAllocString() functions. The last argument to these + functions is a callback function which is used to automatically insert + whitespace in an XML document.

      +

      Your callback function will be called up to four times for each + element node with a pointer to the node and a "where" value of +MXML_WS_BEFORE_OPEN, MXML_WS_AFTER_OPEN, +MXML_WS_BEFORE_CLOSE, or MXML_WS_AFTER_CLOSE. The callback + function should return NULL if no whitespace should be added + and the string to insert (spaces, tabs, carriage returns, and newlines) + otherwise.

      +

      The following whitespace callback can be used to add whitespace to + XHTML output to make it more readable in a standard text editor:

      +
      +    const char *
      +    whitespace_cb(mxml_node_t *node,
      +                  int where)
      +    {
      +      const char *name;
      +
      +     /*
      +      * We can conditionally break to a new line
      +      * before or after any element. These are
      +      * just common HTML elements...
      +      */
      +
      +      name = mxmlGetElement(node);
      +
      +      if (!strcmp(name, "html") ||
      +          !strcmp(name, "head") ||
      +          !strcmp(name, "body") ||
      +	  !strcmp(name, "pre") ||
      +          !strcmp(name, "p") ||
      +	  !strcmp(name, "h1") ||
      +          !strcmp(name, "h2") ||
      +          !strcmp(name, "h3") ||
      +	  !strcmp(name, "h4") ||
      +          !strcmp(name, "h5") ||
      +          !strcmp(name, "h6"))
      +      {
      +       /*
      +	* Newlines before open and after
      +        * close...
      +	*/
      +
      +	if (where == MXML_WS_BEFORE_OPEN ||
      +            where == MXML_WS_AFTER_CLOSE)
      +	  return ("\n");
      +      }
      +      else if (!strcmp(name, "dl") ||
      +               !strcmp(name, "ol") ||
      +               !strcmp(name, "ul"))
      +      {
      +       /*
      +	* Put a newline before and after list
      +        * elements...
      +	*/
      +
      +	return ("\n");
      +      }
      +      else if (!strcmp(name, "dd") ||
      +               !strcmp(name, "dt") ||
      +               !strcmp(name, "li"))
      +      {
      +       /*
      +	* Put a tab before <li>'s, * <dd>'s,
      +        * and <dt>'s, and a newline after them...
      +	*/
      +
      +	if (where == MXML_WS_BEFORE_OPEN)
      +	  return ("\t");
      +	else if (where == MXML_WS_AFTER_CLOSE)
      +	  return ("\n");
      +      }
      +
      +     /*
      +      * Return NULL for no added whitespace...
      +      */
      +
      +      return (NULL);
      +    }
      +
      +

      To use this callback function, simply use the name when you call any + of the save functions:

      +
      +    FILE *fp;
      +    mxml_node_t *tree;
      +
      +    fp = fopen("filename.xml", "w");
      +    mxmlSaveFile(tree, fp, whitespace_cb);
      +    fclose(fp);
      +
      + + +

      Custom Data Types

      +

      Mini-XML supports custom data types via global load and save + callbacks. Only a single set of callbacks can be active at any time, + however your callbacks can store additional information in order to + support multiple custom data types as needed. The MXML_CUSTOM + node type identifies custom data nodes.

      +

      The load callback receives a pointer to the current data node and a + string of opaque character data from the XML source with character + entities converted to the corresponding UTF-8 characters. For example, + if we wanted to support a custom date/time type whose value is encoded + as "yyyy-mm-ddThh:mm:ssZ" (ISO format), the load callback would look + like the following:

      +
      +    typedef struct
      +    {
      +      unsigned      year,    /* Year */
      +                    month,   /* Month */
      +                    day,     /* Day */
      +                    hour,    /* Hour */
      +                    minute,  /* Minute */
      +                    second;  /* Second */
      +      time_t        unix;    /* UNIX time */
      +    } iso_date_time_t;
      +
      +    int
      +    load_custom(mxml_node_t *node,
      +                const char *data)
      +    {
      +      iso_date_time_t *dt;
      +      struct tm tmdata;
      +
      +     /*
      +      * Allocate data structure...
      +      */
      +
      +      dt = calloc(1, sizeof(iso_date_time_t));
      +
      +     /*
      +      * Try reading 6 unsigned integers from the
      +      * data string...
      +      */
      +
      +      if (sscanf(data, "%u-%u-%uT%u:%u:%uZ",
      +                 &(dt->year), &(dt->month),
      +                 &(dt->day), &(dt->hour),
      +                 &(dt->minute),
      +                 &(dt->second)) != 6)
      +      {
      +       /*
      +        * Unable to read numbers, free the data
      +        * structure and return an error...
      +        */
      +
      +        free(dt);
      +
      +        return (-1);
      +      }
      +
      +     /*
      +      * Range check values...
      +      */
      +
      +      if (dt->month <1 || dt->month > 12 ||
      +          dt->day  <1 || dt->day > 31 ||
      +          dt->hour  <0 || dt->hour > 23 ||
      +          dt->minute  <0 || dt->minute > 59 ||
      +          dt->second  <0 || dt->second > 59)
      +      {
      +       /*
      +        * Date information is out of range...
      +        */
      +
      +        free(dt);
      +
      +        return (-1);
      +      }
      +
      +     /*
      +      * Convert ISO time to UNIX time in
      +      * seconds...
      +      */
      +
      +      tmdata.tm_year = dt->year - 1900;
      +      tmdata.tm_mon  = dt->month - 1;
      +      tmdata.tm_day  = dt->day;
      +      tmdata.tm_hour = dt->hour;
      +      tmdata.tm_min  = dt->minute;
      +      tmdata.tm_sec  = dt->second;
      +
      +      dt->unix = gmtime(&tmdata);
      +
      +     /*
      +      * Assign custom node data and destroy
      +      * function pointers...
      +      */
      +
      +      mxmlSetCustom(node, data, destroy);
      +
      +     /*
      +      * Return with no errors...
      +      */
      +
      +      return (0);
      +    }
      +
      +

      The function itself can return 0 on success or -1 if it is unable to + decode the custom data or the data contains an error. Custom data nodes + contain a void pointer to the allocated custom data for the + node and a pointer to a destructor function which will free the custom + data when the node is deleted.

      + + +

      The save callback receives the node pointer and returns an allocated + string containing the custom data value. The following save callback + could be used for our ISO date/time type:

      +
      +    char *
      +    save_custom(mxml_node_t *node)
      +    {
      +      char data[255];
      +      iso_date_time_t *dt;
      +
      +
      +      dt = (iso_date_time_t *)mxmlGetCustom(node);
      +
      +      snprintf(data, sizeof(data),
      +               "%04u-%02u-%02uT%02u:%02u:%02uZ",
      +               dt->year, dt->month, dt->day,
      +               dt->hour, dt->minute, dt->second);
      +
      +      return (strdup(data));
      +    }
      +
      +

      You register the callback functions using the +mxmlSetCustomHandlers() function:

      +
      +    mxmlSetCustomHandlers(load_custom,
      +                          save_custom);
      +
      + + +

      Changing Node Values

      +

      All of the examples so far have concentrated on creating and loading + new XML data nodes. Many applications, however, need to manipulate or + change the nodes during their operation, so Mini-XML provides functions + to change node values safely and without leaking memory.

      +

      Existing nodes can be changed using the +mxmlSetElement(), +mxmlSetInteger(), mxmlSetOpaque() +, mxmlSetReal(), +mxmlSetText(), and +mxmlSetTextf() functions. For example, use the following + function call to change a text node to contain the text "new" with + leading whitespace:

      +
      +    mxml_node_t *node;
      +
      +    mxmlSetText(node, 1, "new");
      +
      +

      Formatted Text

      +

      The mxmlNewTextf() and +mxmlSetTextf() functions create and change text nodes, + respectively, using printf-style format strings and arguments. + For example, use the following function call to create a new text node + containing a constructed filename:

      +
      +    mxml_node_t *node;
      +
      +    node = mxmlNewTextf(node, 1, "%s/%s",
      +                        path, filename);
      +
      +

      Indexing

      +

      Mini-XML provides functions for managing indices of nodes. The + current implementation provides the same functionality as +mxmlFindElement(). The advantage of using an index is that + searching and enumeration of elements is significantly faster. The only + disadvantage is that each index is a static snapshot of the XML + document, so indices are not well suited to XML data that is updated + more often than it is searched. The overhead of creating an index is + approximately equal to walking the XML document tree. Nodes in the + index are sorted by element name and attribute value.

      +

      Indices are stored in mxml_index_t + structures. The mxmlIndexNew() + function creates a new index:

      +
      +    mxml_node_t *tree;
      +    mxml_index_t *ind;
      +
      +    ind = mxmlIndexNew(tree, "element",
      +                       "attribute");
      +
      +

      The first argument is the XML node tree to index. Normally this will + be a pointer to the ?xml element.

      +

      The second argument contains the element to index; passing NULL + indexes all element nodes alphabetically.

      +

      The third argument contains the attribute to index; passing NULL + causes only the element name to be indexed.

      +

      Once the index is created, the +mxmlIndexEnum(), mxmlIndexFind() +, and mxmlIndexReset() + functions are used to access the nodes in the index. The +mxmlIndexReset() function resets the "current" node pointer + in the index, allowing you to do new searches and enumerations on the + same index. Typically you will call this function prior to your calls + to mxmlIndexEnum() and +mxmlIndexFind().

      +

      The mxmlIndexEnum() function + enumerates each of the nodes in the index and can be used in a loop as + follows:

      +
      +    mxml_node_t *node;
      +
      +    mxmlIndexReset(ind);
      +
      +    while ((node = mxmlIndexEnum(ind)) != NULL)
      +    {
      +      // do something with node
      +    }
      +
      +

      The mxmlIndexFind() function + locates the next occurrence of the named element and attribute value in + the index. It can be used to find all matching elements in an index, as + follows:

      +
      +    mxml_node_t *node;
      +
      +    mxmlIndexReset(ind);
      +
      +    while ((node = mxmlIndexFind(ind, "element",
      +                                 "attr-value"))
      +                != NULL)
      +    {
      +      // do something with node
      +    }
      +
      +

      The second and third arguments represent the element name and + attribute value, respectively. A NULL pointer is used to + return all elements or attributes in the index. Passing NULL + for both the element name and attribute value is equivalent to calling +mxmlIndexEnum.

      +

      When you are done using the index, delete it using the +mxmlIndexDelete() function:

      +
      +    mxmlIndexDelete(ind);
      +
      +

      SAX (Stream) Loading of Documents

      +

      Mini-XML supports an implementation of the Simple API for XML (SAX) + which allows you to load and process an XML document as a stream of + nodes. Aside from allowing you to process XML documents of any size, + the Mini-XML implementation also allows you to retain portions of the + document in memory for later processing.

      +

      The mxmlSAXLoadFd, +mxmlSAXLoadFile, and +mxmlSAXLoadString functions provide the SAX loading APIs. Each + function works like the corresponding mxmlLoad function but + uses a callback to process each node as it is read.

      +

      The callback function receives the node, an event code, and a user + data pointer you supply:

      +
      +    void
      +    sax_cb(mxml_node_t *node,
      +           mxml_sax_event_t event,
      +           void *data)
      +    {
      +      ... do something ...
      +    }
      +
      +

      The event will be one of the following:

      +
        +
      • MXML_SAX_CDATA - CDATA was just read
      • +
      • MXML_SAX_COMMENT - A comment was just read
      • +
      • MXML_SAX_DATA - Data (custom, integer, opaque, real, or + text) was just read
      • +
      • MXML_SAX_DIRECTIVE - A processing directive was just read
      • +
      • MXML_SAX_ELEMENT_CLOSE - A close element was just read ( +</element>)
      • +
      • MXML_SAX_ELEMENT_OPEN - An open element was just read ( +<element>)
      • +
      +

      Elements are released after the close element is processed. + All other nodes are released after they are processed. The SAX callback + can retain the node using the +mxmlRetain function. For example, the following SAX callback + will retain all nodes, effectively simulating a normal in-memory load:

      +
      +    void
      +    sax_cb(mxml_node_t *node,
      +           mxml_sax_event_t event,
      +           void *data)
      +    {
      +      if (event != MXML_SAX_ELEMENT_CLOSE)
      +        mxmlRetain(node);
      +    }
      +
      +

      More typically the SAX callback will only retain a small portion of + the document that is needed for post-processing. For example, the + following SAX callback will retain the title and headings in an XHTML + file. It also retains the (parent) elements like <html>, +<head>, and <body>, and processing directives like +<?xml ... ?> and <!DOCTYPE ... >:

      + + +
      +    void
      +    sax_cb(mxml_node_t *node,
      +           mxml_sax_event_t event,
      +           void *data)
      +    {
      +      if (event == MXML_SAX_ELEMENT_OPEN)
      +      {
      +       /*
      +        * Retain headings and titles...
      +        */
      +
      +        char *name = mxmlGetElement(node);
      +
      +        if (!strcmp(name, "html") ||
      +            !strcmp(name, "head") ||
      +            !strcmp(name, "title") ||
      +            !strcmp(name, "body") ||
      +            !strcmp(name, "h1") ||
      +            !strcmp(name, "h2") ||
      +            !strcmp(name, "h3") ||
      +            !strcmp(name, "h4") ||
      +            !strcmp(name, "h5") ||
      +            !strcmp(name, "h6"))
      +          mxmlRetain(node);
      +      }
      +      else if (event == MXML_SAX_DIRECTIVE)
      +        mxmlRetain(node);
      +      else if (event == MXML_SAX_DATA)
      +      {
      +        if (mxmlGetRefCount(mxmlGetParent(node)) > 1)
      +        {
      +         /*
      +          * If the parent was retained, then retain
      +          * this data node as well.
      +          */
      +
      +          mxmlRetain(node);
      +        }
      +      }
      +    }
      +
      +

      The resulting skeleton document tree can then be searched just like + one loaded using the mxmlLoad functions. For example, a filter + that reads an XHTML document from stdin and then shows the title and + headings in the document would look like:

      +
      +    mxml_node_t *doc, *title, *body, *heading;
      +
      +    doc = mxmlSAXLoadFd(NULL, 0,
      +                        MXML_TEXT_CALLBACK,
      +                        sax_cb, NULL);
      +
      +    title = mxmlFindElement(doc, doc, "title",
      +                            NULL, NULL,
      +                            MXML_DESCEND);
      +
      +    if (title)
      +      print_children(title);
      +
      +    body = mxmlFindElement(doc, doc, "body",
      +                           NULL, NULL,
      +                           MXML_DESCEND);
      +
      +    if (body)
      +    {
      +      for (heading = mxmlGetFirstChild(body);
      +           heading;
      +           heading = mxmlGetNextSibling(heading))
      +        print_children(heading);
      +    }
      +
      +
      +

      Chapter 4 - Using the mxmldoc + Utility

      +

      This chapter describes how to use mxmldoc(1) program to + automatically generate documentation from C and C++ source files.

      +

      The Basics

      +

      Originally developed to generate the Mini-XML and CUPS API + documentation, mxmldoc is now a general-purpose utility which + scans C and C++ source files to produce HTML and man page documentation + along with an XML file representing the functions, types, and + definitions in those source files. Unlike popular documentation + generators like Doxygen or Javadoc, mxmldoc uses in-line + comments rather than comment headers, allowing for more "natural" code + documentation.

      +

      By default, mxmldoc produces HTML documentation. For + example, the following command will scan all of the C source and header + files in the current directory and produce a HTML documentation file + called filename.html:

      +
      +    mxmldoc *.h *.c >filename.html ENTER
      +
      +

      You can also specify an XML file to create which contains all of the + information from the source files. For example, the following command + creates an XML file called filename.xml in addition to the + HTML file:

      +
      +    mxmldoc filename.xml *.h *.c >filename.html ENTER
      +
      +

      The --no-output option disables the normal HTML output:

      +
      +    mxmldoc --no-output filename.xml *.h *.c ENTER
      +
      +

      You can then run mxmldoc again with the XML file alone to + generate the HTML documentation:

      +
      +    mxmldoc filename.xml >filename.html ENTER
      +
      +

      Creating Man Pages

      +

      The --man filename option tells mxmldoc to create a + man page instead of HTML documentation, for example:

      +
      +    mxmldoc --man filename filename.xml \
      +        >filename.man ENTER
      +
      +    mxmldoc --man filename *.h *.c \
      +        >filename.man ENTER
      +
      +

      Creating Xcode Documentation Sets

      +

      The --docset directory.docset option tells mxmldoc + to create an Xcode documentation set containing the HTML documentation, + for example:

      +
      +    mxmldoc --docset foo.docset *.h *.c foo.xml ENTER
      +
      +

      Xcode documentation sets can only be built on Mac OS X with Xcode 3.0 + or higher installed.

      +

      Commenting Your Code

      +

      As noted previously, mxmldoc looks for in-line comments to + describe the functions, types, and constants in your code. Mxmldoc + will document all public names it finds in your source files - any + names starting with the underscore character (_) or names that are + documented with the @private@ directive are + treated as private and are not documented.

      +

      Comments appearing directly before a function or type definition are + used to document that function or type. Comments appearing after + argument, definition, return type, or variable declarations are used to + document that argument, definition, return type, or variable. For + example, the following code excerpt defines a key/value structure and a + function that creates a new instance of that structure:

      +
      +    /* A key/value pair. This is used with the
      +       dictionary structure. */
      +
      +    struct keyval
      +    {
      +      char *key; /* Key string */
      +      char *val; /* Value string */
      +    };
      +
      +    /* Create a new key/value pair. */
      +
      +    struct keyval * /* New key/value pair */
      +    new_keyval(
      +        const char *key, /* Key string */
      +	const char *val) /* Value string */
      +    {
      +      ...
      +    }
      +
      +

      Mxmldoc also knows to remove extra asterisks (*) from the + comment string, so the comment string:

      +
      +    /*
      +     * Compute the value of PI.
      +     *
      +     * The function connects to an Internet server
      +     * that streams audio of mathematical monks
      +     * chanting the first 100 digits of PI.
      +     */
      +
      +

      will be shown as:

      +
      +    Compute the value of PI.
      +
      +    The function connects to an Internet server
      +    that streams audio of mathematical monks
      +    chanting the first 100 digits of PI.
      +
      +

      Comments can also include the following + special @name ...@ directive strings:

      +
        +
      • @deprecated@ - flags the item as deprecated to discourage + its use
      • +
      • @private@ - flags the item as private so it will not be + included in the documentation
      • +
      • @since ...@ - flags the item as new since a particular + release. The text following the @since up to the closing @ + is highlighted in the generated documentation, e.g. @since Mini-XML + 2.7@.
      • +
      + + +

      Titles, Sections, and Introductions

      +

      Mxmldoc also provides options to set the title, section, and + introduction text for the generated documentation. The --title text + option specifies the title for the documentation. The title string is + usually put in quotes:

      +
      +    mxmldoc filename.xml \
      +        --title "My Famous Documentation" \
      +        >filename.html ENTER
      +
      +

      The --section name option specifies the section for the + documentation. For HTML documentation, the name is placed in a HTML + comment such as:

      +
      +    <!-- SECTION: name -->
      +
      +

      For man pages, the section name is usually just a number ("3"), or a + number followed by a vendor name ("3acme"). The section name is used in + the .TH directive in the man page:

      +
      +    .TH mylibrary 3acme "My Title" ...
      +
      +

      The default section name for man page output is "3". There is no + default section name for HTML output.

      +

      Finally, the --intro filename option specifies a file to + embed after the title and section but before the generated + documentation. For HTML documentation, the file must consist of valid + HTML without the usual DOCTYPE, html, and body + elements. For man page documentation, the file must consist of valid +nroff(1) text.

      +
      +

      Appendix A - Mini-XML License

      +

      The Mini-XML library and included programs are provided under the + terms of the GNU Library General Public License version 2 (LGPL2) with + the following exceptions:

      +

      1. Static linking of applications to the Mini-XML library does + not constitute a derivative work and does not require the author to + provide source code for the application, use the shared Mini-XML + libraries, or link their applications against a user-supplied version + of Mini-XML.

      +

      If you link the application to a modified version of Mini-XML, + then the changes to Mini-XML must be provided under the terms of the + LGPL2 in sections 1, 2, and 4.

      +

      2. You do not have to provide a copy of the Mini-XML license + with programs that are linked to the Mini-XML library, nor do you have + to identify the Mini-XML license in your program or documentation as + required by section 6 of the LGPL2.

      +

       

      +

      GNU LIBRARY GENERAL PUBLIC LICENSE

      +

      Version 2, June 1991 +
      Copyright (C) 1991 Free Software Foundation, Inc. +
      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +
      Everyone is permitted to copy and distribute verbatim copies of + this license document, but changing it is not allowed. +
      [This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.]

      +

      Preamble

      +

      The licenses for most software are designed to take away your freedom + to share and change it. By contrast, the GNU General Public Licenses + are intended to guarantee your freedom to share and change free + software--to make sure the software is free for all its users.

      +

      This license, the Library General Public License, applies to some + specially designated Free Software Foundation software, and to any + other libraries whose authors decide to use it. You can use it for your + libraries, too.

      +

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

      +

      To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the library, or if you modify it.

      +

      For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link a program with the library, you must provide complete + object files to the recipients so that they can relink them with the + library, after making changes to the library and recompiling it. And + you must show them these terms so they know their rights.

      +

      Our method of protecting your rights has two steps: (1) copyright the + library, and (2) offer you this license which gives you legal + permission to copy, distribute and/or modify the library.

      +

      Also, for each distributor's protection, we want to make certain that + everyone understands that there is no warranty for this free library. + If the library is modified by someone else and passed on, we want its + recipients to know that what they have is not the original version, so + that any problems introduced by others will not reflect on the original + authors' reputations.

      +

      Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that companies distributing free + software will individually obtain patent licenses, thus in effect + transforming the program into proprietary software. To prevent this, we + have made it clear that any patent must be licensed for everyone's free + use or not licensed at all.

      +

      Most GNU software, including some libraries, is covered by the + ordinary GNU General Public License, which was designed for utility + programs. This license, the GNU Library General Public License, applies + to certain designated libraries. This license is quite different from + the ordinary one; be sure to read it in full, and don't assume that + anything in it is the same as in the ordinary license.

      +

      The reason we have a separate public license for some libraries is + that they blur the distinction we usually make between modifying or + adding to a program and simply using it. Linking a program with a + library, without changing the library, is in some sense simply using + the library, and is analogous to running a utility program or + application program. However, in a textual and legal sense, the linked + executable is a combined work, a derivative of the original library, + and the ordinary General Public License treats it as such.

      +

      Because of this blurred distinction, using the ordinary General + Public License for libraries did not effectively promote software + sharing, because most developers did not use the libraries. We + concluded that weaker conditions might promote sharing better.

      +

      However, unrestricted linking of non-free programs would deprive the + users of those programs of all benefit from the free status of the + libraries themselves. This Library General Public License is intended + to permit developers of non-free programs to use free libraries, while + preserving your freedom as a user of such programs to change the free + libraries that are incorporated in them. (We have not seen how to + achieve this as regards changes in header files, but we have achieved + it as regards changes in the actual functions of the Library.) The hope + is that this will lead to faster development of free libraries.

      +

      The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the libary" and a "work that uses the library". The + former contains code derived from the library, while the latter only + works together with the library.

      +

      Note that it is possible for a library to be covered by the ordinary + General Public License rather than by this special one.

      +

      TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND + MODIFICATION

      +

      0. This License Agreement applies to any software + library which contains a notice placed by the copyright holder or other + authorized party saying it may be distributed under the terms of this + Library General Public License (also called "this License"). Each + licensee is addressed as "you".

      +

      A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables.

      +

      The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".)

      +

      "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control + compilation and installation of the library.

      +

      Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of running + a program using the Library is not restricted, and output from such a + program is covered only if its contents constitute a work based on the + Library (independent of the use of the Library in a tool for writing + it). Whether that is true depends on what the Library does and what the + program that uses the Library does.

      +

      1. You may copy and distribute verbatim copies of + the Library's complete source code as you receive it, in any medium, + provided that you conspicuously and appropriately publish on each copy + an appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the Library.

      +

      You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee.

      +

      2. You may modify your copy or copies of the Library + or any portion of it, thus forming a work based on the Library, and + copy and distribute such modifications or work under the terms of + Section 1 above, provided that you also meet all of these conditions:

      +
        +

        a) The modified work must itself be a software + library.

        +

        b) You must cause the files modified to carry + prominent notices stating that you changed the files and the date of + any change.

        +

        c) You must cause the whole of the work to be + licensed at no charge to all third parties under the terms of this + License.

        +

        d) If a facility in the modified Library refers to a + function or a table of data to be supplied by an application program + that uses the facility, other than as an argument passed when the + facility is invoked, then you must make a good faith effort to ensure + that, in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of its + purpose remains meaningful.

        +

        (For example, a function in a library to compute square roots has a + purpose that is entirely well-defined independent of the application. + Therefore, Subsection 2d requires that any application-supplied + function or table used by this function must be optional: if the + application does not supply it, the square root function must still + compute square roots.)

        +
      +

      These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Library, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote + it.

      +

      Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Library.

      +

      In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on a + volume of a storage or distribution medium does not bring the other + work under the scope of this License.

      +

      3. You may opt to apply the terms of the ordinary + GNU General Public License instead of this License to a given copy of + the Library. To do this, you must alter all the notices that refer to + this License, so that they refer to the ordinary GNU General Public + License, version 2, instead of to this License. (If a newer version + than version 2 of the ordinary GNU General Public License has appeared, + then you can specify that version instead if you wish.) Do not make any + other change in these notices.

      +

      Once this change is made in a given copy, it is irreversible for that + copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy.

      +

      This option is useful when you wish to copy part of the code of the + Library into a program that is not a library.

      +

      4. You may copy and distribute the Library (or a + portion or derivative of it, under Section 2) in object code or + executable form under the terms of Sections 1 and 2 above provided that + you accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange.

      +

      If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to distribute + the source code, even though third parties are not compelled to copy + the source along with the object code.

      +

      5. A program that contains no derivative of any + portion of the Library, but is designed to work with the Library by + being compiled or linked with it, is called a "work that uses the + Library". Such a work, in isolation, is not a derivative work of the + Library, and therefore falls outside the scope of this License.

      +

      However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. Section + 6 states terms for distribution of such executables.

      +

      When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law.

      +

      If such an object file uses only numerical parameters, data structure + layouts and accessors, and small macros and small inline functions (ten + lines or less in length), then the use of the object file is + unrestricted, regardless of whether it is legally a derivative work. + (Executables containing this object code plus portions of the Library + will still fall under Section 6.)

      +

      Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, whether + or not they are linked directly with the Library itself.

      +

      6. As an exception to the Sections above, you may + also compile or link a "work that uses the Library" with the Library to + produce a work containing portions of the Library, and distribute that + work under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications.

      +

      You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things:

      +
        a) Accompany the work with the complete + corresponding machine-readable source code for the Library including + whatever changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked with + the Library, with the complete machine-readable "work that uses the + Library", as object code and/or source code, so that the user can + modify the Library and then relink to produce a modified executable + containing the modified Library. (It is understood that the user who + changes the contents of definitions files in the Library will not + necessarily be able to recompile the application to use the modified + definitions.) +

        b) Accompany the work with a written offer, valid + for at least three years, to give the same user the materials specified + in Subsection 6a, above, for a charge no more than the cost of + performing this distribution.

        +

        c) If distribution of the work is made by offering + access to copy from a designated place, offer equivalent access to copy + the above specified materials from the same place.

        +

        d) Verify that the user has already received a copy + of these materials or that you have already sent this user a copy.

        +
      +

      For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the source code distributed need not include anything that is normally + distributed (in either source or binary form) with the major components + (compiler, kernel, and so on) of the operating system on which the + executable runs, unless that component itself accompanies the + executable.

      +

      It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute.

      +

      7. You may place library facilities that are a work + based on the Library side-by-side in a single library together with + other library facilities not covered by this License, and distribute + such a combined library, provided that the separate distribution of the + work based on the Library and of the other library facilities is + otherwise permitted, and provided that you do these two things:

      +
        a) Accompany the combined library with a copy of + the same work based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the Sections + above. +

        b) Give prominent notice with the combined library + of the fact that part of it is a work based on the Library, and + explaining where to find the accompanying uncombined form of the same + work.

        +
      +

      8. You may not copy, modify, sublicense, link with, + or distribute the Library except as expressly provided under this + License. Any attempt otherwise to copy, modify, sublicense, link with, + or distribute the Library is void, and will automatically terminate + your rights under this License. However, parties who have received + copies, or rights, from you under this License will not have their + licenses terminated so long as such parties remain in full compliance.

      +

      9. You are not required to accept this License, + since you have not signed it. However, nothing else grants you + permission to modify or distribute the Library or its derivative works. + These actions are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work based + on the Library), you indicate your acceptance of this License to do so, + and all its terms and conditions for copying, distributing or modifying + the Library or works based on it.

      +

      10. Each time you redistribute the Library (or any + work based on the Library), the recipient automatically receives a + license from the original licensor to copy, distribute, link with or + modify the Library subject to these terms and conditions. You may not + impose any further restrictions on the recipients' exercise of the + rights granted herein. You are not responsible for enforcing compliance + by third parties to this License.

      +

      11. If, as a consequence of a court judgment or + allegation of patent infringement or for any other reason (not limited + to patent issues), conditions are imposed on you (whether by court + order, agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this License. If + you cannot distribute so as to satisfy simultaneously your obligations + under this License and any other pertinent obligations, then as a + consequence you may not distribute the Library at all. For example, if + a patent license would not permit royalty-free redistribution of the + Library by all those who receive copies directly or indirectly through + you, then the only way you could satisfy both it and this License would + be to refrain entirely from distribution of the Library.

      +

      If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply, and the section as a whole is intended to apply in other + circumstances.

      +

      It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is implemented + by public license practices. Many people have made generous + contributions to the wide range of software distributed through that + system in reliance on consistent application of that system; it is up + to the author/donor to decide if he or she is willing to distribute + software through any other system and a licensee cannot impose that + choice.

      +

      This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License.

      +

      12. If the distribution and/or use of the Library is + restricted in certain countries either by patents or by copyrighted + interfaces, the original copyright holder who places the Library under + this License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only in or + among countries not thus excluded. In such case, this License + incorporates the limitation as if written in the body of this License.

      +

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

      +

      Each version is given a distinguishing version number. If the Library + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a license + version number, you may choose any version ever published by the Free + Software Foundation.

      +

      14. If you wish to incorporate parts of the Library + into other free programs whose distribution conditions are incompatible + with these, write to the author to ask for permission. For software + which is copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free status + of all derivatives of our free software and of promoting the sharing + and reuse of software generally.

      +

      NO WARRANTY

      +

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

      +

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

      +

      END OF TERMS AND CONDITIONS

      +

      How to Apply These Terms to Your New Libraries

      +

      If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms of + the ordinary General Public License).

      +

      To apply these terms, attach the following notices to the library. It + is safest to attach them to the start of each source file to most + effectively convey the exclusion of warranty; and each file should have + at least the "copyright" line and a pointer to where the full notice is + found.

      +
        +

        one line to give the library's name and an idea of what it does. +
        Copyright (C) year name of author

        +

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

        +

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

        +

        You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

        +
      +

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

      +

      You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names:

      +
        +

        Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker.

        +

        signature of Ty Coon, 1 April 1990 Ty Coon, President of + Vice

        +
      +

      That's all there is to it!

      +
      +
      +

      Appendix B - Library Reference

      +

      Contents

      + +

      Functions

      +

      mxmlAdd

      +

      Add a node to a tree.

      +

      void mxmlAdd ( +
          mxml_node_t *parent, +
          int where, +
          mxml_node_t *child, +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node
      +
      where
      +
      Where to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
      +
      child
      +
      Child node for where or MXML_ADD_TO_PARENT
      +
      node
      +
      Node to add
      +
      +

      Discussion

      +

      Adds the specified node to the parent. If the + child argument is not NULL, puts the new node before or after the + specified child depending on the value of the where argument. If the + child argument is NULL, puts the new node at the beginning of the child + list (MXML_ADD_BEFORE) or at the end of the child list + (MXML_ADD_AFTER). The constant MXML_ADD_TO_PARENT can be used to + specify a NULL child pointer.

      +

      mxmlDelete

      +

      Delete a node and all of its children.

      +

      void mxmlDelete ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to delete
      +
      +

      Discussion

      +

      If the specified node has a parent, this function + first removes the node from its parent using the mxmlRemove() function.

      +

      + + Mini-XML 2.4 mxmlElementDeleteAttr +

      +

      Delete an attribute.

      +

      void mxmlElementDeleteAttr ( +
          mxml_node_t *node, +
          const char *name +
      );

      +

      Parameters

      +
      +
      node
      +
      Element
      +
      name
      +
      Attribute name
      +
      +

      mxmlElementGetAttr

      +

      Get an attribute.

      +

      const char *mxmlElementGetAttr ( +
          mxml_node_t *node, +
          const char *name +
      );

      +

      Parameters

      +
      +
      node
      +
      Element node
      +
      name
      +
      Name of attribute
      +
      +

      Return Value

      +

      Attribute value or NULL

      +

      Discussion

      +

      This function returns NULL if the node is not an + element or the named attribute does not exist.

      +

      mxmlElementSetAttr

      +

      Set an attribute.

      +

      void mxmlElementSetAttr ( +
          mxml_node_t *node, +
          const char *name, +
          const char *value +
      );

      +

      Parameters

      +
      +
      node
      +
      Element node
      +
      name
      +
      Name of attribute
      +
      value
      +
      Attribute value
      +
      +

      Discussion

      +

      If the named attribute already exists, the value + of the attribute is replaced by the new string value. The string value + is copied into the element node. This function does nothing if the node + is not an element.

      +

      + + Mini-XML 2.3 mxmlElementSetAttrf

      +

      Set an attribute with a formatted value.

      +

      void mxmlElementSetAttrf ( +
          mxml_node_t *node, +
          const char *name, +
          const char *format, +
          ... +
      );

      +

      Parameters

      +
      +
      node
      +
      Element node
      +
      name
      +
      Name of attribute
      +
      format
      +
      Printf-style attribute value
      +
      ...
      +
      Additional arguments as needed
      +
      +

      Discussion

      +

      If the named attribute already exists, the value + of the attribute is replaced by the new formatted string. The formatted + string value is copied into the element node. This function does + nothing if the node is not an element.

      +

      +mxmlEntityAddCallback

      +

      Add a callback to convert entities to Unicode.

      +

      int mxmlEntityAddCallback ( +
          mxml_entity_cb_t cb +
      );

      +

      Parameters

      +
      +
      cb
      +
      Callback function to add
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      mxmlEntityGetName

      +

      Get the name that corresponds to the character + value.

      +

      const char *mxmlEntityGetName ( +
          int val +
      );

      +

      Parameters

      +
      +
      val
      +
      Character value
      +
      +

      Return Value

      +

      Entity name or NULL

      +

      Discussion

      +

      If val does not need to be represented by a named + entity, NULL is returned.

      +

      mxmlEntityGetValue

      +

      Get the character corresponding to a named + entity.

      +

      int mxmlEntityGetValue ( +
          const char *name +
      );

      +

      Parameters

      +
      +
      name
      +
      Entity name
      +
      +

      Return Value

      +

      Character value or -1 on error

      +

      Discussion

      +

      The entity name can also be a numeric constant. -1 + is returned if the name is not known.

      +

      +mxmlEntityRemoveCallback

      +

      Remove a callback.

      +

      void mxmlEntityRemoveCallback ( +
          mxml_entity_cb_t cb +
      );

      +

      Parameters

      +
      +
      cb
      +
      Callback function to remove
      +
      +

      mxmlFindElement

      +

      Find the named element.

      +

      mxml_node_t *mxmlFindElement + ( +
          mxml_node_t *node, +
          mxml_node_t *top, +
          const char *name, +
          const char *attr, +
          const char *value, +
          int descend +
      );

      +

      Parameters

      +
      +
      node
      +
      Current node
      +
      top
      +
      Top node
      +
      name
      +
      Element name or NULL for any
      +
      attr
      +
      Attribute name, or NULL for none
      +
      value
      +
      Attribute value, or NULL for any
      +
      descend
      +
      Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +
      +

      Return Value

      +

      Element node or NULL

      +

      Discussion

      +

      The search is constrained by the name, attribute + name, and value; any NULL names or values are treated as wildcards, so + different kinds of searches can be implemented by looking for all + elements of a given name or all elements with a specific attribute. The + descend argument determines whether the search descends into child + nodes; normally you will use MXML_DESCEND_FIRST for the initial search + and MXML_NO_DESCEND to find additional direct descendents of the node. + The top node argument constrains the search to a particular node's + children.

      +

      + + Mini-XML 2.7 mxmlFindPath

      +

      Find a node with the given path.

      +

      mxml_node_t *mxmlFindPath ( +
          mxml_node_t *top, +
          const char *path +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      path
      +
      Path to element
      +
      +

      Return Value

      +

      Found node or NULL

      +

      Discussion

      +

      The "path" is a slash-separated list of element + names. The name "*" is considered a wildcard for one or more levels of + elements. For example, "foo/one/two", "bar/two/one", "*/one", and so + forth. +
      +
      The first child node of the found node is returned if the given + node has children and the first child is a value node.

      +

      + + Mini-XML 2.7 mxmlGetCDATA

      +

      Get the value for a CDATA node.

      +

      const char *mxmlGetCDATA ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      CDATA value or NULL

      +

      Discussion

      +

      NULL is returned if the node is not a + CDATA element.

      +

      + + Mini-XML 2.7 mxmlGetCustom

      +

      Get the value for a custom node.

      +

      const void *mxmlGetCustom ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Custom value or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its + first child) is not a custom value node.

      +

      + + Mini-XML 2.7 mxmlGetElement

      +

      Get the name for an element node.

      +

      const char *mxmlGetElement ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Element name or NULL

      +

      Discussion

      +

      NULL is returned if the node is not + an element node.

      +

      + + Mini-XML 2.7 mxmlGetFirstChild

      +

      Get the first child of an element node.

      +

      mxml_node_t + *mxmlGetFirstChild ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      First child or NULL

      +

      Discussion

      +

      NULL is returned if the node is not + an element node or if the node has no children.

      +

      + + Mini-XML 2.7 mxmlGetInteger

      +

      Get the integer value from the specified node or + its first child.

      +

      int mxmlGetInteger ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Integer value or 0

      +

      Discussion

      +

      0 is returned if the node (or its first child) is + not an integer value node.

      +

      + + Mini-XML 2.7 mxmlGetLastChild

      +

      Get the last child of an element node.

      +

      mxml_node_t + *mxmlGetLastChild ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Last child or NULL

      +

      Discussion

      +

      NULL is returned if the node is not + an element node or if the node has no children.

      +

      mxmlGetNextSibling

      +

      Return the node type...

      +

      mxml_node_t + *mxmlGetNextSibling ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Get the next node for the current parent.

      +

      NULL is returned if this is the last + child for the current parent.

      +

      + + Mini-XML 2.7 mxmlGetOpaque

      +

      Get an opaque string value for a node or its + first child.

      +

      const char *mxmlGetOpaque ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Opaque string or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its + first child) is not an opaque value node.

      +

      + + Mini-XML 2.7 mxmlGetParent

      +

      Get the parent node.

      +

      mxml_node_t *mxmlGetParent ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Parent node or NULL

      +

      Discussion

      +

      NULL is returned for a root node.

      +

      + + Mini-XML 2.7 mxmlGetPrevSibling

      +

      Get the previous node for the current parent.

      +

      mxml_node_t + *mxmlGetPrevSibling ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Previous node or NULL

      +

      Discussion

      +

      NULL is returned if this is the first + child for the current parent.

      +

      + + Mini-XML 2.7 mxmlGetReal

      +

      Get the real value for a node or its first child.

      +

      double mxmlGetReal ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Real value or 0.0

      +

      Discussion

      +

      0.0 is returned if the node (or its first child) + is not a real value node.

      +

      + + Mini-XML 2.7 mxmlGetRefCount

      +

      Get the current reference (use) count for a node.

      +

      int mxmlGetRefCount ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node
      +
      +

      Return Value

      +

      Reference count

      +

      Discussion

      +

      The initial reference count of new nodes is 1. Use + the mxmlRetain and +mxmlRelease functions to increment and decrement a + node's reference count. .

      +

      + + Mini-XML 2.7 mxmlGetText

      +

      Get the text value for a node or its first child.

      +

      const char *mxmlGetText ( +
          mxml_node_t *node, +
          int *whitespace +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      whitespace
      +
      1 if string is preceded by whitespace, 0 + otherwise
      +
      +

      Return Value

      +

      Text string or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its + first child) is not a text node. The "whitespace" argument can be NULL.

      +

      + + Mini-XML 2.7 mxmlGetType

      +

      Get the node type.

      +

      mxml_type_t mxmlGetType ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      Type of node

      +

      Discussion

      +

      MXML_IGNORE is returned if "node" is +NULL.

      +

      + + Mini-XML 2.7 mxmlGetUserData

      +

      Get the user data pointer for a node.

      +

      void *mxmlGetUserData ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to get
      +
      +

      Return Value

      +

      User data pointer

      +

      mxmlIndexDelete

      +

      Delete an index.

      +

      void mxmlIndexDelete ( +
          mxml_index_t *ind +
      );

      +

      Parameters

      +
      +
      ind
      +
      Index to delete
      +
      +

      mxmlIndexEnum

      +

      Return the next node in the index.

      +

      mxml_node_t *mxmlIndexEnum ( +
          mxml_index_t *ind +
      );

      +

      Parameters

      +
      +
      ind
      +
      Index to enumerate
      +
      +

      Return Value

      +

      Next node or NULL if there is none

      +

      Discussion

      +

      Nodes are returned in the sorted order of the + index.

      +

      mxmlIndexFind

      +

      Find the next matching node.

      +

      mxml_node_t *mxmlIndexFind ( +
          mxml_index_t *ind, +
          const char *element, +
          const char *value +
      );

      +

      Parameters

      +
      +
      ind
      +
      Index to search
      +
      element
      +
      Element name to find, if any
      +
      value
      +
      Attribute value, if any
      +
      +

      Return Value

      +

      Node or NULL if none found

      +

      Discussion

      +

      You should call mxmlIndexReset() prior to using + this function for the first time with a particular set of "element" and + "value" strings. Passing NULL for both "element" and "value" is + equivalent to calling mxmlIndexEnum().

      +

      + + Mini-XML 2.7 mxmlIndexGetCount

      +

      Get the number of nodes in an index.

      +

      int mxmlIndexGetCount ( +
          mxml_index_t *ind +
      );

      +

      Parameters

      +
      +
      ind
      +
      Index of nodes
      +
      +

      Return Value

      +

      Number of nodes in index

      +

      mxmlIndexNew

      +

      Create a new index.

      +

      mxml_index_t *mxmlIndexNew + ( +
          mxml_node_t *node, +
          const char *element, +
          const char *attr +
      );

      +

      Parameters

      +
      +
      node
      +
      XML node tree
      +
      element
      +
      Element to index or NULL for all
      +
      attr
      +
      Attribute to index or NULL for none
      +
      +

      Return Value

      +

      New index

      +

      Discussion

      +

      The index will contain all nodes that contain the + named element and/or attribute. If both "element" and "attr" are NULL, + then the index will contain a sorted list of the elements in the node + tree. Nodes are sorted by element name and optionally by attribute + value if the "attr" argument is not NULL.

      +

      mxmlIndexReset

      +

      Reset the enumeration/find pointer in the index + and return the first node in the index.

      +

      mxml_node_t *mxmlIndexReset + ( +
          mxml_index_t *ind +
      );

      +

      Parameters

      +
      +
      ind
      +
      Index to reset
      +
      +

      Return Value

      +

      First node or NULL if there is none

      +

      Discussion

      +

      This function should be called prior to using + mxmlIndexEnum() or mxmlIndexFind() for the first time.

      +

      mxmlLoadFd

      +

      Load a file descriptor into an XML node tree.

      +

      mxml_node_t *mxmlLoadFd ( +
          mxml_node_t *top, +
          int fd, +
          mxml_load_cb_t cb +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      fd
      +
      File descriptor to read from
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

      +

      mxmlLoadFile

      +

      Load a file into an XML node tree.

      +

      mxml_node_t *mxmlLoadFile ( +
          mxml_node_t *top, +
          FILE *fp, +
          mxml_load_cb_t cb +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      fp
      +
      File to read from
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

      +

      mxmlLoadString

      +

      Load a string into an XML node tree.

      +

      mxml_node_t *mxmlLoadString + ( +
          mxml_node_t *top, +
          const char *s, +
          mxml_load_cb_t cb +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      s
      +
      String to load
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      First node or NULL if the string has errors.

      +

      Discussion

      +

      The nodes in the specified string are added to the + specified top node. If no top node is provided, the XML string MUST be + well-formed with a single parent node like <?xml> for the entire + string. The callback function returns the value type that should be + used for child nodes. If MXML_NO_CALLBACK is specified then all child + nodes will be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type.

      +

      + + Mini-XML 2.3 mxmlNewCDATA

      +

      Create a new CDATA node.

      +

      mxml_node_t *mxmlNewCDATA ( +
          mxml_node_t *parent, +
          const char *data +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      data
      +
      Data string
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new CDATA node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new CDATA node has no parent. The data string must + be nul-terminated and is copied into the new node. CDATA nodes use the + MXML_ELEMENT type.

      +

      + + Mini-XML 2.1 mxmlNewCustom

      +

      Create a new custom data node.

      +

      mxml_node_t *mxmlNewCustom ( +
          mxml_node_t *parent, +
          void *data, +
          mxml_custom_destroy_cb_t + destroy +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      data
      +
      Pointer to data
      +
      destroy
      +
      Function to destroy data
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new custom node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new element node has no parent. NULL can be passed + when the data in the node is not dynamically allocated or is separately + managed.

      +

      mxmlNewElement

      +

      Create a new element node.

      +

      mxml_node_t *mxmlNewElement + ( +
          mxml_node_t *parent, +
          const char *name +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      name
      +
      Name of element
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new element node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new element node has no parent.

      +

      mxmlNewInteger

      +

      Create a new integer node.

      +

      mxml_node_t *mxmlNewInteger + ( +
          mxml_node_t *parent, +
          int integer +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      integer
      +
      Integer value
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new integer node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new integer node has no parent.

      +

      mxmlNewOpaque

      +

      Create a new opaque string.

      +

      mxml_node_t *mxmlNewOpaque ( +
          mxml_node_t *parent, +
          const char *opaque +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      opaque
      +
      Opaque string
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new opaque node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new opaque node has no parent. The opaque string + must be nul-terminated and is copied into the new node.

      +

      mxmlNewReal

      +

      Create a new real number node.

      +

      mxml_node_t *mxmlNewReal ( +
          mxml_node_t *parent, +
          double real +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      real
      +
      Real number value
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new real number node is added to the end of + the specified parent's child list. The constant MXML_NO_PARENT can be + used to specify that the new real number node has no parent.

      +

      mxmlNewText

      +

      Create a new text fragment node.

      +

      mxml_node_t *mxmlNewText ( +
          mxml_node_t *parent, +
          int whitespace, +
          const char *string +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      whitespace
      +
      1 = leading whitespace, 0 = no whitespace
      +
      string
      +
      String
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new text node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new text node has no parent. The whitespace + parameter is used to specify whether leading whitespace is present + before the node. The text string must be nul-terminated and is copied + into the new node.

      +

      mxmlNewTextf

      +

      Create a new formatted text fragment node.

      +

      mxml_node_t *mxmlNewTextf ( +
          mxml_node_t *parent, +
          int whitespace, +
          const char *format, +
          ... +
      );

      +

      Parameters

      +
      +
      parent
      +
      Parent node or MXML_NO_PARENT
      +
      whitespace
      +
      1 = leading whitespace, 0 = no whitespace
      +
      format
      +
      Printf-style frmat string
      +
      ...
      +
      Additional args as needed
      +
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new text node is added to the end of the + specified parent's child list. The constant MXML_NO_PARENT can be used + to specify that the new text node has no parent. The whitespace + parameter is used to specify whether leading whitespace is present + before the node. The format string must be nul-terminated and is + formatted into the new node.

      +

      + + Mini-XML 2.3 mxmlNewXML

      +

      Create a new XML document tree.

      +

      mxml_node_t *mxmlNewXML ( +
          const char *version +
      );

      +

      Parameters

      +
      +
      version
      +
      Version number to use
      +
      +

      Return Value

      +

      New ?xml node

      +

      Discussion

      +

      The "version" argument specifies the version + number to put in the ?xml element node. If NULL, version 1.0 is + assumed.

      +

      + + Mini-XML 2.3 mxmlRelease

      +

      Release a node.

      +

      int mxmlRelease ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node
      +
      +

      Return Value

      +

      New reference count

      +

      Discussion

      +

      When the reference count reaches zero, the node + (and any children) is deleted via mxmlDelete().

      +

      mxmlRemove

      +

      Remove a node from its parent.

      +

      void mxmlRemove ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to remove
      +
      +

      Discussion

      +

      Does not free memory used by the node - use + mxmlDelete() for that. This function does nothing if the node has no + parent.

      +

      + + Mini-XML 2.3 mxmlRetain

      +

      Retain a node.

      +

      int mxmlRetain ( +
          mxml_node_t *node +
      );

      +

      Parameters

      +
      +
      node
      +
      Node
      +
      +

      Return Value

      +

      New reference count

      +

      + + Mini-XML 2.3 mxmlSAXLoadFd

      +

      Load a file descriptor into an XML node tree + using a SAX callback.

      +

      mxml_node_t *mxmlSAXLoadFd ( +
          mxml_node_t *top, +
          int fd, +
          mxml_load_cb_t cb, +
          mxml_sax_cb_t sax_cb, +
          void *sax_data +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      fd
      +
      File descriptor to read from
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      sax_cb
      +
      SAX callback or MXML_NO_CALLBACK
      +
      sax_data
      +
      SAX user data
      +
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
      +
      The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

      +

      + + Mini-XML 2.3 mxmlSAXLoadFile

      +

      Load a file into an XML node tree using a SAX + callback.

      +

      mxml_node_t *mxmlSAXLoadFile + ( +
          mxml_node_t *top, +
          FILE *fp, +
          mxml_load_cb_t cb, +
          mxml_sax_cb_t sax_cb, +
          void *sax_data +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      fp
      +
      File to read from
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      sax_cb
      +
      SAX callback or MXML_NO_CALLBACK
      +
      sax_data
      +
      SAX user data
      +
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the + specified top node. If no top node is provided, the XML file MUST be + well-formed with a single parent node like <?xml> for the entire file. + The callback function returns the value type that should be used for + child nodes. If MXML_NO_CALLBACK is specified then all child nodes will + be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
      +
      The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

      +

      + + Mini-XML 2.3 mxmlSAXLoadString

      +

      Load a string into an XML node tree using a SAX + callback.

      +

      mxml_node_t + *mxmlSAXLoadString ( +
          mxml_node_t *top, +
          const char *s, +
          mxml_load_cb_t cb, +
          mxml_sax_cb_t sax_cb, +
          void *sax_data +
      );

      +

      Parameters

      +
      +
      top
      +
      Top node
      +
      s
      +
      String to load
      +
      cb
      +
      Callback function or MXML_NO_CALLBACK
      +
      sax_cb
      +
      SAX callback or MXML_NO_CALLBACK
      +
      sax_data
      +
      SAX user data
      +
      +

      Return Value

      +

      First node or NULL if the string has errors.

      +

      Discussion

      +

      The nodes in the specified string are added to the + specified top node. If no top node is provided, the XML string MUST be + well-formed with a single parent node like <?xml> for the entire + string. The callback function returns the value type that should be + used for child nodes. If MXML_NO_CALLBACK is specified then all child + nodes will be either MXML_ELEMENT or MXML_TEXT nodes. +
      +
      The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, + MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading + child nodes of the specified type. +
      +
      The SAX callback must call mxmlRetain() for any nodes that need to + be kept for later use. Otherwise, nodes are deleted when the parent + node is closed or after each data, comment, CDATA, or directive node.

      +

      mxmlSaveAllocString +

      +

      Save an XML tree to an allocated string.

      +

      char *mxmlSaveAllocString ( +
          mxml_node_t *node, +
          mxml_save_cb_t cb +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to write
      +
      cb
      +
      Whitespace callback or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      Allocated string or NULL

      +

      Discussion

      +

      This function returns a pointer to a string + containing the textual representation of the XML node tree. The string + should be freed using the free() function when you are done with it. + NULL is returned if the node would produce an empty string or if the + string cannot be allocated. +
      +
      The callback argument specifies a function that returns a + whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

      +

      mxmlSaveFd

      +

      Save an XML tree to a file descriptor.

      +

      int mxmlSaveFd ( +
          mxml_node_t *node, +
          int fd, +
          mxml_save_cb_t cb +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to write
      +
      fd
      +
      File descriptor to write to
      +
      cb
      +
      Whitespace callback or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      0 on success, -1 on error.

      +

      Discussion

      +

      The callback argument specifies a function that + returns a whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

      +

      mxmlSaveFile

      +

      Save an XML tree to a file.

      +

      int mxmlSaveFile ( +
          mxml_node_t *node, +
          FILE *fp, +
          mxml_save_cb_t cb +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to write
      +
      fp
      +
      File to write to
      +
      cb
      +
      Whitespace callback or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      0 on success, -1 on error.

      +

      Discussion

      +

      The callback argument specifies a function that + returns a whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

      +

      mxmlSaveString

      +

      Save an XML node tree to a string.

      +

      int mxmlSaveString ( +
          mxml_node_t *node, +
          char *buffer, +
          int bufsize, +
          mxml_save_cb_t cb +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to write
      +
      buffer
      +
      String buffer
      +
      bufsize
      +
      Size of string buffer
      +
      cb
      +
      Whitespace callback or MXML_NO_CALLBACK
      +
      +

      Return Value

      +

      Size of string

      +

      Discussion

      +

      This function returns the total number of bytes + that would be required for the string but only copies (bufsize - 1) + characters into the specified buffer. +
      +
      The callback argument specifies a function that returns a + whitespace string or NULL before and after each element. If + MXML_NO_CALLBACK is specified, whitespace will only be added before + MXML_TEXT nodes with leading whitespace and before attribute names + inside opening element tags.

      +

      + + Mini-XML 2.3 mxmlSetCDATA

      +

      Set the element name of a CDATA node.

      +

      int mxmlSetCDATA ( +
          mxml_node_t *node, +
          const char *data +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      data
      +
      New data string
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not a CDATA element node.

      +

      + + Mini-XML 2.1 mxmlSetCustom

      +

      Set the data and destructor of a custom data + node.

      +

      int mxmlSetCustom ( +
          mxml_node_t *node, +
          void *data, +
          mxml_custom_destroy_cb_t + destroy +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      data
      +
      New data pointer
      +
      destroy
      +
      New destructor function
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not a custom node.

      +

      +mxmlSetCustomHandlers

      +

      Set the handling functions for custom data.

      +

      void mxmlSetCustomHandlers ( +
          mxml_custom_load_cb_t + load, +
          mxml_custom_save_cb_t save +
      );

      +

      Parameters

      +
      +
      load
      +
      Load function
      +
      save
      +
      Save function
      +
      +

      Discussion

      +

      The load function accepts a node pointer and a + data string and must return 0 on success and non-zero on error. +
      +
      The save function accepts a node pointer and must return a malloc'd + string on success and NULL on error.

      +

      mxmlSetElement

      +

      Set the name of an element node.

      +

      int mxmlSetElement ( +
          mxml_node_t *node, +
          const char *name +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      name
      +
      New name string
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it is not an element + node.

      +

      mxmlSetErrorCallback +

      +

      Set the error message callback.

      +

      void mxmlSetErrorCallback ( +
          mxml_error_cb_t cb +
      );

      +

      Parameters

      +
      +
      cb
      +
      Error callback function
      +
      +

      mxmlSetInteger

      +

      Set the value of an integer node.

      +

      int mxmlSetInteger ( +
          mxml_node_t *node, +
          int integer +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      integer
      +
      Integer value
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not an integer node.

      +

      mxmlSetOpaque

      +

      Set the value of an opaque node.

      +

      int mxmlSetOpaque ( +
          mxml_node_t *node, +
          const char *opaque +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      opaque
      +
      Opaque string
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not an opaque node.

      +

      mxmlSetReal

      +

      Set the value of a real number node.

      +

      int mxmlSetReal ( +
          mxml_node_t *node, +
          double real +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      real
      +
      Real number value
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not a real number node.

      +

      mxmlSetText

      +

      Set the value of a text node.

      +

      int mxmlSetText ( +
          mxml_node_t *node, +
          int whitespace, +
          const char *string +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      whitespace
      +
      1 = leading whitespace, 0 = no whitespace
      +
      string
      +
      String
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not a text node.

      +

      mxmlSetTextf

      +

      Set the value of a text node to a formatted + string.

      +

      int mxmlSetTextf ( +
          mxml_node_t *node, +
          int whitespace, +
          const char *format, +
          ... +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      whitespace
      +
      1 = leading whitespace, 0 = no whitespace
      +
      format
      +
      Printf-style format string
      +
      ...
      +
      Additional arguments as needed
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) + is not a text node.

      +

      + + Mini-XML 2.7 mxmlSetUserData

      +

      Set the user data pointer for a node.

      +

      int mxmlSetUserData ( +
          mxml_node_t *node, +
          void *data +
      );

      +

      Parameters

      +
      +
      node
      +
      Node to set
      +
      data
      +
      User data pointer
      +
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      + + Mini-XML 2.3 mxmlSetWrapMargin

      +

      Set the wrap margin when saving XML data.

      +

      void mxmlSetWrapMargin ( +
          int column +
      );

      +

      Parameters

      +
      +
      column
      +
      Column for wrapping, 0 to disable wrapping
      +
      +

      Discussion

      +

      Wrapping is disabled when "column" is 0.

      +

      mxmlWalkNext

      +

      Walk to the next logical node in the tree.

      +

      mxml_node_t *mxmlWalkNext ( +
          mxml_node_t *node, +
          mxml_node_t *top, +
          int descend +
      );

      +

      Parameters

      +
      +
      node
      +
      Current node
      +
      top
      +
      Top node
      +
      descend
      +
      Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +
      +

      Return Value

      +

      Next node or NULL

      +

      Discussion

      +

      The descend argument controls whether the first + child is considered to be the next node. The top node argument + constrains the walk to the node's children.

      +

      mxmlWalkPrev

      +

      Walk to the previous logical node in the tree.

      +

      mxml_node_t *mxmlWalkPrev ( +
          mxml_node_t *node, +
          mxml_node_t *top, +
          int descend +
      );

      +

      Parameters

      +
      +
      node
      +
      Current node
      +
      top
      +
      Top node
      +
      descend
      +
      Descend into tree - MXML_DESCEND, + MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +
      +

      Return Value

      +

      Previous node or NULL

      +

      Discussion

      +

      The descend argument controls whether the previous + node's last child is considered to be the previous node. The top node + argument constrains the walk to the node's children.

      +

      Data Types

      +

      +mxml_custom_destroy_cb_t

      +

      Custom data destructor

      +

      typedef void (*mxml_custom_destroy_cb_t)(void *);

      +

      +mxml_custom_load_cb_t

      +

      Custom data load callback function

      +

      typedef int (*mxml_custom_load_cb_t)( +mxml_node_t *, const char *);

      +

      +mxml_custom_save_cb_t

      +

      Custom data save callback function

      +

      typedef char *(*mxml_custom_save_cb_t)( +mxml_node_t *);

      +

      mxml_entity_cb_t

      +

      Entity callback function

      +

      typedef int (*mxml_entity_cb_t)(const char *);

      +

      mxml_error_cb_t

      +

      Error callback function

      +

      typedef void (*mxml_error_cb_t)(const char *);

      +

      mxml_index_t

      +

      An XML node index.

      +

      typedef struct mxml_index_s + mxml_index_t;

      +

      mxml_load_cb_t

      +

      Load callback function

      +

      typedef mxml_type_t + (*mxml_load_cb_t)(mxml_node_t *);

      +

      mxml_node_t

      +

      An XML node.

      +

      typedef struct mxml_node_s + mxml_node_t;

      +

      mxml_save_cb_t

      +

      Save callback function

      +

      typedef const char *(*mxml_save_cb_t)( +mxml_node_t *, int);

      +

      mxml_sax_cb_t

      +

      SAX callback function

      +

      typedef void (*mxml_sax_cb_t)( +mxml_node_t *, mxml_sax_event_t, void *);

      +

      mxml_sax_event_t

      +

      SAX event type.

      +

      typedef enum +mxml_sax_event_e mxml_sax_event_t;

      +

      mxml_type_t

      +

      The XML node type.

      +

      typedef enum mxml_type_e + mxml_type_t;

      +

      Constants

      +

      mxml_sax_event_e

      +

      SAX event type.

      +

      Constants

      +
      +
      MXML_SAX_CDATA
      +
      CDATA node
      +
      MXML_SAX_COMMENT
      +
      Comment node
      +
      MXML_SAX_DATA
      +
      Data node
      +
      MXML_SAX_DIRECTIVE
      +
      Processing directive node
      +
      MXML_SAX_ELEMENT_CLOSE
      +
      Element closed
      +
      MXML_SAX_ELEMENT_OPEN
      +
      Element opened
      +
      +

      mxml_type_e

      +

      The XML node type.

      +

      Constants

      +
      +
      MXML_CUSTOM + +  Mini-XML 2.1 
      +
      Custom data
      +
      MXML_ELEMENT
      +
      XML element with attributes
      +
      MXML_IGNORE + +  Mini-XML 2.3 
      +
      Ignore/throw away node
      +
      MXML_INTEGER
      +
      Integer value
      +
      MXML_OPAQUE
      +
      Opaque string
      +
      MXML_REAL
      +
      Real value
      +
      MXML_TEXT
      +
      Text fragment
      +
      +

      +

      Appendix C - XML Schema

      +

      This appendix provides the XML schema that is used for the XML files + produced by mxmldoc. This schema is available on-line at:

      +
      +    https://michaelrsweet.github.io/mxml/mxmldoc.xsd
      +
      +

      mxmldoc.xsd

      +
      
      +<?xml version="1.0"?>
      +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      +  <xsd:annotation>
      +    <xsd:documentation xml:lang="en">
      +      Mini-XML 2.11 documentation schema for mxmldoc output.
      +      Copyright 2003-2017 by Michael R Sweet.
      +    </xsd:documentation>
      +  </xsd:annotation>
      +
      +  <!-- basic element definitions -->
      +  <xsd:element name="argument" type="argumentType"/>
      +  <xsd:element name="class" type="classType"/>
      +  <xsd:element name="constant" type="constantType"/>
      +  <xsd:element name="description" type="xsd:string"/>
      +  <xsd:element name="enumeration" type="enumerationType"/>
      +  <xsd:element name="function" type="functionType"/>
      +  <xsd:element name="mxmldoc" type="mxmldocType"/>
      +  <xsd:element name="namespace" type="namespaceType"/>
      +  <xsd:element name="returnvalue" type="returnvalueType"/>
      +  <xsd:element name="seealso" type="identifierList"/>
      +  <xsd:element name="struct" type="structType"/>
      +  <xsd:element name="typedef" type="typedefType"/>
      +  <xsd:element name="type" type="xsd:string"/>
      +  <xsd:element name="union" type="unionType"/>
      +  <xsd:element name="variable" type="variableType"/>
      +
      +  <!-- descriptions of complex elements -->
      +  <xsd:complexType name="argumentType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="default" type="xsd:string" use="optional"/>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="direction" type="direction" use="optional"
      +     default="I"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="classType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="class"/>
      +	<xsd:element ref="enumeration"/>
      +	<xsd:element ref="function"/>
      +	<xsd:element ref="struct"/>
      +	<xsd:element ref="typedef"/>
      +	<xsd:element ref="union"/>
      +	<xsd:element ref="variable"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="parent" type="xsd:string" use="optional"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="constantType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="enumerationType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="constant" minOccurs="1" maxOccurs="unbounded"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="functionType">
      +    <xsd:sequence>
      +      <xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="argument" minOccurs="1" maxOccurs="unbounded"/>
      +      <xsd:element ref="seealso" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="scope" type="scope" use="optional"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="mxmldocType">
      +    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +      <xsd:element ref="class"/>
      +      <xsd:element ref="enumeration"/>
      +      <xsd:element ref="function"/>
      +      <xsd:element ref="namespace"/>
      +      <xsd:element ref="struct"/>
      +      <xsd:element ref="typedef"/>
      +      <xsd:element ref="union"/>
      +      <xsd:element ref="variable"/>
      +    </xsd:choice>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="namespaceType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="class"/>
      +	<xsd:element ref="enumeration"/>
      +	<xsd:element ref="function"/>
      +	<xsd:element ref="struct"/>
      +	<xsd:element ref="typedef"/>
      +	<xsd:element ref="union"/>
      +	<xsd:element ref="variable"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="returnvalueType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="structType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="variable"/>
      +	<xsd:element ref="function"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="typedefType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="unionType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="variableType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <!-- data types -->
      +  <xsd:simpleType name="direction">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:enumeration value="I"/>
      +      <xsd:enumeration value="O"/>
      +      <xsd:enumeration value="IO"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="identifier">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:pattern value="[a-zA-Z_(.]([a-zA-Z_(.,)* 0-9])*"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="identifierList">
      +    <xsd:list itemType="identifier"/>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="scope">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:enumeration value=""/>
      +      <xsd:enumeration value="private"/>
      +      <xsd:enumeration value="protected"/>
      +      <xsd:enumeration value="public"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +</xsd:schema>
      +
      + + diff --git a/lib/libmxml/doc/mxml.man b/lib/libmxml/doc/mxml.man new file mode 100644 index 0000000..2b7dee5 --- /dev/null +++ b/lib/libmxml/doc/mxml.man @@ -0,0 +1,1329 @@ +.TH mxml 3 "Mini-XML API" "04/30/21" "Mini-XML API" +.SH NAME +mxml \- Mini-XML API +.SH INCLUDE FILE +#include +.SH LIBRARY +\-lmxml +.SH DESCRIPTION +Mini-XML is a small XML parsing library that you can use to +read XML and XML-like data files in your application without +requiring large non-standard libraries. Mini-XML only +requires an ANSI C compatible compiler (GCC works, as do +most vendors' ANSI C compilers) and a "make" program. +.PP +Mini-XML provides the following functionality: +.IP \(bu 4 +Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and strings. +.IP \(bu 4 +Data is stored in a linked-list tree structure, +preserving the XML data hierarchy. +.IP \(bu 4 +Supports arbitrary element names, attributes, and attribute +values with no preset limits, just available memory. +.IP \(bu 4 +Supports integer, real, opaque ("CDATA"), and text data types in +"leaf" nodes. +.IP \(bu 4 +Functions for creating, indexing, and managing trees of data. +.IP \(bu 4 +"Find" and "walk" functions for easily locating and navigating +trees of data. +.PP +Mini-XML doesn't do validation or other types of processing +on the data based upon schema files or other sources of +definition information, nor does it support character +entities other than those required by the XML +specification. +.SH USING MINI-XML +Mini-XML provides a single header file which you include: +.nf + + #include +.fi +.PP +Nodes are defined by the "mxml_node_t" structure; the "type" +member defines the node type (element, integer, opaque, +real, or text) which determines which value you want to look +at in the "value" union. New nodes can be created using the +"mxmlNewElement()", "mxmlNewInteger()", "mxmlNewOpaque()", +"mxmlNewReal()", and "mxmlNewText()" functions. Only +elements can have child nodes, and the top node must be an +element, usually "?xml". +.PP +You load an XML file using the "mxmlLoadFile()" function: +.nf + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "r"); + tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); + fclose(fp); +.fi +.PP +Similarly, you save an XML file using the "mxmlSaveFile()" +function: +.nf + + FILE *fp; + mxml_node_t *tree; + + fp = fopen("filename.xml", "w"); + mxmlSaveFile(tree, fp, MXML_NO_CALLBACK); + fclose(fp); +.fi +.PP +The "mxmlLoadString()", "mxmlSaveAllocString()", and +"mxmlSaveString()" functions load XML node trees from and save +XML node trees to strings: +.nf + + char buffer[8192]; + char *ptr; + mxml_node_t *tree; + + ... + tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK); + + ... + mxmlSaveString(tree, buffer, sizeof(buffer), + MXML_NO_CALLBACK); + + ... + ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK); +.fi +.PP +You can find a named element/node using the "mxmlFindElement()" +function: +.nf + + mxml_node_t *node = mxmlFindElement(tree, tree, "name", + "attr", "value", + MXML_DESCEND); +.fi +.PP +The "name", "attr", and "value" arguments can be passed as +NULL to act as wildcards, e.g.: +.nf + + /* Find the first "a" element */ + node = mxmlFindElement(tree, tree, "a", NULL, NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" attribute */ + node = mxmlFindElement(tree, tree, "a", "href", NULL, + MXML_DESCEND); + + /* Find the first "a" element with "href" to a URL */ + node = mxmlFindElement(tree, tree, "a", "href", + "http://www.easysw.com/~mike/mxml/", + MXML_DESCEND); + + /* Find the first element with a "src" attribute*/ + node = mxmlFindElement(tree, tree, NULL, "src", NULL, + MXML_DESCEND); + + /* Find the first element with a "src" = "foo.jpg" */ + node = mxmlFindElement(tree, tree, NULL, "src", + "foo.jpg", MXML_DESCEND); +.fi +.PP +You can also iterate with the same function: +.nf + + mxml_node_t *node; + + for (node = mxmlFindElement(tree, tree, "name", NULL, + NULL, MXML_DESCEND); + node != NULL; + node = mxmlFindElement(node, tree, "name", NULL, + NULL, MXML_DESCEND)) + { + ... do something ... + } +.fi +.PP +To find the value of a specific node in the tree, use the "mxmlFindPath()" +function: +.nf + + mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar"); +.fi +.PP +The "mxmlGetInteger()", "mxmlGetOpaque()", "mxmlGetReal()", and "mxmlGetText()" +functions retrieve the value from a node: +.nf + + mxml_node_t *node; + + int intvalue = mxmlGetInteger(node); + + const char *opaquevalue = mxmlGetOpaque(node); + + double realvalue = mxmlGetReal(node); + + int whitespacevalue; + const char *textvalue = mxmlGetText(node, &whitespacevalue); +.fi +.PP +Finally, once you are done with the XML data, use the +"mxmlDelete()" function to recursively free the memory that +is used for a particular node or the entire tree: +.nf + + mxmlDelete(tree); +.fi +.SH ENUMERATIONS +.SS mxml_sax_event_e +SAX event type. +.TP 5 +MXML_SAX_CDATA +.br +CDATA node +.TP 5 +MXML_SAX_COMMENT +.br +Comment node +.TP 5 +MXML_SAX_DATA +.br +Data node +.TP 5 +MXML_SAX_DIRECTIVE +.br +Processing directive node +.TP 5 +MXML_SAX_ELEMENT_CLOSE +.br +Element closed +.TP 5 +MXML_SAX_ELEMENT_OPEN +.br +Element opened +.SS mxml_type_e +The XML node type. +.TP 5 +MXML_CUSTOM +.br +Custom data +.TP 5 +MXML_ELEMENT +.br +XML element with attributes +.TP 5 +MXML_IGNORE +.br +Ignore/throw away node +.TP 5 +MXML_INTEGER +.br +Integer value +.TP 5 +MXML_OPAQUE +.br +Opaque string +.TP 5 +MXML_REAL +.br +Real value +.TP 5 +MXML_TEXT +.br +Text fragment +.SH FUNCTIONS +.SS mxmlAdd +Add a node to a tree. +.PP +.nf +void mxmlAdd ( + mxml_node_t *parent, + int where, + mxml_node_t *child, + mxml_node_t *node +); +.fi +.PP +Adds the specified node to the parent. If the child argument is not +\fBNULL\fR, puts the new node before or after the specified child depending +on the value of the where argument. If the child argument is \fBNULL\fR, +puts the new node at the beginning of the child list (\fBMXML_ADD_BEFORE\fR) +or at the end of the child list (\fBMXML_ADD_AFTER\fR). The constant +\fBMXML_ADD_TO_PARENT\fR can be used to specify a \fBNULL\fR child pointer. +.SS mxmlDelete +Delete a node and all of its children. +.PP +.nf +void mxmlDelete ( + mxml_node_t *node +); +.fi +.PP +If the specified node has a parent, this function first removes the +node from its parent using the \fImxmlRemove\fR function. +.SS mxmlElementDeleteAttr +Delete an attribute. +.PP +.nf +void mxmlElementDeleteAttr ( + mxml_node_t *node, + const char *name +); +.fi +.PP + +.SS mxmlElementGetAttr +Get an attribute. +.PP +.nf +const char * mxmlElementGetAttr ( + mxml_node_t *node, + const char *name +); +.fi +.PP +This function returns \fBNULL\fR if the node is not an element or the +named attribute does not exist. +.SS mxmlElementGetAttrByIndex +Get an element attribute by index. +.PP +.nf +const char * mxmlElementGetAttrByIndex ( + mxml_node_t *node, + int idx, + const char **name +); +.fi +.PP +The index ("idx") is 0-based. \fBNULL\fR is returned if the specified index +is out of range. + + +.SS mxmlElementGetAttrCount +Get the number of element attributes. +.PP +.nf +int mxmlElementGetAttrCount ( + mxml_node_t *node +); +.fi +.PP + +.SS mxmlElementSetAttr +Set an attribute. +.PP +.nf +void mxmlElementSetAttr ( + mxml_node_t *node, + const char *name, + const char *value +); +.fi +.PP +If the named attribute already exists, the value of the attribute +is replaced by the new string value. The string value is copied +into the element node. This function does nothing if the node is +not an element. +.SS mxmlElementSetAttrf +Set an attribute with a formatted value. +.PP +.nf +void mxmlElementSetAttrf ( + mxml_node_t *node, + const char *name, + const char *format, + ... +); +.fi +.PP +If the named attribute already exists, the value of the attribute +is replaced by the new formatted string. The formatted string value is +copied into the element node. This function does nothing if the node +is not an element. + + +.SS mxmlEntityAddCallback +Add a callback to convert entities to Unicode. +.PP +.nf +int mxmlEntityAddCallback ( + mxml_entity_cb_t cb +); +.fi +.SS mxmlEntityGetName +Get the name that corresponds to the character value. +.PP +.nf +const char * mxmlEntityGetName ( + int val +); +.fi +.PP +If val does not need to be represented by a named entity, \fBNULL\fR is returned. +.SS mxmlEntityGetValue +Get the character corresponding to a named entity. +.PP +.nf +int mxmlEntityGetValue ( + const char *name +); +.fi +.PP +The entity name can also be a numeric constant. -1 is returned if the +name is not known. +.SS mxmlEntityRemoveCallback +Remove a callback. +.PP +.nf +void mxmlEntityRemoveCallback ( + mxml_entity_cb_t cb +); +.fi +.SS mxmlFindElement +Find the named element. +.PP +.nf +mxml_node_t * mxmlFindElement ( + mxml_node_t *node, + mxml_node_t *top, + const char *element, + const char *attr, + const char *value, + int descend +); +.fi +.PP +The search is constrained by the name, attribute name, and value; any +\fBNULL\fR names or values are treated as wildcards, so different kinds of +searches can be implemented by looking for all elements of a given name +or all elements with a specific attribute. The descend argument determines +whether the search descends into child nodes; normally you will use +\fBMXML_DESCEND_FIRST\fR for the initial search and \fBMXML_NO_DESCEND\fR +to find additional direct descendents of the node. The top node argument +constrains the search to a particular node's children. +.SS mxmlFindPath +Find a node with the given path. +.PP +.nf +mxml_node_t * mxmlFindPath ( + mxml_node_t *top, + const char *path +); +.fi +.PP +The "path" is a slash-separated list of element names. The name "*" is +considered a wildcard for one or more levels of elements. For example, +"foo/one/two", "bar/two/one", "*/one", and so forth. +.PP +The first child node of the found node is returned if the given node has +children and the first child is a value node. + + +.SS mxmlGetCDATA +Get the value for a CDATA node. +.PP +.nf +const char * mxmlGetCDATA ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node is not a CDATA element. + + +.SS mxmlGetCustom +Get the value for a custom node. +.PP +.nf +const void * mxmlGetCustom ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node (or its first child) is not a custom +value node. + + +.SS mxmlGetElement +Get the name for an element node. +.PP +.nf +const char * mxmlGetElement ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node is not an element node. + + +.SS mxmlGetFirstChild +Get the first child of an element node. +.PP +.nf +mxml_node_t * mxmlGetFirstChild ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node is not an element node or if the node +has no children. + + +.SS mxmlGetInteger +Get the integer value from the specified node or its +first child. +.PP +.nf +int mxmlGetInteger ( + mxml_node_t *node +); +.fi +.PP +0 is returned if the node (or its first child) is not an integer value node. + + +.SS mxmlGetLastChild +Get the last child of an element node. +.PP +.nf +mxml_node_t * mxmlGetLastChild ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node is not an element node or if the node +has no children. + + +.SS mxmlGetNextSibling + +.PP +.nf +mxml_node_t * mxmlGetNextSibling ( + mxml_node_t *node +); +.fi +.SS mxmlGetOpaque +Get an opaque string value for a node or its first child. +.PP +.nf +const char * mxmlGetOpaque ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if the node (or its first child) is not an opaque +value node. + + +.SS mxmlGetParent +Get the parent node. +.PP +.nf +mxml_node_t * mxmlGetParent ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned for a root node. + + +.SS mxmlGetPrevSibling +Get the previous node for the current parent. +.PP +.nf +mxml_node_t * mxmlGetPrevSibling ( + mxml_node_t *node +); +.fi +.PP +\fBNULL\fR is returned if this is the first child for the current parent. + + +.SS mxmlGetReal +Get the real value for a node or its first child. +.PP +.nf +double mxmlGetReal ( + mxml_node_t *node +); +.fi +.PP +0.0 is returned if the node (or its first child) is not a real value node. + + +.SS mxmlGetRefCount +Get the current reference (use) count for a node. +.PP +.nf +int mxmlGetRefCount ( + mxml_node_t *node +); +.fi +.PP +The initial reference count of new nodes is 1. Use the \fImxmlRetain\fR +and \fImxmlRelease\fR functions to increment and decrement a node's +reference count. + +\. +.SS mxmlGetText +Get the text value for a node or its first child. +.PP +.nf +const char * mxmlGetText ( + mxml_node_t *node, + int *whitespace +); +.fi +.PP +\fBNULL\fR is returned if the node (or its first child) is not a text node. +The "whitespace" argument can be \fBNULL\fR. + + +.SS mxmlGetType +Get the node type. +.PP +.nf +mxml_type_t mxmlGetType ( + mxml_node_t *node +); +.fi +.PP +\fBMXML_IGNORE\fR is returned if "node" is \fBNULL\fR. + + +.SS mxmlGetUserData +Get the user data pointer for a node. +.PP +.nf +void * mxmlGetUserData ( + mxml_node_t *node +); +.fi +.PP + +.SS mxmlIndexDelete +Delete an index. +.PP +.nf +void mxmlIndexDelete ( + mxml_index_t *ind +); +.fi +.SS mxmlIndexEnum +Return the next node in the index. +.PP +.nf +mxml_node_t * mxmlIndexEnum ( + mxml_index_t *ind +); +.fi +.PP +You should call \fImxmlIndexReset\fR prior to using this function to get +the first node in the index. Nodes are returned in the sorted order of the +index. +.SS mxmlIndexFind +Find the next matching node. +.PP +.nf +mxml_node_t * mxmlIndexFind ( + mxml_index_t *ind, + const char *element, + const char *value +); +.fi +.PP +You should call \fImxmlIndexReset\fR prior to using this function for +the first time with a particular set of "element" and "value" +strings. Passing \fBNULL\fR for both "element" and "value" is equivalent +to calling \fImxmlIndexEnum\fR. +.SS mxmlIndexGetCount +Get the number of nodes in an index. +.PP +.nf +int mxmlIndexGetCount ( + mxml_index_t *ind +); +.fi +.PP + +.SS mxmlIndexNew +Create a new index. +.PP +.nf +mxml_index_t * mxmlIndexNew ( + mxml_node_t *node, + const char *element, + const char *attr +); +.fi +.PP +The index will contain all nodes that contain the named element and/or +attribute. If both "element" and "attr" are \fBNULL\fR, then the index will +contain a sorted list of the elements in the node tree. Nodes are +sorted by element name and optionally by attribute value if the "attr" +argument is not NULL. +.SS mxmlIndexReset +Reset the enumeration/find pointer in the index and +return the first node in the index. +.PP +.nf +mxml_node_t * mxmlIndexReset ( + mxml_index_t *ind +); +.fi +.PP +This function should be called prior to using \fImxmlIndexEnum\fR or +\fImxmlIndexFind\fR for the first time. +.SS mxmlLoadFd +Load a file descriptor into an XML node tree. +.PP +.nf +mxml_node_t * mxmlLoadFd ( + mxml_node_t *top, + int fd, + mxml_load_cb_t cb +); +.fi +.PP +The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child (data) nodes of the specified type. +.SS mxmlLoadFile +Load a file into an XML node tree. +.PP +.nf +mxml_node_t * mxmlLoadFile ( + mxml_node_t *top, + FILE *fp, + mxml_load_cb_t cb +); +.fi +.PP +The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child (data) nodes of the specified type. +.SS mxmlLoadString +Load a string into an XML node tree. +.PP +.nf +mxml_node_t * mxmlLoadString ( + mxml_node_t *top, + const char *s, + mxml_load_cb_t cb +); +.fi +.PP +The nodes in the specified string are added to the specified top node. +If no top node is provided, the XML string MUST be well-formed with a +single parent node like for the entire string. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child (data) nodes of the specified type. +.SS mxmlNewCDATA +Create a new CDATA node. +.PP +.nf +mxml_node_t * mxmlNewCDATA ( + mxml_node_t *parent, + const char *data +); +.fi +.PP +The new CDATA node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +CDATA node has no parent. The data string must be nul-terminated and +is copied into the new node. CDATA nodes currently use the +\fBMXML_ELEMENT\fR type. + + +.SS mxmlNewCustom +Create a new custom data node. +.PP +.nf +mxml_node_t * mxmlNewCustom ( + mxml_node_t *parent, + void *data, + mxml_custom_destroy_cb_t destroy +); +.fi +.PP +The new custom node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +element node has no parent. \fBNULL\fR can be passed when the data in the +node is not dynamically allocated or is separately managed. + + +.SS mxmlNewElement +Create a new element node. +.PP +.nf +mxml_node_t * mxmlNewElement ( + mxml_node_t *parent, + const char *name +); +.fi +.PP +The new element node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +element node has no parent. +.SS mxmlNewInteger +Create a new integer node. +.PP +.nf +mxml_node_t * mxmlNewInteger ( + mxml_node_t *parent, + int integer +); +.fi +.PP +The new integer node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +integer node has no parent. +.SS mxmlNewOpaque +Create a new opaque string. +.PP +.nf +mxml_node_t * mxmlNewOpaque ( + mxml_node_t *parent, + const char *opaque +); +.fi +.PP +The new opaque string node is added to the end of the specified parent's +child list. The constant \fBMXML_NO_PARENT\fR can be used to specify that +the new opaque string node has no parent. The opaque string must be nul- +terminated and is copied into the new node. +.SS mxmlNewOpaquef +Create a new formatted opaque string node. +.PP +.nf +mxml_node_t * mxmlNewOpaquef ( + mxml_node_t *parent, + const char *format, + ... +); +.fi +.PP +The new opaque string node is added to the end of the specified parent's +child list. The constant \fBMXML_NO_PARENT\fR can be used to specify that +the new opaque string node has no parent. The format string must be +nul-terminated and is formatted into the new node. +.SS mxmlNewReal +Create a new real number node. +.PP +.nf +mxml_node_t * mxmlNewReal ( + mxml_node_t *parent, + double real +); +.fi +.PP +The new real number node is added to the end of the specified parent's +child list. The constant \fBMXML_NO_PARENT\fR can be used to specify that +the new real number node has no parent. +.SS mxmlNewText +Create a new text fragment node. +.PP +.nf +mxml_node_t * mxmlNewText ( + mxml_node_t *parent, + int whitespace, + const char *string +); +.fi +.PP +The new text node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +text node has no parent. The whitespace parameter is used to specify +whether leading whitespace is present before the node. The text +string must be nul-terminated and is copied into the new node. +.SS mxmlNewTextf +Create a new formatted text fragment node. +.PP +.nf +mxml_node_t * mxmlNewTextf ( + mxml_node_t *parent, + int whitespace, + const char *format, + ... +); +.fi +.PP +The new text node is added to the end of the specified parent's child +list. The constant \fBMXML_NO_PARENT\fR can be used to specify that the new +text node has no parent. The whitespace parameter is used to specify +whether leading whitespace is present before the node. The format +string must be nul-terminated and is formatted into the new node. +.SS mxmlNewXML +Create a new XML document tree. +.PP +.nf +mxml_node_t * mxmlNewXML ( + const char *version +); +.fi +.PP +The "version" argument specifies the version number to put in the +?xml element node. If \fBNULL\fR, version "1.0" is assumed. + + +.SS mxmlRelease +Release a node. +.PP +.nf +int mxmlRelease ( + mxml_node_t *node +); +.fi +.PP +When the reference count reaches zero, the node (and any children) +is deleted via \fImxmlDelete\fR. + + +.SS mxmlRemove +Remove a node from its parent. +.PP +.nf +void mxmlRemove ( + mxml_node_t *node +); +.fi +.PP +This function does not free memory used by the node - use \fImxmlDelete\fR +for that. This function does nothing if the node has no parent. +.SS mxmlRetain +Retain a node. +.PP +.nf +int mxmlRetain ( + mxml_node_t *node +); +.fi +.PP + +.SS mxmlSAXLoadFd +Load a file descriptor into an XML node tree +using a SAX callback. +.PP +.nf +mxml_node_t * mxmlSAXLoadFd ( + mxml_node_t *top, + int fd, + mxml_load_cb_t cb, + mxml_sax_cb_t sax_cb, + void *sax_data +); +.fi +.PP +The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child nodes of the specified type. +.PP +The SAX callback must call \fImxmlRetain\fR for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + + +.SS mxmlSAXLoadFile +Load a file into an XML node tree +using a SAX callback. +.PP +.nf +mxml_node_t * mxmlSAXLoadFile ( + mxml_node_t *top, + FILE *fp, + mxml_load_cb_t cb, + mxml_sax_cb_t sax_cb, + void *sax_data +); +.fi +.PP +The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child nodes of the specified type. +.PP +The SAX callback must call \fImxmlRetain\fR for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + + +.SS mxmlSAXLoadString +Load a string into an XML node tree +using a SAX callback. +.PP +.nf +mxml_node_t * mxmlSAXLoadString ( + mxml_node_t *top, + const char *s, + mxml_load_cb_t cb, + mxml_sax_cb_t sax_cb, + void *sax_data +); +.fi +.PP +The nodes in the specified string are added to the specified top node. +If no top node is provided, the XML string MUST be well-formed with a +single parent node like for the entire string. The callback +function returns the value type that should be used for child nodes. +The constants \fBMXML_INTEGER_CALLBACK\fR, \fBMXML_OPAQUE_CALLBACK\fR, +\fBMXML_REAL_CALLBACK\fR, and \fBMXML_TEXT_CALLBACK\fR are defined for +loading child nodes of the specified type. +.PP +The SAX callback must call \fImxmlRetain\fR for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + + +.SS mxmlSaveAllocString +Save an XML tree to an allocated string. +.PP +.nf +char * mxmlSaveAllocString ( + mxml_node_t *node, + mxml_save_cb_t cb +); +.fi +.PP +This function returns a pointer to a string containing the textual +representation of the XML node tree. The string should be freed +using the free() function when you are done with it. \fBNULL\fR is returned +if the node would produce an empty string or if the string cannot be +allocated. +.PP +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If \fBMXML_NO_CALLBACK\fR +is specified, whitespace will only be added before \fBMXML_TEXT\fR nodes +with leading whitespace and before attribute names inside opening +element tags. +.SS mxmlSaveFd +Save an XML tree to a file descriptor. +.PP +.nf +int mxmlSaveFd ( + mxml_node_t *node, + int fd, + mxml_save_cb_t cb +); +.fi +.PP +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If \fBMXML_NO_CALLBACK\fR +is specified, whitespace will only be added before \fBMXML_TEXT\fR nodes +with leading whitespace and before attribute names inside opening +element tags. +.SS mxmlSaveFile +Save an XML tree to a file. +.PP +.nf +int mxmlSaveFile ( + mxml_node_t *node, + FILE *fp, + mxml_save_cb_t cb +); +.fi +.PP +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If \fBMXML_NO_CALLBACK\fR +is specified, whitespace will only be added before \fBMXML_TEXT\fR nodes +with leading whitespace and before attribute names inside opening +element tags. +.SS mxmlSaveString +Save an XML node tree to a string. +.PP +.nf +int mxmlSaveString ( + mxml_node_t *node, + char *buffer, + int bufsize, + mxml_save_cb_t cb +); +.fi +.PP +This function returns the total number of bytes that would be +required for the string but only copies (bufsize - 1) characters +into the specified buffer. +.PP +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If \fBMXML_NO_CALLBACK\fR +is specified, whitespace will only be added before \fBMXML_TEXT\fR nodes +with leading whitespace and before attribute names inside opening +element tags. +.SS mxmlSetCDATA +Set the element name of a CDATA node. +.PP +.nf +int mxmlSetCDATA ( + mxml_node_t *node, + const char *data +); +.fi +.PP +The node is not changed if it (or its first child) is not a CDATA element node. + + +.SS mxmlSetCustom +Set the data and destructor of a custom data node. +.PP +.nf +int mxmlSetCustom ( + mxml_node_t *node, + void *data, + mxml_custom_destroy_cb_t destroy +); +.fi +.PP +The node is not changed if it (or its first child) is not a custom node. + + +.SS mxmlSetCustomHandlers +Set the handling functions for custom data. +.PP +.nf +void mxmlSetCustomHandlers ( + mxml_custom_load_cb_t load, + mxml_custom_save_cb_t save +); +.fi +.PP +The load function accepts a node pointer and a data string and must +return 0 on success and non-zero on error. +.PP +The save function accepts a node pointer and must return a malloc'd +string on success and \fBNULL\fR on error. +.SS mxmlSetElement +Set the name of an element node. +.PP +.nf +int mxmlSetElement ( + mxml_node_t *node, + const char *name +); +.fi +.PP +The node is not changed if it is not an element node. +.SS mxmlSetErrorCallback +Set the error message callback. +.PP +.nf +void mxmlSetErrorCallback ( + mxml_error_cb_t cb +); +.fi +.SS mxmlSetInteger +Set the value of an integer node. +.PP +.nf +int mxmlSetInteger ( + mxml_node_t *node, + int integer +); +.fi +.PP +The node is not changed if it (or its first child) is not an integer node. +.SS mxmlSetOpaque +Set the value of an opaque node. +.PP +.nf +int mxmlSetOpaque ( + mxml_node_t *node, + const char *opaque +); +.fi +.PP +The node is not changed if it (or its first child) is not an opaque node. +.SS mxmlSetOpaquef +Set the value of an opaque string node to a formatted string. +.PP +.nf +int mxmlSetOpaquef ( + mxml_node_t *node, + const char *format, + ... +); +.fi +.PP +The node is not changed if it (or its first child) is not an opaque node. + + +.SS mxmlSetReal +Set the value of a real number node. +.PP +.nf +int mxmlSetReal ( + mxml_node_t *node, + double real +); +.fi +.PP +The node is not changed if it (or its first child) is not a real number node. +.SS mxmlSetText +Set the value of a text node. +.PP +.nf +int mxmlSetText ( + mxml_node_t *node, + int whitespace, + const char *string +); +.fi +.PP +The node is not changed if it (or its first child) is not a text node. +.SS mxmlSetTextf +Set the value of a text node to a formatted string. +.PP +.nf +int mxmlSetTextf ( + mxml_node_t *node, + int whitespace, + const char *format, + ... +); +.fi +.PP +The node is not changed if it (or its first child) is not a text node. +.SS mxmlSetUserData +Set the user data pointer for a node. +.PP +.nf +int mxmlSetUserData ( + mxml_node_t *node, + void *data +); +.fi +.PP + +.SS mxmlSetWrapMargin +Set the wrap margin when saving XML data. +.PP +.nf +void mxmlSetWrapMargin ( + int column +); +.fi +.PP +Wrapping is disabled when "column" is 0. + + +.SS mxmlWalkNext +Walk to the next logical node in the tree. +.PP +.nf +mxml_node_t * mxmlWalkNext ( + mxml_node_t *node, + mxml_node_t *top, + int descend +); +.fi +.PP +The descend argument controls whether the first child is considered +to be the next node. The top node argument constrains the walk to +the node's children. +.SS mxmlWalkPrev +Walk to the previous logical node in the tree. +.PP +.nf +mxml_node_t * mxmlWalkPrev ( + mxml_node_t *node, + mxml_node_t *top, + int descend +); +.fi +.PP +The descend argument controls whether the previous node's last child +is considered to be the previous node. The top node argument constrains +the walk to the node's children. +.SH TYPES +.SS mxml_custom_destroy_cb_t +Custom data destructor +.PP +.nf +typedef void(*)(void *) mxml_custom_destroy_cb_t; +.fi +.SS mxml_custom_load_cb_t +Custom data load callback function +.PP +.nf +typedef int(*)(mxml_node_t *, const char *) mxml_custom_load_cb_t; +.fi +.SS mxml_custom_save_cb_t +Custom data save callback function +.PP +.nf +typedef char *(*)(mxml_node_t *) mxml_custom_save_cb_t; +.fi +.SS mxml_entity_cb_t +Entity callback function +.PP +.nf +typedef int(*)(const char *) mxml_entity_cb_t; +.fi +.SS mxml_error_cb_t +Error callback function +.PP +.nf +typedef void(*)(const char *) mxml_error_cb_t; +.fi +.SS mxml_index_t +An XML node index. +.PP +.nf +typedef struct mxml_index_s mxml_index_t; +.fi +.SS mxml_load_cb_t +Load callback function +.PP +.nf +typedef mxml_type_t(*)(mxml_node_t *) mxml_load_cb_t; +.fi +.SS mxml_node_t +An XML node. +.PP +.nf +typedef struct mxml_node_s mxml_node_t; +.fi +.SS mxml_save_cb_t +Save callback function +.PP +.nf +typedef const char *(*)(mxml_node_t *, int) mxml_save_cb_t; +.fi +.SS mxml_sax_cb_t +SAX callback function +.PP +.nf +typedef void(*)(mxml_node_t *, mxml_sax_event_t, void *) mxml_sax_cb_t; +.fi +.SS mxml_sax_event_t +SAX event type. +.PP +.nf +typedef enum mxml_sax_event_e mxml_sax_event_t; +.fi +.SS mxml_type_t +The XML node type. +.PP +.nf +typedef enum mxml_type_e mxml_type_t; +.fi +.SH SEE ALSO +mxmldoc(1), Mini-XML Programmers Manual, https://michaelrsweet.github.io/mxml +.SH COPYRIGHT +Copyright \[co] 2003-2017 by Michael R Sweet. diff --git a/lib/libmxml/doc/mxml.opacity b/lib/libmxml/doc/mxml.opacity new file mode 100644 index 0000000..6746c5e Binary files /dev/null and b/lib/libmxml/doc/mxml.opacity differ diff --git a/lib/libmxml/doc/mxml.pdf b/lib/libmxml/doc/mxml.pdf new file mode 100644 index 0000000..1b11b16 Binary files /dev/null and b/lib/libmxml/doc/mxml.pdf differ diff --git a/lib/libmxml/doc/mxml.png b/lib/libmxml/doc/mxml.png new file mode 100644 index 0000000..58f666f Binary files /dev/null and b/lib/libmxml/doc/mxml.png differ diff --git a/lib/libmxml/doc/mxmldoc.html b/lib/libmxml/doc/mxmldoc.html new file mode 100644 index 0000000..4e54370 --- /dev/null +++ b/lib/libmxml/doc/mxmldoc.html @@ -0,0 +1,218 @@ + + + +

      Chapter 4 - Using the mxmldoc +Utility

      + +

      This chapter describes how to use mxmldoc(1) program to +automatically generate documentation from C and C++ source +files.

      + + +

      The Basics

      + +

      Originally developed to generate the Mini-XML and CUPS API +documentation, mxmldoc is now a general-purpose utility +which scans C and C++ source files to produce HTML and man page +documentation along with an XML file representing the functions, +types, and definitions in those source files. Unlike popular +documentation generators like Doxygen or Javadoc, mxmldoc +uses in-line comments rather than comment headers, allowing for more +"natural" code documentation.

      + +

      By default, mxmldoc produces HTML documentation. For +example, the following command will scan all of the C source and +header files in the current directory and produce a HTML +documentation file called filename.html:

      + +
      +    mxmldoc *.h *.c >filename.html ENTER
      +
      + +

      You can also specify an XML file to create which contains all of +the information from the source files. For example, the following +command creates an XML file called filename.xml in +addition to the HTML file:

      + +
      +    mxmldoc filename.xml *.h *.c >filename.html ENTER
      +
      + +

      The --no-output option disables the normal HTML +output:

      + +
      +    mxmldoc --no-output filename.xml *.h *.c ENTER
      +
      + +

      You can then run mxmldoc again with the XML file alone +to generate the HTML documentation:

      + +
      +    mxmldoc filename.xml >filename.html ENTER
      +
      + +

      Creating Man Pages

      + +

      The --man filename option tells mxmldoc to +create a man page instead of HTML documentation, for example:

      + +
      +    mxmldoc --man filename filename.xml \
      +        >filename.man ENTER
      +
      +    mxmldoc --man filename *.h *.c \
      +        >filename.man ENTER
      +
      + +

      Creating EPUB Books

      + +

      The --epub filename.epub option tells mxmldoc to +create an EPUB book containing the HTML documentation, for example:

      + +
      +    mxmldoc --epub foo.epub *.h *.c foo.xml ENTER
      +
      + + +

      Creating Xcode Documentation Sets

      + +

      The --docset directory.docset option tells mxmldoc to +create an Xcode documentation set containing the HTML documentation, for +example:

      + +
      +    mxmldoc --docset foo.docset *.h *.c foo.xml ENTER
      +
      + +

      Xcode documentation sets can only be built on macOS with Xcode 3.0 or +higher installed.

      + + +

      Commenting Your Code

      + +

      As noted previously, mxmldoc looks for in-line comments +to describe the functions, types, and constants in your code. +Mxmldoc will document all public names it finds in your +source files - any names starting with the underscore character (_) +or names that are documented with the @private@ directive are treated as private +and are not documented.

      + +

      Comments appearing directly before a function or type definition +are used to document that function or type. Comments appearing after +argument, definition, return type, or variable declarations are used +to document that argument, definition, return type, or variable. For +example, the following code excerpt defines a key/value structure +and a function that creates a new instance of that structure:

      + +
      +    /* A key/value pair. This is used with the
      +       dictionary structure. */
      +
      +    struct keyval
      +    {
      +      char *key; /* Key string */
      +      char *val; /* Value string */
      +    };
      +
      +    /* Create a new key/value pair. */
      +
      +    struct keyval * /* New key/value pair */
      +    new_keyval(
      +        const char *key, /* Key string */
      +	const char *val) /* Value string */
      +    {
      +      ...
      +    }
      +
      + +

      Mxmldoc also knows to remove extra asterisks (*) from +the comment string, so the comment string:

      + +
      +    /*
      +     * Compute the value of PI.
      +     *
      +     * The function connects to an Internet server
      +     * that streams audio of mathematical monks
      +     * chanting the first 100 digits of PI.
      +     */
      +
      + +

      will be shown as:

      + +
      +    Compute the value of PI.
      +
      +    The function connects to an Internet server
      +    that streams audio of mathematical monks
      +    chanting the first 100 digits of PI.
      +
      + +

      Comments can also include the +following special @name ...@ directive strings:

      + +
        + +
      • @deprecated@ - flags the item as deprecated to + discourage its use
      • + +
      • @exclude format[,...,format]@ - excludes the item from the + documentation in the specified formats: "all" for all formats, "docset" + for Xcode documentation sets, "epub" for EPUB books, "html" for HTML + output, and "man" for man page output
      • + +
      • @private@ - flags the item as private so it + will not be included in the documentation
      • + +
      • @since ...@ - flags the item as new since a + particular release. The text following the @since + up to the closing @ is highlighted in the generated + documentation, e.g. @since Mini-XML 2.7@.
      • + +
      + + + +

      Titles, Sections, and Introductions

      + +

      Mxmldoc also provides options to set the title, section, +and introduction text for the generated documentation. The +--title text option specifies the title for the +documentation. The title string is usually put in quotes:

      + +
      +    mxmldoc filename.xml \
      +        --title "My Famous Documentation" \
      +        >filename.html ENTER
      +
      + +

      The --section name option specifies the section for +the documentation. For HTML documentation, the name is placed in +a HTML comment such as:

      + +
      +    <!-- SECTION: name -->
      +
      + +

      For man pages, the section name is usually just a number ("3"), +or a number followed by a vendor name ("3acme"). The section name is +used in the .TH directive in the man page:

      + +
      +    .TH mylibrary 3acme "My Title" ...
      +
      + +

      The default section name for man page output is "3". There is no +default section name for HTML output.

      + +

      Finally, the --intro filename option specifies a file to +embed after the title and section but before the generated +documentation. For HTML documentation, the file must consist of +valid HTML without the usual DOCTYPE, html, and +body elements. For man page documentation, the file must +consist of valid nroff(1) text.

      + + + diff --git a/lib/libmxml/doc/mxmldoc.man b/lib/libmxml/doc/mxmldoc.man new file mode 100644 index 0000000..23e1736 --- /dev/null +++ b/lib/libmxml/doc/mxmldoc.man @@ -0,0 +1,250 @@ +.\" +.\" mxmldoc man page for mini-XML, a small XML-like file parsing library. +.\" +.\" Copyright 2003-2017 by Michael R Sweet. +.\" +.\" These coded instructions, statements, and computer programs are the +.\" property of Michael R Sweet and are protected by Federal copyright +.\" law. Distribution and use rights are outlined in the file "COPYING" +.\" which should have been included with this file. If this file is +.\" missing or damaged, see the license at: +.\" +.\" https://michaelrsweet.github.io/mxml +.\" +.TH mxmldoc 1 "Mini-XML" "30 April 2017" "Michael R Sweet" +.SH NAME +mxmldoc \- mini-xml documentation generator +.SH SYNOPSIS +.B mxmldoc +\-\-no-output [ +.I filename.xml +] +.I source file(s) +] +.br +.B mxmldoc +[ \-\-author +.I author +] [ \-\-body +.I bodyfile +] [ \-\-copyright +.I copyright +] [ \-\-footer +.I footerfile +] [ \-\-header +.I headerfile +] [ \-\-section +.I section +] [ \-\-title +.I title +] [ +.I filename.xml +] [ +.I source file(s) +] > +.I filename.html +.br +.B mxmldoc +\-\-docset +.I directory.docset +[ \-\-author +.I author +] [ \-\-body +.I bodyfile +] [ \-\-copyright +.I copyright +] [ \-\-docversion +.I version +] [ \-\-feedname +.I name +] [ \-\-feedurl +.I url +] [ \-\-footer +.I footerfile +] [ \-\-header +.I headerfile +] [ \-\-section +.I section +] [ \-\-title +.I title +] [ +.I filename.xml +] [ +.I source file(s) +] +.br +.B mxmldoc +\-\-tokens +.I path +[ +.I filename.xml +] [ +.I source file(s) +] > tokens.xml +.br +.B mxmldoc +\-\-framed +.I basename +[ \-\-author +.I author +] [ \-\-body +.I bodyfile +] [ \-\-copyright +.I copyright +] [ \-\-footer +.I footerfile +] [ \-\-header +.I headerfile +] [ \-\-section +.I section +] [ \-\-title +.I title +] [ +.I filename.xml +] [ +.I source file(s) +] +.br +.B mxmldoc +[ \-\-author +.I author +] [ \-\-body +.I bodyfile +] [ \-\-copyright +.I copyright +] [ \-\-footer +.I footerfile +] [ \-\-header +.I headerfile +] \-\-man +.I manpage +[ \-\-section +.I section +] [ \-\-title +.I title +] [ +.I filename.xml +] [ +.I source file(s) +] > +.I filename.man +.br +.B mxmldoc +\-\-epub +.I filename.epub +[ \-\-author +.I author +] [ \-\-body +.I bodyfile +] [ \-\-copyright +.I copyright +] [ \-\-coverimage +.I image.png +] [ \-\-docversion +.I version +] [ \-\-feedname +.I name +] [ \-\-feedurl +.I url +] [ \-\-footer +.I footerfile +] [ \-\-header +.I headerfile +] [ \-\-section +.I section +] [ \-\-title +.I title +] [ +.I filename.xml +] [ +.I source file(s) +] +.SH DESCRIPTION +\fImxmldoc\fR scans the specified C and C++ source files to produce +an XML representation of globally accessible classes, constants, +enumerations, functions, structures, typedefs, unions, and variables +- the XML file is updated as necessary. By default, a HTML +representation of the XML file is written to the standard output. +Use the \fI\-\-no-output\fR option to disable the HTML output. +.PP +Man page source can be generated using the \fI\-\-man\fR option. +.PP +If no source files are specified then the current XML file is +converted to the standard output. +.PP +In general, any C or C++ source code is handled by \fImxmldoc\fR, +however it was specifically written to handle code with +documentation that is formatted according to the CUPS Developer +Guide which is available at "http://www.cups.org/doc/spec-cmp.html". +.SH OPTIONS +.TP 5 +\-\-author "author name" +.br +Specifies the name of the documentation author. +.TP 5 +\-\-body bodyfile +.br +Inserts the specified file between the table of contents and references. +.TP 5 +\-\-copyright "copyright text" +.br +Specifies the copyright text to use. +.TP 5 +\-\-docset directory.docset +.br +Creates an Xcode documentation set in the specified directory. +.TP 5 +\-\-docversion version +.br +Specifies the version number for the Xcode documentation set. +.TP 5 +\-\-epub filename.epub +.br +Creates an EPUB book with the specified filename. +.TP 5 +\-\-feedname name +.br +Specifies the Xcode documentation set feed name, typically the project or +company name. +.TP 5 +\-\-feedurl url +.br +Specifies the Xcode documentation set feed URL which must point to an ATOM file +linking to updates. +.TP 5 +\-\-footer footerfile +.br +Inserts the specified file at the bottom of the output documentation. +.TP 5 +\-\-framed basename +.br +Creates HTML documentation using frames - one for the table-of-contents and +one for the body. +.TP 5 +\-\-header headerfile +.br +Inserts the specified file at the top of the output documentation. +.TP 5 +\-\-man manpage +.br +Generated a man page instead of HTML documentation. +.TP 5 +\-\-no-output +.br +Disables generation of documentation on the standard output. +.TP 5 +\-\-section section +.br +Sets the section/keywords in the output documentation. +.TP 5 +\-\-title title +.br +Sets the title of the output documentation. +.TP 5 +\-\-tokens +.br +Generates a Tokens.xml file for use with the Xcode documentation tools. +.SH SEE ALSO +mxml(3), Mini-XML Programmers Manual, https://michaelrsweet.github.io/mxml +.SH COPYRIGHT +Copyright \[co] 2003-2017 by Michael R Sweet. diff --git a/lib/libmxml/doc/mxmldoc.xsd b/lib/libmxml/doc/mxmldoc.xsd new file mode 100644 index 0000000..f0e361c --- /dev/null +++ b/lib/libmxml/doc/mxmldoc.xsd @@ -0,0 +1,187 @@ + + + + + Mini-XML 2.x documentation schema for mxmldoc output. + Copyright 2003-2017 by Michael R Sweet. + + These coded instructions, statements, and computer programs are the + property of Michael R Sweet and are protected by Federal copyright + law. Distribution and use rights are outlined in the file "COPYING" + which should have been included with this file. If this file is + missing or damaged, see the license at: + + https://michaelrsweet.github.io/mxml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/libmxml/doc/reference.header b/lib/libmxml/doc/reference.header new file mode 100644 index 0000000..07fdc2c --- /dev/null +++ b/lib/libmxml/doc/reference.header @@ -0,0 +1 @@ +

      Appendix B - Library Reference

      diff --git a/lib/libmxml/doc/reference.html b/lib/libmxml/doc/reference.html new file mode 100644 index 0000000..6daa33d --- /dev/null +++ b/lib/libmxml/doc/reference.html @@ -0,0 +1,1650 @@ + + + + Mini-XML API Reference + + + + + + + + +

      Appendix B - Library Reference

      +
      +

      Contents

      + +
      +
      +

      Functions

      +

      mxmlAdd

      +

      Add a node to a tree.

      +

      +void mxmlAdd(mxml_node_t *parent, int where, mxml_node_t *child, mxml_node_t *node);

      +

      Parameters

      + + + + + + + + + +
      parentParent node
      whereWhere to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
      childChild node for where or MXML_ADD_TO_PARENT
      nodeNode to add
      +

      Discussion

      +

      Adds the specified node to the parent. If the child argument is not +NULL, puts the new node before or after the specified child depending +on the value of the where argument. If the child argument is NULL, +puts the new node at the beginning of the child list (MXML_ADD_BEFORE) +or at the end of the child list (MXML_ADD_AFTER). The constant +MXML_ADD_TO_PARENT can be used to specify a NULL child pointer.

      +

      mxmlDelete

      +

      Delete a node and all of its children.

      +

      +void mxmlDelete(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to delete
      +

      Discussion

      +

      If the specified node has a parent, this function first removes the +node from its parent using the mxmlRemove function.

      +

       Mini-XML 2.4 mxmlElementDeleteAttr

      +

      Delete an attribute.

      +

      +void mxmlElementDeleteAttr(mxml_node_t *node, const char *name);

      +

      Parameters

      + + + + + +
      nodeElement
      nameAttribute name
      +

      mxmlElementGetAttr

      +

      Get an attribute.

      +

      +const char *mxmlElementGetAttr(mxml_node_t *node, const char *name);

      +

      Parameters

      + + + + + +
      nodeElement node
      nameName of attribute
      +

      Return Value

      +

      Attribute value or NULL

      +

      Discussion

      +

      This function returns NULL if the node is not an element or the +named attribute does not exist.

      +

       Mini-XML 2.11 mxmlElementGetAttrByIndex

      +

      Get an element attribute by index.

      +

      +const char *mxmlElementGetAttrByIndex(mxml_node_t *node, int idx, const char **name);

      +

      Parameters

      + + + + + + + +
      nodeNode
      idxAttribute index, starting at 0
      nameAttribute name
      +

      Return Value

      +

      Attribute value

      +

      Discussion

      +

      The index ("idx") is 0-based. NULL is returned if the specified index +is out of range. + +

      +

       Mini-XML 2.11 mxmlElementGetAttrCount

      +

      Get the number of element attributes.

      +

      +int mxmlElementGetAttrCount(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode
      +

      Return Value

      +

      Number of attributes

      +

      mxmlElementSetAttr

      +

      Set an attribute.

      +

      +void mxmlElementSetAttr(mxml_node_t *node, const char *name, const char *value);

      +

      Parameters

      + + + + + + + +
      nodeElement node
      nameName of attribute
      valueAttribute value
      +

      Discussion

      +

      If the named attribute already exists, the value of the attribute +is replaced by the new string value. The string value is copied +into the element node. This function does nothing if the node is +not an element.

      +

       Mini-XML 2.3 mxmlElementSetAttrf

      +

      Set an attribute with a formatted value.

      +

      +void mxmlElementSetAttrf(mxml_node_t *node, const char *name, const char *format, ...);

      +

      Parameters

      + + + + + + + + + +
      nodeElement node
      nameName of attribute
      formatPrintf-style attribute value
      ...Additional arguments as needed
      +

      Discussion

      +

      If the named attribute already exists, the value of the attribute +is replaced by the new formatted string. The formatted string value is +copied into the element node. This function does nothing if the node +is not an element. + +

      +

      mxmlEntityAddCallback

      +

      Add a callback to convert entities to Unicode.

      +

      +int mxmlEntityAddCallback(mxml_entity_cb_t cb);

      +

      Parameters

      + + + +
      cbCallback function to add
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      mxmlEntityGetName

      +

      Get the name that corresponds to the character value.

      +

      +const char *mxmlEntityGetName(int val);

      +

      Parameters

      + + + +
      valCharacter value
      +

      Return Value

      +

      Entity name or NULL

      +

      Discussion

      +

      If val does not need to be represented by a named entity, NULL is returned.

      +

      mxmlEntityGetValue

      +

      Get the character corresponding to a named entity.

      +

      +int mxmlEntityGetValue(const char *name);

      +

      Parameters

      + + + +
      nameEntity name
      +

      Return Value

      +

      Character value or -1 on error

      +

      Discussion

      +

      The entity name can also be a numeric constant. -1 is returned if the +name is not known.

      +

      mxmlEntityRemoveCallback

      +

      Remove a callback.

      +

      +void mxmlEntityRemoveCallback(mxml_entity_cb_t cb);

      +

      Parameters

      + + + +
      cbCallback function to remove
      +

      mxmlFindElement

      +

      Find the named element.

      +

      +mxml_node_t *mxmlFindElement(mxml_node_t *node, mxml_node_t *top, const char *element, const char *attr, const char *value, int descend);

      +

      Parameters

      + + + + + + + + + + + + + +
      nodeCurrent node
      topTop node
      elementElement name or NULL for any
      attrAttribute name, or NULL for none
      valueAttribute value, or NULL for any
      descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +

      Return Value

      +

      Element node or NULL

      +

      Discussion

      +

      The search is constrained by the name, attribute name, and value; any +NULL names or values are treated as wildcards, so different kinds of +searches can be implemented by looking for all elements of a given name +or all elements with a specific attribute. The descend argument determines +whether the search descends into child nodes; normally you will use +MXML_DESCEND_FIRST for the initial search and MXML_NO_DESCEND +to find additional direct descendents of the node. The top node argument +constrains the search to a particular node's children.

      +

       Mini-XML 2.7 mxmlFindPath

      +

      Find a node with the given path.

      +

      +mxml_node_t *mxmlFindPath(mxml_node_t *top, const char *path);

      +

      Parameters

      + + + + + +
      topTop node
      pathPath to element
      +

      Return Value

      +

      Found node or NULL

      +

      Discussion

      +

      The "path" is a slash-separated list of element names. The name "*" is +considered a wildcard for one or more levels of elements. For example, +"foo/one/two", "bar/two/one", "*/one", and so forth.
      +
      +The first child node of the found node is returned if the given node has +children and the first child is a value node. + +

      +

       Mini-XML 2.7 mxmlGetCDATA

      +

      Get the value for a CDATA node.

      +

      +const char *mxmlGetCDATA(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      CDATA value or NULL

      +

      Discussion

      +

      NULL is returned if the node is not a CDATA element. + +

      +

       Mini-XML 2.7 mxmlGetCustom

      +

      Get the value for a custom node.

      +

      +const void *mxmlGetCustom(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Custom value or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its first child) is not a custom +value node. + +

      +

       Mini-XML 2.7 mxmlGetElement

      +

      Get the name for an element node.

      +

      +const char *mxmlGetElement(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Element name or NULL

      +

      Discussion

      +

      NULL is returned if the node is not an element node. + +

      +

       Mini-XML 2.7 mxmlGetFirstChild

      +

      Get the first child of an element node.

      +

      +mxml_node_t *mxmlGetFirstChild(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      First child or NULL

      +

      Discussion

      +

      NULL is returned if the node is not an element node or if the node +has no children. + +

      +

       Mini-XML 2.7 mxmlGetInteger

      +

      Get the integer value from the specified node or its +first child.

      +

      +int mxmlGetInteger(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Integer value or 0

      +

      Discussion

      +

      0 is returned if the node (or its first child) is not an integer value node. + +

      +

       Mini-XML 2.7 mxmlGetLastChild

      +

      Get the last child of an element node.

      +

      +mxml_node_t *mxmlGetLastChild(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Last child or NULL

      +

      Discussion

      +

      NULL is returned if the node is not an element node or if the node +has no children. + +

      +

      mxmlGetNextSibling

      +

      +

      +mxml_node_t *mxmlGetNextSibling(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Get the next node for the current parent.

      +

      NULL is returned if this is the last child for the current parent. + +

      +

       Mini-XML 2.7 mxmlGetOpaque

      +

      Get an opaque string value for a node or its first child.

      +

      +const char *mxmlGetOpaque(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Opaque string or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its first child) is not an opaque +value node. + +

      +

       Mini-XML 2.7 mxmlGetParent

      +

      Get the parent node.

      +

      +mxml_node_t *mxmlGetParent(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Parent node or NULL

      +

      Discussion

      +

      NULL is returned for a root node. + +

      +

       Mini-XML 2.7 mxmlGetPrevSibling

      +

      Get the previous node for the current parent.

      +

      +mxml_node_t *mxmlGetPrevSibling(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Previous node or NULL

      +

      Discussion

      +

      NULL is returned if this is the first child for the current parent. + +

      +

       Mini-XML 2.7 mxmlGetReal

      +

      Get the real value for a node or its first child.

      +

      +double mxmlGetReal(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Real value or 0.0

      +

      Discussion

      +

      0.0 is returned if the node (or its first child) is not a real value node. + +

      +

       Mini-XML 2.7 mxmlGetRefCount

      +

      Get the current reference (use) count for a node.

      +

      +int mxmlGetRefCount(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode
      +

      Return Value

      +

      Reference count

      +

      Discussion

      +

      The initial reference count of new nodes is 1. Use the mxmlRetain +and mxmlRelease functions to increment and decrement a node's +reference count. + +.

      +

       Mini-XML 2.7 mxmlGetText

      +

      Get the text value for a node or its first child.

      +

      +const char *mxmlGetText(mxml_node_t *node, int *whitespace);

      +

      Parameters

      + + + + + +
      nodeNode to get
      whitespace1 if string is preceded by whitespace, 0 otherwise
      +

      Return Value

      +

      Text string or NULL

      +

      Discussion

      +

      NULL is returned if the node (or its first child) is not a text node. +The "whitespace" argument can be NULL. + +

      +

       Mini-XML 2.7 mxmlGetType

      +

      Get the node type.

      +

      +mxml_type_t mxmlGetType(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      Type of node

      +

      Discussion

      +

      MXML_IGNORE is returned if "node" is NULL. + +

      +

       Mini-XML 2.7 mxmlGetUserData

      +

      Get the user data pointer for a node.

      +

      +void *mxmlGetUserData(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to get
      +

      Return Value

      +

      User data pointer

      +

      mxmlIndexDelete

      +

      Delete an index.

      +

      +void mxmlIndexDelete(mxml_index_t *ind);

      +

      Parameters

      + + + +
      indIndex to delete
      +

      mxmlIndexEnum

      +

      Return the next node in the index.

      +

      +mxml_node_t *mxmlIndexEnum(mxml_index_t *ind);

      +

      Parameters

      + + + +
      indIndex to enumerate
      +

      Return Value

      +

      Next node or NULL if there is none

      +

      Discussion

      +

      You should call mxmlIndexReset prior to using this function to get +the first node in the index. Nodes are returned in the sorted order of the +index.

      +

      mxmlIndexFind

      +

      Find the next matching node.

      +

      +mxml_node_t *mxmlIndexFind(mxml_index_t *ind, const char *element, const char *value);

      +

      Parameters

      + + + + + + + +
      indIndex to search
      elementElement name to find, if any
      valueAttribute value, if any
      +

      Return Value

      +

      Node or NULL if none found

      +

      Discussion

      +

      You should call mxmlIndexReset prior to using this function for +the first time with a particular set of "element" and "value" +strings. Passing NULL for both "element" and "value" is equivalent +to calling mxmlIndexEnum.

      +

       Mini-XML 2.7 mxmlIndexGetCount

      +

      Get the number of nodes in an index.

      +

      +int mxmlIndexGetCount(mxml_index_t *ind);

      +

      Parameters

      + + + +
      indIndex of nodes
      +

      Return Value

      +

      Number of nodes in index

      +

      mxmlIndexNew

      +

      Create a new index.

      +

      +mxml_index_t *mxmlIndexNew(mxml_node_t *node, const char *element, const char *attr);

      +

      Parameters

      + + + + + + + +
      nodeXML node tree
      elementElement to index or NULL for all
      attrAttribute to index or NULL for none
      +

      Return Value

      +

      New index

      +

      Discussion

      +

      The index will contain all nodes that contain the named element and/or +attribute. If both "element" and "attr" are NULL, then the index will +contain a sorted list of the elements in the node tree. Nodes are +sorted by element name and optionally by attribute value if the "attr" +argument is not NULL.

      +

      mxmlIndexReset

      +

      Reset the enumeration/find pointer in the index and +return the first node in the index.

      +

      +mxml_node_t *mxmlIndexReset(mxml_index_t *ind);

      +

      Parameters

      + + + +
      indIndex to reset
      +

      Return Value

      +

      First node or NULL if there is none

      +

      Discussion

      +

      This function should be called prior to using mxmlIndexEnum or +mxmlIndexFind for the first time.

      +

      mxmlLoadFd

      +

      Load a file descriptor into an XML node tree.

      +

      +mxml_node_t *mxmlLoadFd(mxml_node_t *top, int fd, mxml_load_cb_t cb);

      +

      Parameters

      + + + + + + + +
      topTop node
      fdFile descriptor to read from
      cbCallback function or constant
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like <?xml> for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child (data) nodes of the specified type.

      +

      mxmlLoadFile

      +

      Load a file into an XML node tree.

      +

      +mxml_node_t *mxmlLoadFile(mxml_node_t *top, FILE *fp, mxml_load_cb_t cb);

      +

      Parameters

      + + + + + + + +
      topTop node
      fpFile to read from
      cbCallback function or constant
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like <?xml> for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child (data) nodes of the specified type.

      +

      mxmlLoadString

      +

      Load a string into an XML node tree.

      +

      +mxml_node_t *mxmlLoadString(mxml_node_t *top, const char *s, mxml_load_cb_t cb);

      +

      Parameters

      + + + + + + + +
      topTop node
      sString to load
      cbCallback function or constant
      +

      Return Value

      +

      First node or NULL if the string has errors.

      +

      Discussion

      +

      The nodes in the specified string are added to the specified top node. +If no top node is provided, the XML string MUST be well-formed with a +single parent node like <?xml> for the entire string. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child (data) nodes of the specified type.

      +

       Mini-XML 2.3 mxmlNewCDATA

      +

      Create a new CDATA node.

      +

      +mxml_node_t *mxmlNewCDATA(mxml_node_t *parent, const char *data);

      +

      Parameters

      + + + + + +
      parentParent node or MXML_NO_PARENT
      dataData string
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new CDATA node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +CDATA node has no parent. The data string must be nul-terminated and +is copied into the new node. CDATA nodes currently use the +MXML_ELEMENT type. + +

      +

       Mini-XML 2.1 mxmlNewCustom

      +

      Create a new custom data node.

      +

      +mxml_node_t *mxmlNewCustom(mxml_node_t *parent, void *data, mxml_custom_destroy_cb_t destroy);

      +

      Parameters

      + + + + + + + +
      parentParent node or MXML_NO_PARENT
      dataPointer to data
      destroyFunction to destroy data
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new custom node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +element node has no parent. NULL can be passed when the data in the +node is not dynamically allocated or is separately managed. + +

      +

      mxmlNewElement

      +

      Create a new element node.

      +

      +mxml_node_t *mxmlNewElement(mxml_node_t *parent, const char *name);

      +

      Parameters

      + + + + + +
      parentParent node or MXML_NO_PARENT
      nameName of element
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new element node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +element node has no parent.

      +

      mxmlNewInteger

      +

      Create a new integer node.

      +

      +mxml_node_t *mxmlNewInteger(mxml_node_t *parent, int integer);

      +

      Parameters

      + + + + + +
      parentParent node or MXML_NO_PARENT
      integerInteger value
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new integer node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +integer node has no parent.

      +

      mxmlNewOpaque

      +

      Create a new opaque string.

      +

      +mxml_node_t *mxmlNewOpaque(mxml_node_t *parent, const char *opaque);

      +

      Parameters

      + + + + + +
      parentParent node or MXML_NO_PARENT
      opaqueOpaque string
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new opaque string node is added to the end of the specified parent's +child list. The constant MXML_NO_PARENT can be used to specify that +the new opaque string node has no parent. The opaque string must be nul- +terminated and is copied into the new node.

      +

      mxmlNewOpaquef

      +

      Create a new formatted opaque string node.

      +

      +mxml_node_t *mxmlNewOpaquef(mxml_node_t *parent, const char *format, ...);

      +

      Parameters

      + + + + + + + +
      parentParent node or MXML_NO_PARENT
      formatPrintf-style format string
      ...Additional args as needed
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new opaque string node is added to the end of the specified parent's +child list. The constant MXML_NO_PARENT can be used to specify that +the new opaque string node has no parent. The format string must be +nul-terminated and is formatted into the new node.

      +

      mxmlNewReal

      +

      Create a new real number node.

      +

      +mxml_node_t *mxmlNewReal(mxml_node_t *parent, double real);

      +

      Parameters

      + + + + + +
      parentParent node or MXML_NO_PARENT
      realReal number value
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new real number node is added to the end of the specified parent's +child list. The constant MXML_NO_PARENT can be used to specify that +the new real number node has no parent.

      +

      mxmlNewText

      +

      Create a new text fragment node.

      +

      +mxml_node_t *mxmlNewText(mxml_node_t *parent, int whitespace, const char *string);

      +

      Parameters

      + + + + + + + +
      parentParent node or MXML_NO_PARENT
      whitespace1 = leading whitespace, 0 = no whitespace
      stringString
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new text node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +text node has no parent. The whitespace parameter is used to specify +whether leading whitespace is present before the node. The text +string must be nul-terminated and is copied into the new node.

      +

      mxmlNewTextf

      +

      Create a new formatted text fragment node.

      +

      +mxml_node_t *mxmlNewTextf(mxml_node_t *parent, int whitespace, const char *format, ...);

      +

      Parameters

      + + + + + + + + + +
      parentParent node or MXML_NO_PARENT
      whitespace1 = leading whitespace, 0 = no whitespace
      formatPrintf-style format string
      ...Additional args as needed
      +

      Return Value

      +

      New node

      +

      Discussion

      +

      The new text node is added to the end of the specified parent's child +list. The constant MXML_NO_PARENT can be used to specify that the new +text node has no parent. The whitespace parameter is used to specify +whether leading whitespace is present before the node. The format +string must be nul-terminated and is formatted into the new node.

      +

       Mini-XML 2.3 mxmlNewXML

      +

      Create a new XML document tree.

      +

      +mxml_node_t *mxmlNewXML(const char *version);

      +

      Parameters

      + + + +
      versionVersion number to use
      +

      Return Value

      +

      New ?xml node

      +

      Discussion

      +

      The "version" argument specifies the version number to put in the +?xml element node. If NULL, version "1.0" is assumed. + +

      +

       Mini-XML 2.3 mxmlRelease

      +

      Release a node.

      +

      +int mxmlRelease(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode
      +

      Return Value

      +

      New reference count

      +

      Discussion

      +

      When the reference count reaches zero, the node (and any children) +is deleted via mxmlDelete. + +

      +

      mxmlRemove

      +

      Remove a node from its parent.

      +

      +void mxmlRemove(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode to remove
      +

      Discussion

      +

      This function does not free memory used by the node - use mxmlDelete +for that. This function does nothing if the node has no parent.

      +

       Mini-XML 2.3 mxmlRetain

      +

      Retain a node.

      +

      +int mxmlRetain(mxml_node_t *node);

      +

      Parameters

      + + + +
      nodeNode
      +

      Return Value

      +

      New reference count

      +

       Mini-XML 2.3 mxmlSAXLoadFd

      +

      Load a file descriptor into an XML node tree +using a SAX callback.

      +

      +mxml_node_t *mxmlSAXLoadFd(mxml_node_t *top, int fd, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

      +

      Parameters

      + + + + + + + + + + + +
      topTop node
      fdFile descriptor to read from
      cbCallback function or constant
      sax_cbSAX callback or MXML_NO_CALLBACK
      sax_dataSAX user data
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like <?xml> for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child nodes of the specified type.
      +
      +The SAX callback must call mxmlRetain for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + +

      +

       Mini-XML 2.3 mxmlSAXLoadFile

      +

      Load a file into an XML node tree +using a SAX callback.

      +

      +mxml_node_t *mxmlSAXLoadFile(mxml_node_t *top, FILE *fp, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

      +

      Parameters

      + + + + + + + + + + + +
      topTop node
      fpFile to read from
      cbCallback function or constant
      sax_cbSAX callback or MXML_NO_CALLBACK
      sax_dataSAX user data
      +

      Return Value

      +

      First node or NULL if the file could not be read.

      +

      Discussion

      +

      The nodes in the specified file are added to the specified top node. +If no top node is provided, the XML file MUST be well-formed with a +single parent node like <?xml> for the entire file. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child nodes of the specified type.
      +
      +The SAX callback must call mxmlRetain for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + +

      +

       Mini-XML 2.3 mxmlSAXLoadString

      +

      Load a string into an XML node tree +using a SAX callback.

      +

      +mxml_node_t *mxmlSAXLoadString(mxml_node_t *top, const char *s, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

      +

      Parameters

      + + + + + + + + + + + +
      topTop node
      sString to load
      cbCallback function or constant
      sax_cbSAX callback or MXML_NO_CALLBACK
      sax_dataSAX user data
      +

      Return Value

      +

      First node or NULL if the string has errors.

      +

      Discussion

      +

      The nodes in the specified string are added to the specified top node. +If no top node is provided, the XML string MUST be well-formed with a +single parent node like <?xml> for the entire string. The callback +function returns the value type that should be used for child nodes. +The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, +MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for +loading child nodes of the specified type.
      +
      +The SAX callback must call mxmlRetain for any nodes that need to +be kept for later use. Otherwise, nodes are deleted when the parent +node is closed or after each data, comment, CDATA, or directive node. + +

      +

      mxmlSaveAllocString

      +

      Save an XML tree to an allocated string.

      +

      +char *mxmlSaveAllocString(mxml_node_t *node, mxml_save_cb_t cb);

      +

      Parameters

      + + + + + +
      nodeNode to write
      cbWhitespace callback or MXML_NO_CALLBACK
      +

      Return Value

      +

      Allocated string or NULL

      +

      Discussion

      +

      This function returns a pointer to a string containing the textual +representation of the XML node tree. The string should be freed +using the free() function when you are done with it. NULL is returned +if the node would produce an empty string or if the string cannot be +allocated.
      +
      +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If MXML_NO_CALLBACK +is specified, whitespace will only be added before MXML_TEXT nodes +with leading whitespace and before attribute names inside opening +element tags.

      +

      mxmlSaveFd

      +

      Save an XML tree to a file descriptor.

      +

      +int mxmlSaveFd(mxml_node_t *node, int fd, mxml_save_cb_t cb);

      +

      Parameters

      + + + + + + + +
      nodeNode to write
      fdFile descriptor to write to
      cbWhitespace callback or MXML_NO_CALLBACK
      +

      Return Value

      +

      0 on success, -1 on error.

      +

      Discussion

      +

      The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If MXML_NO_CALLBACK +is specified, whitespace will only be added before MXML_TEXT nodes +with leading whitespace and before attribute names inside opening +element tags.

      +

      mxmlSaveFile

      +

      Save an XML tree to a file.

      +

      +int mxmlSaveFile(mxml_node_t *node, FILE *fp, mxml_save_cb_t cb);

      +

      Parameters

      + + + + + + + +
      nodeNode to write
      fpFile to write to
      cbWhitespace callback or MXML_NO_CALLBACK
      +

      Return Value

      +

      0 on success, -1 on error.

      +

      Discussion

      +

      The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If MXML_NO_CALLBACK +is specified, whitespace will only be added before MXML_TEXT nodes +with leading whitespace and before attribute names inside opening +element tags.

      +

      mxmlSaveString

      +

      Save an XML node tree to a string.

      +

      +int mxmlSaveString(mxml_node_t *node, char *buffer, int bufsize, mxml_save_cb_t cb);

      +

      Parameters

      + + + + + + + + + +
      nodeNode to write
      bufferString buffer
      bufsizeSize of string buffer
      cbWhitespace callback or MXML_NO_CALLBACK
      +

      Return Value

      +

      Size of string

      +

      Discussion

      +

      This function returns the total number of bytes that would be +required for the string but only copies (bufsize - 1) characters +into the specified buffer.
      +
      +The callback argument specifies a function that returns a whitespace +string or NULL before and after each element. If MXML_NO_CALLBACK +is specified, whitespace will only be added before MXML_TEXT nodes +with leading whitespace and before attribute names inside opening +element tags.

      +

       Mini-XML 2.3 mxmlSetCDATA

      +

      Set the element name of a CDATA node.

      +

      +int mxmlSetCDATA(mxml_node_t *node, const char *data);

      +

      Parameters

      + + + + + +
      nodeNode to set
      dataNew data string
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not a CDATA element node. + +

      +

       Mini-XML 2.1 mxmlSetCustom

      +

      Set the data and destructor of a custom data node.

      +

      +int mxmlSetCustom(mxml_node_t *node, void *data, mxml_custom_destroy_cb_t destroy);

      +

      Parameters

      + + + + + + + +
      nodeNode to set
      dataNew data pointer
      destroyNew destructor function
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not a custom node. + +

      +

      mxmlSetCustomHandlers

      +

      Set the handling functions for custom data.

      +

      +void mxmlSetCustomHandlers(mxml_custom_load_cb_t load, mxml_custom_save_cb_t save);

      +

      Parameters

      + + + + + +
      loadLoad function
      saveSave function
      +

      Discussion

      +

      The load function accepts a node pointer and a data string and must +return 0 on success and non-zero on error.
      +
      +The save function accepts a node pointer and must return a malloc'd +string on success and NULL on error.

      +

      mxmlSetElement

      +

      Set the name of an element node.

      +

      +int mxmlSetElement(mxml_node_t *node, const char *name);

      +

      Parameters

      + + + + + +
      nodeNode to set
      nameNew name string
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it is not an element node.

      +

      mxmlSetErrorCallback

      +

      Set the error message callback.

      +

      +void mxmlSetErrorCallback(mxml_error_cb_t cb);

      +

      Parameters

      + + + +
      cbError callback function
      +

      mxmlSetInteger

      +

      Set the value of an integer node.

      +

      +int mxmlSetInteger(mxml_node_t *node, int integer);

      +

      Parameters

      + + + + + +
      nodeNode to set
      integerInteger value
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not an integer node.

      +

      mxmlSetOpaque

      +

      Set the value of an opaque node.

      +

      +int mxmlSetOpaque(mxml_node_t *node, const char *opaque);

      +

      Parameters

      + + + + + +
      nodeNode to set
      opaqueOpaque string
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not an opaque node.

      +

       Mini-XML 2.11 mxmlSetOpaquef

      +

      Set the value of an opaque string node to a formatted string.

      +

      +int mxmlSetOpaquef(mxml_node_t *node, const char *format, ...);

      +

      Parameters

      + + + + + + + +
      nodeNode to set
      formatPrintf-style format string
      ...Additional arguments as needed
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not an opaque node. + +

      +

      mxmlSetReal

      +

      Set the value of a real number node.

      +

      +int mxmlSetReal(mxml_node_t *node, double real);

      +

      Parameters

      + + + + + +
      nodeNode to set
      realReal number value
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not a real number node.

      +

      mxmlSetText

      +

      Set the value of a text node.

      +

      +int mxmlSetText(mxml_node_t *node, int whitespace, const char *string);

      +

      Parameters

      + + + + + + + +
      nodeNode to set
      whitespace1 = leading whitespace, 0 = no whitespace
      stringString
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not a text node.

      +

      mxmlSetTextf

      +

      Set the value of a text node to a formatted string.

      +

      +int mxmlSetTextf(mxml_node_t *node, int whitespace, const char *format, ...);

      +

      Parameters

      + + + + + + + + + +
      nodeNode to set
      whitespace1 = leading whitespace, 0 = no whitespace
      formatPrintf-style format string
      ...Additional arguments as needed
      +

      Return Value

      +

      0 on success, -1 on failure

      +

      Discussion

      +

      The node is not changed if it (or its first child) is not a text node.

      +

       Mini-XML 2.7 mxmlSetUserData

      +

      Set the user data pointer for a node.

      +

      +int mxmlSetUserData(mxml_node_t *node, void *data);

      +

      Parameters

      + + + + + +
      nodeNode to set
      dataUser data pointer
      +

      Return Value

      +

      0 on success, -1 on failure

      +

       Mini-XML 2.3 mxmlSetWrapMargin

      +

      Set the wrap margin when saving XML data.

      +

      +void mxmlSetWrapMargin(int column);

      +

      Parameters

      + + + +
      columnColumn for wrapping, 0 to disable wrapping
      +

      Discussion

      +

      Wrapping is disabled when "column" is 0. + +

      +

      mxmlWalkNext

      +

      Walk to the next logical node in the tree.

      +

      +mxml_node_t *mxmlWalkNext(mxml_node_t *node, mxml_node_t *top, int descend);

      +

      Parameters

      + + + + + + + +
      nodeCurrent node
      topTop node
      descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +

      Return Value

      +

      Next node or NULL

      +

      Discussion

      +

      The descend argument controls whether the first child is considered +to be the next node. The top node argument constrains the walk to +the node's children.

      +

      mxmlWalkPrev

      +

      Walk to the previous logical node in the tree.

      +

      +mxml_node_t *mxmlWalkPrev(mxml_node_t *node, mxml_node_t *top, int descend);

      +

      Parameters

      + + + + + + + +
      nodeCurrent node
      topTop node
      descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
      +

      Return Value

      +

      Previous node or NULL

      +

      Discussion

      +

      The descend argument controls whether the previous node's last child +is considered to be the previous node. The top node argument constrains +the walk to the node's children.

      +

      Data Types

      +

      mxml_custom_destroy_cb_t

      +

      Custom data destructor

      +

      +typedef void (*mxml_custom_destroy_cb_t)(void *); +

      +

      mxml_custom_load_cb_t

      +

      Custom data load callback function

      +

      +typedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *); +

      +

      mxml_custom_save_cb_t

      +

      Custom data save callback function

      +

      +typedef char *(*mxml_custom_save_cb_t)(mxml_node_t *); +

      +

      mxml_entity_cb_t

      +

      Entity callback function

      +

      +typedef int (*mxml_entity_cb_t)(const char *); +

      +

      mxml_error_cb_t

      +

      Error callback function

      +

      +typedef void (*mxml_error_cb_t)(const char *); +

      +

      mxml_index_t

      +

      An XML node index.

      +

      +typedef struct mxml_index_s mxml_index_t; +

      +

      mxml_load_cb_t

      +

      Load callback function

      +

      +typedef mxml_type_t (*mxml_load_cb_t)(mxml_node_t *); +

      +

      mxml_node_t

      +

      An XML node.

      +

      +typedef struct mxml_node_s mxml_node_t; +

      +

      mxml_save_cb_t

      +

      Save callback function

      +

      +typedef const char *(*mxml_save_cb_t)(mxml_node_t *, int); +

      +

      mxml_sax_cb_t

      +

      SAX callback function

      +

      +typedef void (*mxml_sax_cb_t)(mxml_node_t *, mxml_sax_event_t, void *); +

      +

      mxml_sax_event_t

      +

      SAX event type.

      +

      +typedef enum mxml_sax_event_e mxml_sax_event_t; +

      +

      mxml_type_t

      +

      The XML node type.

      +

      +typedef enum mxml_type_e mxml_type_t; +

      +

      Constants

      +

      mxml_sax_event_e

      +

      SAX event type.

      +

      Constants

      + + + + + + + +
      MXML_SAX_CDATA CDATA node
      MXML_SAX_COMMENT Comment node
      MXML_SAX_DATA Data node
      MXML_SAX_DIRECTIVE Processing directive node
      MXML_SAX_ELEMENT_CLOSE Element closed
      MXML_SAX_ELEMENT_OPEN Element opened
      +

      mxml_type_e

      +

      The XML node type.

      +

      Constants

      + + + + + + + + +
      MXML_CUSTOM  Mini-XML 2.1  Custom data
      MXML_ELEMENT XML element with attributes
      MXML_IGNORE  Mini-XML 2.3  Ignore/throw away node
      MXML_INTEGER Integer value
      MXML_OPAQUE Opaque string
      MXML_REAL Real value
      MXML_TEXT Text fragment
      +
      + + diff --git a/lib/libmxml/doc/schema.html b/lib/libmxml/doc/schema.html new file mode 100644 index 0000000..0a6b492 --- /dev/null +++ b/lib/libmxml/doc/schema.html @@ -0,0 +1,200 @@ + + + +

      Appendix C - XML Schema

      + +

      This appendix provides the XML schema that is used for the XML +files produced by mxmldoc. This schema is available on-line +at:

      + +
      +    https://michaelrsweet.github.io/mxml/mxmldoc.xsd
      +
      + +

      mxmldoc.xsd

      + +
      
      +<?xml version="1.0"?>
      +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      +  <xsd:annotation>
      +    <xsd:documentation xml:lang="en">
      +      Mini-XML 2.11 documentation schema for mxmldoc output.
      +      Copyright 2003-2017 by Michael R Sweet.
      +    </xsd:documentation>
      +  </xsd:annotation>
      +
      +  <!-- basic element definitions -->
      +  <xsd:element name="argument" type="argumentType"/>
      +  <xsd:element name="class" type="classType"/>
      +  <xsd:element name="constant" type="constantType"/>
      +  <xsd:element name="description" type="xsd:string"/>
      +  <xsd:element name="enumeration" type="enumerationType"/>
      +  <xsd:element name="function" type="functionType"/>
      +  <xsd:element name="mxmldoc" type="mxmldocType"/>
      +  <xsd:element name="namespace" type="namespaceType"/>
      +  <xsd:element name="returnvalue" type="returnvalueType"/>
      +  <xsd:element name="seealso" type="identifierList"/>
      +  <xsd:element name="struct" type="structType"/>
      +  <xsd:element name="typedef" type="typedefType"/>
      +  <xsd:element name="type" type="xsd:string"/>
      +  <xsd:element name="union" type="unionType"/>
      +  <xsd:element name="variable" type="variableType"/>
      +
      +  <!-- descriptions of complex elements -->
      +  <xsd:complexType name="argumentType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="default" type="xsd:string" use="optional"/>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="direction" type="direction" use="optional"
      +     default="I"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="classType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="class"/>
      +	<xsd:element ref="enumeration"/>
      +	<xsd:element ref="function"/>
      +	<xsd:element ref="struct"/>
      +	<xsd:element ref="typedef"/>
      +	<xsd:element ref="union"/>
      +	<xsd:element ref="variable"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="parent" type="xsd:string" use="optional"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="constantType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="enumerationType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="constant" minOccurs="1" maxOccurs="unbounded"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="functionType">
      +    <xsd:sequence>
      +      <xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="argument" minOccurs="1" maxOccurs="unbounded"/>
      +      <xsd:element ref="seealso" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +    <xsd:attribute name="scope" type="scope" use="optional"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="mxmldocType">
      +    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +      <xsd:element ref="class"/>
      +      <xsd:element ref="enumeration"/>
      +      <xsd:element ref="function"/>
      +      <xsd:element ref="namespace"/>
      +      <xsd:element ref="struct"/>
      +      <xsd:element ref="typedef"/>
      +      <xsd:element ref="union"/>
      +      <xsd:element ref="variable"/>
      +    </xsd:choice>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="namespaceType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="class"/>
      +	<xsd:element ref="enumeration"/>
      +	<xsd:element ref="function"/>
      +	<xsd:element ref="struct"/>
      +	<xsd:element ref="typedef"/>
      +	<xsd:element ref="union"/>
      +	<xsd:element ref="variable"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="returnvalueType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="structType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:choice minOccurs="0" maxOccurs="unbounded">
      +	<xsd:element ref="variable"/>
      +	<xsd:element ref="function"/>
      +      </xsd:choice>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="typedefType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="unionType">
      +    <xsd:sequence>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +      <xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <xsd:complexType name="variableType">
      +    <xsd:sequence>
      +      <xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
      +      <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
      +    </xsd:sequence>
      +    <xsd:attribute name="name" type="identifier" use="required"/>
      +  </xsd:complexType>
      +
      +  <!-- data types -->
      +  <xsd:simpleType name="direction">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:enumeration value="I"/>
      +      <xsd:enumeration value="O"/>
      +      <xsd:enumeration value="IO"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="identifier">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:pattern value="[a-zA-Z_(.]([a-zA-Z_(.,)* 0-9])*"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="identifierList">
      +    <xsd:list itemType="identifier"/>
      +  </xsd:simpleType>
      +
      +  <xsd:simpleType name="scope">
      +    <xsd:restriction base="xsd:string">
      +      <xsd:enumeration value=""/>
      +      <xsd:enumeration value="private"/>
      +      <xsd:enumeration value="protected"/>
      +      <xsd:enumeration value="public"/>
      +    </xsd:restriction>
      +  </xsd:simpleType>
      +</xsd:schema>
      +
      + + + diff --git a/lib/libmxml/doc/title.html b/lib/libmxml/doc/title.html new file mode 100644 index 0000000..603a3cc --- /dev/null +++ b/lib/libmxml/doc/title.html @@ -0,0 +1,33 @@ + + + + Mini-XML Programmers Manual + + + + + + + +
      + +


      +Mini-XML Programmers Manual
      +Version 2.11

      + +

      MICHAEL R. SWEET

      + +
      + + +

      Mini-XML Programmers Manual, Version 2.11

      + +

      Copyright © 2003-2017 by Michael R Sweet

      + +

      Permission is granted to copy, distribute and/or modify +this document under the terms of the GNU Library General Public +License, Version 2. A copy of this license is included in Appendix A - Mini-XML License.

      + + + diff --git a/lib/libmxml/install-sh b/lib/libmxml/install-sh new file mode 100644 index 0000000..398a88e --- /dev/null +++ b/lib/libmxml/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# 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. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + : + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + : + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + : + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/lib/libmxml/libmxml.so.1.6 b/lib/libmxml/libmxml.so.1.6 new file mode 100644 index 0000000..ef70078 Binary files /dev/null and b/lib/libmxml/libmxml.so.1.6 differ diff --git a/lib/libmxml/makesrcdist b/lib/libmxml/makesrcdist new file mode 100644 index 0000000..2fa96df --- /dev/null +++ b/lib/libmxml/makesrcdist @@ -0,0 +1,51 @@ +#!/bin/sh +# +# "$Id$" +# +# makesrcdist - make a source distribution of mxml. +# + +echo "Getting distribution..." + +if test $# = 0; then + echo -n "Version number for distribution? " + read version +else + version=$1 +fi + +cd /tmp + +if test $version = snapshot; then + url="https://svn.msweet.org/mxml/trunk" +else + url="svn+ssh://msweet.org/var/svn/mxml/tags/release-$version" + + svn copy svn+ssh://msweet.org/var/svn/mxml/trunk "$url" \ + -m "Tag $version" || exit 1 +fi + +rm -rf mxml-$version +svn export $url mxml-$version +cd mxml-$version + +echo "Removing Subversion files and directories..." + +rm -f makesrcdist TODO mvalidate.c +rm -rf www +rm -rf doc/mxml-cover* doc/hires +cd .. + +echo "Making .tar.gz distribution..." + +tar czf mxml-$version.tar.gz mxml-$version + +echo "Removing distribution directory..." + +rm -rf mxml-$version + +echo "Done!" + +# +# End of "$Id$". +# diff --git a/lib/libmxml/mmd.c b/lib/libmxml/mmd.c new file mode 100644 index 0000000..64121b4 --- /dev/null +++ b/lib/libmxml/mmd.c @@ -0,0 +1,978 @@ +/* + * Implementation of miniature markdown library. + * + * https://github.com/michaelrsweet/mmd + * + * Copyright 2017 by Michael R Sweet. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * + * 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 HOLDER 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. + */ + +/* + * Include necessary headers... + */ + +#include "mmd.h" +#include +#include +#include + + +/* + * Structures... + */ + +struct _mmd_s +{ + mmd_type_t type; /* Node type */ + int whitespace; /* Leading whitespace? */ + char *text, /* Text */ + *url; /* Reference URL (image/link/etc.) */ + mmd_t *parent, /* Parent node */ + *first_child, /* First child node */ + *last_child, /* Last child node */ + *prev_sibling, /* Previous sibling node */ + *next_sibling; /* Next sibling node */ +}; + + +/* + * Local functions... + */ + + +static mmd_t *mmd_add(mmd_t *parent, mmd_type_t type, int whitespace, char *text, char *url); +static void mmd_free(mmd_t *node); +static void mmd_parse_inline(mmd_t *parent, char *line); +static char *mmd_parse_link(char *lineptr, char **text, char **url); +static void mmd_remove(mmd_t *node); + + +/* + * 'mmdFree()' - Free a markdown tree. + */ + +void +mmdFree(mmd_t *node) /* I - First node */ +{ + mmd_t *current, /* Current node */ + *next; /* Next node */ + + + mmd_remove(node); + + for (current = node->first_child; current; current = next) + { + /* + * Get the next node... + */ + + if ((next = current->first_child) != NULL) + { + /* + * Free parent nodes after child nodes have been freed... + */ + + current->first_child = NULL; + continue; + } + + if ((next = current->next_sibling) == NULL) + { + /* + * Next node is the parent, which we'll free as needed... + */ + + if ((next = current->parent) == node) + next = NULL; + } + + /* + * Free child... + */ + + mmd_free(current); + } + + /* + * Then free the memory used by the parent node... + */ + + mmd_free(node); +} + + +/* + * 'mmdGetFirstChild()' - Return the first child of a node, if any. + */ + +mmd_t * /* O - First child or @code NULL@ if none */ +mmdGetFirstChild(mmd_t *node) /* I - Node */ +{ + return (node ? node->first_child : NULL); +} + + +/* + * 'mmdGetLastChild()' - Return the last child of a node, if any. + */ + +mmd_t * /* O - Last child or @code NULL@ if none */ +mmdGetLastChild(mmd_t *node) /* I - Node */ +{ + return (node ? node->last_child : NULL); +} + + +/* + * 'mmdGetMetadata()' - Return the metadata for the given keyword. + */ + +const char * /* O - Value or @code NULL@ if none */ +mmdGetMetadata(mmd_t *doc, /* I - Document */ + const char *keyword) /* I - Keyword */ +{ + mmd_t *metadata, /* Metadata node */ + *current; /* Current node */ + char prefix[256]; /* Prefix string */ + size_t prefix_len; /* Length of prefix string */ + const char *value; /* Pointer to value */ + + + if (!doc || (metadata = doc->first_child) == NULL || metadata->type != MMD_TYPE_METADATA) + return (NULL); + + snprintf(prefix, sizeof(prefix), "%s:", keyword); + prefix_len = strlen(prefix); + + for (current = metadata->first_child; current; current = current->next_sibling) + { + if (strncmp(current->text, prefix, prefix_len)) + continue; + + value = current->text + prefix_len; + while (isspace(*value & 255)) + value ++; + + return (value); + } + + return (NULL); +} + + +/* + * 'mmdGetNextSibling()' - Return the next sibling of a node, if any. + */ + +mmd_t * /* O - Next sibling or @code NULL@ if none */ +mmdGetNextSibling(mmd_t *node) /* I - Node */ +{ + return (node ? node->next_sibling : NULL); +} + + +/* + * 'mmdGetParent()' - Return the parent of a node, if any. + */ + +mmd_t * /* O - Parent node or @code NULL@ if none */ +mmdGetParent(mmd_t *node) /* I - Node */ +{ + return (node ? node->parent : NULL); +} + + +/* + * 'mmdGetPrevSibling()' - Return the previous sibling of a node, if any. + */ + +mmd_t * /* O - Previous sibling or @code NULL@ if none */ +mmdGetPrevSibling(mmd_t *node) /* I - Node */ +{ + return (node ? node->prev_sibling : NULL); +} + + +/* + * 'mmdGetText()' - Return the text associated with a node, if any. + */ + +const char * /* O - Text or @code NULL@ if none */ +mmdGetText(mmd_t *node) /* I - Node */ +{ + return (node ? node->text : NULL); +} + + +/* + * 'mmdGetType()' - Return the type of a node, if any. + */ + +mmd_type_t /* O - Type or @code MMD_TYPE_NONE@ if none */ +mmdGetType(mmd_t *node) /* I - Node */ +{ + return (node ? node->type : MMD_TYPE_NONE); +} + + +/* + * 'mmdGetURL()' - Return the URL associated with a node, if any. + */ + +const char * /* O - URL or @code NULL@ if none */ +mmdGetURL(mmd_t *node) /* I - Node */ +{ + return (node ? node->url : NULL); +} + + +/* + * 'mmdGetWhitespace()' - Return whether whitespace preceded a node. + */ + +int /* O - 1 for whitespace, 0 for none */ +mmdGetWhitespace(mmd_t *node) /* I - Node */ +{ + return (node ? node->whitespace : 0); +} + + +/* + * 'mmdIsBlock()' - Return whether the node is a block. + */ + +int /* O - 1 for block nodes, 0 otherwise */ +mmdIsBlock(mmd_t *node) /* I - Node */ +{ + return (node ? node->type < MMD_TYPE_NORMAL_TEXT : 0); +} + + +/* + * 'mmdLoad()' - Load a markdown file into nodes. + */ + +mmd_t * /* O - First node in markdown */ +mmdLoad(const char *filename) /* I - File to load */ +{ + FILE *fp; /* File */ + mmd_t *doc; /* Document */ + + + /* + * Open the file and create an empty document... + */ + + if ((fp = fopen(filename, "r")) == NULL) + return (NULL); + + doc = mmdLoadFile(fp); + + fclose(fp); + + return (doc); +} + + +/* + * 'mmdLoadFile()' - Load a markdown file into nodes from a stdio file. + */ + +mmd_t * /* O - First node in markdown */ +mmdLoadFile(FILE *fp) /* I - File to load */ +{ + mmd_t *doc, /* Document */ + *current, /* Current parent block */ + *block = NULL; /* Current block */ + mmd_type_t type; /* Type for line */ + char line[65536], /* Line from file */ + *lineptr, /* Pointer into line */ + *lineend; /* End of line */ + int blank_code = 0; /* Saved indented blank code line */ + + + /* + * Create an empty document... + */ + + doc = current = mmd_add(NULL, MMD_TYPE_DOCUMENT, 0, NULL, NULL); + + if (!doc) + { + fclose(fp); + return (NULL); + } + + /* + * Read lines until end-of-file... + */ + + while (fgets(line, sizeof(line), fp)) + { + lineptr = line; + + while (isspace(*lineptr & 255)) + lineptr ++; + + if ((lineptr - line) >= 4 && !block && (current == doc || current->type == MMD_TYPE_CODE_BLOCK)) + { + /* + * Indented code block. + */ + + if (current == doc) + current = mmd_add(doc, MMD_TYPE_CODE_BLOCK, 0, NULL, NULL); + + if (blank_code) + mmd_add(current, MMD_TYPE_CODE_TEXT, 0, "\n", NULL); + + mmd_add(current, MMD_TYPE_CODE_TEXT, 0, line + 4, NULL); + + blank_code = 0; + continue; + } + else if (*lineptr == '`' && (!lineptr[1] || lineptr[1] == '`')) + { + if (block) + { + if (block->type == MMD_TYPE_CODE_BLOCK) + block = NULL; + else if (block->type == MMD_TYPE_LIST_ITEM) + block = mmd_add(block, MMD_TYPE_CODE_BLOCK, 0, NULL, NULL); + else if (block->parent->type == MMD_TYPE_LIST_ITEM) + block = mmd_add(block->parent, MMD_TYPE_CODE_BLOCK, 0, NULL, NULL); + else + block = mmd_add(current, MMD_TYPE_CODE_BLOCK, 0, NULL, NULL); + } + else + block = mmd_add(current, MMD_TYPE_CODE_BLOCK, 0, NULL, NULL); + + continue; + } + + if (block && block->type == MMD_TYPE_CODE_BLOCK) + { + mmd_add(block, MMD_TYPE_CODE_TEXT, 0, line, NULL); + continue; + } + else if (!strncmp(lineptr, "---", 3) && doc->first_child == NULL) + { + /* + * Document metadata... + */ + + block = mmd_add(doc, MMD_TYPE_METADATA, 0, NULL, NULL); + + while (fgets(line, sizeof(line), fp)) + { + lineptr = line; + + while (isspace(*lineptr & 255)) + lineptr ++; + + if (!strncmp(line, "---", 3) || !strncmp(line, "...", 3)) + break; + + lineend = lineptr + strlen(lineptr) - 1; + if (lineend > lineptr && *lineend == '\n') + *lineend = '\0'; + + mmd_add(block, MMD_TYPE_METADATA_TEXT, 0, lineptr, NULL); + } + + block = NULL; + continue; + } + else if (!block && (!strncmp(lineptr, "---", 3) || !strncmp(lineptr, "***", 3) || !strncmp(lineptr, "___", 3))) + { + int ch = *lineptr; + + lineptr += 3; + while (*lineptr && (*lineptr == ch || isspace(*lineptr & 255))) + lineptr ++; + + if (!*lineptr) + { + block = NULL; + mmd_add(current, MMD_TYPE_THEMATIC_BREAK, 0, NULL, NULL); + continue; + } + } + + if (*lineptr == '>') + { + /* + * Block quote. See if the parent of the current node is already a block + * quote... + */ + + if (current == doc || current->type != MMD_TYPE_BLOCK_QUOTE) + current = mmd_add(doc, MMD_TYPE_BLOCK_QUOTE, 0, NULL, NULL); + + /* + * Skip whitespace after the ">"... + */ + + lineptr ++; + while (isspace(*lineptr & 255)) + lineptr ++; + } + else if (current->type == MMD_TYPE_BLOCK_QUOTE) + current = current->parent; + + if (!*lineptr) + { + blank_code = current->type == MMD_TYPE_CODE_BLOCK; + block = NULL; + continue; + } + else if (!strcmp(lineptr, "+")) + { + if (block) + { + if (block->type == MMD_TYPE_LIST_ITEM) + block = mmd_add(block, MMD_TYPE_PARAGRAPH, 0, NULL, NULL); + else if (block->parent->type == MMD_TYPE_LIST_ITEM) + block = mmd_add(block->parent, MMD_TYPE_PARAGRAPH, 0, NULL, NULL); + else + block = NULL; + } + continue; + } + else if (block && block->type == MMD_TYPE_PARAGRAPH && (!strncmp(lineptr, "---", 3) || !strncmp(lineptr, "===", 3))) + { + int ch = *lineptr; + + lineptr += 3; + while (*lineptr == ch) + lineptr ++; + while (isspace(*lineptr & 255)) + lineptr ++; + + if (!*lineptr) + { + if (ch == '=') + block->type = MMD_TYPE_HEADING_1; + else + block->type = MMD_TYPE_HEADING_2; + + block = NULL; + continue; + } + + type = MMD_TYPE_PARAGRAPH; + } + else if ((*lineptr == '-' || *lineptr == '+' || *lineptr == '*') && isspace(lineptr[1] & 255)) + { + /* + * Bulleted list... + */ + + lineptr += 2; + while (isspace(*lineptr & 255)) + lineptr ++; + + if (current == doc && doc->last_child && doc->last_child->type == MMD_TYPE_UNORDERED_LIST) + current = doc->last_child; + else if (current->type != MMD_TYPE_UNORDERED_LIST) + current = mmd_add(current, MMD_TYPE_UNORDERED_LIST, 0, NULL, NULL); + + type = MMD_TYPE_LIST_ITEM; + block = NULL; + } + else if (isdigit(*lineptr & 255)) + { + /* + * Ordered list? + */ + + char *temp = lineptr + 1; + + while (isdigit(*temp & 255)) + temp ++; + + if (*temp == '.' && isspace(temp[1] & 255)) + { + /* + * Yes, ordered list. + */ + + lineptr = temp + 2; + while (isspace(*lineptr & 255)) + lineptr ++; + + if (current == doc && doc->last_child && doc->last_child->type == MMD_TYPE_ORDERED_LIST) + current = doc->last_child; + else if (current->type != MMD_TYPE_ORDERED_LIST) + current = mmd_add(current, MMD_TYPE_ORDERED_LIST, 0, NULL, NULL); + + type = MMD_TYPE_LIST_ITEM; + block = NULL; + } + else + { + /* + * No, just a regular paragraph... + */ + + type = block ? block->type : MMD_TYPE_PARAGRAPH; + } + } + else if (*lineptr == '#') + { + /* + * Heading, count the number of '#' for the heading level... + */ + + char *temp = lineptr + 1; + + while (*temp == '#') + temp ++; + + if ((temp - lineptr) <= 6) + { + /* + * Heading 1-6... + */ + + type = MMD_TYPE_HEADING_1 + (temp - lineptr - 1); + block = NULL; + + /* + * Skip whitespace after "#"... + */ + + lineptr = temp; + while (isspace(*lineptr & 255)) + lineptr ++; + + /* + * Strip trailing "#" characters... + */ + + for (temp = lineptr + strlen(lineptr) - 1; temp > lineptr && *temp == '#'; temp --) + *temp = '\0'; + } + else + { + /* + * More than 6 #'s, just treat as a paragraph... + */ + + type = MMD_TYPE_PARAGRAPH; + } + + if (current->type != MMD_TYPE_BLOCK_QUOTE) + current = doc; + } + else if (!block) + { + type = MMD_TYPE_PARAGRAPH; + + if (lineptr == line) + current = doc; + } + else + type = block->type; + + if (!block || block->type != type) + { + if (current->type == MMD_TYPE_CODE_BLOCK) + current = doc; + + block = mmd_add(current, type, 0, NULL, NULL); + } + + mmd_parse_inline(block, lineptr); + } + + return (doc); +} + + +/* + * 'mmd_add()' - Add a new markdown node. + */ + +static mmd_t * /* O - New node */ +mmd_add(mmd_t *parent, /* I - Parent node */ + mmd_type_t type, /* I - Node type */ + int whitespace, /* I - 1 if whitespace precedes this node */ + char *text, /* I - Text, if any */ + char *url) /* I - URL, if any */ +{ + mmd_t *temp; /* New node */ + + + if ((temp = calloc(1, sizeof(mmd_t))) != NULL) + { + if (parent) + { + /* + * Add node to the parent... + */ + + temp->parent = parent; + + if (parent->last_child) + { + parent->last_child->next_sibling = temp; + temp->prev_sibling = parent->last_child; + parent->last_child = temp; + } + else + { + parent->first_child = parent->last_child = temp; + } + } + + /* + * Copy the node values... + */ + + temp->type = type; + temp->whitespace = whitespace; + + if (text) + temp->text = strdup(text); + + if (url) + temp->url = strdup(url); + } + + return (temp); +} + + +/* + * 'mmd_free()' - Free memory used by a node. + */ + +static void +mmd_free(mmd_t *node) /* I - Node */ +{ + if (node->text) + free(node->text); + + if (node->url) + free(node->url); + + free(node); +} + + +/* + * 'mmd_parse_inline()' - Parse inline formatting. + */ + +static void +mmd_parse_inline(mmd_t *parent, /* I - Parent node */ + char *line) /* I - Line from file */ +{ + mmd_type_t type; /* Current node type */ + int whitespace; /* Whitespace precedes? */ + char *lineptr, /* Pointer into line */ + *text, /* Text fragment in line */ + *url; /* URL in link */ + + + whitespace = parent->last_child != NULL; + + for (lineptr = line, text = NULL, type = MMD_TYPE_NORMAL_TEXT; *lineptr; lineptr ++) + { + if (isspace(*lineptr & 255) && type != MMD_TYPE_CODE_TEXT) + { + if (text) + { + *lineptr = '\0'; + mmd_add(parent, type, whitespace, text, NULL); + text = NULL; + } + + whitespace = 1; + } + else if (*lineptr == '!' && lineptr[1] == '[' && type != MMD_TYPE_CODE_TEXT) + { + /* + * Image... + */ + + if (text) + { + mmd_add(parent, type, whitespace, text, NULL); + + text = NULL; + whitespace = 0; + } + + lineptr = mmd_parse_link(lineptr + 1, &text, &url); + + if (url) + mmd_add(parent, MMD_TYPE_IMAGE, whitespace, text, url); + + if (!*lineptr) + return; + + text = url = NULL; + whitespace = 0; + lineptr --; + } + else if (*lineptr == '[' && type != MMD_TYPE_CODE_TEXT) + { + /* + * Link... + */ + + if (text) + { + mmd_add(parent, type, whitespace, text, NULL); + + text = NULL; + whitespace = 0; + } + + lineptr = mmd_parse_link(lineptr, &text, &url); + + if (text && *text == '`') + { + char *end = text + strlen(text) - 1; + + text ++; + if (end > text && *end == '`') + *end = '\0'; + + mmd_add(parent, MMD_TYPE_CODE_TEXT, whitespace, text, url); + } + else if (text) + mmd_add(parent, MMD_TYPE_LINKED_TEXT, whitespace, text, url); + + if (!*lineptr) + return; + + text = url = NULL; + whitespace = 0; + lineptr --; + } + else if (*lineptr == '<' && type != MMD_TYPE_CODE_TEXT && strchr(lineptr + 1, '>')) + { + /* + * Autolink... + */ + + if (text) + { + mmd_add(parent, type, whitespace, text, NULL); + + text = NULL; + whitespace = 0; + } + + url = lineptr + 1; + lineptr = strchr(lineptr + 1, '>'); + + *lineptr++ = '\0'; + + mmd_add(parent, MMD_TYPE_LINKED_TEXT, whitespace, url, url); + + text = url = NULL; + whitespace = 0; + lineptr --; + } + else if (*lineptr == '*' && type != MMD_TYPE_CODE_TEXT) + { + if (text) + { + *lineptr = '\0'; + + mmd_add(parent, type, whitespace, text, NULL); + + *lineptr = '*'; + text = NULL; + whitespace = 0; + } + + if (type == MMD_TYPE_NORMAL_TEXT) + { + if (lineptr[1] == '*' && !isspace(lineptr[2] & 255)) + { + type = MMD_TYPE_STRONG_TEXT; + lineptr ++; + } + else if (!isspace(lineptr[1] & 255)) + { + type = MMD_TYPE_EMPHASIZED_TEXT; + } + + text = lineptr + 1; + } + else + { + if (lineptr[1] == '*') + lineptr ++; + + type = MMD_TYPE_NORMAL_TEXT; + } + } + else if (*lineptr == '`') + { + if (text) + { + *lineptr = '\0'; + mmd_add(parent, type, whitespace, text, NULL); + + text = NULL; + whitespace = 0; + } + + if (type == MMD_TYPE_CODE_TEXT) + { + type = MMD_TYPE_NORMAL_TEXT; + } + else + { + type = MMD_TYPE_CODE_TEXT; + text = lineptr + 1; + } + } + else if (!text) + { + if (*lineptr == '\\' && lineptr[1]) + { + /* + * Escaped character... + */ + + lineptr ++; + } + + text = lineptr; + } + else if (*lineptr == '\\' && lineptr[1]) + { + /* + * Escaped character... + */ + + memmove(lineptr, lineptr + 1, strlen(lineptr)); + } + } + + if (text) + mmd_add(parent, type, whitespace, text, NULL); +} + + +/* + * 'mmd_parse_link()' - Parse a link. + */ + +static char * /* O - End of link text */ +mmd_parse_link(char *lineptr, /* I - Pointer into line */ + char **text, /* O - Text */ + char **url) /* O - URL */ +{ + lineptr ++; /* skip "[" */ + + *text = lineptr; + *url = NULL; + + while (*lineptr && *lineptr != ']') + { + if (*lineptr == '\"') + { + lineptr ++; + while (*lineptr && *lineptr != '\"') + lineptr ++; + + if (!*lineptr) + return (lineptr); + } + + lineptr ++; + } + + if (!*lineptr) + return (lineptr); + + *lineptr++ = '\0'; + + while (isspace(*lineptr & 255)) + lineptr ++; + + if (*lineptr == '(') + { + /* + * Get URL... + */ + + lineptr ++; + *url = lineptr; + + while (*lineptr && *lineptr != ')') + { + if (isspace(*lineptr & 255)) + *lineptr = '\0'; + else if (*lineptr == '\"') + { + lineptr ++; + while (*lineptr && *lineptr != '\"') + lineptr ++; + + if (!*lineptr) + return (lineptr); + } + + lineptr ++; + } + + *lineptr++ = '\0'; + } + + return (lineptr); +} + + +/* + * 'mmd_remove()' - Remove a node from its parent. + */ + +static void +mmd_remove(mmd_t *node) /* I - Node */ +{ + if (node->parent) + { + if (node->prev_sibling) + node->prev_sibling->next_sibling = node->next_sibling; + else + node->parent->first_child = node->next_sibling; + + if (node->next_sibling) + node->next_sibling->prev_sibling = node->prev_sibling; + else + node->parent->last_child = node->prev_sibling; + + node->parent = NULL; + node->prev_sibling = NULL; + node->next_sibling = NULL; + } +} diff --git a/lib/libmxml/mmd.h b/lib/libmxml/mmd.h new file mode 100644 index 0000000..d29f045 --- /dev/null +++ b/lib/libmxml/mmd.h @@ -0,0 +1,109 @@ +/* + * Header file for miniature markdown library. + * + * https://github.com/michaelrsweet/mmd + * + * Copyright 2017 by Michael R Sweet. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * + * 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 HOLDER 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. + */ + +#ifndef MMD_H +# define MMD_H + +/* + * Include necessary headers... + */ + +# include + + +/* + * Constants... + */ + +typedef enum mmd_type_e +{ + MMD_TYPE_NONE = -1, + MMD_TYPE_DOCUMENT, + MMD_TYPE_METADATA, + MMD_TYPE_BLOCK_QUOTE, + MMD_TYPE_ORDERED_LIST, + MMD_TYPE_UNORDERED_LIST, + MMD_TYPE_LIST_ITEM, + MMD_TYPE_HEADING_1 = 10, + MMD_TYPE_HEADING_2, + MMD_TYPE_HEADING_3, + MMD_TYPE_HEADING_4, + MMD_TYPE_HEADING_5, + MMD_TYPE_HEADING_6, + MMD_TYPE_PARAGRAPH, + MMD_TYPE_CODE_BLOCK, + MMD_TYPE_THEMATIC_BREAK, + MMD_TYPE_NORMAL_TEXT = 100, + MMD_TYPE_EMPHASIZED_TEXT, + MMD_TYPE_STRONG_TEXT, + MMD_TYPE_STRUCK_TEXT, + MMD_TYPE_LINKED_TEXT, + MMD_TYPE_CODE_TEXT, + MMD_TYPE_IMAGE, + MMD_TYPE_HARD_BREAK, + MMD_TYPE_SOFT_BREAK, + MMD_TYPE_METADATA_TEXT +} mmd_type_t; + + +/* + * Types... + */ + +typedef struct _mmd_s mmd_t; + + +/* + * Functions... + */ + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + +extern void mmdFree(mmd_t *node); +extern mmd_t *mmdGetFirstChild(mmd_t *node); +extern mmd_t *mmdGetLastChild(mmd_t *node); +extern const char *mmdGetMetadata(mmd_t *doc, const char *keyword); +extern mmd_t *mmdGetNextSibling(mmd_t *node); +extern mmd_t *mmdGetParent(mmd_t *node); +extern mmd_t *mmdGetPrevSibling(mmd_t *node); +extern const char *mmdGetText(mmd_t *node); +extern mmd_type_t mmdGetType(mmd_t *node); +extern const char *mmdGetURL(mmd_t *node); +extern int mmdGetWhitespace(mmd_t *node); +extern int mmdIsBlock(mmd_t *node); +extern mmd_t *mmdLoad(const char *filename); +extern mmd_t *mmdLoadFile(FILE *fp); + +# ifdef __cplusplus +} +# endif /* __cplusplus */ + +#endif /* !MMD_H */ diff --git a/lib/libmxml/mvalidate.c b/lib/libmxml/mvalidate.c new file mode 100644 index 0000000..e40dba9 --- /dev/null +++ b/lib/libmxml/mvalidate.c @@ -0,0 +1,33 @@ +/* + * XML Schema validation program for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * 'main()' - Main entry for schema validation program. + */ + +int /* O - Exit status */ +main(int argc, /* I - Number of command-line args */ + char *argv[]) /* I - Command-line args */ +{ + /* TODO: Implement me */ + return (0); +} diff --git a/lib/libmxml/mxml-attr.c b/lib/libmxml/mxml-attr.c new file mode 100644 index 0000000..ca5531c --- /dev/null +++ b/lib/libmxml/mxml-attr.c @@ -0,0 +1,349 @@ +/* + * Attribute support code for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * Local functions... + */ + +static int mxml_set_attr(mxml_node_t *node, const char *name, + char *value); + + +/* + * 'mxmlElementDeleteAttr()' - Delete an attribute. + * + * @since Mini-XML 2.4@ + */ + +void +mxmlElementDeleteAttr(mxml_node_t *node,/* I - Element */ + const char *name)/* I - Attribute name */ +{ + int i; /* Looping var */ + mxml_attr_t *attr; /* Cirrent attribute */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlElementDeleteAttr(node=%p, name=\"%s\")\n", + node, name ? name : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || !name) + return; + + /* + * Look for the attribute... + */ + + for (i = node->value.element.num_attrs, attr = node->value.element.attrs; + i > 0; + i --, attr ++) + { +#ifdef DEBUG + printf(" %s=\"%s\"\n", attr->name, attr->value); +#endif /* DEBUG */ + + if (!strcmp(attr->name, name)) + { + /* + * Delete this attribute... + */ + + free(attr->name); + free(attr->value); + + i --; + if (i > 0) + memmove(attr, attr + 1, i * sizeof(mxml_attr_t)); + + node->value.element.num_attrs --; + + if (node->value.element.num_attrs == 0) + free(node->value.element.attrs); + return; + } + } +} + + +/* + * 'mxmlElementGetAttr()' - Get an attribute. + * + * This function returns @code NULL@ if the node is not an element or the + * named attribute does not exist. + */ + +const char * /* O - Attribute value or @code NULL@ */ +mxmlElementGetAttr(mxml_node_t *node, /* I - Element node */ + const char *name) /* I - Name of attribute */ +{ + int i; /* Looping var */ + mxml_attr_t *attr; /* Cirrent attribute */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlElementGetAttr(node=%p, name=\"%s\")\n", + node, name ? name : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || !name) + return (NULL); + + /* + * Look for the attribute... + */ + + for (i = node->value.element.num_attrs, attr = node->value.element.attrs; + i > 0; + i --, attr ++) + { +#ifdef DEBUG + printf(" %s=\"%s\"\n", attr->name, attr->value); +#endif /* DEBUG */ + + if (!strcmp(attr->name, name)) + { +#ifdef DEBUG + printf(" Returning \"%s\"!\n", attr->value); +#endif /* DEBUG */ + return (attr->value); + } + } + + /* + * Didn't find attribute, so return NULL... + */ + +#ifdef DEBUG + puts(" Returning NULL!\n"); +#endif /* DEBUG */ + + return (NULL); +} + + +/* + * 'mxmlElementGetAttrByIndex()' - Get an element attribute by index. + * + * The index ("idx") is 0-based. @code NULL@ is returned if the specified index + * is out of range. + * + * @since Mini-XML 2.11@ + */ + +const char * /* O - Attribute value */ +mxmlElementGetAttrByIndex( + mxml_node_t *node, /* I - Node */ + int idx, /* I - Attribute index, starting at 0 */ + const char **name) /* O - Attribute name */ +{ + if (!node || node->type != MXML_ELEMENT || idx < 0 || idx >= node->value.element.num_attrs) + return (NULL); + + if (name) + *name = node->value.element.attrs[idx].name; + + return (node->value.element.attrs[idx].value); +} + + +/* + * 'mxmlElementGetAttrCount()' - Get the number of element attributes. + * + * @since Mini-XML 2.11@ + */ + +int /* O - Number of attributes */ +mxmlElementGetAttrCount( + mxml_node_t *node) /* I - Node */ +{ + if (node && node->type == MXML_ELEMENT) + return (node->value.element.num_attrs); + else + return (0); +} + + +/* + * 'mxmlElementSetAttr()' - Set an attribute. + * + * If the named attribute already exists, the value of the attribute + * is replaced by the new string value. The string value is copied + * into the element node. This function does nothing if the node is + * not an element. + */ + +void +mxmlElementSetAttr(mxml_node_t *node, /* I - Element node */ + const char *name, /* I - Name of attribute */ + const char *value) /* I - Attribute value */ +{ + char *valuec; /* Copy of value */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlElementSetAttr(node=%p, name=\"%s\", value=\"%s\")\n", + node, name ? name : "(null)", value ? value : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || !name) + return; + + if (value) + valuec = strdup(value); + else + valuec = NULL; + + if (mxml_set_attr(node, name, valuec)) + free(valuec); +} + + +/* + * 'mxmlElementSetAttrf()' - Set an attribute with a formatted value. + * + * If the named attribute already exists, the value of the attribute + * is replaced by the new formatted string. The formatted string value is + * copied into the element node. This function does nothing if the node + * is not an element. + * + * @since Mini-XML 2.3@ + */ + +void +mxmlElementSetAttrf(mxml_node_t *node, /* I - Element node */ + const char *name, /* I - Name of attribute */ + const char *format,/* I - Printf-style attribute value */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Argument pointer */ + char *value; /* Value */ + + +#ifdef DEBUG + fprintf(stderr, + "mxmlElementSetAttrf(node=%p, name=\"%s\", format=\"%s\", ...)\n", + node, name ? name : "(null)", format ? format : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || !name || !format) + return; + + /* + * Format the value... + */ + + va_start(ap, format); + value = _mxml_vstrdupf(format, ap); + va_end(ap); + + if (!value) + mxml_error("Unable to allocate memory for attribute '%s' in element %s!", + name, node->value.element.name); + else if (mxml_set_attr(node, name, value)) + free(value); +} + + +/* + * 'mxml_set_attr()' - Set or add an attribute name/value pair. + */ + +static int /* O - 0 on success, -1 on failure */ +mxml_set_attr(mxml_node_t *node, /* I - Element node */ + const char *name, /* I - Attribute name */ + char *value) /* I - Attribute value */ +{ + int i; /* Looping var */ + mxml_attr_t *attr; /* New attribute */ + + + /* + * Look for the attribute... + */ + + for (i = node->value.element.num_attrs, attr = node->value.element.attrs; + i > 0; + i --, attr ++) + if (!strcmp(attr->name, name)) + { + /* + * Free the old value as needed... + */ + + if (attr->value) + free(attr->value); + + attr->value = value; + + return (0); + } + + /* + * Add a new attribute... + */ + + if (node->value.element.num_attrs == 0) + attr = malloc(sizeof(mxml_attr_t)); + else + attr = realloc(node->value.element.attrs, + (node->value.element.num_attrs + 1) * sizeof(mxml_attr_t)); + + if (!attr) + { + mxml_error("Unable to allocate memory for attribute '%s' in element %s!", + name, node->value.element.name); + return (-1); + } + + node->value.element.attrs = attr; + attr += node->value.element.num_attrs; + + if ((attr->name = strdup(name)) == NULL) + { + mxml_error("Unable to allocate memory for attribute '%s' in element %s!", + name, node->value.element.name); + return (-1); + } + + attr->value = value; + + node->value.element.num_attrs ++; + + return (0); +} diff --git a/lib/libmxml/mxml-entity.c b/lib/libmxml/mxml-entity.c new file mode 100644 index 0000000..cca15b5 --- /dev/null +++ b/lib/libmxml/mxml-entity.c @@ -0,0 +1,441 @@ +/* + * Character entity support code for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "mxml-private.h" + + +/* + * 'mxmlEntityAddCallback()' - Add a callback to convert entities to Unicode. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlEntityAddCallback( + mxml_entity_cb_t cb) /* I - Callback function to add */ +{ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + if (global->num_entity_cbs < (int)(sizeof(global->entity_cbs) / sizeof(global->entity_cbs[0]))) + { + global->entity_cbs[global->num_entity_cbs] = cb; + global->num_entity_cbs ++; + + return (0); + } + else + { + mxml_error("Unable to add entity callback!"); + + return (-1); + } +} + + +/* + * 'mxmlEntityGetName()' - Get the name that corresponds to the character value. + * + * If val does not need to be represented by a named entity, @code NULL@ is returned. + */ + +const char * /* O - Entity name or @code NULL@ */ +mxmlEntityGetName(int val) /* I - Character value */ +{ + switch (val) + { + case '&' : + return ("amp"); + + case '<' : + return ("lt"); + + case '>' : + return ("gt"); + + case '\"' : + return ("quot"); + + default : + return (NULL); + } +} + + +/* + * 'mxmlEntityGetValue()' - Get the character corresponding to a named entity. + * + * The entity name can also be a numeric constant. -1 is returned if the + * name is not known. + */ + +int /* O - Character value or -1 on error */ +mxmlEntityGetValue(const char *name) /* I - Entity name */ +{ + int i; /* Looping var */ + int ch; /* Character value */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + for (i = 0; i < global->num_entity_cbs; i ++) + if ((ch = (global->entity_cbs[i])(name)) >= 0) + return (ch); + + return (-1); +} + + +/* + * 'mxmlEntityRemoveCallback()' - Remove a callback. + */ + +void +mxmlEntityRemoveCallback( + mxml_entity_cb_t cb) /* I - Callback function to remove */ +{ + int i; /* Looping var */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + for (i = 0; i < global->num_entity_cbs; i ++) + if (cb == global->entity_cbs[i]) + { + /* + * Remove the callback... + */ + + global->num_entity_cbs --; + + if (i < global->num_entity_cbs) + memmove(global->entity_cbs + i, global->entity_cbs + i + 1, + (global->num_entity_cbs - i) * sizeof(global->entity_cbs[0])); + + return; + } +} + + +/* + * '_mxml_entity_cb()' - Lookup standard (X)HTML entities. + */ + +int /* O - Unicode value or -1 */ +_mxml_entity_cb(const char *name) /* I - Entity name */ +{ + int diff, /* Difference between names */ + current, /* Current entity in search */ + first, /* First entity in search */ + last; /* Last entity in search */ + static const struct + { + const char *name; /* Entity name */ + int val; /* Character value */ + } entities[] = + { + { "AElig", 198 }, + { "Aacute", 193 }, + { "Acirc", 194 }, + { "Agrave", 192 }, + { "Alpha", 913 }, + { "Aring", 197 }, + { "Atilde", 195 }, + { "Auml", 196 }, + { "Beta", 914 }, + { "Ccedil", 199 }, + { "Chi", 935 }, + { "Dagger", 8225 }, + { "Delta", 916 }, + { "Dstrok", 208 }, + { "ETH", 208 }, + { "Eacute", 201 }, + { "Ecirc", 202 }, + { "Egrave", 200 }, + { "Epsilon", 917 }, + { "Eta", 919 }, + { "Euml", 203 }, + { "Gamma", 915 }, + { "Iacute", 205 }, + { "Icirc", 206 }, + { "Igrave", 204 }, + { "Iota", 921 }, + { "Iuml", 207 }, + { "Kappa", 922 }, + { "Lambda", 923 }, + { "Mu", 924 }, + { "Ntilde", 209 }, + { "Nu", 925 }, + { "OElig", 338 }, + { "Oacute", 211 }, + { "Ocirc", 212 }, + { "Ograve", 210 }, + { "Omega", 937 }, + { "Omicron", 927 }, + { "Oslash", 216 }, + { "Otilde", 213 }, + { "Ouml", 214 }, + { "Phi", 934 }, + { "Pi", 928 }, + { "Prime", 8243 }, + { "Psi", 936 }, + { "Rho", 929 }, + { "Scaron", 352 }, + { "Sigma", 931 }, + { "THORN", 222 }, + { "Tau", 932 }, + { "Theta", 920 }, + { "Uacute", 218 }, + { "Ucirc", 219 }, + { "Ugrave", 217 }, + { "Upsilon", 933 }, + { "Uuml", 220 }, + { "Xi", 926 }, + { "Yacute", 221 }, + { "Yuml", 376 }, + { "Zeta", 918 }, + { "aacute", 225 }, + { "acirc", 226 }, + { "acute", 180 }, + { "aelig", 230 }, + { "agrave", 224 }, + { "alefsym", 8501 }, + { "alpha", 945 }, + { "amp", '&' }, + { "and", 8743 }, + { "ang", 8736 }, + { "apos", '\'' }, + { "aring", 229 }, + { "asymp", 8776 }, + { "atilde", 227 }, + { "auml", 228 }, + { "bdquo", 8222 }, + { "beta", 946 }, + { "brkbar", 166 }, + { "brvbar", 166 }, + { "bull", 8226 }, + { "cap", 8745 }, + { "ccedil", 231 }, + { "cedil", 184 }, + { "cent", 162 }, + { "chi", 967 }, + { "circ", 710 }, + { "clubs", 9827 }, + { "cong", 8773 }, + { "copy", 169 }, + { "crarr", 8629 }, + { "cup", 8746 }, + { "curren", 164 }, + { "dArr", 8659 }, + { "dagger", 8224 }, + { "darr", 8595 }, + { "deg", 176 }, + { "delta", 948 }, + { "diams", 9830 }, + { "die", 168 }, + { "divide", 247 }, + { "eacute", 233 }, + { "ecirc", 234 }, + { "egrave", 232 }, + { "empty", 8709 }, + { "emsp", 8195 }, + { "ensp", 8194 }, + { "epsilon", 949 }, + { "equiv", 8801 }, + { "eta", 951 }, + { "eth", 240 }, + { "euml", 235 }, + { "euro", 8364 }, + { "exist", 8707 }, + { "fnof", 402 }, + { "forall", 8704 }, + { "frac12", 189 }, + { "frac14", 188 }, + { "frac34", 190 }, + { "frasl", 8260 }, + { "gamma", 947 }, + { "ge", 8805 }, + { "gt", '>' }, + { "hArr", 8660 }, + { "harr", 8596 }, + { "hearts", 9829 }, + { "hellip", 8230 }, + { "hibar", 175 }, + { "iacute", 237 }, + { "icirc", 238 }, + { "iexcl", 161 }, + { "igrave", 236 }, + { "image", 8465 }, + { "infin", 8734 }, + { "int", 8747 }, + { "iota", 953 }, + { "iquest", 191 }, + { "isin", 8712 }, + { "iuml", 239 }, + { "kappa", 954 }, + { "lArr", 8656 }, + { "lambda", 955 }, + { "lang", 9001 }, + { "laquo", 171 }, + { "larr", 8592 }, + { "lceil", 8968 }, + { "ldquo", 8220 }, + { "le", 8804 }, + { "lfloor", 8970 }, + { "lowast", 8727 }, + { "loz", 9674 }, + { "lrm", 8206 }, + { "lsaquo", 8249 }, + { "lsquo", 8216 }, + { "lt", '<' }, + { "macr", 175 }, + { "mdash", 8212 }, + { "micro", 181 }, + { "middot", 183 }, + { "minus", 8722 }, + { "mu", 956 }, + { "nabla", 8711 }, + { "nbsp", 160 }, + { "ndash", 8211 }, + { "ne", 8800 }, + { "ni", 8715 }, + { "not", 172 }, + { "notin", 8713 }, + { "nsub", 8836 }, + { "ntilde", 241 }, + { "nu", 957 }, + { "oacute", 243 }, + { "ocirc", 244 }, + { "oelig", 339 }, + { "ograve", 242 }, + { "oline", 8254 }, + { "omega", 969 }, + { "omicron", 959 }, + { "oplus", 8853 }, + { "or", 8744 }, + { "ordf", 170 }, + { "ordm", 186 }, + { "oslash", 248 }, + { "otilde", 245 }, + { "otimes", 8855 }, + { "ouml", 246 }, + { "para", 182 }, + { "part", 8706 }, + { "permil", 8240 }, + { "perp", 8869 }, + { "phi", 966 }, + { "pi", 960 }, + { "piv", 982 }, + { "plusmn", 177 }, + { "pound", 163 }, + { "prime", 8242 }, + { "prod", 8719 }, + { "prop", 8733 }, + { "psi", 968 }, + { "quot", '\"' }, + { "rArr", 8658 }, + { "radic", 8730 }, + { "rang", 9002 }, + { "raquo", 187 }, + { "rarr", 8594 }, + { "rceil", 8969 }, + { "rdquo", 8221 }, + { "real", 8476 }, + { "reg", 174 }, + { "rfloor", 8971 }, + { "rho", 961 }, + { "rlm", 8207 }, + { "rsaquo", 8250 }, + { "rsquo", 8217 }, + { "sbquo", 8218 }, + { "scaron", 353 }, + { "sdot", 8901 }, + { "sect", 167 }, + { "shy", 173 }, + { "sigma", 963 }, + { "sigmaf", 962 }, + { "sim", 8764 }, + { "spades", 9824 }, + { "sub", 8834 }, + { "sube", 8838 }, + { "sum", 8721 }, + { "sup", 8835 }, + { "sup1", 185 }, + { "sup2", 178 }, + { "sup3", 179 }, + { "supe", 8839 }, + { "szlig", 223 }, + { "tau", 964 }, + { "there4", 8756 }, + { "theta", 952 }, + { "thetasym", 977 }, + { "thinsp", 8201 }, + { "thorn", 254 }, + { "tilde", 732 }, + { "times", 215 }, + { "trade", 8482 }, + { "uArr", 8657 }, + { "uacute", 250 }, + { "uarr", 8593 }, + { "ucirc", 251 }, + { "ugrave", 249 }, + { "uml", 168 }, + { "upsih", 978 }, + { "upsilon", 965 }, + { "uuml", 252 }, + { "weierp", 8472 }, + { "xi", 958 }, + { "yacute", 253 }, + { "yen", 165 }, + { "yuml", 255 }, + { "zeta", 950 }, + { "zwj", 8205 }, + { "zwnj", 8204 } + }; + + + /* + * Do a binary search for the named entity... + */ + + first = 0; + last = (int)(sizeof(entities) / sizeof(entities[0]) - 1); + + while ((last - first) > 1) + { + current = (first + last) / 2; + + if ((diff = strcmp(name, entities[current].name)) == 0) + return (entities[current].val); + else if (diff < 0) + last = current; + else + first = current; + } + + /* + * If we get here, there is a small chance that there is still + * a match; check first and last... + */ + + if (!strcmp(name, entities[first].name)) + return (entities[first].val); + else if (!strcmp(name, entities[last].name)) + return (entities[last].val); + else + return (-1); +} diff --git a/lib/libmxml/mxml-file.c b/lib/libmxml/mxml-file.c new file mode 100644 index 0000000..ec106a7 --- /dev/null +++ b/lib/libmxml/mxml-file.c @@ -0,0 +1,3070 @@ +/* + * File loading code for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#ifndef WIN32 +# include +#endif /* !WIN32 */ +#include "mxml-private.h" + + +/* + * Character encoding... + */ + +#define ENCODE_UTF8 0 /* UTF-8 */ +#define ENCODE_UTF16BE 1 /* UTF-16 Big-Endian */ +#define ENCODE_UTF16LE 2 /* UTF-16 Little-Endian */ + + +/* + * Macro to test for a bad XML character... + */ + +#define mxml_bad_char(ch) ((ch) < ' ' && (ch) != '\n' && (ch) != '\r' && (ch) != '\t') + + +/* + * Types and structures... + */ + +typedef int (*_mxml_getc_cb_t)(void *, int *); +typedef int (*_mxml_putc_cb_t)(int, void *); + +typedef struct _mxml_fdbuf_s /**** File descriptor buffer ****/ +{ + int fd; /* File descriptor */ + unsigned char *current, /* Current position in buffer */ + *end, /* End of buffer */ + buffer[8192]; /* Character buffer */ +} _mxml_fdbuf_t; + + +/* + * Local functions... + */ + +static int mxml_add_char(int ch, char **ptr, char **buffer, + int *bufsize); +static int mxml_fd_getc(void *p, int *encoding); +static int mxml_fd_putc(int ch, void *p); +static int mxml_fd_read(_mxml_fdbuf_t *buf); +static int mxml_fd_write(_mxml_fdbuf_t *buf); +static int mxml_file_getc(void *p, int *encoding); +static int mxml_file_putc(int ch, void *p); +static int mxml_get_entity(mxml_node_t *parent, void *p, + int *encoding, + _mxml_getc_cb_t getc_cb); +static inline int mxml_isspace(int ch) + { + return (ch == ' ' || ch == '\t' || ch == '\r' || + ch == '\n'); + } +static mxml_node_t *mxml_load_data(mxml_node_t *top, void *p, + mxml_load_cb_t cb, + _mxml_getc_cb_t getc_cb, + mxml_sax_cb_t sax_cb, void *sax_data); +static int mxml_parse_element(mxml_node_t *node, void *p, + int *encoding, + _mxml_getc_cb_t getc_cb); +static int mxml_string_getc(void *p, int *encoding); +static int mxml_string_putc(int ch, void *p); +static int mxml_write_name(const char *s, void *p, + _mxml_putc_cb_t putc_cb); +static int mxml_write_node(mxml_node_t *node, void *p, + mxml_save_cb_t cb, int col, + _mxml_putc_cb_t putc_cb, + _mxml_global_t *global); +static int mxml_write_string(const char *s, void *p, + _mxml_putc_cb_t putc_cb); +static int mxml_write_ws(mxml_node_t *node, void *p, + mxml_save_cb_t cb, int ws, + int col, _mxml_putc_cb_t putc_cb); + + +/* + * 'mxmlLoadFd()' - Load a file descriptor into an XML node tree. + * + * The nodes in the specified file are added to the specified top node. + * If no top node is provided, the XML file MUST be well-formed with a + * single parent node like for the entire file. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child (data) nodes of the specified type. + */ + +mxml_node_t * /* O - First node or @code NULL@ if the file could not be read. */ +mxmlLoadFd(mxml_node_t *top, /* I - Top node */ + int fd, /* I - File descriptor to read from */ + mxml_load_cb_t cb) /* I - Callback function or constant */ +{ + _mxml_fdbuf_t buf; /* File descriptor buffer */ + + + /* + * Initialize the file descriptor buffer... + */ + + buf.fd = fd; + buf.current = buf.buffer; + buf.end = buf.buffer; + + /* + * Read the XML data... + */ + + return (mxml_load_data(top, &buf, cb, mxml_fd_getc, MXML_NO_CALLBACK, NULL)); +} + + +/* + * 'mxmlLoadFile()' - Load a file into an XML node tree. + * + * The nodes in the specified file are added to the specified top node. + * If no top node is provided, the XML file MUST be well-formed with a + * single parent node like for the entire file. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child (data) nodes of the specified type. + */ + +mxml_node_t * /* O - First node or @code NULL@ if the file could not be read. */ +mxmlLoadFile(mxml_node_t *top, /* I - Top node */ + FILE *fp, /* I - File to read from */ + mxml_load_cb_t cb) /* I - Callback function or constant */ +{ + /* + * Read the XML data... + */ + + return (mxml_load_data(top, fp, cb, mxml_file_getc, MXML_NO_CALLBACK, NULL)); +} + + +/* + * 'mxmlLoadString()' - Load a string into an XML node tree. + * + * The nodes in the specified string are added to the specified top node. + * If no top node is provided, the XML string MUST be well-formed with a + * single parent node like for the entire string. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child (data) nodes of the specified type. + */ + +mxml_node_t * /* O - First node or @code NULL@ if the string has errors. */ +mxmlLoadString(mxml_node_t *top, /* I - Top node */ + const char *s, /* I - String to load */ + mxml_load_cb_t cb) /* I - Callback function or constant */ +{ + /* + * Read the XML data... + */ + + return (mxml_load_data(top, (void *)&s, cb, mxml_string_getc, MXML_NO_CALLBACK, + NULL)); +} + + +/* + * 'mxmlSaveAllocString()' - Save an XML tree to an allocated string. + * + * This function returns a pointer to a string containing the textual + * representation of the XML node tree. The string should be freed + * using the free() function when you are done with it. @code NULL@ is returned + * if the node would produce an empty string or if the string cannot be + * allocated. + * + * The callback argument specifies a function that returns a whitespace + * string or NULL before and after each element. If @code MXML_NO_CALLBACK@ + * is specified, whitespace will only be added before @code MXML_TEXT@ nodes + * with leading whitespace and before attribute names inside opening + * element tags. + */ + +char * /* O - Allocated string or @code NULL@ */ +mxmlSaveAllocString( + mxml_node_t *node, /* I - Node to write */ + mxml_save_cb_t cb) /* I - Whitespace callback or @code MXML_NO_CALLBACK@ */ +{ + int bytes; /* Required bytes */ + char buffer[8192]; /* Temporary buffer */ + char *s; /* Allocated string */ + + + /* + * Write the node to the temporary buffer... + */ + + bytes = mxmlSaveString(node, buffer, sizeof(buffer), cb); + + if (bytes <= 0) + return (NULL); + + if (bytes < (int)(sizeof(buffer) - 1)) + { + /* + * Node fit inside the buffer, so just duplicate that string and + * return... + */ + + return (strdup(buffer)); + } + + /* + * Allocate a buffer of the required size and save the node to the + * new buffer... + */ + + if ((s = malloc(bytes + 1)) == NULL) + return (NULL); + + mxmlSaveString(node, s, bytes + 1, cb); + + /* + * Return the allocated string... + */ + + return (s); +} + + +/* + * 'mxmlSaveFd()' - Save an XML tree to a file descriptor. + * + * The callback argument specifies a function that returns a whitespace + * string or NULL before and after each element. If @code MXML_NO_CALLBACK@ + * is specified, whitespace will only be added before @code MXML_TEXT@ nodes + * with leading whitespace and before attribute names inside opening + * element tags. + */ + +int /* O - 0 on success, -1 on error. */ +mxmlSaveFd(mxml_node_t *node, /* I - Node to write */ + int fd, /* I - File descriptor to write to */ + mxml_save_cb_t cb) /* I - Whitespace callback or @code MXML_NO_CALLBACK@ */ +{ + int col; /* Final column */ + _mxml_fdbuf_t buf; /* File descriptor buffer */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + /* + * Initialize the file descriptor buffer... + */ + + buf.fd = fd; + buf.current = buf.buffer; + buf.end = buf.buffer + sizeof(buf.buffer); + + /* + * Write the node... + */ + + if ((col = mxml_write_node(node, &buf, cb, 0, mxml_fd_putc, global)) < 0) + return (-1); + + if (col > 0) + if (mxml_fd_putc('\n', &buf) < 0) + return (-1); + + /* + * Flush and return... + */ + + return (mxml_fd_write(&buf)); +} + + +/* + * 'mxmlSaveFile()' - Save an XML tree to a file. + * + * The callback argument specifies a function that returns a whitespace + * string or NULL before and after each element. If @code MXML_NO_CALLBACK@ + * is specified, whitespace will only be added before @code MXML_TEXT@ nodes + * with leading whitespace and before attribute names inside opening + * element tags. + */ + +int /* O - 0 on success, -1 on error. */ +mxmlSaveFile(mxml_node_t *node, /* I - Node to write */ + FILE *fp, /* I - File to write to */ + mxml_save_cb_t cb) /* I - Whitespace callback or @code MXML_NO_CALLBACK@ */ +{ + int col; /* Final column */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + /* + * Write the node... + */ + + if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0) + return (-1); + + if (col > 0) + if (putc('\n', fp) < 0) + return (-1); + + /* + * Return 0 (success)... + */ + + return (0); +} + + +/* + * 'mxmlSaveString()' - Save an XML node tree to a string. + * + * This function returns the total number of bytes that would be + * required for the string but only copies (bufsize - 1) characters + * into the specified buffer. + * + * The callback argument specifies a function that returns a whitespace + * string or NULL before and after each element. If @code MXML_NO_CALLBACK@ + * is specified, whitespace will only be added before @code MXML_TEXT@ nodes + * with leading whitespace and before attribute names inside opening + * element tags. + */ + +int /* O - Size of string */ +mxmlSaveString(mxml_node_t *node, /* I - Node to write */ + char *buffer, /* I - String buffer */ + int bufsize, /* I - Size of string buffer */ + mxml_save_cb_t cb) /* I - Whitespace callback or @code MXML_NO_CALLBACK@ */ +{ + int col; /* Final column */ + char *ptr[2]; /* Pointers for putc_cb */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + /* + * Write the node... + */ + + ptr[0] = buffer; + ptr[1] = buffer + bufsize; + + if ((col = mxml_write_node(node, ptr, cb, 0, mxml_string_putc, global)) < 0) + return (-1); + + if (col > 0) + mxml_string_putc('\n', ptr); + + /* + * Nul-terminate the buffer... + */ + + if (ptr[0] >= ptr[1]) + buffer[bufsize - 1] = '\0'; + else + ptr[0][0] = '\0'; + + /* + * Return the number of characters... + */ + + return ((int)(ptr[0] - buffer)); +} + + +/* + * 'mxmlSAXLoadFd()' - Load a file descriptor into an XML node tree + * using a SAX callback. + * + * The nodes in the specified file are added to the specified top node. + * If no top node is provided, the XML file MUST be well-formed with a + * single parent node like for the entire file. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child nodes of the specified type. + * + * The SAX callback must call @link mxmlRetain@ for any nodes that need to + * be kept for later use. Otherwise, nodes are deleted when the parent + * node is closed or after each data, comment, CDATA, or directive node. + * + * @since Mini-XML 2.3@ + */ + +mxml_node_t * /* O - First node or @code NULL@ if the file could not be read. */ +mxmlSAXLoadFd(mxml_node_t *top, /* I - Top node */ + int fd, /* I - File descriptor to read from */ + mxml_load_cb_t cb, /* I - Callback function or constant */ + mxml_sax_cb_t sax_cb, /* I - SAX callback or @code MXML_NO_CALLBACK@ */ + void *sax_data) /* I - SAX user data */ +{ + _mxml_fdbuf_t buf; /* File descriptor buffer */ + + + /* + * Initialize the file descriptor buffer... + */ + + buf.fd = fd; + buf.current = buf.buffer; + buf.end = buf.buffer; + + /* + * Read the XML data... + */ + + return (mxml_load_data(top, &buf, cb, mxml_fd_getc, sax_cb, sax_data)); +} + + +/* + * 'mxmlSAXLoadFile()' - Load a file into an XML node tree + * using a SAX callback. + * + * The nodes in the specified file are added to the specified top node. + * If no top node is provided, the XML file MUST be well-formed with a + * single parent node like for the entire file. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child nodes of the specified type. + * + * The SAX callback must call @link mxmlRetain@ for any nodes that need to + * be kept for later use. Otherwise, nodes are deleted when the parent + * node is closed or after each data, comment, CDATA, or directive node. + * + * @since Mini-XML 2.3@ + */ + +mxml_node_t * /* O - First node or @code NULL@ if the file could not be read. */ +mxmlSAXLoadFile( + mxml_node_t *top, /* I - Top node */ + FILE *fp, /* I - File to read from */ + mxml_load_cb_t cb, /* I - Callback function or constant */ + mxml_sax_cb_t sax_cb, /* I - SAX callback or @code MXML_NO_CALLBACK@ */ + void *sax_data) /* I - SAX user data */ +{ + /* + * Read the XML data... + */ + + return (mxml_load_data(top, fp, cb, mxml_file_getc, sax_cb, sax_data)); +} + + +/* + * 'mxmlSAXLoadString()' - Load a string into an XML node tree + * using a SAX callback. + * + * The nodes in the specified string are added to the specified top node. + * If no top node is provided, the XML string MUST be well-formed with a + * single parent node like for the entire string. The callback + * function returns the value type that should be used for child nodes. + * The constants @code MXML_INTEGER_CALLBACK@, @code MXML_OPAQUE_CALLBACK@, + * @code MXML_REAL_CALLBACK@, and @code MXML_TEXT_CALLBACK@ are defined for + * loading child nodes of the specified type. + * + * The SAX callback must call @link mxmlRetain@ for any nodes that need to + * be kept for later use. Otherwise, nodes are deleted when the parent + * node is closed or after each data, comment, CDATA, or directive node. + * + * @since Mini-XML 2.3@ + */ + +mxml_node_t * /* O - First node or @code NULL@ if the string has errors. */ +mxmlSAXLoadString( + mxml_node_t *top, /* I - Top node */ + const char *s, /* I - String to load */ + mxml_load_cb_t cb, /* I - Callback function or constant */ + mxml_sax_cb_t sax_cb, /* I - SAX callback or @code MXML_NO_CALLBACK@ */ + void *sax_data) /* I - SAX user data */ +{ + /* + * Read the XML data... + */ + + return (mxml_load_data(top, (void *)&s, cb, mxml_string_getc, sax_cb, sax_data)); +} + + +/* + * 'mxmlSetCustomHandlers()' - Set the handling functions for custom data. + * + * The load function accepts a node pointer and a data string and must + * return 0 on success and non-zero on error. + * + * The save function accepts a node pointer and must return a malloc'd + * string on success and @code NULL@ on error. + * + */ + +void +mxmlSetCustomHandlers( + mxml_custom_load_cb_t load, /* I - Load function */ + mxml_custom_save_cb_t save) /* I - Save function */ +{ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + global->custom_load_cb = load; + global->custom_save_cb = save; +} + + +/* + * 'mxmlSetErrorCallback()' - Set the error message callback. + */ + +void +mxmlSetErrorCallback(mxml_error_cb_t cb)/* I - Error callback function */ +{ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + global->error_cb = cb; +} + + +/* + * 'mxmlSetWrapMargin()' - Set the wrap margin when saving XML data. + * + * Wrapping is disabled when "column" is 0. + * + * @since Mini-XML 2.3@ + */ + +void +mxmlSetWrapMargin(int column) /* I - Column for wrapping, 0 to disable wrapping */ +{ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + global->wrap = column; +} + + +/* + * 'mxml_add_char()' - Add a character to a buffer, expanding as needed. + */ + +static int /* O - 0 on success, -1 on error */ +mxml_add_char(int ch, /* I - Character to add */ + char **bufptr, /* IO - Current position in buffer */ + char **buffer, /* IO - Current buffer */ + int *bufsize) /* IO - Current buffer size */ +{ + char *newbuffer; /* New buffer value */ + + + if (*bufptr >= (*buffer + *bufsize - 4)) + { + /* + * Increase the size of the buffer... + */ + + if (*bufsize < 1024) + (*bufsize) *= 2; + else + (*bufsize) += 1024; + + if ((newbuffer = realloc(*buffer, *bufsize)) == NULL) + { + free(*buffer); + + mxml_error("Unable to expand string buffer to %d bytes!", *bufsize); + + return (-1); + } + + *bufptr = newbuffer + (*bufptr - *buffer); + *buffer = newbuffer; + } + + if (ch < 0x80) + { + /* + * Single byte ASCII... + */ + + *(*bufptr)++ = ch; + } + else if (ch < 0x800) + { + /* + * Two-byte UTF-8... + */ + + *(*bufptr)++ = 0xc0 | (ch >> 6); + *(*bufptr)++ = 0x80 | (ch & 0x3f); + } + else if (ch < 0x10000) + { + /* + * Three-byte UTF-8... + */ + + *(*bufptr)++ = 0xe0 | (ch >> 12); + *(*bufptr)++ = 0x80 | ((ch >> 6) & 0x3f); + *(*bufptr)++ = 0x80 | (ch & 0x3f); + } + else + { + /* + * Four-byte UTF-8... + */ + + *(*bufptr)++ = 0xf0 | (ch >> 18); + *(*bufptr)++ = 0x80 | ((ch >> 12) & 0x3f); + *(*bufptr)++ = 0x80 | ((ch >> 6) & 0x3f); + *(*bufptr)++ = 0x80 | (ch & 0x3f); + } + + return (0); +} + + +/* + * 'mxml_fd_getc()' - Read a character from a file descriptor. + */ + +static int /* O - Character or EOF */ +mxml_fd_getc(void *p, /* I - File descriptor buffer */ + int *encoding) /* IO - Encoding */ +{ + _mxml_fdbuf_t *buf; /* File descriptor buffer */ + int ch, /* Current character */ + temp; /* Temporary character */ + + + /* + * Grab the next character in the buffer... + */ + + buf = (_mxml_fdbuf_t *)p; + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + ch = *(buf->current)++; + + switch (*encoding) + { + case ENCODE_UTF8 : + /* + * Got a UTF-8 character; convert UTF-8 to Unicode and return... + */ + + if (!(ch & 0x80)) + { +#if DEBUG > 1 + printf("mxml_fd_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + + return (ch); + } + else if (ch == 0xfe) + { + /* + * UTF-16 big-endian BOM? + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + ch = *(buf->current)++; + + if (ch != 0xff) + return (EOF); + + *encoding = ENCODE_UTF16BE; + + return (mxml_fd_getc(p, encoding)); + } + else if (ch == 0xff) + { + /* + * UTF-16 little-endian BOM? + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + ch = *(buf->current)++; + + if (ch != 0xfe) + return (EOF); + + *encoding = ENCODE_UTF16LE; + + return (mxml_fd_getc(p, encoding)); + } + else if ((ch & 0xe0) == 0xc0) + { + /* + * Two-byte value... + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x1f) << 6) | (temp & 0x3f); + + if (ch < 0x80) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + } + else if ((ch & 0xf0) == 0xe0) + { + /* + * Three-byte value... + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x0f) << 6) | (temp & 0x3f); + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if (ch < 0x800) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + + /* + * Ignore (strip) Byte Order Mark (BOM)... + */ + + if (ch == 0xfeff) + return (mxml_fd_getc(p, encoding)); + } + else if ((ch & 0xf8) == 0xf0) + { + /* + * Four-byte value... + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x07) << 6) | (temp & 0x3f); + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + if ((temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if (ch < 0x10000) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + } + else + return (EOF); + break; + + case ENCODE_UTF16BE : + /* + * Read UTF-16 big-endian char... + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + ch = (ch << 8) | temp; + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch; + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + lch = *(buf->current)++; + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + lch = (lch << 8) | temp; + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + break; + + case ENCODE_UTF16LE : + /* + * Read UTF-16 little-endian char... + */ + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + ch |= (temp << 8); + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch; + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + lch = *(buf->current)++; + + if (buf->current >= buf->end) + if (mxml_fd_read(buf) < 0) + return (EOF); + + temp = *(buf->current)++; + + lch |= (temp << 8); + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + break; + } + +#if DEBUG > 1 + printf("mxml_fd_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); +} + + +/* + * 'mxml_fd_putc()' - Write a character to a file descriptor. + */ + +static int /* O - 0 on success, -1 on error */ +mxml_fd_putc(int ch, /* I - Character */ + void *p) /* I - File descriptor buffer */ +{ + _mxml_fdbuf_t *buf; /* File descriptor buffer */ + + + /* + * Flush the write buffer as needed... + */ + + buf = (_mxml_fdbuf_t *)p; + + if (buf->current >= buf->end) + if (mxml_fd_write(buf) < 0) + return (-1); + + *(buf->current)++ = ch; + + /* + * Return successfully... + */ + + return (0); +} + + +/* + * 'mxml_fd_read()' - Read a buffer of data from a file descriptor. + */ + +static int /* O - 0 on success, -1 on error */ +mxml_fd_read(_mxml_fdbuf_t *buf) /* I - File descriptor buffer */ +{ + int bytes; /* Bytes read... */ + + + /* + * Range check input... + */ + + if (!buf) + return (-1); + + /* + * Read from the file descriptor... + */ + + while ((bytes = (int)read(buf->fd, buf->buffer, sizeof(buf->buffer))) < 0) +#ifdef EINTR + if (errno != EAGAIN && errno != EINTR) +#else + if (errno != EAGAIN) +#endif /* EINTR */ + return (-1); + + if (bytes == 0) + return (-1); + + /* + * Update the pointers and return success... + */ + + buf->current = buf->buffer; + buf->end = buf->buffer + bytes; + + return (0); +} + + +/* + * 'mxml_fd_write()' - Write a buffer of data to a file descriptor. + */ + +static int /* O - 0 on success, -1 on error */ +mxml_fd_write(_mxml_fdbuf_t *buf) /* I - File descriptor buffer */ +{ + int bytes; /* Bytes written */ + unsigned char *ptr; /* Pointer into buffer */ + + + /* + * Range check... + */ + + if (!buf) + return (-1); + + /* + * Return 0 if there is nothing to write... + */ + + if (buf->current == buf->buffer) + return (0); + + /* + * Loop until we have written everything... + */ + + for (ptr = buf->buffer; ptr < buf->current; ptr += bytes) + if ((bytes = (int)write(buf->fd, ptr, buf->current - ptr)) < 0) + return (-1); + + /* + * All done, reset pointers and return success... + */ + + buf->current = buf->buffer; + + return (0); +} + + +/* + * 'mxml_file_getc()' - Get a character from a file. + */ + +static int /* O - Character or EOF */ +mxml_file_getc(void *p, /* I - Pointer to file */ + int *encoding) /* IO - Encoding */ +{ + int ch, /* Character from file */ + temp; /* Temporary character */ + FILE *fp; /* Pointer to file */ + + + /* + * Read a character from the file and see if it is EOF or ASCII... + */ + + fp = (FILE *)p; + ch = getc(fp); + + if (ch == EOF) + return (EOF); + + switch (*encoding) + { + case ENCODE_UTF8 : + /* + * Got a UTF-8 character; convert UTF-8 to Unicode and return... + */ + + if (!(ch & 0x80)) + { + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + +#if DEBUG > 1 + printf("mxml_file_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + } + else if (ch == 0xfe) + { + /* + * UTF-16 big-endian BOM? + */ + + ch = getc(fp); + if (ch != 0xff) + return (EOF); + + *encoding = ENCODE_UTF16BE; + + return (mxml_file_getc(p, encoding)); + } + else if (ch == 0xff) + { + /* + * UTF-16 little-endian BOM? + */ + + ch = getc(fp); + if (ch != 0xfe) + return (EOF); + + *encoding = ENCODE_UTF16LE; + + return (mxml_file_getc(p, encoding)); + } + else if ((ch & 0xe0) == 0xc0) + { + /* + * Two-byte value... + */ + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x1f) << 6) | (temp & 0x3f); + + if (ch < 0x80) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + } + else if ((ch & 0xf0) == 0xe0) + { + /* + * Three-byte value... + */ + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x0f) << 6) | (temp & 0x3f); + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if (ch < 0x800) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + + /* + * Ignore (strip) Byte Order Mark (BOM)... + */ + + if (ch == 0xfeff) + return (mxml_file_getc(p, encoding)); + } + else if ((ch & 0xf8) == 0xf0) + { + /* + * Four-byte value... + */ + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x07) << 6) | (temp & 0x3f); + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if ((temp = getc(fp)) == EOF || (temp & 0xc0) != 0x80) + return (EOF); + + ch = (ch << 6) | (temp & 0x3f); + + if (ch < 0x10000) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + } + else + return (EOF); + break; + + case ENCODE_UTF16BE : + /* + * Read UTF-16 big-endian char... + */ + + ch = (ch << 8) | getc(fp); + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch = getc(fp); + lch = (lch << 8) | getc(fp); + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + break; + + case ENCODE_UTF16LE : + /* + * Read UTF-16 little-endian char... + */ + + ch |= (getc(fp) << 8); + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch = getc(fp); + lch |= (getc(fp) << 8); + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + break; + } + +#if DEBUG > 1 + printf("mxml_file_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); +} + + +/* + * 'mxml_file_putc()' - Write a character to a file. + */ + +static int /* O - 0 on success, -1 on failure */ +mxml_file_putc(int ch, /* I - Character to write */ + void *p) /* I - Pointer to file */ +{ + return (putc(ch, (FILE *)p) == EOF ? -1 : 0); +} + + +/* + * 'mxml_get_entity()' - Get the character corresponding to an entity... + */ + +static int /* O - Character value or EOF on error */ +mxml_get_entity(mxml_node_t *parent, /* I - Parent node */ + void *p, /* I - Pointer to source */ + int *encoding, /* IO - Character encoding */ + int (*getc_cb)(void *, int *)) + /* I - Get character function */ +{ + int ch; /* Current character */ + char entity[64], /* Entity string */ + *entptr; /* Pointer into entity */ + + + entptr = entity; + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + if (ch > 126 || (!isalnum(ch) && ch != '#')) + break; + else if (entptr < (entity + sizeof(entity) - 1)) + *entptr++ = ch; + else + { + mxml_error("Entity name too long under parent <%s>!", + parent ? parent->value.element.name : "null"); + break; + } + + *entptr = '\0'; + + if (ch != ';') + { + mxml_error("Character entity \"%s\" not terminated under parent <%s>!", + entity, parent ? parent->value.element.name : "null"); + return (EOF); + } + + if (entity[0] == '#') + { + if (entity[1] == 'x') + ch = (int)strtol(entity + 2, NULL, 16); + else + ch = (int)strtol(entity + 1, NULL, 10); + } + else if ((ch = mxmlEntityGetValue(entity)) < 0) + mxml_error("Entity name \"%s;\" not supported under parent <%s>!", + entity, parent ? parent->value.element.name : "null"); + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x under parent <%s> not allowed by XML standard!", + ch, parent ? parent->value.element.name : "null"); + return (EOF); + } + + return (ch); +} + + +/* + * 'mxml_load_data()' - Load data into an XML node tree. + */ + +static mxml_node_t * /* O - First node or NULL if the file could not be read. */ +mxml_load_data( + mxml_node_t *top, /* I - Top node */ + void *p, /* I - Pointer to data */ + mxml_load_cb_t cb, /* I - Callback function or MXML_NO_CALLBACK */ + _mxml_getc_cb_t getc_cb, /* I - Read function */ + mxml_sax_cb_t sax_cb, /* I - SAX callback or MXML_NO_CALLBACK */ + void *sax_data) /* I - SAX user data */ +{ + mxml_node_t *node, /* Current node */ + *first, /* First node added */ + *parent; /* Current parent node */ + int ch, /* Character from file */ + whitespace; /* Non-zero if whitespace seen */ + char *buffer, /* String buffer */ + *bufptr; /* Pointer into buffer */ + int bufsize; /* Size of buffer */ + mxml_type_t type; /* Current node type */ + int encoding; /* Character encoding */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + static const char * const types[] = /* Type strings... */ + { + "MXML_ELEMENT", /* XML element with attributes */ + "MXML_INTEGER", /* Integer value */ + "MXML_OPAQUE", /* Opaque string */ + "MXML_REAL", /* Real value */ + "MXML_TEXT", /* Text fragment */ + "MXML_CUSTOM" /* Custom data */ + }; + + + /* + * Read elements and other nodes from the file... + */ + + if ((buffer = malloc(64)) == NULL) + { + mxml_error("Unable to allocate string buffer!"); + return (NULL); + } + + bufsize = 64; + bufptr = buffer; + parent = top; + first = NULL; + whitespace = 0; + encoding = ENCODE_UTF8; + + if (cb && parent) + type = (*cb)(parent); + else if (parent) + type = MXML_TEXT; + else + type = MXML_IGNORE; + + while ((ch = (*getc_cb)(p, &encoding)) != EOF) + { + if ((ch == '<' || + (mxml_isspace(ch) && type != MXML_OPAQUE && type != MXML_CUSTOM)) && + bufptr > buffer) + { + /* + * Add a new value node... + */ + + *bufptr = '\0'; + + switch (type) + { + case MXML_INTEGER : + node = mxmlNewInteger(parent, (int)strtol(buffer, &bufptr, 0)); + break; + + case MXML_OPAQUE : + node = mxmlNewOpaque(parent, buffer); + break; + + case MXML_REAL : + node = mxmlNewReal(parent, strtod(buffer, &bufptr)); + break; + + case MXML_TEXT : + node = mxmlNewText(parent, whitespace, buffer); + break; + + case MXML_CUSTOM : + if (global->custom_load_cb) + { + /* + * Use the callback to fill in the custom data... + */ + + node = mxmlNewCustom(parent, NULL, NULL); + + if ((*global->custom_load_cb)(node, buffer)) + { + mxml_error("Bad custom value '%s' in parent <%s>!", + buffer, parent ? parent->value.element.name : "null"); + mxmlDelete(node); + node = NULL; + } + break; + } + + default : /* Ignore... */ + node = NULL; + break; + } + + if (*bufptr) + { + /* + * Bad integer/real number value... + */ + + mxml_error("Bad %s value '%s' in parent <%s>!", + type == MXML_INTEGER ? "integer" : "real", buffer, + parent ? parent->value.element.name : "null"); + break; + } + + bufptr = buffer; + whitespace = mxml_isspace(ch) && type == MXML_TEXT; + + if (!node && type != MXML_IGNORE) + { + /* + * Print error and return... + */ + + mxml_error("Unable to add value node of type %s to parent <%s>!", + types[type], parent ? parent->value.element.name : "null"); + goto error; + } + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_DATA, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (!first && node) + first = node; + } + else if (mxml_isspace(ch) && type == MXML_TEXT) + whitespace = 1; + + /* + * Add lone whitespace node if we have an element and existing + * whitespace... + */ + + if (ch == '<' && whitespace && type == MXML_TEXT) + { + if (parent) + { + node = mxmlNewText(parent, whitespace, ""); + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_DATA, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (!first && node) + first = node; + } + + whitespace = 0; + } + + if (ch == '<') + { + /* + * Start of open/close tag... + */ + + bufptr = buffer; + + while ((ch = (*getc_cb)(p, &encoding)) != EOF) + if (mxml_isspace(ch) || ch == '>' || (ch == '/' && bufptr > buffer)) + break; + else if (ch == '<') + { + mxml_error("Bare < in element!"); + goto error; + } + else if (ch == '&') + { + if ((ch = mxml_get_entity(parent, p, &encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + else if (ch < '0' && ch != '!' && ch != '-' && ch != '.' && ch != '/') + goto error; + else if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + else if (((bufptr - buffer) == 1 && buffer[0] == '?') || + ((bufptr - buffer) == 3 && !strncmp(buffer, "!--", 3)) || + ((bufptr - buffer) == 8 && !strncmp(buffer, "![CDATA[", 8))) + break; + + *bufptr = '\0'; + + if (!strcmp(buffer, "!--")) + { + /* + * Gather rest of comment... + */ + + while ((ch = (*getc_cb)(p, &encoding)) != EOF) + { + if (ch == '>' && bufptr > (buffer + 4) && + bufptr[-3] != '-' && bufptr[-2] == '-' && bufptr[-1] == '-') + break; + else if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + + /* + * Error out if we didn't get the whole comment... + */ + + if (ch != '>') + { + /* + * Print error and return... + */ + + mxml_error("Early EOF in comment node!"); + goto error; + } + + + /* + * Otherwise add this as an element under the current parent... + */ + + *bufptr = '\0'; + + if (!parent && first) + { + /* + * There can only be one root element! + */ + + mxml_error("<%s> cannot be a second root node after <%s>", + buffer, first->value.element.name); + goto error; + } + + if ((node = mxmlNewElement(parent, buffer)) == NULL) + { + /* + * Just print error for now... + */ + + mxml_error("Unable to add comment node to parent <%s>!", + parent ? parent->value.element.name : "null"); + break; + } + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_COMMENT, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (node && !first) + first = node; + } + else if (!strcmp(buffer, "![CDATA[")) + { + /* + * Gather CDATA section... + */ + + while ((ch = (*getc_cb)(p, &encoding)) != EOF) + { + if (ch == '>' && !strncmp(bufptr - 2, "]]", 2)) + { + /* + * Drop terminator from CDATA string... + */ + + bufptr[-2] = '\0'; + break; + } + else if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + + /* + * Error out if we didn't get the whole comment... + */ + + if (ch != '>') + { + /* + * Print error and return... + */ + + mxml_error("Early EOF in CDATA node!"); + goto error; + } + + + /* + * Otherwise add this as an element under the current parent... + */ + + *bufptr = '\0'; + + if (!parent && first) + { + /* + * There can only be one root element! + */ + + mxml_error("<%s> cannot be a second root node after <%s>", + buffer, first->value.element.name); + goto error; + } + + if ((node = mxmlNewElement(parent, buffer)) == NULL) + { + /* + * Print error and return... + */ + + mxml_error("Unable to add CDATA node to parent <%s>!", + parent ? parent->value.element.name : "null"); + goto error; + } + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_CDATA, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (node && !first) + first = node; + } + else if (buffer[0] == '?') + { + /* + * Gather rest of processing instruction... + */ + + while ((ch = (*getc_cb)(p, &encoding)) != EOF) + { + if (ch == '>' && bufptr > buffer && bufptr[-1] == '?') + break; + else if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + + /* + * Error out if we didn't get the whole processing instruction... + */ + + if (ch != '>') + { + /* + * Print error and return... + */ + + mxml_error("Early EOF in processing instruction node!"); + goto error; + } + + /* + * Otherwise add this as an element under the current parent... + */ + + *bufptr = '\0'; + + if (!parent && first) + { + /* + * There can only be one root element! + */ + + mxml_error("<%s> cannot be a second root node after <%s>", + buffer, first->value.element.name); + goto error; + } + + if ((node = mxmlNewElement(parent, buffer)) == NULL) + { + /* + * Print error and return... + */ + + mxml_error("Unable to add processing instruction node to parent <%s>!", + parent ? parent->value.element.name : "null"); + goto error; + } + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_DIRECTIVE, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (node) + { + if (!first) + first = node; + + if (!parent) + { + parent = node; + + if (cb) + type = (*cb)(parent); + else + type = MXML_TEXT; + } + } + } + else if (buffer[0] == '!') + { + /* + * Gather rest of declaration... + */ + + do + { + if (ch == '>') + break; + else + { + if (ch == '&') + if ((ch = mxml_get_entity(parent, p, &encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + } + while ((ch = (*getc_cb)(p, &encoding)) != EOF); + + /* + * Error out if we didn't get the whole declaration... + */ + + if (ch != '>') + { + /* + * Print error and return... + */ + + mxml_error("Early EOF in declaration node!"); + goto error; + } + + /* + * Otherwise add this as an element under the current parent... + */ + + *bufptr = '\0'; + + if (!parent && first) + { + /* + * There can only be one root element! + */ + + mxml_error("<%s> cannot be a second root node after <%s>", + buffer, first->value.element.name); + goto error; + } + + if ((node = mxmlNewElement(parent, buffer)) == NULL) + { + /* + * Print error and return... + */ + + mxml_error("Unable to add declaration node to parent <%s>!", + parent ? parent->value.element.name : "null"); + goto error; + } + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_DIRECTIVE, sax_data); + + if (!mxmlRelease(node)) + node = NULL; + } + + if (node) + { + if (!first) + first = node; + + if (!parent) + { + parent = node; + + if (cb) + type = (*cb)(parent); + else + type = MXML_TEXT; + } + } + } + else if (buffer[0] == '/') + { + /* + * Handle close tag... + */ + + if (!parent || strcmp(buffer + 1, parent->value.element.name)) + { + /* + * Close tag doesn't match tree; print an error for now... + */ + + mxml_error("Mismatched close tag <%s> under parent <%s>!", + buffer, parent ? parent->value.element.name : "(null)"); + goto error; + } + + /* + * Keep reading until we see >... + */ + + while (ch != '>' && ch != EOF) + ch = (*getc_cb)(p, &encoding); + + node = parent; + parent = parent->parent; + + if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_ELEMENT_CLOSE, sax_data); + + if (!mxmlRelease(node) && first == node) + first = NULL; + } + + /* + * Ascend into the parent and set the value type as needed... + */ + + if (cb && parent) + type = (*cb)(parent); + } + else + { + /* + * Handle open tag... + */ + + if (!parent && first) + { + /* + * There can only be one root element! + */ + + mxml_error("<%s> cannot be a second root node after <%s>", + buffer, first->value.element.name); + goto error; + } + + if ((node = mxmlNewElement(parent, buffer)) == NULL) + { + /* + * Just print error for now... + */ + + mxml_error("Unable to add element node to parent <%s>!", + parent ? parent->value.element.name : "null"); + goto error; + } + + if (mxml_isspace(ch)) + { + if ((ch = mxml_parse_element(node, p, &encoding, getc_cb)) == EOF) + goto error; + } + else if (ch == '/') + { + if ((ch = (*getc_cb)(p, &encoding)) != '>') + { + mxml_error("Expected > but got '%c' instead for element <%s/>!", + ch, buffer); + mxmlDelete(node); + goto error; + } + + ch = '/'; + } + + if (sax_cb) + (*sax_cb)(node, MXML_SAX_ELEMENT_OPEN, sax_data); + + if (!first) + first = node; + + if (ch == EOF) + break; + + if (ch != '/') + { + /* + * Descend into this node, setting the value type as needed... + */ + + parent = node; + + if (cb && parent) + type = (*cb)(parent); + else + type = MXML_TEXT; + } + else if (sax_cb) + { + (*sax_cb)(node, MXML_SAX_ELEMENT_CLOSE, sax_data); + + if (!mxmlRelease(node) && first == node) + first = NULL; + } + } + + bufptr = buffer; + } + else if (ch == '&') + { + /* + * Add character entity to current buffer... + */ + + if ((ch = mxml_get_entity(parent, p, &encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + else if (type == MXML_OPAQUE || type == MXML_CUSTOM || !mxml_isspace(ch)) + { + /* + * Add character to current buffer... + */ + + if (mxml_add_char(ch, &bufptr, &buffer, &bufsize)) + goto error; + } + } + + /* + * Free the string buffer - we don't need it anymore... + */ + + free(buffer); + + /* + * Find the top element and return it... + */ + + if (parent) + { + node = parent; + + while (parent != top && parent->parent) + parent = parent->parent; + + if (node != parent) + { + mxml_error("Missing close tag under parent <%s>!", + node->value.element.name, + node->parent ? node->parent->value.element.name : "(null)"); + + mxmlDelete(first); + + return (NULL); + } + } + + if (parent) + return (parent); + else + return (first); + + /* + * Common error return... + */ + +error: + + mxmlDelete(first); + + free(buffer); + + return (NULL); +} + + +/* + * 'mxml_parse_element()' - Parse an element for any attributes... + */ + +static int /* O - Terminating character */ +mxml_parse_element( + mxml_node_t *node, /* I - Element node */ + void *p, /* I - Data to read from */ + int *encoding, /* IO - Encoding */ + _mxml_getc_cb_t getc_cb) /* I - Data callback */ +{ + int ch, /* Current character in file */ + quote; /* Quoting character */ + char *name, /* Attribute name */ + *value, /* Attribute value */ + *ptr; /* Pointer into name/value */ + int namesize, /* Size of name string */ + valsize; /* Size of value string */ + + + /* + * Initialize the name and value buffers... + */ + + if ((name = malloc(64)) == NULL) + { + mxml_error("Unable to allocate memory for name!"); + return (EOF); + } + + namesize = 64; + + if ((value = malloc(64)) == NULL) + { + free(name); + mxml_error("Unable to allocate memory for value!"); + return (EOF); + } + + valsize = 64; + + /* + * Loop until we hit a >, /, ?, or EOF... + */ + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + { +#if DEBUG > 1 + fprintf(stderr, "parse_element: ch='%c'\n", ch); +#endif /* DEBUG > 1 */ + + /* + * Skip leading whitespace... + */ + + if (mxml_isspace(ch)) + continue; + + /* + * Stop at /, ?, or >... + */ + + if (ch == '/' || ch == '?') + { + /* + * Grab the > character and print an error if it isn't there... + */ + + quote = (*getc_cb)(p, encoding); + + if (quote != '>') + { + mxml_error("Expected '>' after '%c' for element %s, but got '%c'!", + ch, node->value.element.name, quote); + goto error; + } + + break; + } + else if (ch == '<') + { + mxml_error("Bare < in element %s!", node->value.element.name); + goto error; + } + else if (ch == '>') + break; + + /* + * Read the attribute name... + */ + + name[0] = ch; + ptr = name + 1; + + if (ch == '\"' || ch == '\'') + { + /* + * Name is in quotes, so get a quoted string... + */ + + quote = ch; + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + { + if (ch == '&') + if ((ch = mxml_get_entity(node, p, encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &ptr, &name, &namesize)) + goto error; + + if (ch == quote) + break; + } + } + else + { + /* + * Grab an normal, non-quoted name... + */ + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + if (mxml_isspace(ch) || ch == '=' || ch == '/' || ch == '>' || + ch == '?') + break; + else + { + if (ch == '&') + if ((ch = mxml_get_entity(node, p, encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &ptr, &name, &namesize)) + goto error; + } + } + + *ptr = '\0'; + + if (mxmlElementGetAttr(node, name)) + goto error; + + while (ch != EOF && mxml_isspace(ch)) + ch = (*getc_cb)(p, encoding); + + if (ch == '=') + { + /* + * Read the attribute value... + */ + + while ((ch = (*getc_cb)(p, encoding)) != EOF && mxml_isspace(ch)); + + if (ch == EOF) + { + mxml_error("Missing value for attribute '%s' in element %s!", + name, node->value.element.name); + goto error; + } + + if (ch == '\'' || ch == '\"') + { + /* + * Read quoted value... + */ + + quote = ch; + ptr = value; + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + if (ch == quote) + break; + else + { + if (ch == '&') + if ((ch = mxml_get_entity(node, p, encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &ptr, &value, &valsize)) + goto error; + } + + *ptr = '\0'; + } + else + { + /* + * Read unquoted value... + */ + + value[0] = ch; + ptr = value + 1; + + while ((ch = (*getc_cb)(p, encoding)) != EOF) + if (mxml_isspace(ch) || ch == '=' || ch == '/' || ch == '>') + break; + else + { + if (ch == '&') + if ((ch = mxml_get_entity(node, p, encoding, getc_cb)) == EOF) + goto error; + + if (mxml_add_char(ch, &ptr, &value, &valsize)) + goto error; + } + + *ptr = '\0'; + } + + /* + * Set the attribute with the given string value... + */ + + mxmlElementSetAttr(node, name, value); + } + else + { + mxml_error("Missing value for attribute '%s' in element %s!", + name, node->value.element.name); + goto error; + } + + /* + * Check the end character... + */ + + if (ch == '/' || ch == '?') + { + /* + * Grab the > character and print an error if it isn't there... + */ + + quote = (*getc_cb)(p, encoding); + + if (quote != '>') + { + mxml_error("Expected '>' after '%c' for element %s, but got '%c'!", + ch, node->value.element.name, quote); + ch = EOF; + } + + break; + } + else if (ch == '>') + break; + } + + /* + * Free the name and value buffers and return... + */ + + free(name); + free(value); + + return (ch); + + /* + * Common error return point... + */ + +error: + + free(name); + free(value); + + return (EOF); +} + + +/* + * 'mxml_string_getc()' - Get a character from a string. + */ + +static int /* O - Character or EOF */ +mxml_string_getc(void *p, /* I - Pointer to file */ + int *encoding) /* IO - Encoding */ +{ + int ch; /* Character */ + const char **s; /* Pointer to string pointer */ + + + s = (const char **)p; + + if ((ch = (*s)[0] & 255) != 0 || *encoding == ENCODE_UTF16LE) + { + /* + * Got character; convert UTF-8 to integer and return... + */ + + (*s)++; + + switch (*encoding) + { + case ENCODE_UTF8 : + if (!(ch & 0x80)) + { +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + + return (ch); + } + else if (ch == 0xfe) + { + /* + * UTF-16 big-endian BOM? + */ + + if (((*s)[0] & 255) != 0xff) + return (EOF); + + *encoding = ENCODE_UTF16BE; + (*s)++; + + return (mxml_string_getc(p, encoding)); + } + else if (ch == 0xff) + { + /* + * UTF-16 little-endian BOM? + */ + + if (((*s)[0] & 255) != 0xfe) + return (EOF); + + *encoding = ENCODE_UTF16LE; + (*s)++; + + return (mxml_string_getc(p, encoding)); + } + else if ((ch & 0xe0) == 0xc0) + { + /* + * Two-byte value... + */ + + if (((*s)[0] & 0xc0) != 0x80) + return (EOF); + + ch = ((ch & 0x1f) << 6) | ((*s)[0] & 0x3f); + + (*s)++; + + if (ch < 0x80) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + } + else if ((ch & 0xf0) == 0xe0) + { + /* + * Three-byte value... + */ + + if (((*s)[0] & 0xc0) != 0x80 || + ((*s)[1] & 0xc0) != 0x80) + return (EOF); + + ch = ((((ch & 0x0f) << 6) | ((*s)[0] & 0x3f)) << 6) | ((*s)[1] & 0x3f); + + (*s) += 2; + + if (ch < 0x800) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + + /* + * Ignore (strip) Byte Order Mark (BOM)... + */ + + if (ch == 0xfeff) + return (mxml_string_getc(p, encoding)); + +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + } + else if ((ch & 0xf8) == 0xf0) + { + /* + * Four-byte value... + */ + + if (((*s)[0] & 0xc0) != 0x80 || + ((*s)[1] & 0xc0) != 0x80 || + ((*s)[2] & 0xc0) != 0x80) + return (EOF); + + ch = ((((((ch & 0x07) << 6) | ((*s)[0] & 0x3f)) << 6) | + ((*s)[1] & 0x3f)) << 6) | ((*s)[2] & 0x3f); + + (*s) += 3; + + if (ch < 0x10000) + { + mxml_error("Invalid UTF-8 sequence for character 0x%04x!", ch); + return (EOF); + } + +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + } + else + return (EOF); + + case ENCODE_UTF16BE : + /* + * Read UTF-16 big-endian char... + */ + + ch = (ch << 8) | ((*s)[0] & 255); + (*s) ++; + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch; /* Lower word */ + + + if (!(*s)[0]) + return (EOF); + + lch = (((*s)[0] & 255) << 8) | ((*s)[1] & 255); + (*s) += 2; + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + + case ENCODE_UTF16LE : + /* + * Read UTF-16 little-endian char... + */ + + ch = ch | (((*s)[0] & 255) << 8); + + if (!ch) + { + (*s) --; + return (EOF); + } + + (*s) ++; + + if (mxml_bad_char(ch)) + { + mxml_error("Bad control character 0x%02x not allowed by XML standard!", + ch); + return (EOF); + } + else if (ch >= 0xd800 && ch <= 0xdbff) + { + /* + * Multi-word UTF-16 char... + */ + + int lch; /* Lower word */ + + + if (!(*s)[1]) + return (EOF); + + lch = (((*s)[1] & 255) << 8) | ((*s)[0] & 255); + (*s) += 2; + + if (lch < 0xdc00 || lch >= 0xdfff) + return (EOF); + + ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000; + } + +#if DEBUG > 1 + printf("mxml_string_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch); +#endif /* DEBUG > 1 */ + + return (ch); + } + } + + return (EOF); +} + + +/* + * 'mxml_string_putc()' - Write a character to a string. + */ + +static int /* O - 0 on success, -1 on failure */ +mxml_string_putc(int ch, /* I - Character to write */ + void *p) /* I - Pointer to string pointers */ +{ + char **pp; /* Pointer to string pointers */ + + + pp = (char **)p; + + if (pp[0] < pp[1]) + pp[0][0] = ch; + + pp[0] ++; + + return (0); +} + + +/* + * 'mxml_write_name()' - Write a name string. + */ + +static int /* O - 0 on success, -1 on failure */ +mxml_write_name(const char *s, /* I - Name to write */ + void *p, /* I - Write pointer */ + int (*putc_cb)(int, void *)) + /* I - Write callback */ +{ + char quote; /* Quote character */ + const char *name; /* Entity name */ + + + if (*s == '\"' || *s == '\'') + { + /* + * Write a quoted name string... + */ + + if ((*putc_cb)(*s, p) < 0) + return (-1); + + quote = *s++; + + while (*s && *s != quote) + { + if ((name = mxmlEntityGetName(*s)) != NULL) + { + if ((*putc_cb)('&', p) < 0) + return (-1); + + while (*name) + { + if ((*putc_cb)(*name, p) < 0) + return (-1); + + name ++; + } + + if ((*putc_cb)(';', p) < 0) + return (-1); + } + else if ((*putc_cb)(*s, p) < 0) + return (-1); + + s ++; + } + + /* + * Write the end quote... + */ + + if ((*putc_cb)(quote, p) < 0) + return (-1); + } + else + { + /* + * Write a non-quoted name string... + */ + + while (*s) + { + if ((*putc_cb)(*s, p) < 0) + return (-1); + + s ++; + } + } + + return (0); +} + + +/* + * 'mxml_write_node()' - Save an XML node to a file. + */ + +static int /* O - Column or -1 on error */ +mxml_write_node(mxml_node_t *node, /* I - Node to write */ + void *p, /* I - File to write to */ + mxml_save_cb_t cb, /* I - Whitespace callback */ + int col, /* I - Current column */ + _mxml_putc_cb_t putc_cb,/* I - Output callback */ + _mxml_global_t *global)/* I - Global data */ +{ + mxml_node_t *current, /* Current node */ + *next; /* Next node */ + int i, /* Looping var */ + width; /* Width of attr + value */ + mxml_attr_t *attr; /* Current attribute */ + char s[255]; /* Temporary string */ + + + /* + * Loop through this node and all of its children... + */ + + for (current = node; current; current = next) + { + /* + * Print the node value... + */ + + switch (current->type) + { + case MXML_ELEMENT : + col = mxml_write_ws(current, p, cb, MXML_WS_BEFORE_OPEN, col, putc_cb); + + if ((*putc_cb)('<', p) < 0) + return (-1); + if (current->value.element.name[0] == '?' || + !strncmp(current->value.element.name, "!--", 3)) + { + /* + * Comments and processing instructions do not use character + * entities. + */ + + const char *ptr; /* Pointer into name */ + + for (ptr = current->value.element.name; *ptr; ptr ++) + if ((*putc_cb)(*ptr, p) < 0) + return (-1); + } + else if (!strncmp(current->value.element.name, "![CDATA[", 8)) + { + /* + * CDATA elements do not use character entities, but also need the + * "]]" terminator added at the end. + */ + + const char *ptr; /* Pointer into name */ + + for (ptr = current->value.element.name; *ptr; ptr ++) + if ((*putc_cb)(*ptr, p) < 0) + return (-1); + + if ((*putc_cb)(']', p) < 0) + return (-1); + if ((*putc_cb)(']', p) < 0) + return (-1); + } + else if (mxml_write_name(current->value.element.name, p, putc_cb) < 0) + return (-1); + + col += strlen(current->value.element.name) + 1; + + for (i = current->value.element.num_attrs, attr = current->value.element.attrs; + i > 0; + i --, attr ++) + { + width = (int)strlen(attr->name); + + if (attr->value) + width += strlen(attr->value) + 3; + + if (global->wrap > 0 && (col + width) > global->wrap) + { + if ((*putc_cb)('\n', p) < 0) + return (-1); + + col = 0; + } + else + { + if ((*putc_cb)(' ', p) < 0) + return (-1); + + col ++; + } + + if (mxml_write_name(attr->name, p, putc_cb) < 0) + return (-1); + + if (attr->value) + { + if ((*putc_cb)('=', p) < 0) + return (-1); + if ((*putc_cb)('\"', p) < 0) + return (-1); + if (mxml_write_string(attr->value, p, putc_cb) < 0) + return (-1); + if ((*putc_cb)('\"', p) < 0) + return (-1); + } + + col += width; + } + + if (current->child) + { + /* + * Write children... + */ + + if ((*putc_cb)('>', p) < 0) + return (-1); + else + col ++; + + col = mxml_write_ws(current, p, cb, MXML_WS_AFTER_OPEN, col, putc_cb); + } + else if (current->value.element.name[0] == '!' || + current->value.element.name[0] == '?') + { + /* + * The ? and ! elements are special-cases... + */ + + if ((*putc_cb)('>', p) < 0) + return (-1); + else + col ++; + + col = mxml_write_ws(current, p, cb, MXML_WS_AFTER_OPEN, col, putc_cb); + } + else + { + if ((*putc_cb)(' ', p) < 0) + return (-1); + if ((*putc_cb)('/', p) < 0) + return (-1); + if ((*putc_cb)('>', p) < 0) + return (-1); + + col += 3; + + col = mxml_write_ws(current, p, cb, MXML_WS_AFTER_OPEN, col, putc_cb); + } + break; + + case MXML_INTEGER : + if (current->prev) + { + if (global->wrap > 0 && col > global->wrap) + { + if ((*putc_cb)('\n', p) < 0) + return (-1); + + col = 0; + } + else if ((*putc_cb)(' ', p) < 0) + return (-1); + else + col ++; + } + + sprintf(s, "%d", current->value.integer); + if (mxml_write_string(s, p, putc_cb) < 0) + return (-1); + + col += strlen(s); + break; + + case MXML_OPAQUE : + if (mxml_write_string(current->value.opaque, p, putc_cb) < 0) + return (-1); + + col += strlen(current->value.opaque); + break; + + case MXML_REAL : + if (current->prev) + { + if (global->wrap > 0 && col > global->wrap) + { + if ((*putc_cb)('\n', p) < 0) + return (-1); + + col = 0; + } + else if ((*putc_cb)(' ', p) < 0) + return (-1); + else + col ++; + } + + sprintf(s, "%f", current->value.real); + if (mxml_write_string(s, p, putc_cb) < 0) + return (-1); + + col += strlen(s); + break; + + case MXML_TEXT : + if (current->value.text.whitespace && col > 0) + { + if (global->wrap > 0 && col > global->wrap) + { + if ((*putc_cb)('\n', p) < 0) + return (-1); + + col = 0; + } + else if ((*putc_cb)(' ', p) < 0) + return (-1); + else + col ++; + } + + if (mxml_write_string(current->value.text.string, p, putc_cb) < 0) + return (-1); + + col += strlen(current->value.text.string); + break; + + case MXML_CUSTOM : + if (global->custom_save_cb) + { + char *data; /* Custom data string */ + const char *newline; /* Last newline in string */ + + + if ((data = (*global->custom_save_cb)(node)) == NULL) + return (-1); + + if (mxml_write_string(data, p, putc_cb) < 0) + return (-1); + + if ((newline = strrchr(data, '\n')) == NULL) + col += strlen(data); + else + col = (int)strlen(newline); + + free(data); + break; + } + + default : /* Should never happen */ + return (-1); + } + + /* + * Figure out the next node... + */ + + if ((next = current->child) == NULL) + { + while ((next = current->next) == NULL) + { + if (current == node) + break; + + /* + * The ? and ! elements are special-cases and have no end tags... + */ + + current = current->parent; + + if (current->value.element.name[0] != '!' && + current->value.element.name[0] != '?') + { + col = mxml_write_ws(current, p, cb, MXML_WS_BEFORE_CLOSE, col, putc_cb); + + if ((*putc_cb)('<', p) < 0) + return (-1); + if ((*putc_cb)('/', p) < 0) + return (-1); + if (mxml_write_string(current->value.element.name, p, putc_cb) < 0) + return (-1); + if ((*putc_cb)('>', p) < 0) + return (-1); + + col += strlen(current->value.element.name) + 3; + + col = mxml_write_ws(current, p, cb, MXML_WS_AFTER_CLOSE, col, putc_cb); + } + } + } + } + + return (col); +} + + +/* + * 'mxml_write_string()' - Write a string, escaping & and < as needed. + */ + +static int /* O - 0 on success, -1 on failure */ +mxml_write_string( + const char *s, /* I - String to write */ + void *p, /* I - Write pointer */ + _mxml_putc_cb_t putc_cb) /* I - Write callback */ +{ + const char *name; /* Entity name, if any */ + + + while (*s) + { + if ((name = mxmlEntityGetName(*s)) != NULL) + { + if ((*putc_cb)('&', p) < 0) + return (-1); + + while (*name) + { + if ((*putc_cb)(*name, p) < 0) + return (-1); + name ++; + } + + if ((*putc_cb)(';', p) < 0) + return (-1); + } + else if ((*putc_cb)(*s, p) < 0) + return (-1); + + s ++; + } + + return (0); +} + + +/* + * 'mxml_write_ws()' - Do whitespace callback... + */ + +static int /* O - New column */ +mxml_write_ws(mxml_node_t *node, /* I - Current node */ + void *p, /* I - Write pointer */ + mxml_save_cb_t cb, /* I - Callback function */ + int ws, /* I - Where value */ + int col, /* I - Current column */ + _mxml_putc_cb_t putc_cb) /* I - Write callback */ +{ + const char *s; /* Whitespace string */ + + + if (cb && (s = (*cb)(node, ws)) != NULL) + { + while (*s) + { + if ((*putc_cb)(*s, p) < 0) + return (-1); + else if (*s == '\n') + col = 0; + else if (*s == '\t') + { + col += MXML_TAB; + col = col - (col % MXML_TAB); + } + else + col ++; + + s ++; + } + } + + return (col); +} diff --git a/lib/libmxml/mxml-get.c b/lib/libmxml/mxml-get.c new file mode 100644 index 0000000..abe2da5 --- /dev/null +++ b/lib/libmxml/mxml-get.c @@ -0,0 +1,445 @@ +/* + * Node get functions for Mini-XML, a small XML file parsing library. + * + * Copyright 2014-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * 'mxmlGetCDATA()' - Get the value for a CDATA node. + * + * @code NULL@ is returned if the node is not a CDATA element. + * + * @since Mini-XML 2.7@ + */ + +const char * /* O - CDATA value or @code NULL@ */ +mxmlGetCDATA(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || + strncmp(node->value.element.name, "![CDATA[", 8)) + return (NULL); + + /* + * Return the text following the CDATA declaration... + */ + + return (node->value.element.name + 8); +} + + +/* + * 'mxmlGetCustom()' - Get the value for a custom node. + * + * @code NULL@ is returned if the node (or its first child) is not a custom + * value node. + * + * @since Mini-XML 2.7@ + */ + +const void * /* O - Custom value or @code NULL@ */ +mxmlGetCustom(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the integer value... + */ + + if (node->type == MXML_CUSTOM) + return (node->value.custom.data); + else if (node->type == MXML_ELEMENT && + node->child && + node->child->type == MXML_CUSTOM) + return (node->child->value.custom.data); + else + return (NULL); +} + + +/* + * 'mxmlGetElement()' - Get the name for an element node. + * + * @code NULL@ is returned if the node is not an element node. + * + * @since Mini-XML 2.7@ + */ + +const char * /* O - Element name or @code NULL@ */ +mxmlGetElement(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT) + return (NULL); + + /* + * Return the element name... + */ + + return (node->value.element.name); +} + + +/* + * 'mxmlGetFirstChild()' - Get the first child of an element node. + * + * @code NULL@ is returned if the node is not an element node or if the node + * has no children. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * /* O - First child or @code NULL@ */ +mxmlGetFirstChild(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT) + return (NULL); + + /* + * Return the first child node... + */ + + return (node->child); +} + + +/* + * 'mxmlGetInteger()' - Get the integer value from the specified node or its + * first child. + * + * 0 is returned if the node (or its first child) is not an integer value node. + * + * @since Mini-XML 2.7@ + */ + +int /* O - Integer value or 0 */ +mxmlGetInteger(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (0); + + /* + * Return the integer value... + */ + + if (node->type == MXML_INTEGER) + return (node->value.integer); + else if (node->type == MXML_ELEMENT && + node->child && + node->child->type == MXML_INTEGER) + return (node->child->value.integer); + else + return (0); +} + + +/* + * 'mxmlGetLastChild()' - Get the last child of an element node. + * + * @code NULL@ is returned if the node is not an element node or if the node + * has no children. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * /* O - Last child or @code NULL@ */ +mxmlGetLastChild(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT) + return (NULL); + + /* + * Return the node type... + */ + + return (node->last_child); +} + + +/* + * 'mxmlGetNextSibling()' - Get the next node for the current parent. + * + * @code NULL@ is returned if this is the last child for the current parent. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * +mxmlGetNextSibling(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the node type... + */ + + return (node->next); +} + + +/* + * 'mxmlGetOpaque()' - Get an opaque string value for a node or its first child. + * + * @code NULL@ is returned if the node (or its first child) is not an opaque + * value node. + * + * @since Mini-XML 2.7@ + */ + +const char * /* O - Opaque string or @code NULL@ */ +mxmlGetOpaque(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the integer value... + */ + + if (node->type == MXML_OPAQUE) + return (node->value.opaque); + else if (node->type == MXML_ELEMENT && + node->child && + node->child->type == MXML_OPAQUE) + return (node->child->value.opaque); + else + return (NULL); +} + + +/* + * 'mxmlGetParent()' - Get the parent node. + * + * @code NULL@ is returned for a root node. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * /* O - Parent node or @code NULL@ */ +mxmlGetParent(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the node type... + */ + + return (node->parent); +} + + +/* + * 'mxmlGetPrevSibling()' - Get the previous node for the current parent. + * + * @code NULL@ is returned if this is the first child for the current parent. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * /* O - Previous node or @code NULL@ */ +mxmlGetPrevSibling(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the node type... + */ + + return (node->prev); +} + + +/* + * 'mxmlGetReal()' - Get the real value for a node or its first child. + * + * 0.0 is returned if the node (or its first child) is not a real value node. + * + * @since Mini-XML 2.7@ + */ + +double /* O - Real value or 0.0 */ +mxmlGetReal(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (0.0); + + /* + * Return the integer value... + */ + + if (node->type == MXML_REAL) + return (node->value.real); + else if (node->type == MXML_ELEMENT && + node->child && + node->child->type == MXML_REAL) + return (node->child->value.real); + else + return (0.0); +} + + +/* + * 'mxmlGetText()' - Get the text value for a node or its first child. + * + * @code NULL@ is returned if the node (or its first child) is not a text node. + * The "whitespace" argument can be @code NULL@. + * + * @since Mini-XML 2.7@ + */ + +const char * /* O - Text string or @code NULL@ */ +mxmlGetText(mxml_node_t *node, /* I - Node to get */ + int *whitespace) /* O - 1 if string is preceded by whitespace, 0 otherwise */ +{ + /* + * Range check input... + */ + + if (!node) + { + if (whitespace) + *whitespace = 0; + + return (NULL); + } + + /* + * Return the integer value... + */ + + if (node->type == MXML_TEXT) + { + if (whitespace) + *whitespace = node->value.text.whitespace; + + return (node->value.text.string); + } + else if (node->type == MXML_ELEMENT && + node->child && + node->child->type == MXML_TEXT) + { + if (whitespace) + *whitespace = node->child->value.text.whitespace; + + return (node->child->value.text.string); + } + else + { + if (whitespace) + *whitespace = 0; + + return (NULL); + } +} + + +/* + * 'mxmlGetType()' - Get the node type. + * + * @code MXML_IGNORE@ is returned if "node" is @code NULL@. + * + * @since Mini-XML 2.7@ + */ + +mxml_type_t /* O - Type of node */ +mxmlGetType(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (MXML_IGNORE); + + /* + * Return the node type... + */ + + return (node->type); +} + + +/* + * 'mxmlGetUserData()' - Get the user data pointer for a node. + * + * @since Mini-XML 2.7@ + */ + +void * /* O - User data pointer */ +mxmlGetUserData(mxml_node_t *node) /* I - Node to get */ +{ + /* + * Range check input... + */ + + if (!node) + return (NULL); + + /* + * Return the user data pointer... + */ + + return (node->user_data); +} diff --git a/lib/libmxml/mxml-index.c b/lib/libmxml/mxml-index.c new file mode 100644 index 0000000..d93768c --- /dev/null +++ b/lib/libmxml/mxml-index.c @@ -0,0 +1,655 @@ +/* + * Index support code for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * Sort functions... + */ + +static int index_compare(mxml_index_t *ind, mxml_node_t *first, + mxml_node_t *second); +static int index_find(mxml_index_t *ind, const char *element, + const char *value, mxml_node_t *node); +static void index_sort(mxml_index_t *ind, int left, int right); + + +/* + * 'mxmlIndexDelete()' - Delete an index. + */ + +void +mxmlIndexDelete(mxml_index_t *ind) /* I - Index to delete */ +{ + /* + * Range check input.. + */ + + if (!ind) + return; + + /* + * Free memory... + */ + + if (ind->attr) + free(ind->attr); + + if (ind->alloc_nodes) + free(ind->nodes); + + free(ind); +} + + +/* + * 'mxmlIndexEnum()' - Return the next node in the index. + * + * You should call @link mxmlIndexReset@ prior to using this function to get + * the first node in the index. Nodes are returned in the sorted order of the + * index. + */ + +mxml_node_t * /* O - Next node or @code NULL@ if there is none */ +mxmlIndexEnum(mxml_index_t *ind) /* I - Index to enumerate */ +{ + /* + * Range check input... + */ + + if (!ind) + return (NULL); + + /* + * Return the next node... + */ + + if (ind->cur_node < ind->num_nodes) + return (ind->nodes[ind->cur_node ++]); + else + return (NULL); +} + + +/* + * 'mxmlIndexFind()' - Find the next matching node. + * + * You should call @link mxmlIndexReset@ prior to using this function for + * the first time with a particular set of "element" and "value" + * strings. Passing @code NULL@ for both "element" and "value" is equivalent + * to calling @link mxmlIndexEnum@. + */ + +mxml_node_t * /* O - Node or @code NULL@ if none found */ +mxmlIndexFind(mxml_index_t *ind, /* I - Index to search */ + const char *element, /* I - Element name to find, if any */ + const char *value) /* I - Attribute value, if any */ +{ + int diff, /* Difference between names */ + current, /* Current entity in search */ + first, /* First entity in search */ + last; /* Last entity in search */ + + +#ifdef DEBUG + printf("mxmlIndexFind(ind=%p, element=\"%s\", value=\"%s\")\n", + ind, element ? element : "(null)", value ? value : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!ind || (!ind->attr && value)) + { +#ifdef DEBUG + puts(" returning NULL..."); + if (ind) + printf(" ind->attr=\"%s\"\n", ind->attr ? ind->attr : "(null)"); +#endif /* DEBUG */ + + return (NULL); + } + + /* + * If both element and value are NULL, just enumerate the nodes in the + * index... + */ + + if (!element && !value) + return (mxmlIndexEnum(ind)); + + /* + * If there are no nodes in the index, return NULL... + */ + + if (!ind->num_nodes) + { +#ifdef DEBUG + puts(" returning NULL..."); + puts(" no nodes!"); +#endif /* DEBUG */ + + return (NULL); + } + + /* + * If cur_node == 0, then find the first matching node... + */ + + if (ind->cur_node == 0) + { + /* + * Find the first node using a modified binary search algorithm... + */ + + first = 0; + last = ind->num_nodes - 1; + +#ifdef DEBUG + printf(" find first time, num_nodes=%d...\n", ind->num_nodes); +#endif /* DEBUG */ + + while ((last - first) > 1) + { + current = (first + last) / 2; + +#ifdef DEBUG + printf(" first=%d, last=%d, current=%d\n", first, last, current); +#endif /* DEBUG */ + + if ((diff = index_find(ind, element, value, ind->nodes[current])) == 0) + { + /* + * Found a match, move back to find the first... + */ + +#ifdef DEBUG + puts(" match!"); +#endif /* DEBUG */ + + while (current > 0 && + !index_find(ind, element, value, ind->nodes[current - 1])) + current --; + +#ifdef DEBUG + printf(" returning first match=%d\n", current); +#endif /* DEBUG */ + + /* + * Return the first match and save the index to the next... + */ + + ind->cur_node = current + 1; + + return (ind->nodes[current]); + } + else if (diff < 0) + last = current; + else + first = current; + +#ifdef DEBUG + printf(" diff=%d\n", diff); +#endif /* DEBUG */ + } + + /* + * If we get this far, then we found exactly 0 or 1 matches... + */ + + for (current = first; current <= last; current ++) + if (!index_find(ind, element, value, ind->nodes[current])) + { + /* + * Found exactly one (or possibly two) match... + */ + +#ifdef DEBUG + printf(" returning only match %d...\n", current); +#endif /* DEBUG */ + + ind->cur_node = current + 1; + + return (ind->nodes[current]); + } + + /* + * No matches... + */ + + ind->cur_node = ind->num_nodes; + +#ifdef DEBUG + puts(" returning NULL..."); +#endif /* DEBUG */ + + return (NULL); + } + else if (ind->cur_node < ind->num_nodes && + !index_find(ind, element, value, ind->nodes[ind->cur_node])) + { + /* + * Return the next matching node... + */ + +#ifdef DEBUG + printf(" returning next match %d...\n", ind->cur_node); +#endif /* DEBUG */ + + return (ind->nodes[ind->cur_node ++]); + } + + /* + * If we get this far, then we have no matches... + */ + + ind->cur_node = ind->num_nodes; + +#ifdef DEBUG + puts(" returning NULL..."); +#endif /* DEBUG */ + + return (NULL); +} + + +/* + * 'mxmlIndexGetCount()' - Get the number of nodes in an index. + * + * @since Mini-XML 2.7@ + */ + +int /* I - Number of nodes in index */ +mxmlIndexGetCount(mxml_index_t *ind) /* I - Index of nodes */ +{ + /* + * Range check input... + */ + + if (!ind) + return (0); + + /* + * Return the number of nodes in the index... + */ + + return (ind->num_nodes); +} + + +/* + * 'mxmlIndexNew()' - Create a new index. + * + * The index will contain all nodes that contain the named element and/or + * attribute. If both "element" and "attr" are @code NULL@, then the index will + * contain a sorted list of the elements in the node tree. Nodes are + * sorted by element name and optionally by attribute value if the "attr" + * argument is not NULL. + */ + +mxml_index_t * /* O - New index */ +mxmlIndexNew(mxml_node_t *node, /* I - XML node tree */ + const char *element, /* I - Element to index or @code NULL@ for all */ + const char *attr) /* I - Attribute to index or @code NULL@ for none */ +{ + mxml_index_t *ind; /* New index */ + mxml_node_t *current, /* Current node in index */ + **temp; /* Temporary node pointer array */ + + + /* + * Range check input... + */ + +#ifdef DEBUG + printf("mxmlIndexNew(node=%p, element=\"%s\", attr=\"%s\")\n", + node, element ? element : "(null)", attr ? attr : "(null)"); +#endif /* DEBUG */ + + if (!node) + return (NULL); + + /* + * Create a new index... + */ + + if ((ind = calloc(1, sizeof(mxml_index_t))) == NULL) + { + mxml_error("Unable to allocate %d bytes for index - %s", + sizeof(mxml_index_t), strerror(errno)); + return (NULL); + } + + if (attr) + ind->attr = strdup(attr); + + if (!element && !attr) + current = node; + else + current = mxmlFindElement(node, node, element, attr, NULL, MXML_DESCEND); + + while (current) + { + if (ind->num_nodes >= ind->alloc_nodes) + { + if (!ind->alloc_nodes) + temp = malloc(64 * sizeof(mxml_node_t *)); + else + temp = realloc(ind->nodes, (ind->alloc_nodes + 64) * sizeof(mxml_node_t *)); + + if (!temp) + { + /* + * Unable to allocate memory for the index, so abort... + */ + + mxml_error("Unable to allocate %d bytes for index: %s", + (ind->alloc_nodes + 64) * sizeof(mxml_node_t *), + strerror(errno)); + + mxmlIndexDelete(ind); + return (NULL); + } + + ind->nodes = temp; + ind->alloc_nodes += 64; + } + + ind->nodes[ind->num_nodes ++] = current; + + current = mxmlFindElement(current, node, element, attr, NULL, MXML_DESCEND); + } + + /* + * Sort nodes based upon the search criteria... + */ + +#ifdef DEBUG + { + int i; /* Looping var */ + + + printf("%d node(s) in index.\n\n", ind->num_nodes); + + if (attr) + { + printf("Node Address Element %s\n", attr); + puts("-------- -------- -------------- ------------------------------"); + + for (i = 0; i < ind->num_nodes; i ++) + printf("%8d %-8p %-14.14s %s\n", i, ind->nodes[i], + ind->nodes[i]->value.element.name, + mxmlElementGetAttr(ind->nodes[i], attr)); + } + else + { + puts("Node Address Element"); + puts("-------- -------- --------------"); + + for (i = 0; i < ind->num_nodes; i ++) + printf("%8d %-8p %s\n", i, ind->nodes[i], + ind->nodes[i]->value.element.name); + } + + putchar('\n'); + } +#endif /* DEBUG */ + + if (ind->num_nodes > 1) + index_sort(ind, 0, ind->num_nodes - 1); + +#ifdef DEBUG + { + int i; /* Looping var */ + + + puts("After sorting:\n"); + + if (attr) + { + printf("Node Address Element %s\n", attr); + puts("-------- -------- -------------- ------------------------------"); + + for (i = 0; i < ind->num_nodes; i ++) + printf("%8d %-8p %-14.14s %s\n", i, ind->nodes[i], + ind->nodes[i]->value.element.name, + mxmlElementGetAttr(ind->nodes[i], attr)); + } + else + { + puts("Node Address Element"); + puts("-------- -------- --------------"); + + for (i = 0; i < ind->num_nodes; i ++) + printf("%8d %-8p %s\n", i, ind->nodes[i], + ind->nodes[i]->value.element.name); + } + + putchar('\n'); + } +#endif /* DEBUG */ + + /* + * Return the new index... + */ + + return (ind); +} + + +/* + * 'mxmlIndexReset()' - Reset the enumeration/find pointer in the index and + * return the first node in the index. + * + * This function should be called prior to using @link mxmlIndexEnum@ or + * @link mxmlIndexFind@ for the first time. + */ + +mxml_node_t * /* O - First node or @code NULL@ if there is none */ +mxmlIndexReset(mxml_index_t *ind) /* I - Index to reset */ +{ +#ifdef DEBUG + printf("mxmlIndexReset(ind=%p)\n", ind); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!ind) + return (NULL); + + /* + * Set the index to the first element... + */ + + ind->cur_node = 0; + + /* + * Return the first node... + */ + + if (ind->num_nodes) + return (ind->nodes[0]); + else + return (NULL); +} + + +/* + * 'index_compare()' - Compare two nodes. + */ + +static int /* O - Result of comparison */ +index_compare(mxml_index_t *ind, /* I - Index */ + mxml_node_t *first, /* I - First node */ + mxml_node_t *second) /* I - Second node */ +{ + int diff; /* Difference */ + + + /* + * Check the element name... + */ + + if ((diff = strcmp(first->value.element.name, + second->value.element.name)) != 0) + return (diff); + + /* + * Check the attribute value... + */ + + if (ind->attr) + { + if ((diff = strcmp(mxmlElementGetAttr(first, ind->attr), + mxmlElementGetAttr(second, ind->attr))) != 0) + return (diff); + } + + /* + * No difference, return 0... + */ + + return (0); +} + + +/* + * 'index_find()' - Compare a node with index values. + */ + +static int /* O - Result of comparison */ +index_find(mxml_index_t *ind, /* I - Index */ + const char *element, /* I - Element name or @code NULL@ */ + const char *value, /* I - Attribute value or @code NULL@ */ + mxml_node_t *node) /* I - Node */ +{ + int diff; /* Difference */ + + + /* + * Check the element name... + */ + + if (element) + { + if ((diff = strcmp(element, node->value.element.name)) != 0) + return (diff); + } + + /* + * Check the attribute value... + */ + + if (value) + { + if ((diff = strcmp(value, mxmlElementGetAttr(node, ind->attr))) != 0) + return (diff); + } + + /* + * No difference, return 0... + */ + + return (0); +} + + +/* + * 'index_sort()' - Sort the nodes in the index... + * + * This function implements the classic quicksort algorithm... + */ + +static void +index_sort(mxml_index_t *ind, /* I - Index to sort */ + int left, /* I - Left node in partition */ + int right) /* I - Right node in partition */ +{ + mxml_node_t *pivot, /* Pivot node */ + *temp; /* Swap node */ + int templ, /* Temporary left node */ + tempr; /* Temporary right node */ + + + /* + * Loop until we have sorted all the way to the right... + */ + + do + { + /* + * Sort the pivot in the current partition... + */ + + pivot = ind->nodes[left]; + + for (templ = left, tempr = right; templ < tempr;) + { + /* + * Move left while left node <= pivot node... + */ + + while ((templ < right) && + index_compare(ind, ind->nodes[templ], pivot) <= 0) + templ ++; + + /* + * Move right while right node > pivot node... + */ + + while ((tempr > left) && + index_compare(ind, ind->nodes[tempr], pivot) > 0) + tempr --; + + /* + * Swap nodes if needed... + */ + + if (templ < tempr) + { + temp = ind->nodes[templ]; + ind->nodes[templ] = ind->nodes[tempr]; + ind->nodes[tempr] = temp; + } + } + + /* + * When we get here, the right (tempr) node is the new position for the + * pivot node... + */ + + if (index_compare(ind, pivot, ind->nodes[tempr]) > 0) + { + ind->nodes[left] = ind->nodes[tempr]; + ind->nodes[tempr] = pivot; + } + + /* + * Recursively sort the left partition as needed... + */ + + if (left < (tempr - 1)) + index_sort(ind, left, tempr - 1); + } + while (right > (left = tempr + 1)); +} diff --git a/lib/libmxml/mxml-node.c b/lib/libmxml/mxml-node.c new file mode 100644 index 0000000..d2468d2 --- /dev/null +++ b/lib/libmxml/mxml-node.c @@ -0,0 +1,876 @@ +/* + * Node support code for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * Local functions... + */ + +static void mxml_free(mxml_node_t *node); +static mxml_node_t *mxml_new(mxml_node_t *parent, mxml_type_t type); + + +/* + * 'mxmlAdd()' - Add a node to a tree. + * + * Adds the specified node to the parent. If the child argument is not + * @code NULL@, puts the new node before or after the specified child depending + * on the value of the where argument. If the child argument is @code NULL@, + * puts the new node at the beginning of the child list (@code MXML_ADD_BEFORE@) + * or at the end of the child list (@code MXML_ADD_AFTER@). The constant + * @code MXML_ADD_TO_PARENT@ can be used to specify a @code NULL@ child pointer. + */ + +void +mxmlAdd(mxml_node_t *parent, /* I - Parent node */ + int where, /* I - Where to add, @code MXML_ADD_BEFORE@ or @code MXML_ADD_AFTER@ */ + mxml_node_t *child, /* I - Child node for where or @code MXML_ADD_TO_PARENT@ */ + mxml_node_t *node) /* I - Node to add */ +{ +#ifdef DEBUG + fprintf(stderr, "mxmlAdd(parent=%p, where=%d, child=%p, node=%p)\n", parent, + where, child, node); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!parent || !node) + return; + +#if DEBUG > 1 + fprintf(stderr, " BEFORE: node->parent=%p\n", node->parent); + if (parent) + { + fprintf(stderr, " BEFORE: parent->child=%p\n", parent->child); + fprintf(stderr, " BEFORE: parent->last_child=%p\n", parent->last_child); + fprintf(stderr, " BEFORE: parent->prev=%p\n", parent->prev); + fprintf(stderr, " BEFORE: parent->next=%p\n", parent->next); + } +#endif /* DEBUG > 1 */ + + /* + * Remove the node from any existing parent... + */ + + if (node->parent) + mxmlRemove(node); + + /* + * Reset pointers... + */ + + node->parent = parent; + + switch (where) + { + case MXML_ADD_BEFORE : + if (!child || child == parent->child || child->parent != parent) + { + /* + * Insert as first node under parent... + */ + + node->next = parent->child; + + if (parent->child) + parent->child->prev = node; + else + parent->last_child = node; + + parent->child = node; + } + else + { + /* + * Insert node before this child... + */ + + node->next = child; + node->prev = child->prev; + + if (child->prev) + child->prev->next = node; + else + parent->child = node; + + child->prev = node; + } + break; + + case MXML_ADD_AFTER : + if (!child || child == parent->last_child || child->parent != parent) + { + /* + * Insert as last node under parent... + */ + + node->parent = parent; + node->prev = parent->last_child; + + if (parent->last_child) + parent->last_child->next = node; + else + parent->child = node; + + parent->last_child = node; + } + else + { + /* + * Insert node after this child... + */ + + node->prev = child; + node->next = child->next; + + if (child->next) + child->next->prev = node; + else + parent->last_child = node; + + child->next = node; + } + break; + } + +#if DEBUG > 1 + fprintf(stderr, " AFTER: node->parent=%p\n", node->parent); + if (parent) + { + fprintf(stderr, " AFTER: parent->child=%p\n", parent->child); + fprintf(stderr, " AFTER: parent->last_child=%p\n", parent->last_child); + fprintf(stderr, " AFTER: parent->prev=%p\n", parent->prev); + fprintf(stderr, " AFTER: parent->next=%p\n", parent->next); + } +#endif /* DEBUG > 1 */ +} + + +/* + * 'mxmlDelete()' - Delete a node and all of its children. + * + * If the specified node has a parent, this function first removes the + * node from its parent using the @link mxmlRemove@ function. + */ + +void +mxmlDelete(mxml_node_t *node) /* I - Node to delete */ +{ + mxml_node_t *current, /* Current node */ + *next; /* Next node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlDelete(node=%p)\n", node); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node) + return; + + /* + * Remove the node from its parent, if any... + */ + + mxmlRemove(node); + + /* + * Delete children... + */ + + for (current = node->child; current; current = next) + { + /* + * Get the next node... + */ + + if ((next = current->child) != NULL) + { + /* + * Free parent nodes after child nodes have been freed... + */ + + current->child = NULL; + continue; + } + + if ((next = current->next) == NULL) + { + /* + * Next node is the parent, which we'll free as needed... + */ + + if ((next = current->parent) == node) + next = NULL; + } + + /* + * Free child... + */ + + mxml_free(current); + } + + /* + * Then free the memory used by the parent node... + */ + + mxml_free(node); +} + + +/* + * 'mxmlGetRefCount()' - Get the current reference (use) count for a node. + * + * The initial reference count of new nodes is 1. Use the @link mxmlRetain@ + * and @link mxmlRelease@ functions to increment and decrement a node's + * reference count. + * + * @since Mini-XML 2.7@. + */ + +int /* O - Reference count */ +mxmlGetRefCount(mxml_node_t *node) /* I - Node */ +{ + /* + * Range check input... + */ + + if (!node) + return (0); + + /* + * Return the reference count... + */ + + return (node->ref_count); +} + + +/* + * 'mxmlNewCDATA()' - Create a new CDATA node. + * + * The new CDATA node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * CDATA node has no parent. The data string must be nul-terminated and + * is copied into the new node. CDATA nodes currently use the + * @code MXML_ELEMENT@ type. + * + * @since Mini-XML 2.3@ + */ + +mxml_node_t * /* O - New node */ +mxmlNewCDATA(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + const char *data) /* I - Data string */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewCDATA(parent=%p, data=\"%s\")\n", + parent, data ? data : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!data) + return (NULL); + + /* + * Create the node and set the name value... + */ + + if ((node = mxml_new(parent, MXML_ELEMENT)) != NULL) + node->value.element.name = _mxml_strdupf("![CDATA[%s]]", data); + + return (node); +} + + +/* + * 'mxmlNewCustom()' - Create a new custom data node. + * + * The new custom node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * element node has no parent. @code NULL@ can be passed when the data in the + * node is not dynamically allocated or is separately managed. + * + * @since Mini-XML 2.1@ + */ + +mxml_node_t * /* O - New node */ +mxmlNewCustom( + mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + void *data, /* I - Pointer to data */ + mxml_custom_destroy_cb_t destroy) /* I - Function to destroy data */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewCustom(parent=%p, data=%p, destroy=%p)\n", parent, + data, destroy); +#endif /* DEBUG */ + + /* + * Create the node and set the value... + */ + + if ((node = mxml_new(parent, MXML_CUSTOM)) != NULL) + { + node->value.custom.data = data; + node->value.custom.destroy = destroy; + } + + return (node); +} + + +/* + * 'mxmlNewElement()' - Create a new element node. + * + * The new element node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * element node has no parent. + */ + +mxml_node_t * /* O - New node */ +mxmlNewElement(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + const char *name) /* I - Name of element */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewElement(parent=%p, name=\"%s\")\n", parent, + name ? name : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!name) + return (NULL); + + /* + * Create the node and set the element name... + */ + + if ((node = mxml_new(parent, MXML_ELEMENT)) != NULL) + node->value.element.name = strdup(name); + + return (node); +} + + +/* + * 'mxmlNewInteger()' - Create a new integer node. + * + * The new integer node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * integer node has no parent. + */ + +mxml_node_t * /* O - New node */ +mxmlNewInteger(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + int integer) /* I - Integer value */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewInteger(parent=%p, integer=%d)\n", parent, integer); +#endif /* DEBUG */ + + /* + * Create the node and set the element name... + */ + + if ((node = mxml_new(parent, MXML_INTEGER)) != NULL) + node->value.integer = integer; + + return (node); +} + + +/* + * 'mxmlNewOpaque()' - Create a new opaque string. + * + * The new opaque string node is added to the end of the specified parent's + * child list. The constant @code MXML_NO_PARENT@ can be used to specify that + * the new opaque string node has no parent. The opaque string must be nul- + * terminated and is copied into the new node. + */ + +mxml_node_t * /* O - New node */ +mxmlNewOpaque(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + const char *opaque) /* I - Opaque string */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewOpaque(parent=%p, opaque=\"%s\")\n", parent, + opaque ? opaque : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!opaque) + return (NULL); + + /* + * Create the node and set the element name... + */ + + if ((node = mxml_new(parent, MXML_OPAQUE)) != NULL) + node->value.opaque = strdup(opaque); + + return (node); +} + + +/* + * 'mxmlNewOpaquef()' - Create a new formatted opaque string node. + * + * The new opaque string node is added to the end of the specified parent's + * child list. The constant @code MXML_NO_PARENT@ can be used to specify that + * the new opaque string node has no parent. The format string must be + * nul-terminated and is formatted into the new node. + */ + +mxml_node_t * /* O - New node */ +mxmlNewOpaquef(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional args as needed */ +{ + mxml_node_t *node; /* New node */ + va_list ap; /* Pointer to arguments */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewOpaquef(parent=%p, format=\"%s\", ...)\n", parent, format ? format : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!format) + return (NULL); + + /* + * Create the node and set the text value... + */ + + if ((node = mxml_new(parent, MXML_OPAQUE)) != NULL) + { + va_start(ap, format); + + node->value.opaque = _mxml_vstrdupf(format, ap); + + va_end(ap); + } + + return (node); +} + + +/* + * 'mxmlNewReal()' - Create a new real number node. + * + * The new real number node is added to the end of the specified parent's + * child list. The constant @code MXML_NO_PARENT@ can be used to specify that + * the new real number node has no parent. + */ + +mxml_node_t * /* O - New node */ +mxmlNewReal(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + double real) /* I - Real number value */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewReal(parent=%p, real=%g)\n", parent, real); +#endif /* DEBUG */ + + /* + * Create the node and set the element name... + */ + + if ((node = mxml_new(parent, MXML_REAL)) != NULL) + node->value.real = real; + + return (node); +} + + +/* + * 'mxmlNewText()' - Create a new text fragment node. + * + * The new text node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * text node has no parent. The whitespace parameter is used to specify + * whether leading whitespace is present before the node. The text + * string must be nul-terminated and is copied into the new node. + */ + +mxml_node_t * /* O - New node */ +mxmlNewText(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + int whitespace, /* I - 1 = leading whitespace, 0 = no whitespace */ + const char *string) /* I - String */ +{ + mxml_node_t *node; /* New node */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewText(parent=%p, whitespace=%d, string=\"%s\")\n", + parent, whitespace, string ? string : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!string) + return (NULL); + + /* + * Create the node and set the text value... + */ + + if ((node = mxml_new(parent, MXML_TEXT)) != NULL) + { + node->value.text.whitespace = whitespace; + node->value.text.string = strdup(string); + } + + return (node); +} + + +/* + * 'mxmlNewTextf()' - Create a new formatted text fragment node. + * + * The new text node is added to the end of the specified parent's child + * list. The constant @code MXML_NO_PARENT@ can be used to specify that the new + * text node has no parent. The whitespace parameter is used to specify + * whether leading whitespace is present before the node. The format + * string must be nul-terminated and is formatted into the new node. + */ + +mxml_node_t * /* O - New node */ +mxmlNewTextf(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */ + int whitespace, /* I - 1 = leading whitespace, 0 = no whitespace */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional args as needed */ +{ + mxml_node_t *node; /* New node */ + va_list ap; /* Pointer to arguments */ + + +#ifdef DEBUG + fprintf(stderr, "mxmlNewTextf(parent=%p, whitespace=%d, format=\"%s\", ...)\n", + parent, whitespace, format ? format : "(null)"); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!format) + return (NULL); + + /* + * Create the node and set the text value... + */ + + if ((node = mxml_new(parent, MXML_TEXT)) != NULL) + { + va_start(ap, format); + + node->value.text.whitespace = whitespace; + node->value.text.string = _mxml_vstrdupf(format, ap); + + va_end(ap); + } + + return (node); +} + + +/* + * 'mxmlRemove()' - Remove a node from its parent. + * + * This function does not free memory used by the node - use @link mxmlDelete@ + * for that. This function does nothing if the node has no parent. + */ + +void +mxmlRemove(mxml_node_t *node) /* I - Node to remove */ +{ +#ifdef DEBUG + fprintf(stderr, "mxmlRemove(node=%p)\n", node); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!node || !node->parent) + return; + + /* + * Remove from parent... + */ + +#if DEBUG > 1 + fprintf(stderr, " BEFORE: node->parent=%p\n", node->parent); + if (node->parent) + { + fprintf(stderr, " BEFORE: node->parent->child=%p\n", node->parent->child); + fprintf(stderr, " BEFORE: node->parent->last_child=%p\n", node->parent->last_child); + } + fprintf(stderr, " BEFORE: node->child=%p\n", node->child); + fprintf(stderr, " BEFORE: node->last_child=%p\n", node->last_child); + fprintf(stderr, " BEFORE: node->prev=%p\n", node->prev); + fprintf(stderr, " BEFORE: node->next=%p\n", node->next); +#endif /* DEBUG > 1 */ + + if (node->prev) + node->prev->next = node->next; + else + node->parent->child = node->next; + + if (node->next) + node->next->prev = node->prev; + else + node->parent->last_child = node->prev; + + node->parent = NULL; + node->prev = NULL; + node->next = NULL; + +#if DEBUG > 1 + fprintf(stderr, " AFTER: node->parent=%p\n", node->parent); + if (node->parent) + { + fprintf(stderr, " AFTER: node->parent->child=%p\n", node->parent->child); + fprintf(stderr, " AFTER: node->parent->last_child=%p\n", node->parent->last_child); + } + fprintf(stderr, " AFTER: node->child=%p\n", node->child); + fprintf(stderr, " AFTER: node->last_child=%p\n", node->last_child); + fprintf(stderr, " AFTER: node->prev=%p\n", node->prev); + fprintf(stderr, " AFTER: node->next=%p\n", node->next); +#endif /* DEBUG > 1 */ +} + + +/* + * 'mxmlNewXML()' - Create a new XML document tree. + * + * The "version" argument specifies the version number to put in the + * ?xml element node. If @code NULL@, version "1.0" is assumed. + * + * @since Mini-XML 2.3@ + */ + +mxml_node_t * /* O - New ?xml node */ +mxmlNewXML(const char *version) /* I - Version number to use */ +{ + char element[1024]; /* Element text */ + + + snprintf(element, sizeof(element), "?xml version=\"%s\" encoding=\"utf-8\"?", + version ? version : "1.0"); + + return (mxmlNewElement(NULL, element)); +} + + +/* + * 'mxmlRelease()' - Release a node. + * + * When the reference count reaches zero, the node (and any children) + * is deleted via @link mxmlDelete@. + * + * @since Mini-XML 2.3@ + */ + +int /* O - New reference count */ +mxmlRelease(mxml_node_t *node) /* I - Node */ +{ + if (node) + { + if ((-- node->ref_count) <= 0) + { + mxmlDelete(node); + return (0); + } + else + return (node->ref_count); + } + else + return (-1); +} + + +/* + * 'mxmlRetain()' - Retain a node. + * + * @since Mini-XML 2.3@ + */ + +int /* O - New reference count */ +mxmlRetain(mxml_node_t *node) /* I - Node */ +{ + if (node) + return (++ node->ref_count); + else + return (-1); +} + + +/* + * 'mxml_free()' - Free the memory used by a node. + * + * Note: Does not free child nodes, does not remove from parent. + */ + +static void +mxml_free(mxml_node_t *node) /* I - Node */ +{ + int i; /* Looping var */ + + + switch (node->type) + { + case MXML_ELEMENT : + if (node->value.element.name) + free(node->value.element.name); + + if (node->value.element.num_attrs) + { + for (i = 0; i < node->value.element.num_attrs; i ++) + { + if (node->value.element.attrs[i].name) + free(node->value.element.attrs[i].name); + if (node->value.element.attrs[i].value) + free(node->value.element.attrs[i].value); + } + + free(node->value.element.attrs); + } + break; + case MXML_INTEGER : + /* Nothing to do */ + break; + case MXML_OPAQUE : + if (node->value.opaque) + free(node->value.opaque); + break; + case MXML_REAL : + /* Nothing to do */ + break; + case MXML_TEXT : + if (node->value.text.string) + free(node->value.text.string); + break; + case MXML_CUSTOM : + if (node->value.custom.data && + node->value.custom.destroy) + (*(node->value.custom.destroy))(node->value.custom.data); + break; + default : + break; + } + + /* + * Free this node... + */ + + free(node); +} + + +/* + * 'mxml_new()' - Create a new node. + */ + +static mxml_node_t * /* O - New node */ +mxml_new(mxml_node_t *parent, /* I - Parent node */ + mxml_type_t type) /* I - Node type */ +{ + mxml_node_t *node; /* New node */ + + +#if DEBUG > 1 + fprintf(stderr, "mxml_new(parent=%p, type=%d)\n", parent, type); +#endif /* DEBUG > 1 */ + + /* + * Allocate memory for the node... + */ + + if ((node = calloc(1, sizeof(mxml_node_t))) == NULL) + { +#if DEBUG > 1 + fputs(" returning NULL\n", stderr); +#endif /* DEBUG > 1 */ + + return (NULL); + } + +#if DEBUG > 1 + fprintf(stderr, " returning %p\n", node); +#endif /* DEBUG > 1 */ + + /* + * Set the node type... + */ + + node->type = type; + node->ref_count = 1; + + /* + * Add to the parent if present... + */ + + if (parent) + mxmlAdd(parent, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, node); + + /* + * Return the new node... + */ + + return (node); +} diff --git a/lib/libmxml/mxml-private.c b/lib/libmxml/mxml-private.c new file mode 100644 index 0000000..0d93876 --- /dev/null +++ b/lib/libmxml/mxml-private.c @@ -0,0 +1,316 @@ +/* + * Private functions for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "mxml-private.h" + + +/* + * Some crazy people think that unloading a shared object is a good or safe + * thing to do. Unfortunately, most objects are simply *not* safe to unload + * and bad things *will* happen. + * + * The following mess of conditional code allows us to provide a destructor + * function in Mini-XML for our thread-global storage so that it can possibly + * be unloaded safely, although since there is no standard way to do so I + * can't even provide any guarantees that you can do it safely on all platforms. + * + * This code currently supports AIX, HP-UX, Linux, Mac OS X, Solaris, and + * Windows. It might work on the BSDs and IRIX, but I haven't tested that. + */ + +#if defined(__sun) || defined(_AIX) +# pragma fini(_mxml_fini) +# define _MXML_FINI _mxml_fini +#elif defined(__hpux) +# pragma FINI _mxml_fini +# define _MXML_FINI _mxml_fini +#elif defined(__GNUC__) /* Linux and Mac OS X */ +# define _MXML_FINI __attribute((destructor)) _mxml_fini +#else +# define _MXML_FINI _fini +#endif /* __sun */ + + +/* + * 'mxml_error()' - Display an error message. + */ + +void +mxml_error(const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Pointer to arguments */ + char s[1024]; /* Message string */ + _mxml_global_t *global = _mxml_global(); + /* Global data */ + + + /* + * Range check input... + */ + + if (!format) + return; + + /* + * Format the error message string... + */ + + va_start(ap, format); + + vsnprintf(s, sizeof(s), format, ap); + + va_end(ap); + + /* + * And then display the error message... + */ + + if (global->error_cb) + (*global->error_cb)(s); + else + fprintf(stderr, "mxml: %s\n", s); +} + + +/* + * 'mxml_ignore_cb()' - Default callback for ignored values. + */ + +mxml_type_t /* O - Node type */ +mxml_ignore_cb(mxml_node_t *node) /* I - Current node */ +{ + (void)node; + + return (MXML_IGNORE); +} + + +/* + * 'mxml_integer_cb()' - Default callback for integer values. + */ + +mxml_type_t /* O - Node type */ +mxml_integer_cb(mxml_node_t *node) /* I - Current node */ +{ + (void)node; + + return (MXML_INTEGER); +} + + +/* + * 'mxml_opaque_cb()' - Default callback for opaque values. + */ + +mxml_type_t /* O - Node type */ +mxml_opaque_cb(mxml_node_t *node) /* I - Current node */ +{ + (void)node; + + return (MXML_OPAQUE); +} + + +/* + * 'mxml_real_cb()' - Default callback for real number values. + */ + +mxml_type_t /* O - Node type */ +mxml_real_cb(mxml_node_t *node) /* I - Current node */ +{ + (void)node; + + return (MXML_REAL); +} + + +#ifdef HAVE_PTHREAD_H /**** POSIX threading ****/ +# include + +static pthread_key_t _mxml_key = -1; /* Thread local storage key */ +static pthread_once_t _mxml_key_once = PTHREAD_ONCE_INIT; + /* One-time initialization object */ +static void _mxml_init(void); +static void _mxml_destructor(void *g); + + +/* + * '_mxml_destructor()' - Free memory used for globals... + */ + +static void +_mxml_destructor(void *g) /* I - Global data */ +{ + free(g); +} + + +/* + * '_mxml_fini()' - Clean up when unloaded. + */ + +static void +_MXML_FINI(void) +{ + _mxml_global_t *global; /* Global data */ + + + if (_mxml_key != -1) + { + if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) != NULL) + _mxml_destructor(global); + + pthread_key_delete(_mxml_key); + _mxml_key = -1; + } +} + + +/* + * '_mxml_global()' - Get global data. + */ + +_mxml_global_t * /* O - Global data */ +_mxml_global(void) +{ + _mxml_global_t *global; /* Global data */ + + + pthread_once(&_mxml_key_once, _mxml_init); + + if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) == NULL) + { + global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t)); + pthread_setspecific(_mxml_key, global); + + global->num_entity_cbs = 1; + global->entity_cbs[0] = _mxml_entity_cb; + global->wrap = 72; + } + + return (global); +} + + +/* + * '_mxml_init()' - Initialize global data... + */ + +static void +_mxml_init(void) +{ + pthread_key_create(&_mxml_key, _mxml_destructor); +} + + +#elif defined(WIN32) && defined(MXML1_EXPORTS) /**** WIN32 threading ****/ +# include + +static DWORD _mxml_tls_index; /* Index for global storage */ + + +/* + * 'DllMain()' - Main entry for library. + */ + +BOOL WINAPI /* O - Success/failure */ +DllMain(HINSTANCE hinst, /* I - DLL module handle */ + DWORD reason, /* I - Reason */ + LPVOID reserved) /* I - Unused */ +{ + _mxml_global_t *global; /* Global data */ + + + (void)hinst; + (void)reserved; + + switch (reason) + { + case DLL_PROCESS_ATTACH : /* Called on library initialization */ + if ((_mxml_tls_index = TlsAlloc()) == TLS_OUT_OF_INDEXES) + return (FALSE); + break; + + case DLL_THREAD_DETACH : /* Called when a thread terminates */ + if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) != NULL) + free(global); + break; + + case DLL_PROCESS_DETACH : /* Called when library is unloaded */ + if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) != NULL) + free(global); + + TlsFree(_mxml_tls_index); + break; + + default: + break; + } + + return (TRUE); +} + + +/* + * '_mxml_global()' - Get global data. + */ + +_mxml_global_t * /* O - Global data */ +_mxml_global(void) +{ + _mxml_global_t *global; /* Global data */ + + + if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) == NULL) + { + global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t)); + + global->num_entity_cbs = 1; + global->entity_cbs[0] = _mxml_entity_cb; + global->wrap = 72; + + TlsSetValue(_mxml_tls_index, (LPVOID)global); + } + + return (global); +} + + +#else /**** No threading ****/ +/* + * '_mxml_global()' - Get global data. + */ + +_mxml_global_t * /* O - Global data */ +_mxml_global(void) +{ + static _mxml_global_t global = /* Global data */ + { + NULL, /* error_cb */ + 1, /* num_entity_cbs */ + { _mxml_entity_cb }, /* entity_cbs */ + 72, /* wrap */ + NULL, /* custom_load_cb */ + NULL /* custom_save_cb */ + }; + + + return (&global); +} +#endif /* HAVE_PTHREAD_H */ diff --git a/lib/libmxml/mxml-private.h b/lib/libmxml/mxml-private.h new file mode 100644 index 0000000..a78dcde --- /dev/null +++ b/lib/libmxml/mxml-private.h @@ -0,0 +1,43 @@ +/* + * Private definitions for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * Global, per-thread data... + */ + +typedef struct _mxml_global_s +{ + void (*error_cb)(const char *); + int num_entity_cbs; + int (*entity_cbs[100])(const char *name); + int wrap; + mxml_custom_load_cb_t custom_load_cb; + mxml_custom_save_cb_t custom_save_cb; +} _mxml_global_t; + + +/* + * Functions... + */ + +extern _mxml_global_t *_mxml_global(void); +extern int _mxml_entity_cb(const char *name); diff --git a/lib/libmxml/mxml-search.c b/lib/libmxml/mxml-search.c new file mode 100644 index 0000000..a133bff --- /dev/null +++ b/lib/libmxml/mxml-search.c @@ -0,0 +1,272 @@ +/* + * Search/navigation functions for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * 'mxmlFindElement()' - Find the named element. + * + * The search is constrained by the name, attribute name, and value; any + * @code NULL@ names or values are treated as wildcards, so different kinds of + * searches can be implemented by looking for all elements of a given name + * or all elements with a specific attribute. The descend argument determines + * whether the search descends into child nodes; normally you will use + * @code MXML_DESCEND_FIRST@ for the initial search and @code MXML_NO_DESCEND@ + * to find additional direct descendents of the node. The top node argument + * constrains the search to a particular node's children. + */ + +mxml_node_t * /* O - Element node or @code NULL@ */ +mxmlFindElement(mxml_node_t *node, /* I - Current node */ + mxml_node_t *top, /* I - Top node */ + const char *element, /* I - Element name or @code NULL@ for any */ + const char *attr, /* I - Attribute name, or @code NULL@ for none */ + const char *value, /* I - Attribute value, or @code NULL@ for any */ + int descend) /* I - Descend into tree - @code MXML_DESCEND@, @code MXML_NO_DESCEND@, or @code MXML_DESCEND_FIRST@ */ +{ + const char *temp; /* Current attribute value */ + + + /* + * Range check input... + */ + + if (!node || !top || (!attr && value)) + return (NULL); + + /* + * Start with the next node... + */ + + node = mxmlWalkNext(node, top, descend); + + /* + * Loop until we find a matching element... + */ + + while (node != NULL) + { + /* + * See if this node matches... + */ + + if (node->type == MXML_ELEMENT && + node->value.element.name && + (!element || !strcmp(node->value.element.name, element))) + { + /* + * See if we need to check for an attribute... + */ + + if (!attr) + return (node); /* No attribute search, return it... */ + + /* + * Check for the attribute... + */ + + if ((temp = mxmlElementGetAttr(node, attr)) != NULL) + { + /* + * OK, we have the attribute, does it match? + */ + + if (!value || !strcmp(value, temp)) + return (node); /* Yes, return it... */ + } + } + + /* + * No match, move on to the next node... + */ + + if (descend == MXML_DESCEND) + node = mxmlWalkNext(node, top, MXML_DESCEND); + else + node = node->next; + } + + return (NULL); +} + + +/* + * 'mxmlFindPath()' - Find a node with the given path. + * + * The "path" is a slash-separated list of element names. The name "*" is + * considered a wildcard for one or more levels of elements. For example, + * "foo/one/two", "bar/two/one", "*\/one", and so forth. + * + * The first child node of the found node is returned if the given node has + * children and the first child is a value node. + * + * @since Mini-XML 2.7@ + */ + +mxml_node_t * /* O - Found node or @code NULL@ */ +mxmlFindPath(mxml_node_t *top, /* I - Top node */ + const char *path) /* I - Path to element */ +{ + mxml_node_t *node; /* Current node */ + char element[256]; /* Current element name */ + const char *pathsep; /* Separator in path */ + int descend; /* mxmlFindElement option */ + + + /* + * Range check input... + */ + + if (!top || !path || !*path) + return (NULL); + + /* + * Search each element in the path... + */ + + node = top; + while (*path) + { + /* + * Handle wildcards... + */ + + if (!strncmp(path, "*/", 2)) + { + path += 2; + descend = MXML_DESCEND; + } + else + descend = MXML_DESCEND_FIRST; + + /* + * Get the next element in the path... + */ + + if ((pathsep = strchr(path, '/')) == NULL) + pathsep = path + strlen(path); + + if (pathsep == path || (pathsep - path) >= sizeof(element)) + return (NULL); + + memcpy(element, path, pathsep - path); + element[pathsep - path] = '\0'; + + if (*pathsep) + path = pathsep + 1; + else + path = pathsep; + + /* + * Search for the element... + */ + + if ((node = mxmlFindElement(node, node, element, NULL, NULL, + descend)) == NULL) + return (NULL); + } + + /* + * If we get this far, return the node or its first child... + */ + + if (node->child && node->child->type != MXML_ELEMENT) + return (node->child); + else + return (node); +} + + +/* + * 'mxmlWalkNext()' - Walk to the next logical node in the tree. + * + * The descend argument controls whether the first child is considered + * to be the next node. The top node argument constrains the walk to + * the node's children. + */ + +mxml_node_t * /* O - Next node or @code NULL@ */ +mxmlWalkNext(mxml_node_t *node, /* I - Current node */ + mxml_node_t *top, /* I - Top node */ + int descend) /* I - Descend into tree - @code MXML_DESCEND@, @code MXML_NO_DESCEND@, or @code MXML_DESCEND_FIRST@ */ +{ + if (!node) + return (NULL); + else if (node->child && descend) + return (node->child); + else if (node == top) + return (NULL); + else if (node->next) + return (node->next); + else if (node->parent && node->parent != top) + { + node = node->parent; + + while (!node->next) + if (node->parent == top || !node->parent) + return (NULL); + else + node = node->parent; + + return (node->next); + } + else + return (NULL); +} + + +/* + * 'mxmlWalkPrev()' - Walk to the previous logical node in the tree. + * + * The descend argument controls whether the previous node's last child + * is considered to be the previous node. The top node argument constrains + * the walk to the node's children. + */ + +mxml_node_t * /* O - Previous node or @code NULL@ */ +mxmlWalkPrev(mxml_node_t *node, /* I - Current node */ + mxml_node_t *top, /* I - Top node */ + int descend) /* I - Descend into tree - @code MXML_DESCEND@, @code MXML_NO_DESCEND@, or @code MXML_DESCEND_FIRST@ */ +{ + if (!node || node == top) + return (NULL); + else if (node->prev) + { + if (node->prev->last_child && descend) + { + /* + * Find the last child under the previous node... + */ + + node = node->prev->last_child; + + while (node->last_child) + node = node->last_child; + + return (node); + } + else + return (node->prev); + } + else if (node->parent != top) + return (node->parent); + else + return (NULL); +} diff --git a/lib/libmxml/mxml-set.c b/lib/libmxml/mxml-set.c new file mode 100644 index 0000000..71ade49 --- /dev/null +++ b/lib/libmxml/mxml-set.c @@ -0,0 +1,374 @@ +/* + * Node set functions for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" + + +/* + * 'mxmlSetCDATA()' - Set the element name of a CDATA node. + * + * The node is not changed if it (or its first child) is not a CDATA element node. + * + * @since Mini-XML 2.3@ + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetCDATA(mxml_node_t *node, /* I - Node to set */ + const char *data) /* I - New data string */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + strncmp(node->value.element.name, "![CDATA[", 8) && + node->child && node->child->type == MXML_ELEMENT && + !strncmp(node->child->value.element.name, "![CDATA[", 8)) + node = node->child; + + if (!node || node->type != MXML_ELEMENT || !data || + strncmp(node->value.element.name, "![CDATA[", 8)) + return (-1); + + /* + * Free any old element value and set the new value... + */ + + if (node->value.element.name) + free(node->value.element.name); + + node->value.element.name = _mxml_strdupf("![CDATA[%s]]", data); + + return (0); +} + + +/* + * 'mxmlSetCustom()' - Set the data and destructor of a custom data node. + * + * The node is not changed if it (or its first child) is not a custom node. + * + * @since Mini-XML 2.1@ + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetCustom( + mxml_node_t *node, /* I - Node to set */ + void *data, /* I - New data pointer */ + mxml_custom_destroy_cb_t destroy) /* I - New destructor function */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_CUSTOM) + node = node->child; + + if (!node || node->type != MXML_CUSTOM) + return (-1); + + /* + * Free any old element value and set the new value... + */ + + if (node->value.custom.data && node->value.custom.destroy) + (*(node->value.custom.destroy))(node->value.custom.data); + + node->value.custom.data = data; + node->value.custom.destroy = destroy; + + return (0); +} + + +/* + * 'mxmlSetElement()' - Set the name of an element node. + * + * The node is not changed if it is not an element node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetElement(mxml_node_t *node, /* I - Node to set */ + const char *name) /* I - New name string */ +{ + /* + * Range check input... + */ + + if (!node || node->type != MXML_ELEMENT || !name) + return (-1); + + /* + * Free any old element value and set the new value... + */ + + if (node->value.element.name) + free(node->value.element.name); + + node->value.element.name = strdup(name); + + return (0); +} + + +/* + * 'mxmlSetInteger()' - Set the value of an integer node. + * + * The node is not changed if it (or its first child) is not an integer node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetInteger(mxml_node_t *node, /* I - Node to set */ + int integer) /* I - Integer value */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_INTEGER) + node = node->child; + + if (!node || node->type != MXML_INTEGER) + return (-1); + + /* + * Set the new value and return... + */ + + node->value.integer = integer; + + return (0); +} + + +/* + * 'mxmlSetOpaque()' - Set the value of an opaque node. + * + * The node is not changed if it (or its first child) is not an opaque node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetOpaque(mxml_node_t *node, /* I - Node to set */ + const char *opaque) /* I - Opaque string */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_OPAQUE) + node = node->child; + + if (!node || node->type != MXML_OPAQUE || !opaque) + return (-1); + + /* + * Free any old opaque value and set the new value... + */ + + if (node->value.opaque) + free(node->value.opaque); + + node->value.opaque = strdup(opaque); + + return (0); +} + + +/* + * 'mxmlSetOpaquef()' - Set the value of an opaque string node to a formatted string. + * + * The node is not changed if it (or its first child) is not an opaque node. + * + * @since Mini-XML 2.11@ + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetOpaquef(mxml_node_t *node, /* I - Node to set */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Pointer to arguments */ + + + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_OPAQUE) + node = node->child; + + if (!node || node->type != MXML_OPAQUE || !format) + return (-1); + + /* + * Free any old string value and set the new value... + */ + + if (node->value.opaque) + free(node->value.opaque); + + va_start(ap, format); + + node->value.opaque = _mxml_strdupf(format, ap); + + va_end(ap); + + return (0); +} + + +/* + * 'mxmlSetReal()' - Set the value of a real number node. + * + * The node is not changed if it (or its first child) is not a real number node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetReal(mxml_node_t *node, /* I - Node to set */ + double real) /* I - Real number value */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_REAL) + node = node->child; + + if (!node || node->type != MXML_REAL) + return (-1); + + /* + * Set the new value and return... + */ + + node->value.real = real; + + return (0); +} + + +/* + * 'mxmlSetText()' - Set the value of a text node. + * + * The node is not changed if it (or its first child) is not a text node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetText(mxml_node_t *node, /* I - Node to set */ + int whitespace, /* I - 1 = leading whitespace, 0 = no whitespace */ + const char *string) /* I - String */ +{ + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_TEXT) + node = node->child; + + if (!node || node->type != MXML_TEXT || !string) + return (-1); + + /* + * Free any old string value and set the new value... + */ + + if (node->value.text.string) + free(node->value.text.string); + + node->value.text.whitespace = whitespace; + node->value.text.string = strdup(string); + + return (0); +} + + +/* + * 'mxmlSetTextf()' - Set the value of a text node to a formatted string. + * + * The node is not changed if it (or its first child) is not a text node. + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetTextf(mxml_node_t *node, /* I - Node to set */ + int whitespace, /* I - 1 = leading whitespace, 0 = no whitespace */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Pointer to arguments */ + + + /* + * Range check input... + */ + + if (node && node->type == MXML_ELEMENT && + node->child && node->child->type == MXML_TEXT) + node = node->child; + + if (!node || node->type != MXML_TEXT || !format) + return (-1); + + /* + * Free any old string value and set the new value... + */ + + if (node->value.text.string) + free(node->value.text.string); + + va_start(ap, format); + + node->value.text.whitespace = whitespace; + node->value.text.string = _mxml_strdupf(format, ap); + + va_end(ap); + + return (0); +} + + +/* + * 'mxmlSetUserData()' - Set the user data pointer for a node. + * + * @since Mini-XML 2.7@ + */ + +int /* O - 0 on success, -1 on failure */ +mxmlSetUserData(mxml_node_t *node, /* I - Node to set */ + void *data) /* I - User data pointer */ +{ + /* + * Range check input... + */ + + if (!node) + return (-1); + + /* + * Set the user data pointer and return... + */ + + node->user_data = data; + return (0); +} diff --git a/lib/libmxml/mxml-string.c b/lib/libmxml/mxml-string.c new file mode 100644 index 0000000..2495753 --- /dev/null +++ b/lib/libmxml/mxml-string.c @@ -0,0 +1,565 @@ +/* + * String functions for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" + + +/* + * The va_copy macro is part of C99, but many compilers don't implement it. + * Provide a "direct assignment" implmentation when va_copy isn't defined... + */ + +#ifndef va_copy +# ifdef __va_copy +# define va_copy(dst,src) __va_copy(dst,src) +# else +# define va_copy(dst,src) memcpy(&dst, src, sizeof(va_list)) +# endif /* __va_copy */ +#endif /* va_copy */ + + +#ifndef HAVE_SNPRINTF +/* + * '_mxml_snprintf()' - Format a string. + */ + +int /* O - Number of bytes formatted */ +_mxml_snprintf(char *buffer, /* I - Output buffer */ + size_t bufsize, /* I - Size of output buffer */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Argument list */ + int bytes; /* Number of bytes formatted */ + + + va_start(ap, format); + bytes = vsnprintf(buffer, bufsize, format, ap); + va_end(ap); + + return (bytes); +} +#endif /* !HAVE_SNPRINTF */ + + +/* + * '_mxml_strdup()' - Duplicate a string. + */ + +#ifndef HAVE_STRDUP +char * /* O - New string pointer */ +_mxml_strdup(const char *s) /* I - String to duplicate */ +{ + char *t; /* New string pointer */ + + + if (s == NULL) + return (NULL); + + if ((t = malloc(strlen(s) + 1)) == NULL) + return (NULL); + + return (strcpy(t, s)); +} +#endif /* !HAVE_STRDUP */ + + +/* + * '_mxml_strdupf()' - Format and duplicate a string. + */ + +char * /* O - New string pointer */ +_mxml_strdupf(const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + va_list ap; /* Pointer to additional arguments */ + char *s; /* Pointer to formatted string */ + + + /* + * Get a pointer to the additional arguments, format the string, + * and return it... + */ + + va_start(ap, format); +#ifdef HAVE_VASPRINTF + if (vasprintf(&s, format, ap) < 0) + s = NULL; +#else + s = _mxml_vstrdupf(format, ap); +#endif /* HAVE_VASPRINTF */ + va_end(ap); + + return (s); +} + + +#ifndef HAVE_STRLCAT +/* + * '_mxml_strlcat()' - Safely concatenate a string. + */ + +size_t /* O - Number of bytes copied */ +_mxml_strlcat(char *dst, /* I - Destination buffer */ + const char *src, /* I - Source string */ + size_t dstsize) /* I - Size of destinatipon buffer */ +{ + size_t srclen; /* Length of source string */ + size_t dstlen; /* Length of destination string */ + + + /* + * Figure out how much room is left... + */ + + dstlen = strlen(dst); + + if (dstsize <= (dstlen + 1)) + return (dstlen); /* No room, return immediately... */ + + dstsize -= dstlen + 1; + + /* + * Figure out how much room is needed... + */ + + srclen = strlen(src); + + /* + * Copy the appropriate amount... + */ + + if (srclen > dstsize) + srclen = dstsize; + + memmove(dst + dstlen, src, srclen); + dst[dstlen + srclen] = '\0'; + + return (dstlen + srclen); +} +#endif /* !HAVE_STRLCAT */ + + +#ifndef HAVE_STRLCPY +/* + * '_mxml_strlcpy()' - Safely copy a string. + */ + +size_t /* O - Number of bytes copied */ +_mxml_strlcpy(char *dst, /* I - Destination buffer */ + const char *src, /* I - Source string */ + size_t dstsize) /* I - Size of destinatipon buffer */ +{ + size_t srclen; /* Length of source string */ + + + /* + * Figure out how much room is needed... + */ + + dstsize --; + + srclen = strlen(src); + + /* + * Copy the appropriate amount... + */ + + if (srclen > dstsize) + srclen = dstsize; + + memmove(dst, src, srclen); + dst[srclen] = '\0'; + + return (srclen); +} +#endif /* !HAVE_STRLCPY */ + + +#ifndef HAVE_VSNPRINTF +/* + * '_mxml_vsnprintf()' - Format a string into a fixed size buffer. + */ + +int /* O - Number of bytes formatted */ +_mxml_vsnprintf(char *buffer, /* O - Output buffer */ + size_t bufsize, /* O - Size of output buffer */ + const char *format, /* I - Printf-style format string */ + va_list ap) /* I - Pointer to additional arguments */ +{ + char *bufptr, /* Pointer to position in buffer */ + *bufend, /* Pointer to end of buffer */ + sign, /* Sign of format width */ + size, /* Size character (h, l, L) */ + type; /* Format type character */ + int width, /* Width of field */ + prec; /* Number of characters of precision */ + char tformat[100], /* Temporary format string for sprintf() */ + *tptr, /* Pointer into temporary format */ + temp[1024]; /* Buffer for formatted numbers */ + char *s; /* Pointer to string */ + int slen; /* Length of string */ + int bytes; /* Total number of bytes needed */ + + + /* + * Loop through the format string, formatting as needed... + */ + + bufptr = buffer; + bufend = buffer + bufsize - 1; + bytes = 0; + + while (*format) + { + if (*format == '%') + { + tptr = tformat; + *tptr++ = *format++; + + if (*format == '%') + { + if (bufptr && bufptr < bufend) + *bufptr++ = *format; + bytes ++; + format ++; + continue; + } + else if (strchr(" -+#\'", *format)) + { + *tptr++ = *format; + sign = *format++; + } + else + sign = 0; + + if (*format == '*') + { + /* + * Get width from argument... + */ + + format ++; + width = va_arg(ap, int); + + snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", width); + tptr += strlen(tptr); + } + else + { + width = 0; + + while (isdigit(*format & 255)) + { + if (tptr < (tformat + sizeof(tformat) - 1)) + *tptr++ = *format; + + width = width * 10 + *format++ - '0'; + } + } + + if (*format == '.') + { + if (tptr < (tformat + sizeof(tformat) - 1)) + *tptr++ = *format; + + format ++; + + if (*format == '*') + { + /* + * Get precision from argument... + */ + + format ++; + prec = va_arg(ap, int); + + snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", prec); + tptr += strlen(tptr); + } + else + { + prec = 0; + + while (isdigit(*format & 255)) + { + if (tptr < (tformat + sizeof(tformat) - 1)) + *tptr++ = *format; + + prec = prec * 10 + *format++ - '0'; + } + } + } + else + prec = -1; + + if (*format == 'l' && format[1] == 'l') + { + size = 'L'; + + if (tptr < (tformat + sizeof(tformat) - 2)) + { + *tptr++ = 'l'; + *tptr++ = 'l'; + } + + format += 2; + } + else if (*format == 'h' || *format == 'l' || *format == 'L') + { + if (tptr < (tformat + sizeof(tformat) - 1)) + *tptr++ = *format; + + size = *format++; + } + + if (!*format) + break; + + if (tptr < (tformat + sizeof(tformat) - 1)) + *tptr++ = *format; + + type = *format++; + *tptr = '\0'; + + switch (type) + { + case 'E' : /* Floating point formats */ + case 'G' : + case 'e' : + case 'f' : + case 'g' : + if ((width + 2) > sizeof(temp)) + break; + + sprintf(temp, tformat, va_arg(ap, double)); + + bytes += strlen(temp); + + if (bufptr) + { + if ((bufptr + strlen(temp)) > bufend) + { + strncpy(bufptr, temp, (size_t)(bufend - bufptr)); + bufptr = bufend; + } + else + { + strcpy(bufptr, temp); + bufptr += strlen(temp); + } + } + break; + + case 'B' : /* Integer formats */ + case 'X' : + case 'b' : + case 'd' : + case 'i' : + case 'o' : + case 'u' : + case 'x' : + if ((width + 2) > sizeof(temp)) + break; + +#ifdef HAVE_LONG_LONG + if (size == 'L') + sprintf(temp, tformat, va_arg(ap, long long)); + else +#endif /* HAVE_LONG_LONG */ + sprintf(temp, tformat, va_arg(ap, int)); + + bytes += strlen(temp); + + if (bufptr) + { + if ((bufptr + strlen(temp)) > bufend) + { + strncpy(bufptr, temp, (size_t)(bufend - bufptr)); + bufptr = bufend; + } + else + { + strcpy(bufptr, temp); + bufptr += strlen(temp); + } + } + break; + + case 'p' : /* Pointer value */ + if ((width + 2) > sizeof(temp)) + break; + + sprintf(temp, tformat, va_arg(ap, void *)); + + bytes += strlen(temp); + + if (bufptr) + { + if ((bufptr + strlen(temp)) > bufend) + { + strncpy(bufptr, temp, (size_t)(bufend - bufptr)); + bufptr = bufend; + } + else + { + strcpy(bufptr, temp); + bufptr += strlen(temp); + } + } + break; + + case 'c' : /* Character or character array */ + bytes += width; + + if (bufptr) + { + if (width <= 1) + *bufptr++ = va_arg(ap, int); + else + { + if ((bufptr + width) > bufend) + width = bufend - bufptr; + + memcpy(bufptr, va_arg(ap, char *), (size_t)width); + bufptr += width; + } + } + break; + + case 's' : /* String */ + if ((s = va_arg(ap, char *)) == NULL) + s = "(null)"; + + slen = strlen(s); + if (slen > width && prec != width) + width = slen; + + bytes += width; + + if (bufptr) + { + if ((bufptr + width) > bufend) + width = bufend - bufptr; + + if (slen > width) + slen = width; + + if (sign == '-') + { + strncpy(bufptr, s, (size_t)slen); + memset(bufptr + slen, ' ', (size_t)(width - slen)); + } + else + { + memset(bufptr, ' ', (size_t)(width - slen)); + strncpy(bufptr + width - slen, s, (size_t)slen); + } + + bufptr += width; + } + break; + + case 'n' : /* Output number of chars so far */ + *(va_arg(ap, int *)) = bytes; + break; + } + } + else + { + bytes ++; + + if (bufptr && bufptr < bufend) + *bufptr++ = *format; + + format ++; + } + } + + /* + * Nul-terminate the string and return the number of characters needed. + */ + + *bufptr = '\0'; + + return (bytes); +} +#endif /* !HAVE_VSNPRINTF */ + + +/* + * '_mxml_vstrdupf()' - Format and duplicate a string. + */ + +char * /* O - New string pointer */ +_mxml_vstrdupf(const char *format, /* I - Printf-style format string */ + va_list ap) /* I - Pointer to additional arguments */ +{ +#ifdef HAVE_VASPRINTF + char *s; /* String */ + + if (vasprintf(&s, format, ap) < 0) + s = NULL; + + return (s); + +#else + int bytes; /* Number of bytes required */ + char *buffer, /* String buffer */ + temp[256]; /* Small buffer for first vsnprintf */ + + + /* + * First format with a tiny buffer; this will tell us how many bytes are + * needed... + */ + +# ifdef WIN32 + bytes = _vscprintf(format, ap); + +# else + va_list apcopy; /* Copy of argument list */ + + va_copy(apcopy, ap); + bytes = vsnprintf(temp, sizeof(temp), format, apcopy); +# endif /* WIN32 */ + + if (bytes < sizeof(temp)) + { + /* + * Hey, the formatted string fits in the tiny buffer, so just dup that... + */ + + return (strdup(temp)); + } + + /* + * Allocate memory for the whole thing and reformat to the new, larger + * buffer... + */ + + if ((buffer = calloc(1, bytes + 1)) != NULL) + vsnprintf(buffer, bytes + 1, format, ap); + + /* + * Return the new string... + */ + + return (buffer); +#endif /* HAVE_VASPRINTF */ +} diff --git a/lib/libmxml/mxml.h b/lib/libmxml/mxml.h new file mode 100644 index 0000000..5ad96b8 --- /dev/null +++ b/lib/libmxml/mxml.h @@ -0,0 +1,335 @@ +/* + * Header file for Mini-XML, a small XML file parsing library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Prevent multiple inclusion... + */ + +#ifndef _mxml_h_ +# define _mxml_h_ + +/* + * Include necessary headers... + */ + +# include +# include +# include +# include +# include + + +/* + * Constants... + */ + +# define MXML_MAJOR_VERSION 2 /* Major version number */ +# define MXML_MINOR_VERSION 11 /* Minor version number */ + +# define MXML_TAB 8 /* Tabs every N columns */ + +# define MXML_NO_CALLBACK 0 /* Don't use a type callback */ +# define MXML_INTEGER_CALLBACK mxml_integer_cb + /* Treat all data as integers */ +# define MXML_OPAQUE_CALLBACK mxml_opaque_cb + /* Treat all data as opaque */ +# define MXML_REAL_CALLBACK mxml_real_cb + /* Treat all data as real numbers */ +# define MXML_TEXT_CALLBACK 0 /* Treat all data as text */ +# define MXML_IGNORE_CALLBACK mxml_ignore_cb + /* Ignore all non-element content */ + +# define MXML_NO_PARENT 0 /* No parent for the node */ + +# define MXML_DESCEND 1 /* Descend when finding/walking */ +# define MXML_NO_DESCEND 0 /* Don't descend when finding/walking */ +# define MXML_DESCEND_FIRST -1 /* Descend for first find */ + +# define MXML_WS_BEFORE_OPEN 0 /* Callback for before open tag */ +# define MXML_WS_AFTER_OPEN 1 /* Callback for after open tag */ +# define MXML_WS_BEFORE_CLOSE 2 /* Callback for before close tag */ +# define MXML_WS_AFTER_CLOSE 3 /* Callback for after close tag */ + +# define MXML_ADD_BEFORE 0 /* Add node before specified node */ +# define MXML_ADD_AFTER 1 /* Add node after specified node */ +# define MXML_ADD_TO_PARENT NULL /* Add node relative to parent */ + + +/* + * Data types... + */ + +typedef enum mxml_sax_event_e /**** SAX event type. ****/ +{ + MXML_SAX_CDATA, /* CDATA node */ + MXML_SAX_COMMENT, /* Comment node */ + MXML_SAX_DATA, /* Data node */ + MXML_SAX_DIRECTIVE, /* Processing directive node */ + MXML_SAX_ELEMENT_CLOSE, /* Element closed */ + MXML_SAX_ELEMENT_OPEN /* Element opened */ +} mxml_sax_event_t; + +typedef enum mxml_type_e /**** The XML node type. ****/ +{ + MXML_IGNORE = -1, /* Ignore/throw away node @since Mini-XML 2.3@ */ + MXML_ELEMENT, /* XML element with attributes */ + MXML_INTEGER, /* Integer value */ + MXML_OPAQUE, /* Opaque string */ + MXML_REAL, /* Real value */ + MXML_TEXT, /* Text fragment */ + MXML_CUSTOM /* Custom data @since Mini-XML 2.1@ */ +} mxml_type_t; + +typedef void (*mxml_custom_destroy_cb_t)(void *); + /**** Custom data destructor ****/ + +typedef void (*mxml_error_cb_t)(const char *); + /**** Error callback function ****/ + +typedef struct mxml_attr_s /**** An XML element attribute value. @private@ ****/ +{ + char *name; /* Attribute name */ + char *value; /* Attribute value */ +} mxml_attr_t; + +typedef struct mxml_element_s /**** An XML element value. @private@ ****/ +{ + char *name; /* Name of element */ + int num_attrs; /* Number of attributes */ + mxml_attr_t *attrs; /* Attributes */ +} mxml_element_t; + +typedef struct mxml_text_s /**** An XML text value. @private@ ****/ +{ + int whitespace; /* Leading whitespace? */ + char *string; /* Fragment string */ +} mxml_text_t; + +typedef struct mxml_custom_s /**** An XML custom value. @private@ ****/ +{ + void *data; /* Pointer to (allocated) custom data */ + mxml_custom_destroy_cb_t destroy; /* Pointer to destructor function */ +} mxml_custom_t; + +typedef union mxml_value_u /**** An XML node value. @private@ ****/ +{ + mxml_element_t element; /* Element */ + int integer; /* Integer number */ + char *opaque; /* Opaque string */ + double real; /* Real number */ + mxml_text_t text; /* Text fragment */ + mxml_custom_t custom; /* Custom data @since Mini-XML 2.1@ */ +} mxml_value_t; + +struct mxml_node_s /**** An XML node. @private@ ****/ +{ + mxml_type_t type; /* Node type */ + struct mxml_node_s *next; /* Next node under same parent */ + struct mxml_node_s *prev; /* Previous node under same parent */ + struct mxml_node_s *parent; /* Parent node */ + struct mxml_node_s *child; /* First child node */ + struct mxml_node_s *last_child; /* Last child node */ + mxml_value_t value; /* Node value */ + int ref_count; /* Use count */ + void *user_data; /* User data */ +}; + +typedef struct mxml_node_s mxml_node_t; /**** An XML node. ****/ + +struct mxml_index_s /**** An XML node index. @private@ ****/ +{ + char *attr; /* Attribute used for indexing or NULL */ + int num_nodes; /* Number of nodes in index */ + int alloc_nodes; /* Allocated nodes in index */ + int cur_node; /* Current node */ + mxml_node_t **nodes; /* Node array */ +}; + +typedef struct mxml_index_s mxml_index_t; + /**** An XML node index. ****/ + +typedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *); + /**** Custom data load callback function ****/ + +typedef char *(*mxml_custom_save_cb_t)(mxml_node_t *); + /**** Custom data save callback function ****/ + +typedef int (*mxml_entity_cb_t)(const char *); + /**** Entity callback function */ + +typedef mxml_type_t (*mxml_load_cb_t)(mxml_node_t *); + /**** Load callback function ****/ + +typedef const char *(*mxml_save_cb_t)(mxml_node_t *, int); + /**** Save callback function ****/ + +typedef void (*mxml_sax_cb_t)(mxml_node_t *, mxml_sax_event_t, void *); + /**** SAX callback function ****/ + + +/* + * C++ support... + */ + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + +/* + * Prototypes... + */ + +extern void mxmlAdd(mxml_node_t *parent, int where, + mxml_node_t *child, mxml_node_t *node); +extern void mxmlDelete(mxml_node_t *node); +extern void mxmlElementDeleteAttr(mxml_node_t *node, + const char *name); +extern const char *mxmlElementGetAttr(mxml_node_t *node, const char *name); +extern const char *mxmlElementGetAttrByIndex(mxml_node_t *node, int idx, const char **name); +extern int mxmlElementGetAttrCount(mxml_node_t *node); +extern void mxmlElementSetAttr(mxml_node_t *node, const char *name, + const char *value); +extern void mxmlElementSetAttrf(mxml_node_t *node, const char *name, + const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 3, 4))) +# endif /* __GNUC__ */ +; +extern int mxmlEntityAddCallback(mxml_entity_cb_t cb); +extern const char *mxmlEntityGetName(int val); +extern int mxmlEntityGetValue(const char *name); +extern void mxmlEntityRemoveCallback(mxml_entity_cb_t cb); +extern mxml_node_t *mxmlFindElement(mxml_node_t *node, mxml_node_t *top, + const char *element, const char *attr, + const char *value, int descend); +extern mxml_node_t *mxmlFindPath(mxml_node_t *node, const char *path); +extern const char *mxmlGetCDATA(mxml_node_t *node); +extern const void *mxmlGetCustom(mxml_node_t *node); +extern const char *mxmlGetElement(mxml_node_t *node); +extern mxml_node_t *mxmlGetFirstChild(mxml_node_t *node); +extern int mxmlGetInteger(mxml_node_t *node); +extern mxml_node_t *mxmlGetLastChild(mxml_node_t *node); +extern mxml_node_t *mxmlGetNextSibling(mxml_node_t *node); +extern const char *mxmlGetOpaque(mxml_node_t *node); +extern mxml_node_t *mxmlGetParent(mxml_node_t *node); +extern mxml_node_t *mxmlGetPrevSibling(mxml_node_t *node); +extern double mxmlGetReal(mxml_node_t *node); +extern int mxmlGetRefCount(mxml_node_t *node); +extern const char *mxmlGetText(mxml_node_t *node, int *whitespace); +extern mxml_type_t mxmlGetType(mxml_node_t *node); +extern void *mxmlGetUserData(mxml_node_t *node); +extern void mxmlIndexDelete(mxml_index_t *ind); +extern mxml_node_t *mxmlIndexEnum(mxml_index_t *ind); +extern mxml_node_t *mxmlIndexFind(mxml_index_t *ind, + const char *element, + const char *value); +extern int mxmlIndexGetCount(mxml_index_t *ind); +extern mxml_index_t *mxmlIndexNew(mxml_node_t *node, const char *element, + const char *attr); +extern mxml_node_t *mxmlIndexReset(mxml_index_t *ind); +extern mxml_node_t *mxmlLoadFd(mxml_node_t *top, int fd, + mxml_type_t (*cb)(mxml_node_t *)); +extern mxml_node_t *mxmlLoadFile(mxml_node_t *top, FILE *fp, + mxml_type_t (*cb)(mxml_node_t *)); +extern mxml_node_t *mxmlLoadString(mxml_node_t *top, const char *s, + mxml_type_t (*cb)(mxml_node_t *)); +extern mxml_node_t *mxmlNewCDATA(mxml_node_t *parent, const char *string); +extern mxml_node_t *mxmlNewCustom(mxml_node_t *parent, void *data, + mxml_custom_destroy_cb_t destroy); +extern mxml_node_t *mxmlNewElement(mxml_node_t *parent, const char *name); +extern mxml_node_t *mxmlNewInteger(mxml_node_t *parent, int integer); +extern mxml_node_t *mxmlNewOpaque(mxml_node_t *parent, const char *opaque); +extern mxml_node_t *mxmlNewOpaquef(mxml_node_t *parent, const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 2, 3))) +# endif /* __GNUC__ */ +; +extern mxml_node_t *mxmlNewReal(mxml_node_t *parent, double real); +extern mxml_node_t *mxmlNewText(mxml_node_t *parent, int whitespace, const char *string); +extern mxml_node_t *mxmlNewTextf(mxml_node_t *parent, int whitespace, const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 3, 4))) +# endif /* __GNUC__ */ +; +extern mxml_node_t *mxmlNewXML(const char *version); +extern int mxmlRelease(mxml_node_t *node); +extern void mxmlRemove(mxml_node_t *node); +extern int mxmlRetain(mxml_node_t *node); +extern char *mxmlSaveAllocString(mxml_node_t *node, + mxml_save_cb_t cb); +extern int mxmlSaveFd(mxml_node_t *node, int fd, + mxml_save_cb_t cb); +extern int mxmlSaveFile(mxml_node_t *node, FILE *fp, + mxml_save_cb_t cb); +extern int mxmlSaveString(mxml_node_t *node, char *buffer, + int bufsize, mxml_save_cb_t cb); +extern mxml_node_t *mxmlSAXLoadFd(mxml_node_t *top, int fd, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); +extern mxml_node_t *mxmlSAXLoadFile(mxml_node_t *top, FILE *fp, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); +extern mxml_node_t *mxmlSAXLoadString(mxml_node_t *top, const char *s, + mxml_type_t (*cb)(mxml_node_t *), + mxml_sax_cb_t sax, void *sax_data); +extern int mxmlSetCDATA(mxml_node_t *node, const char *data); +extern int mxmlSetCustom(mxml_node_t *node, void *data, + mxml_custom_destroy_cb_t destroy); +extern void mxmlSetCustomHandlers(mxml_custom_load_cb_t load, + mxml_custom_save_cb_t save); +extern int mxmlSetElement(mxml_node_t *node, const char *name); +extern void mxmlSetErrorCallback(mxml_error_cb_t cb); +extern int mxmlSetInteger(mxml_node_t *node, int integer); +extern int mxmlSetOpaque(mxml_node_t *node, const char *opaque); +extern int mxmlSetOpaquef(mxml_node_t *node, const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 2, 3))) +# endif /* __GNUC__ */ +; +extern int mxmlSetReal(mxml_node_t *node, double real); +extern int mxmlSetText(mxml_node_t *node, int whitespace, + const char *string); +extern int mxmlSetTextf(mxml_node_t *node, int whitespace, + const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 3, 4))) +# endif /* __GNUC__ */ +; +extern int mxmlSetUserData(mxml_node_t *node, void *data); +extern void mxmlSetWrapMargin(int column); +extern mxml_node_t *mxmlWalkNext(mxml_node_t *node, mxml_node_t *top, + int descend); +extern mxml_node_t *mxmlWalkPrev(mxml_node_t *node, mxml_node_t *top, + int descend); + + +/* + * Semi-private functions... + */ + +extern void mxml_error(const char *format, ...); +extern mxml_type_t mxml_ignore_cb(mxml_node_t *node); +extern mxml_type_t mxml_integer_cb(mxml_node_t *node); +extern mxml_type_t mxml_opaque_cb(mxml_node_t *node); +extern mxml_type_t mxml_real_cb(mxml_node_t *node); + + +/* + * C++ support... + */ + +# ifdef __cplusplus +} +# endif /* __cplusplus */ +#endif /* !_mxml_h_ */ diff --git a/lib/libmxml/mxml.pc.in b/lib/libmxml/mxml.pc.in new file mode 100644 index 0000000..9d48b60 --- /dev/null +++ b/lib/libmxml/mxml.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Mini-XML +Description: Lightweight XML support library +Version: @VERSION@ +Libs: @PC_LIBS@ @PTHREAD_LIBS@ +Cflags: @PC_CFLAGS@ @PTHREAD_FLAGS@ diff --git a/lib/libmxml/mxml.spec b/lib/libmxml/mxml.spec new file mode 100644 index 0000000..f74cdcd --- /dev/null +++ b/lib/libmxml/mxml.spec @@ -0,0 +1,82 @@ +# +# RPM "spec" file for Mini-XML, a small XML file parsing library. +# +# Copyright 2003-2017 by Michael R Sweet. +# +# These coded instructions, statements, and computer programs are the +# property of Michael R Sweet and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "COPYING" +# which should have been included with this file. If this file is +# missing or damaged, see the license at: +# +# https://michaelrsweet.github.io/mxml +# + +Summary: Small XML file parsing library +Name: mxml +Version: 2.11 +Release: 1 +License: LGPL +Group: Development/Libraries +Source: https://github.com/michaelrsweet/mxml/releases/download/release-%{version}/mxml-%{version}.tar.gz +Url: https://michaelrsweet.github.io/mxml +Packager: John Doe +Vendor: Michael R Sweet + +# Use buildroot so as not to disturb the version already installed +BuildRoot: /var/tmp/%{name}-root + +%description +Mini-XML is a small XML parsing library that you can use to read XML data files +or strings in your application without requiring large non-standard libraries. +Mini-XML provides the following functionality: + +- Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and + strings. +- Data is stored in a linked-list tree structure, preserving the XML data + hierarchy. +- SAX (streamed) reading of XML files and strings to minimize memory usage. +- Supports arbitrary element names, attributes, and attribute values with no + preset limits, just available memory. +- Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes. +- Functions for creating and managing trees of data. +- "Find" and "walk" functions for easily locating and navigating trees of data. + +Mini-XML doesn't do validation or other types of processing on the data +based upon schema files or other sources of definition information. + +%prep +%setup + +%build +CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" ./configure --enable-shared --prefix=/usr + +# If we got this far, all prerequisite libraries must be here. +make + +%install +# Make sure the RPM_BUILD_ROOT directory exists. +rm -rf $RPM_BUILD_ROOT + +make BUILDROOT=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) + +%dir /usr/bin +/usr/bin/* +%dir /usr/include +/usr/include/mxml.h +%dir /usr/lib +/usr/lib/* +%dir /usr/lib/pkgconfig +/usr/lib/pkgconfig/mxml.pc +%dir /usr/share/doc/mxml +/usr/share/doc/mxml/* +%dir /usr/share/man/man1 +/usr/share/man/man1/* +%dir /usr/share/man/man3 +/usr/share/man/man3/* diff --git a/lib/libmxml/mxmldoc.c b/lib/libmxml/mxmldoc.c new file mode 100644 index 0000000..de5c8a7 --- /dev/null +++ b/lib/libmxml/mxmldoc.c @@ -0,0 +1,6928 @@ +/*#define DEBUG 1*/ +/* + * Documentation generator using Mini-XML, a small XML file parsing + * library. + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" +#include "mmd.h" +#include +#include +#ifndef WIN32 +# include +# include +#endif /* !WIN32 */ +#ifdef __APPLE__ +# include +# include +extern char **environ; +#endif /* __APPLE__ */ + +#ifdef HAVE_ZLIB_H +# include "zipc.h" +#endif /* HAVE_ZLIB_H */ + + +/* + * This program scans source and header files and produces public API + * documentation for code that conforms to the CUPS Configuration + * Management Plan (CMP) coding standards. Please see the following web + * page for details: + * + * https://www.cups.org/doc/spec-cmp.html + * + * Using Mini-XML, this program creates and maintains an XML representation + * of the public API code documentation which can then be converted to HTML, + * man pages, or EPUB as desired. The following is a poor-man's schema: + * + * + * + * + * [optional...] + * + * descriptive text + * + * + * + * descriptive text + * ... + * + * + * + * descriptive text + * type string + * + * + * + * descriptive text + * + * descriptive text + * type string + * + * + * descriptive text + * type string + * + * function names separated by spaces + * + * + * + * descriptive text + * type string + * + * + * + * descriptive text + * ... + * ... + * + * + * + * descriptive text + * ... + * + * + * + * descriptive text + * ... + * ... + * ... + * ... + * ... + * + * + * + */ + + +/* + * Basic states for file parser... + */ + +#define STATE_NONE 0 /* No state - whitespace, etc. */ +#define STATE_PREPROCESSOR 1 /* Preprocessor directive */ +#define STATE_C_COMMENT 2 /* Inside a C comment */ +#define STATE_CXX_COMMENT 3 /* Inside a C++ comment */ +#define STATE_STRING 4 /* Inside a string constant */ +#define STATE_CHARACTER 5 /* Inside a character constant */ +#define STATE_IDENTIFIER 6 /* Inside a keyword/identifier */ + + +/* + * Output modes... + */ + +#define OUTPUT_NONE 0 /* No output */ +#define OUTPUT_HTML 1 /* Output HTML */ +#define OUTPUT_XML 2 /* Output XML */ +#define OUTPUT_MAN 3 /* Output nroff/man */ +#define OUTPUT_TOKENS 4 /* Output docset Tokens.xml file */ +#define OUTPUT_EPUB 5 /* Output EPUB (XHTML) */ +#define OUTPUT_DOCSET 6 /* Output Xcode documentation set (HTML) */ + + +/* + * Local types... + */ + +typedef struct +{ + char level, /* Table of contents level (0-N) */ + anchor[64], /* Anchor in file */ + title[447]; /* Title of section */ +} toc_entry_t; + +typedef struct +{ + size_t alloc_entries, /* Allocated entries */ + num_entries; /* Number of entries */ + toc_entry_t *entries; /* Entries */ +} toc_t; + + +/* + * Local functions... + */ + +static void add_toc(toc_t *toc, int level, const char *anchor, const char *title); +static mxml_node_t *add_variable(mxml_node_t *parent, const char *name, mxml_node_t *type); +static toc_t *build_toc(mxml_node_t *doc, const char *bodyfile, mmd_t *body, int mode); +static mxml_node_t *find_public(mxml_node_t *node, mxml_node_t *top, const char *element, const char *name, int mode); +static void free_toc(toc_t *toc); +static char *get_comment_info(mxml_node_t *description); +static char *get_iso_date(time_t t); +static char *get_text(mxml_node_t *node, char *buffer, int buflen); +static int is_markdown(const char *filename); +static mxml_type_t load_cb(mxml_node_t *node); +static const char *markdown_anchor(const char *text); +static void markdown_write_block(FILE *out, mmd_t *parent, int mode); +static void markdown_write_leaf(FILE *out, mmd_t *node, int mode); +static mxml_node_t *new_documentation(mxml_node_t **mxmldoc); +#ifdef __APPLE__ +static int remove_directory(const char *path); +#endif /* __APPLE__ */ +static void safe_strcpy(char *dst, const char *src); +static int scan_file(const char *filename, FILE *fp, mxml_node_t *doc); +static void sort_node(mxml_node_t *tree, mxml_node_t *func); +static void update_comment(mxml_node_t *parent, mxml_node_t *comment); +static void usage(const char *option); +static void write_description(FILE *out, int mode, mxml_node_t *description, const char *element, int summary); +#ifdef __APPLE__ +static void write_docset(const char *docset, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *feedname, const char *feedurl, const char *cssfile, const char *headerfile, const char *bodyfile, mmd_t *body, mxml_node_t *doc, const char *footerfile); +#endif /* __APPLE__ */ +static void write_element(FILE *out, mxml_node_t *doc, mxml_node_t *element, int mode); +#ifdef HAVE_ZLIB_H +static void write_epub(const char *epubfile, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *cssfile, const char *coverimage, const char *headerfile, const char *bodyfile, mmd_t *body, mxml_node_t *doc, const char *footerfile); +#endif /* HAVE_ZLIB_H */ +static void write_file(FILE *out, const char *file, int mode); +static void write_function(FILE *out, int mode, mxml_node_t *doc, mxml_node_t *function, int level); +static void write_html(const char *framefile, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *cssfile, const char *coverimage, const char *headerfile, const char *bodyfile, mmd_t *body, mxml_node_t *doc, const char *footerfile); +static void write_html_body(FILE *out, int mode, const char *bodyfile, mmd_t *body, mxml_node_t *doc); +static void write_html_head(FILE *out, int mode, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *cssfile); +static void write_html_toc(FILE *out, const char *title, toc_t *toc, const char *filename, const char *target); +static void write_man(const char *man_name, const char *section, const char *title, const char *author, const char *copyright, const char *headerfile, const char *bodyfile, mmd_t *body, mxml_node_t *doc, const char *footerfile); +static void write_scu(FILE *out, int mode, mxml_node_t *doc, mxml_node_t *scut); +static void write_string(FILE *out, const char *s, int mode); +static void write_tokens(FILE *out, mxml_node_t *doc, const char *path); +static const char *ws_cb(mxml_node_t *node, int where); + + +/* + * 'main()' - Main entry for test program. + */ + +int /* O - Exit status */ +main(int argc, /* I - Number of command-line args */ + char *argv[]) /* I - Command-line args */ +{ + int i; /* Looping var */ + int len; /* Length of argument */ + FILE *fp; /* File to read */ + mxml_node_t *doc = NULL; /* XML documentation tree */ + mxml_node_t *mxmldoc = NULL; /* mxmldoc node */ + const char *author = NULL, /* Author */ + *copyright = NULL, /* Copyright */ + *cssfile = NULL, /* CSS stylesheet file */ + *docset = NULL, /* Documentation set directory */ + *docversion = NULL, /* Documentation set version */ + *epubfile = NULL, /* EPUB filename */ + *feedname = NULL, /* Feed name for documentation set */ + *feedurl = NULL, /* Feed URL for documentation set */ + *footerfile = NULL, /* Footer file */ + *framefile = NULL, /* Framed HTML basename */ + *headerfile = NULL, /* Header file */ + *bodyfile = NULL, /* Body file */ + *coverimage = NULL, /* Cover image file */ + *name = NULL, /* Name of manpage */ + *path = NULL, /* Path to help file for tokens */ + *section = NULL, /* Section/keywords of documentation */ + *title = NULL, /* Title of documentation */ + *xmlfile = NULL; /* XML file */ + mmd_t *body; /* Body markdown file, if any */ + int mode = OUTPUT_HTML, /* Output mode */ + update = 0; /* Updated XML file */ + + + /* + * Check arguments... + */ + + for (i = 1; i < argc; i ++) + if (!strcmp(argv[i], "--help")) + { + /* + * Show help... + */ + + usage(NULL); + } + else if (!strcmp(argv[i], "--version")) + { + /* + * Show version... + */ + + puts(MXML_VERSION + 10); + return (0); + } + else if (!strcmp(argv[i], "--author") && !author) + { + /* + * Set author... + */ + + i ++; + if (i < argc) + author = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--copyright") && !copyright) + { + /* + * Set copyright... + */ + + i ++; + if (i < argc) + copyright = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--coverimage") && !coverimage) + { + /* + * Set cover image file... + */ + + i ++; + if (i < argc) + coverimage = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--css") && !cssfile) + { + /* + * Set CSS stylesheet file... + */ + + i ++; + if (i < argc) + cssfile = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--docset") && !docset) + { + /* + * Set documentation set directory... + */ + + mode = OUTPUT_DOCSET; + + i ++; + if (i < argc) + docset = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--docversion") && !docversion) + { + /* + * Set documentation set directory... + */ + + i ++; + if (i < argc) + docversion = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--epub") && !epubfile) + { + /* + * Set EPUB filename... + */ + + mode = OUTPUT_EPUB; + + i ++; + if (i < argc) + epubfile = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--footer") && !footerfile) + { + /* + * Set footer file... + */ + + i ++; + if (i < argc) + footerfile = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--feedname") && !feedname) + { + /* + * Set documentation set feed name... + */ + + i ++; + if (i < argc) + feedname = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--feedurl") && !feedurl) + { + /* + * Set documentation set feed name... + */ + + i ++; + if (i < argc) + feedurl = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--framed") && !framefile) + { + /* + * Set base filename for framed HTML output... + */ + + i ++; + if (i < argc) + framefile = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--header") && !headerfile) + { + /* + * Set header file... + */ + + i ++; + if (i < argc) + headerfile = argv[i]; + else + usage(NULL); + } + else if ((!strcmp(argv[i], "--body") || !strcmp(argv[i], "--intro")) && !bodyfile) + { + /* + * Set body file... + */ + + i ++; + if (i < argc) + bodyfile = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--man") && !name) + { + /* + * Output manpage... + */ + + i ++; + if (i < argc) + { + mode = OUTPUT_MAN; + name = argv[i]; + } + else + usage(NULL); + } + else if (!strcmp(argv[i], "--no-output")) + mode = OUTPUT_NONE; + else if (!strcmp(argv[i], "--section") && !section) + { + /* + * Set section/keywords... + */ + + i ++; + if (i < argc) + section = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--title") && !title) + { + /* + * Set title... + */ + + i ++; + if (i < argc) + title = argv[i]; + else + usage(NULL); + } + else if (!strcmp(argv[i], "--tokens")) + { + /* + * Output Tokens.xml file... + */ + + mode = OUTPUT_TOKENS; + + i ++; + if (i < argc) + path = argv[i]; + else + usage(NULL); + } + else if (argv[i][0] == '-') + { + /* + * Unknown/bad option... + */ + + usage(argv[i]); + } + else + { + /* + * Process XML or source file... + */ + + len = (int)strlen(argv[i]); + if (len > 4 && !strcmp(argv[i] + len - 4, ".xml")) + { + /* + * Set XML file... + */ + + if (xmlfile) + usage(NULL); + + xmlfile = argv[i]; + + if (!doc) + { + if ((fp = fopen(argv[i], "r")) != NULL) + { + /* + * Read the existing XML file... + */ + + doc = mxmlLoadFile(NULL, fp, load_cb); + + fclose(fp); + + if (!doc) + { + mxmldoc = NULL; + + fprintf(stderr, + "mxmldoc: Unable to read the XML documentation file " + "\"%s\"!\n", argv[i]); + } + else if ((mxmldoc = mxmlFindElement(doc, doc, "mxmldoc", NULL, + NULL, MXML_DESCEND)) == NULL) + { + fprintf(stderr, + "mxmldoc: XML documentation file \"%s\" is missing " + " node!!\n", argv[i]); + + mxmlDelete(doc); + doc = NULL; + } + } + else + { + doc = NULL; + mxmldoc = NULL; + } + + if (!doc) + doc = new_documentation(&mxmldoc); + } + } + else + { + /* + * Load source file... + */ + + update = 1; + + if (!doc) + doc = new_documentation(&mxmldoc); + + if ((fp = fopen(argv[i], "r")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to open source file \"%s\": %s\n", + argv[i], strerror(errno)); + mxmlDelete(doc); + return (1); + } + else if (scan_file(argv[i], fp, mxmldoc)) + { + fclose(fp); + mxmlDelete(doc); + return (1); + } + else + fclose(fp); + } + } + + if (update && xmlfile) + { + /* + * Save the updated XML documentation file... + */ + + if ((fp = fopen(xmlfile, "w")) != NULL) + { + /* + * Write over the existing XML file... + */ + + mxmlSetWrapMargin(0); + + if (mxmlSaveFile(doc, fp, ws_cb)) + { + fprintf(stderr, + "mxmldoc: Unable to write the XML documentation file \"%s\": " + "%s!\n", xmlfile, strerror(errno)); + fclose(fp); + mxmlDelete(doc); + return (1); + } + + fclose(fp); + } + else + { + fprintf(stderr, + "mxmldoc: Unable to create the XML documentation file \"%s\": " + "%s!\n", xmlfile, strerror(errno)); + mxmlDelete(doc); + return (1); + } + } + + /* + * Load the body file and collect the default metadata values, if present. + */ + + if (is_markdown(bodyfile)) + body = mmdLoad(bodyfile); + else + body = NULL; + + if (!title) + title = mmdGetMetadata(body, "title"); + if (!title) + title = "Documentation"; + + if (!author) + author = mmdGetMetadata(body, "author"); + if (!author) + author = "Unknown"; + + if (!copyright) + copyright = mmdGetMetadata(body, "copyright"); + if (!copyright) + copyright = "Unknown"; + + if (!docversion) + docversion = mmdGetMetadata(body, "version"); + if (!docversion) + docversion = "0.0"; + + /* + * Write output... + */ + + switch (mode) + { + case OUTPUT_DOCSET : + /* + * Write Xcode documentation set... + */ + +#ifdef __APPLE__ + write_docset(docset, section, title, author, copyright, docversion, feedname, feedurl, cssfile, headerfile, bodyfile, body, mxmldoc, footerfile); +#else + fputs("mxmldoc: Sorry, Xcode documentation sets can only be created on macOS.\n", stderr); +#endif /* __APPLE__ */ + break; + + case OUTPUT_EPUB : + /* + * Write EPUB (XHTML) documentation... + */ + +#ifdef HAVE_ZLIB_H + write_epub(epubfile, section, title, author, copyright, docversion, cssfile, coverimage, headerfile, bodyfile, body, mxmldoc, footerfile); +#else + fputs("mxmldoc: Sorry, not compiled with EPUB support.\n", stderr); +#endif /* HAVE_ZLIB_H */ + break; + + case OUTPUT_HTML : + /* + * Write HTML documentation... + */ + + write_html(framefile, section, title, author, copyright, docversion, cssfile, coverimage, headerfile, bodyfile, body, mxmldoc, footerfile); + break; + + case OUTPUT_MAN : + /* + * Write manpage documentation... + */ + + write_man(name, section, title, author, copyright, headerfile, bodyfile, body, mxmldoc, footerfile); + break; + + case OUTPUT_TOKENS : + fputs("\n" + "\n", stdout); + + write_tokens(stdout, mxmldoc, path); + + fputs("\n", stdout); + break; + } + + if (body) + mmdFree(body); + + /* + * Delete the tree and return... + */ + + mxmlDelete(doc); + + return (0); +} + + +/* + * 'add_toc()' - Add a TOC entry. + */ + +static void +add_toc(toc_t *toc, /* I - Table-of-contents */ + int level, /* I - Level (1-N) */ + const char *anchor, /* I - Anchor */ + const char *title) /* I - Title */ +{ + toc_entry_t *temp; /* New pointer */ + + + if (toc->num_entries >= toc->alloc_entries) + { + toc->alloc_entries += 100; + if (!toc->entries) + temp = malloc(sizeof(toc_entry_t) * toc->alloc_entries); + else + temp = realloc(toc->entries, sizeof(toc_entry_t) * toc->alloc_entries); + + if (!temp) + return; + + toc->entries = temp; + } + + temp = toc->entries + toc->num_entries; + toc->num_entries ++; + + temp->level = level; + strlcpy(temp->anchor, anchor, sizeof(temp->anchor)); + strlcpy(temp->title, title, sizeof(temp->title)); +} + + +/* + * 'add_variable()' - Add a variable or argument. + */ + +static mxml_node_t * /* O - New variable/argument */ +add_variable(mxml_node_t *parent, /* I - Parent node */ + const char *name, /* I - "argument" or "variable" */ + mxml_node_t *type) /* I - Type nodes */ +{ + mxml_node_t *variable, /* New variable */ + *node, /* Current node */ + *next; /* Next node */ + char buffer[16384], /* String buffer */ + *bufptr; /* Pointer into buffer */ + + +#ifdef DEBUG + fprintf(stderr, "add_variable(parent=%p, name=\"%s\", type=%p)\n", + parent, name, type); +#endif /* DEBUG */ + + /* + * Range check input... + */ + + if (!type || !type->child) + return (NULL); + + /* + * Create the variable/argument node... + */ + + variable = mxmlNewElement(parent, name); + + /* + * Check for a default value... + */ + + for (node = type->child; node; node = node->next) + if (!strcmp(node->value.text.string, "=")) + break; + + if (node) + { + /* + * Default value found, copy it and add as a "default" attribute... + */ + + for (bufptr = buffer; node; bufptr += strlen(bufptr)) + { + if (node->value.text.whitespace && bufptr > buffer) + *bufptr++ = ' '; + + strlcpy(bufptr, node->value.text.string, sizeof(buffer) - (size_t)(bufptr - buffer)); + + next = node->next; + mxmlDelete(node); + node = next; + } + + mxmlElementSetAttr(variable, "default", buffer); + } + + /* + * Extract the argument/variable name... + */ + + if (type->last_child->value.text.string[0] == ')') + { + /* + * Handle "type (*name)(args)"... + */ + + for (node = type->child; node; node = node->next) + if (node->value.text.string[0] == '(') + break; + + for (bufptr = buffer; node; bufptr += strlen(bufptr)) + { + if (node->value.text.whitespace && bufptr > buffer) + *bufptr++ = ' '; + + strlcpy(bufptr, node->value.text.string, sizeof(buffer) - (size_t)(bufptr - buffer)); + + next = node->next; + mxmlDelete(node); + node = next; + } + } + else + { + /* + * Handle "type name"... + */ + + strlcpy(buffer, type->last_child->value.text.string, sizeof(buffer)); + mxmlDelete(type->last_child); + } + + /* + * Set the name... + */ + + mxmlElementSetAttr(variable, "name", buffer); + + /* + * Add the remaining type information to the variable node... + */ + + mxmlAdd(variable, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, type); + + /* + * Add new new variable node... + */ + + return (variable); +} + + +/* + * 'build_toc()' - Build a table-of-contents... + */ + +static toc_t * /* O - Table of contents */ +build_toc(mxml_node_t *doc, /* I - Documentation */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + int mode) /* I - Output mode */ +{ + toc_t *toc; /* Array of headings */ + FILE *fp; /* Body file */ + mxml_node_t *function, /* Current function */ + *scut, /* Struct/class/union/typedef */ + *arg; /* Current argument */ + const char *name; /* Name of function/type */ + + + /* + * Make a new table-of-contents... + */ + + if ((toc = calloc(1, sizeof(toc_t))) == NULL) + return (NULL); + + /* + * Scan the body file for headings... + */ + + if (body) + { + mmd_t *node, /* Current node */ + *tnode, /* Title node */ + *next; /* Next node */ + mmd_type_t type; /* Node type */ + char title[1024], /* Heading title */ + *ptr; /* Pointer into title */ + + for (node = mmdGetFirstChild(body); node; node = next) + { + type = mmdGetType(node); + + if (type == MMD_TYPE_HEADING_1 || type == MMD_TYPE_HEADING_2) + { + title[sizeof(title) - 1] = '\0'; + + for (tnode = mmdGetFirstChild(node), ptr = title; tnode; tnode = mmdGetNextSibling(tnode)) + { + if (mmdGetWhitespace(tnode) && ptr < (title + sizeof(title) - 1)) + *ptr++ = ' '; + + strncpy(ptr, mmdGetText(tnode), sizeof(title) - (ptr - title) - 1); + ptr += strlen(ptr); + } + + add_toc(toc, type - MMD_TYPE_HEADING_1 + 1, markdown_anchor(title), title); + } + + if ((next = mmdGetNextSibling(node)) == NULL) + { + next = mmdGetParent(node); + + while (next && mmdGetNextSibling(next) == NULL) + next = mmdGetParent(next); + + next = mmdGetNextSibling(next); + } + } + } + else if (bodyfile && (fp = fopen(bodyfile, "r")) != NULL) + { + char line[8192], /* Line from file */ + *ptr, /* Pointer in line */ + *end, /* End of line */ + *anchor, /* Anchor name */ + *title, /* Title */ + quote; /* Quote character for value */ + int level; /* New heading level */ + + + while (fgets(line, sizeof(line), fp)) + { + /* + * See if this line has a heading... + */ + + if ((ptr = strstr(line, "")) != NULL) + *ptr = '\0'; + else if ((ptr = strstr(title, "")) != NULL) + *ptr = '\0'; + + add_toc(toc, level, anchor, title); + } + + fclose(fp); + } + + /* + * Next the classes... + */ + + if ((scut = find_public(doc, doc, "class", NULL, mode)) != NULL) + { + add_toc(toc, 1, "CLASSES", "Classes"); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + scut = find_public(scut, doc, "class", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Functions... + */ + + if ((function = find_public(doc, doc, "function", NULL, mode)) != NULL) + { + add_toc(toc, 1, "FUNCTIONS", "Functions"); + + while (function) + { + name = mxmlElementGetAttr(function, "name"); + function = find_public(function, doc, "function", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Data types... + */ + + if ((scut = find_public(doc, doc, "typedef", NULL, mode)) != NULL) + { + add_toc(toc, 1, "TYPES", "Data Types"); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + scut = find_public(scut, doc, "typedef", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Structures... + */ + + if ((scut = find_public(doc, doc, "struct", NULL, mode)) != NULL) + { + add_toc(toc, 1, "STRUCTURES", "Structures"); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + scut = find_public(scut, doc, "struct", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Unions... + */ + + if ((scut = find_public(doc, doc, "union", NULL, mode)) != NULL) + { + add_toc(toc, 1, "UNIONS", "Unions"); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + scut = find_public(scut, doc, "union", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Globals variables... + */ + + if ((arg = find_public(doc, doc, "variable", NULL, mode)) != NULL) + { + add_toc(toc, 1, "VARIABLES", "Variables"); + + while (arg) + { + name = mxmlElementGetAttr(arg, "name"); + arg = find_public(arg, doc, "variable", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + /* + * Enumerations/constants... + */ + + if ((scut = find_public(doc, doc, "enumeration", NULL, mode)) != NULL) + { + add_toc(toc, 1, "ENUMERATIONS", "Enumerations"); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + scut = find_public(scut, doc, "enumeration", NULL, mode); + add_toc(toc, 2, name, name); + } + } + + return (toc); +} + + +/* + * 'epub_ws_cb()' - Whitespace callback for EPUB. + */ + +static const char * /* O - Whitespace string or NULL for none */ +epub_ws_cb(mxml_node_t *node, /* I - Element node */ + int where) /* I - Where value */ +{ + int depth; /* Depth of node */ + static const char *spaces = " "; + /* Whitespace (40 spaces) for indent */ + + + switch (where) + { + case MXML_WS_BEFORE_CLOSE : + if (node->child && node->child->type != MXML_ELEMENT) + return (NULL); + + for (depth = -4; node; node = node->parent, depth += 2); + if (depth > 40) + return (spaces); + else if (depth < 2) + return (NULL); + else + return (spaces + 40 - depth); + + case MXML_WS_AFTER_CLOSE : + return ("\n"); + + case MXML_WS_BEFORE_OPEN : + for (depth = -4; node; node = node->parent, depth += 2); + if (depth > 40) + return (spaces); + else if (depth < 2) + return (NULL); + else + return (spaces + 40 - depth); + + default : + case MXML_WS_AFTER_OPEN : + if (node->child && node->child->type != MXML_ELEMENT) + return (NULL); + + return ("\n"); + } +} + + +/* + * 'find_public()' - Find a public function, type, etc. + */ + +static mxml_node_t * /* I - Found node or NULL */ +find_public(mxml_node_t *node, /* I - Current node */ + mxml_node_t *top, /* I - Top node */ + const char *element, /* I - Element */ + const char *name, /* I - Name */ + int mode) /* I - Output mode */ +{ + mxml_node_t *description, /* Description node */ + *comment; /* Comment node */ + + + for (node = mxmlFindElement(node, top, element, name ? "name" : NULL, name, node == top ? MXML_DESCEND_FIRST : MXML_NO_DESCEND); + node; + node = mxmlFindElement(node, top, element, name ? "name" : NULL, name, MXML_NO_DESCEND)) + { + /* + * Get the description for this node... + */ + + description = mxmlFindElement(node, node, "description", NULL, NULL, + MXML_DESCEND_FIRST); + + /* + * A missing or empty description signals a private node... + */ + + if (!description) + continue; + + /* + * Look for @private@ or @exclude format@ in the comment text... + */ + + for (comment = description->child; comment; comment = comment->next) + { + const char *s = comment->type == MXML_TEXT ? comment->value.text.string : comment->value.opaque; + const char *exclude; + + /* + * Skip anything marked private... + */ + + if (strstr(s, "@private@")) + break; + + /* + * Skip items excluded for certain formats... + */ + + if ((exclude = strstr(s, "@exclude ")) != NULL) + { + exclude += 9; + + if (!strncmp(exclude, "all@", 4)) + { + break; + } + else + { + while (*exclude != '@') + { + if (!strncmp(exclude, "docset", 6)) + { + if (mode == OUTPUT_DOCSET) + break; + exclude += 6; + } + else if (!strncmp(exclude, "epub", 4)) + { + if (mode == OUTPUT_EPUB) + break; + exclude += 4; + } + else if (!strncmp(exclude, "html", 4)) + { + if (mode == OUTPUT_HTML) + break; + exclude += 4; + } + else if (!strncmp(exclude, "man", 3)) + { + if (mode == OUTPUT_MAN) + break; + exclude += 3; + } + else if (!strncmp(exclude, "tokens", 6)) + { + if (mode == OUTPUT_TOKENS) + break; + exclude += 6; + } + else if (!strncmp(exclude, "xml", 3)) + { + if (mode == OUTPUT_XML) + break; + exclude += 3; + } + else + break; + + if (*exclude == ',') + exclude ++; + else if (*exclude != '@') + break; + } + + if (*exclude != '@') + break; + } + } + } + + if (!comment) + { + /* + * No @private@, so return this node... + */ + + return (node); + } + } + + /* + * If we get here, there are no (more) public nodes... + */ + + return (NULL); +} + + +/* + * 'free_toc()' - Free a table-of-contents. + */ + +static void +free_toc(toc_t *toc) /* I - Table of contents */ +{ + free(toc->entries); + free(toc); +} + + +/* + * 'get_comment_info()' - Get info from comment. + */ + +static char * /* O - Info from comment */ +get_comment_info( + mxml_node_t *description) /* I - Description node */ +{ + char text[10240], /* Description text */ + since[255], /* @since value */ + *ptr; /* Pointer into text */ + static char info[1024]; /* Info string */ + + + if (!description) + return (""); + + get_text(description, text, sizeof(text)); + + for (ptr = strchr(text, '@'); ptr; ptr = strchr(ptr + 1, '@')) + { + if (!strncmp(ptr, "@deprecated@", 12)) + return (" DEPRECATED "); + else if (!strncmp(ptr, "@since ", 7)) + { + strlcpy(since, ptr + 7, sizeof(since)); + + if ((ptr = strchr(since, '@')) != NULL) + *ptr = '\0'; + + snprintf(info, sizeof(info), " %s ", since); + return (info); + } + } + + return (""); +} + + +/* + * 'get_iso_date()' - Get an ISO-formatted date/time string. + */ + +static char * /* O - ISO date/time string */ +get_iso_date(time_t t) /* I - Time value */ +{ + struct tm *date; /* UTC date/time */ + static char buffer[100]; /* String buffer */ + + + date = gmtime(&t); + + snprintf(buffer, sizeof(buffer), "%04d-%02d-%02dT%02d:%02d:%02dZ", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday, date->tm_hour, date->tm_min, date->tm_sec); + return (buffer); +} + + +/* + * 'get_text()' - Get the text for a node. + */ + +static char * /* O - Text in node */ +get_text(mxml_node_t *node, /* I - Node to get */ + char *buffer, /* I - Buffer */ + int buflen) /* I - Size of buffer */ +{ + char *ptr, /* Pointer into buffer */ + *end; /* End of buffer */ + int len; /* Length of node */ + mxml_node_t *current; /* Current node */ + + + ptr = buffer; + end = buffer + buflen - 1; + + for (current = node->child; current && ptr < end; current = current->next) + { + if (current->type == MXML_TEXT) + { + if (current->value.text.whitespace) + *ptr++ = ' '; + + len = (int)strlen(current->value.text.string); + if (len > (int)(end - ptr)) + len = (int)(end - ptr); + + memcpy(ptr, current->value.text.string, len); + ptr += len; + } + else if (current->type == MXML_OPAQUE) + { + len = (int)strlen(current->value.opaque); + if (len > (int)(end - ptr)) + len = (int)(end - ptr); + + memcpy(ptr, current->value.opaque, len); + ptr += len; + } + } + + *ptr = '\0'; + + return (buffer); +} + + +/* + * 'is_markdown()' - Determine whether a file is markdown text. + */ + +static int /* O - 1 if markdown, 0 otherwise */ +is_markdown(const char *filename) /* I - File to check */ +{ + const char *ext = filename ? strstr(filename, ".md") : NULL; + /* Pointer to extension */ + + return (ext && !ext[3]); +} + + +/* + * 'load_cb()' - Set the type of child nodes. + */ + +static mxml_type_t /* O - Node type */ +load_cb(mxml_node_t *node) /* I - Node */ +{ + if (!strcmp(node->value.element.name, "description")) + return (MXML_OPAQUE); + else + return (MXML_TEXT); +} + + +/* + * 'markdown_anchor()' - Return the HTML anchor for a given title. + */ + +static const char * /* O - HTML anchor */ +markdown_anchor(const char *text) /* I - Title text */ +{ + char *bufptr; /* Pointer into buffer */ + static char buffer[1024]; /* Buffer for anchor string */ + + + for (bufptr = buffer; *text && bufptr < (buffer + sizeof(buffer) - 1); text ++) + { + if ((*text >= '0' && *text <= '9') || (*text >= 'a' && *text <= 'z') || (*text >= 'A' && *text <= 'Z') || *text == '.' || *text == '-') + *bufptr++ = (char)tolower(*text); + else if (*text == ' ') + *bufptr++ = '-'; + } + + *bufptr = '\0'; + + return (buffer); +} + + +/* + * 'markdown_write_block()' - Write a markdown block. + */ + +static void +markdown_write_block(FILE *out, /* I - Output file */ + mmd_t *parent, /* I - Parent node */ + int mode) /* I - Output mode */ +{ + mmd_t *node; /* Current child node */ + mmd_type_t type; /* Node type */ + + + type = mmdGetType(parent); + + if (mode == OUTPUT_MAN) + { + switch (type) + { + case MMD_TYPE_BLOCK_QUOTE : + break; + + case MMD_TYPE_ORDERED_LIST : + break; + + case MMD_TYPE_UNORDERED_LIST : + break; + + case MMD_TYPE_LIST_ITEM : + fputs(".IP \\(bu 5\n", out); + break; + + case MMD_TYPE_HEADING_1 : + fputs(".SH ", out); + break; + + case MMD_TYPE_HEADING_2 : + fputs(".SS ", out); + break; + + case MMD_TYPE_HEADING_3 : + case MMD_TYPE_HEADING_4 : + case MMD_TYPE_HEADING_5 : + case MMD_TYPE_HEADING_6 : + case MMD_TYPE_PARAGRAPH : + fputs(".PP\n", out); + break; + + case MMD_TYPE_CODE_BLOCK : + fputs(".nf\n\n", out); + for (node = mmdGetFirstChild(parent); node; node = mmdGetNextSibling(node)) + { + fputs(" ", out); + write_string(out, mmdGetText(node), mode); + } + fputs(".fi\n", out); + return; + + case MMD_TYPE_METADATA : + return; + + default : + break; + } + + for (node = mmdGetFirstChild(parent); node; node = mmdGetNextSibling(node)) + { + if (mmdIsBlock(node)) + markdown_write_block(out, node, mode); + else + markdown_write_leaf(out, node, mode); + } + + fputs("\n", out); + } + else + { + const char *element; /* Enclosing element, if any */ + + switch (type) + { + case MMD_TYPE_BLOCK_QUOTE : + element = "blockquote"; + break; + + case MMD_TYPE_ORDERED_LIST : + element = "ol"; + break; + + case MMD_TYPE_UNORDERED_LIST : + element = "ul"; + break; + + case MMD_TYPE_LIST_ITEM : + element = "li"; + break; + + case MMD_TYPE_HEADING_1 : + element = "h2"; /* Offset since title is H1 for mxmldoc output */ + break; + + case MMD_TYPE_HEADING_2 : + element = "h3"; /* Offset since title is H1 for mxmldoc output */ + break; + + case MMD_TYPE_HEADING_3 : + element = "h4"; /* Offset since title is H1 for mxmldoc output */ + break; + + case MMD_TYPE_HEADING_4 : + element = "h5"; /* Offset since title is H1 for mxmldoc output */ + break; + + case MMD_TYPE_HEADING_5 : + element = "h6"; /* Offset since title is H1 for mxmldoc output */ + break; + + case MMD_TYPE_HEADING_6 : + element = "h6"; + break; + + case MMD_TYPE_PARAGRAPH : + element = "p"; + break; + + case MMD_TYPE_CODE_BLOCK : + fputs("
      ", out);
      +          for (node = mmdGetFirstChild(parent); node; node = mmdGetNextSibling(node))
      +            write_string(out, mmdGetText(node), mode);
      +          fputs("
      \n", out); + return; + + case MMD_TYPE_THEMATIC_BREAK : + if (mode == OUTPUT_EPUB) + fputs("
      \n", out); + else + fputs("
      \n", out); + return; + + default : + element = NULL; + break; + } + + if (type >= MMD_TYPE_HEADING_1 && type <= MMD_TYPE_HEADING_6) + { + /* + * Add an anchor... + */ + + fprintf(out, " <%s>", out); + } + else if (element) + fprintf(out, " <%s>%s", element, type <= MMD_TYPE_UNORDERED_LIST ? "\n" : ""); + + for (node = mmdGetFirstChild(parent); node; node = mmdGetNextSibling(node)) + { + if (mmdIsBlock(node)) + markdown_write_block(out, node, mode); + else + markdown_write_leaf(out, node, mode); + } + + if (type >= MMD_TYPE_HEADING_1 && type <= MMD_TYPE_HEADING_6) + fprintf(out, "\n", element); + else if (element) + fprintf(out, "\n", element); + } +} + + +/* + * 'markdown_write_leaf()' - Write an leaf markdown node. + */ + +static void +markdown_write_leaf(FILE *out, /* I - Output file */ + mmd_t *node, /* I - Node to write */ + int mode) /* I - Output mode */ +{ + const char *text, /* Text to write */ + *url; /* URL to write */ + + + text = mmdGetText(node); + url = mmdGetURL(node); + + if (mode == OUTPUT_MAN) + { + const char *suffix = NULL; /* Trailing string */ + + switch (mmdGetType(node)) + { + case MMD_TYPE_EMPHASIZED_TEXT : + if (mmdGetWhitespace(node)) + fputc('\n', out); + + fputs(".I ", out); + suffix = "\n"; + break; + + case MMD_TYPE_STRONG_TEXT : + if (mmdGetWhitespace(node)) + fputc('\n', out); + + fputs(".B ", out); + suffix = "\n"; + break; + + case MMD_TYPE_HARD_BREAK : + if (mmdGetWhitespace(node)) + fputc('\n', out); + + fputs(".PP\n", out); + return; + + case MMD_TYPE_SOFT_BREAK : + case MMD_TYPE_METADATA_TEXT : + return; + + default : + if (mmdGetWhitespace(node)) + fputc(' ', out); + break; + } + + write_string(out, text, mode); + + if (suffix) + fputs(suffix, out); + } + else + { + const char *element; /* Encoding element, if any */ + + if (mmdGetWhitespace(node)) + fputc(' ', out); + + switch (mmdGetType(node)) + { + case MMD_TYPE_EMPHASIZED_TEXT : + element = "em"; + break; + + case MMD_TYPE_STRONG_TEXT : + element = "strong"; + break; + + case MMD_TYPE_STRUCK_TEXT : + element = "del"; + break; + + case MMD_TYPE_LINKED_TEXT : + element = NULL; + break; + + case MMD_TYPE_CODE_TEXT : + element = "code"; + break; + + case MMD_TYPE_IMAGE : + fputs("\"",", out); + else + fputs("\">", out); + return; + + case MMD_TYPE_HARD_BREAK : + if (mode == OUTPUT_EPUB) + fputs("
      \n", out); + else + fputs("
      \n", out); + return; + + case MMD_TYPE_SOFT_BREAK : + if (mode == OUTPUT_EPUB) + fputs("", out); + else + fputs("", out); + return; + + case MMD_TYPE_METADATA_TEXT : + return; + + default : + element = NULL; + break; + } + + if (url) + { + if (!strcmp(url, "@")) + fprintf(out, "", markdown_anchor(text)); + else + fprintf(out, "", url); + } + + if (element) + fprintf(out, "<%s>", element); + + if (!strcmp(text, "(c)")) + fputs(" ", out); + else if (!strcmp(text, "(r)")) + fputs("®", out); + else if (!strcmp(text, "(tm)")) + fputs("™", out); + else + write_string(out, text, mode); + + if (element) + fprintf(out, "", element); + + if (url) + fputs("", out); + } +} + + +/* + * 'new_documentation()' - Create a new documentation tree. + */ + +static mxml_node_t * /* O - New documentation */ +new_documentation(mxml_node_t **mxmldoc)/* O - mxmldoc node */ +{ + mxml_node_t *doc; /* New documentation */ + + + /* + * Create an empty XML documentation file... + */ + + doc = mxmlNewXML(NULL); + + *mxmldoc = mxmlNewElement(doc, "mxmldoc"); + + mxmlElementSetAttr(*mxmldoc, "xmlns", "http://www.easysw.com"); + mxmlElementSetAttr(*mxmldoc, "xmlns:xsi", + "http://www.w3.org/2001/XMLSchema-instance"); + mxmlElementSetAttr(*mxmldoc, "xsi:schemaLocation", + "http://www.minixml.org/mxmldoc.xsd"); + + return (doc); +} + + +#ifdef __APPLE__ +/* + * 'remove_directory()' - Remove a directory. + */ + +static int /* O - 1 on success, 0 on failure */ +remove_directory(const char *path) /* I - Directory to remove */ +{ + DIR *dir; /* Directory */ + struct dirent *dent; /* Current directory entry */ + char filename[1024]; /* Current filename */ + struct stat fileinfo; /* File information */ + + + if ((dir = opendir(path)) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to open directory \"%s\": %s\n", path, + strerror(errno)); + return (0); + } + + while ((dent = readdir(dir)) != NULL) + { + /* + * Skip "." and ".."... + */ + + if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, "..")) + continue; + + /* + * See if we have a file or directory... + */ + + snprintf(filename, sizeof(filename), "%s/%s", path, dent->d_name); + + if (stat(filename, &fileinfo)) + { + fprintf(stderr, "mxmldoc: Unable to stat \"%s\": %s\n", filename, + strerror(errno)); + closedir(dir); + return (0); + } + + if (S_ISDIR(fileinfo.st_mode)) + { + if (!remove_directory(filename)) + { + closedir(dir); + return (0); + } + } + else if (unlink(filename)) + { + fprintf(stderr, "mxmldoc: Unable to remove \"%s\": %s\n", filename, + strerror(errno)); + closedir(dir); + return (0); + } + } + + closedir(dir); + + if (rmdir(path)) + { + fprintf(stderr, "mxmldoc: Unable to remove directory \"%s\": %s\n", path, + strerror(errno)); + return (0); + } + + return (1); +} +#endif /* __APPLE__ */ + + +/* + * 'safe_strcpy()' - Copy a string allowing for overlapping strings. + */ + +static void +safe_strcpy(char *dst, /* I - Destination string */ + const char *src) /* I - Source string */ +{ + while (*src) + *dst++ = *src++; + + *dst = '\0'; +} + + +/* + * 'scan_file()' - Scan a source file. + */ + +static int /* O - 0 on success, -1 on error */ +scan_file(const char *filename, /* I - Filename */ + FILE *fp, /* I - File to scan */ + mxml_node_t *tree) /* I - Function tree */ +{ + int state, /* Current parser state */ + braces, /* Number of braces active */ + parens; /* Number of active parenthesis */ + int ch; /* Current character */ + char buffer[65536], /* String buffer */ + *bufptr; /* Pointer into buffer */ + const char *scope; /* Current variable/function scope */ + mxml_node_t *comment, /* node */ + *constant, /* node */ + *enumeration, /* node */ + *function, /* node */ + *fstructclass, /* function struct/class node */ + *structclass, /* or node */ + *typedefnode, /* node */ + *variable, /* or node */ + *returnvalue, /* node */ + *type, /* node */ + *description, /* node */ + *node, /* Current node */ + *next; /* Next node */ +#if DEBUG > 1 + mxml_node_t *temp; /* Temporary node */ + int oldstate, /* Previous state */ + oldch; /* Old character */ + static const char *states[] = /* State strings */ + { + "STATE_NONE", + "STATE_PREPROCESSOR", + "STATE_C_COMMENT", + "STATE_CXX_COMMENT", + "STATE_STRING", + "STATE_CHARACTER", + "STATE_IDENTIFIER" + }; +#endif /* DEBUG > 1 */ + + +#ifdef DEBUG + fprintf(stderr, "scan_file(filename=\"%s\", fp=%p, tree=%p)\n", filename, + fp, tree); +#endif /* DEBUG */ + + /* + * Initialize the finite state machine... + */ + + state = STATE_NONE; + braces = 0; + parens = 0; + bufptr = buffer; + + comment = mxmlNewElement(MXML_NO_PARENT, "temp"); + constant = NULL; + enumeration = NULL; + function = NULL; + variable = NULL; + returnvalue = NULL; + type = NULL; + description = NULL; + typedefnode = NULL; + structclass = NULL; + fstructclass = NULL; + + if (!strcmp(tree->value.element.name, "class")) + scope = "private"; + else + scope = NULL; + + /* + * Read until end-of-file... + */ + + while ((ch = getc(fp)) != EOF) + { +#if DEBUG > 1 + oldstate = state; + oldch = ch; +#endif /* DEBUG > 1 */ + + switch (state) + { + case STATE_NONE : /* No state - whitespace, etc. */ + switch (ch) + { + case '/' : /* Possible C/C++ comment */ + ch = getc(fp); + bufptr = buffer; + + if (ch == '*') + state = STATE_C_COMMENT; + else if (ch == '/') + state = STATE_CXX_COMMENT; + else + { + ungetc(ch, fp); + + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< / >>>\n", stderr); +#endif /* DEBUG */ + ch = type->last_child->value.text.string[0]; + mxmlNewText(type, isalnum(ch) || ch == '_', "/"); + } + } + break; + + case '#' : /* Preprocessor */ +#ifdef DEBUG + fputs(" #preprocessor...\n", stderr); +#endif /* DEBUG */ + state = STATE_PREPROCESSOR; + while (comment->child) + mxmlDelete(comment->child); + break; + + case '\'' : /* Character constant */ + state = STATE_CHARACTER; + bufptr = buffer; + *bufptr++ = ch; + break; + + case '\"' : /* String constant */ + state = STATE_STRING; + bufptr = buffer; + *bufptr++ = ch; + break; + + case '{' : +#ifdef DEBUG + fprintf(stderr, " open brace, function=%p, type=%p...\n", + function, type); + if (type) + fprintf(stderr, " type->child=\"%s\"...\n", + type->child->value.text.string); +#endif /* DEBUG */ + + if (function) + { + mxml_node_t *temptype = mxmlFindElement(returnvalue, returnvalue, "type", NULL, NULL, MXML_DESCEND); + +#ifdef DEBUG + fprintf(stderr, " returnvalue type=%p(%s)\n", temptype, temptype ? temptype->child->value.text.string : "null"); +#endif /* DEBUG */ + + if (temptype && temptype->child && + !strcmp(temptype->child->value.text.string, "static") && + !strcmp(tree->value.element.name, "mxmldoc")) + { + /* + * Remove static functions... + */ + +#ifdef DEBUG + fputs(" DELETING STATIC FUNCTION\n", stderr); +#endif /* DEBUG */ + mxmlDelete(function); + } + else if (fstructclass) + { + sort_node(fstructclass, function); + fstructclass = NULL; + } + else + sort_node(tree, function); + + function = NULL; + returnvalue = NULL; + } + else if (type && type->child && + ((!strcmp(type->child->value.text.string, "typedef") && + type->child->next && + (!strcmp(type->child->next->value.text.string, "struct") || + !strcmp(type->child->next->value.text.string, "union") || + !strcmp(type->child->next->value.text.string, "class"))) || + !strcmp(type->child->value.text.string, "union") || + !strcmp(type->child->value.text.string, "struct") || + !strcmp(type->child->value.text.string, "class"))) + { + /* + * Start of a class or structure... + */ + + if (!strcmp(type->child->value.text.string, "typedef")) + { +#ifdef DEBUG + fputs(" starting typedef...\n", stderr); +#endif /* DEBUG */ + + typedefnode = mxmlNewElement(MXML_NO_PARENT, "typedef"); + mxmlDelete(type->child); + } + else + typedefnode = NULL; + + structclass = mxmlNewElement(MXML_NO_PARENT, + type->child->value.text.string); + +#ifdef DEBUG + fprintf(stderr, "%c%s: <<<< %s >>>\n", + toupper(type->child->value.text.string[0]), + type->child->value.text.string + 1, + type->child->next ? + type->child->next->value.text.string : "(noname)"); + + fputs(" type =", stderr); + for (node = type->child; node; node = node->next) + fprintf(stderr, " \"%s\"", node->value.text.string); + putc('\n', stderr); + + fprintf(stderr, " scope = %s\n", scope ? scope : "(null)"); +#endif /* DEBUG */ + + if (type->child->next) + { + mxmlElementSetAttr(structclass, "name", + type->child->next->value.text.string); + sort_node(tree, structclass); + } + + if (typedefnode && type->child) + type->child->value.text.whitespace = 0; + else if (structclass && type->child && + type->child->next && type->child->next->next) + { + for (bufptr = buffer, node = type->child->next->next; + node; + bufptr += strlen(bufptr)) + { + if (node->value.text.whitespace && bufptr > buffer) + *bufptr++ = ' '; + + strlcpy(bufptr, node->value.text.string, sizeof(buffer) - (size_t)(bufptr - buffer)); + + next = node->next; + mxmlDelete(node); + node = next; + } + + mxmlElementSetAttr(structclass, "parent", buffer); + + mxmlDelete(type); + type = NULL; + } + else + { + mxmlDelete(type); + type = NULL; + } + + if (typedefnode && comment->last_child) + { + /* + * Copy comment for typedef as well as class/struct/union... + */ + + mxmlNewOpaque(comment, comment->last_child->value.opaque); + description = mxmlNewElement(typedefnode, "description"); +#ifdef DEBUG + fprintf(stderr, + " duplicating comment %p/%p for typedef...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + update_comment(typedefnode, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + } + + description = mxmlNewElement(structclass, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to %s...\n", + comment->last_child, comment->child, + structclass->value.element.name); +#endif /* DEBUG */ + update_comment(structclass, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + + if (scan_file(filename, fp, structclass)) + { + mxmlDelete(comment); + return (-1); + } + +#ifdef DEBUG + fputs(" ended typedef...\n", stderr); +#endif /* DEBUG */ + structclass = NULL; + break; + } + else if (type && type->child && type->child->next && + (!strcmp(type->child->value.text.string, "enum") || + (!strcmp(type->child->value.text.string, "typedef") && + !strcmp(type->child->next->value.text.string, "enum")))) + { + /* + * Enumeration type... + */ + + if (!strcmp(type->child->value.text.string, "typedef")) + { +#ifdef DEBUG + fputs(" starting typedef...\n", stderr); +#endif /* DEBUG */ + + typedefnode = mxmlNewElement(MXML_NO_PARENT, "typedef"); + mxmlDelete(type->child); + } + else + typedefnode = NULL; + + enumeration = mxmlNewElement(MXML_NO_PARENT, "enumeration"); + +#ifdef DEBUG + fprintf(stderr, "Enumeration: <<<< %s >>>\n", + type->child->next ? + type->child->next->value.text.string : "(noname)"); +#endif /* DEBUG */ + + if (type->child->next) + { + mxmlElementSetAttr(enumeration, "name", + type->child->next->value.text.string); + sort_node(tree, enumeration); + } + + if (typedefnode && type->child) + type->child->value.text.whitespace = 0; + else + { + mxmlDelete(type); + type = NULL; + } + + if (typedefnode && comment->last_child) + { + /* + * Copy comment for typedef as well as class/struct/union... + */ + + mxmlNewOpaque(comment, comment->last_child->value.opaque); + description = mxmlNewElement(typedefnode, "description"); +#ifdef DEBUG + fprintf(stderr, + " duplicating comment %p/%p for typedef...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + update_comment(typedefnode, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + } + + description = mxmlNewElement(enumeration, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to enumeration...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + update_comment(enumeration, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + } + else if (type && type->child && + !strcmp(type->child->value.text.string, "extern")) + { + if (scan_file(filename, fp, tree)) + { + mxmlDelete(comment); + return (-1); + } + } + else if (type) + { + mxmlDelete(type); + type = NULL; + } + + braces ++; + function = NULL; + variable = NULL; + break; + + case '}' : +#ifdef DEBUG + fputs(" close brace...\n", stderr); +#endif /* DEBUG */ + + if (structclass) + scope = NULL; + + if (!typedefnode) + enumeration = NULL; + + constant = NULL; + structclass = NULL; + + if (braces > 0) + { + braces --; + if (braces == 0) + { + while (comment->child) + mxmlDelete(comment->child); + } + } + else + { + mxmlDelete(comment); + return (0); + } + break; + + case '(' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< ( >>>\n", stderr); +#endif /* DEBUG */ + mxmlNewText(type, 0, "("); + } + + parens ++; + break; + + case ')' : + if (type && parens) + { +#ifdef DEBUG + fputs("Identifier: <<<< ) >>>\n", stderr); +#endif /* DEBUG */ + mxmlNewText(type, 0, ")"); + } + + if (function && type && !parens) + { + /* + * Check for "void" argument... + */ + + if (type->child && type->child->next) + variable = add_variable(function, "argument", type); + else + mxmlDelete(type); + + type = NULL; + } + + if (parens > 0) + parens --; + break; + + case ';' : +#ifdef DEBUG + fputs("Identifier: <<<< ; >>>\n", stderr); + fprintf(stderr, " enumeration=%p, function=%p, type=%p, type->child=%p, typedefnode=%p\n", + enumeration, function, type, type ? type->child : NULL, typedefnode); +#endif /* DEBUG */ + + if (function) + { + mxml_node_t *temptype = mxmlFindElement(returnvalue, returnvalue, "type", NULL, NULL, MXML_DESCEND); + +#ifdef DEBUG + fprintf(stderr, " returnvalue type=%p(%s)\n", temptype, temptype ? temptype->child->value.text.string : "null"); +#endif /* DEBUG */ + + if (temptype && temptype->child && + !strcmp(temptype->child->value.text.string, "static") && + !strcmp(tree->value.element.name, "mxmldoc")) + { + /* + * Remove static functions... + */ + +#ifdef DEBUG + fputs(" DELETING STATIC FUNCTION\n", stderr); +#endif /* DEBUG */ + + mxmlDelete(function); + } + else if (!strcmp(tree->value.element.name, "class")) + { +#ifdef DEBUG + fputs(" ADDING FUNCTION TO CLASS\n", stderr); +#endif /* DEBUG */ + sort_node(tree, function); + } + else + mxmlDelete(function); + + function = NULL; + variable = NULL; + returnvalue = NULL; + } + + if (type) + { + /* + * See if we have a typedef... + */ + + if (type->child && + !strcmp(type->child->value.text.string, "typedef")) + { + /* + * Yes, add it! + */ + + typedefnode = mxmlNewElement(MXML_NO_PARENT, "typedef"); + + for (node = type->child->next; node; node = node->next) + if (!strcmp(node->value.text.string, "(")) + break; + + if (node) + { + for (node = node->next; node; node = node->next) + if (strcmp(node->value.text.string, "*")) + break; + } + + if (!node) + node = type->last_child; + +#ifdef DEBUG + fprintf(stderr, " ADDING TYPEDEF FOR %p(%s)...\n", + node, node->value.text.string); +#endif /* DEBUG */ + + mxmlElementSetAttr(typedefnode, "name", + node->value.text.string); + sort_node(tree, typedefnode); + + if (type->child != node) + mxmlDelete(type->child); + + mxmlDelete(node); + + if (type->child) + type->child->value.text.whitespace = 0; + + mxmlAdd(typedefnode, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + type); + type = NULL; + break; + } + else if (typedefnode && enumeration) + { + /* + * Add enum typedef... + */ + + node = type->child; + +#ifdef DEBUG + fprintf(stderr, " ADDING TYPEDEF FOR %p(%s)...\n", + node, node->value.text.string); +#endif /* DEBUG */ + + mxmlElementSetAttr(typedefnode, "name", + node->value.text.string); + sort_node(tree, typedefnode); + mxmlDelete(type); + + type = mxmlNewElement(typedefnode, "type"); + mxmlNewText(type, 0, "enum"); + mxmlNewText(type, 1, + mxmlElementGetAttr(enumeration, "name")); + enumeration = NULL; + type = NULL; + break; + } + + mxmlDelete(type); + type = NULL; + } + break; + + case ':' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< : >>>\n", stderr); +#endif /* DEBUG */ + mxmlNewText(type, 1, ":"); + } + break; + + case '*' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< * >>>\n", stderr); +#endif /* DEBUG */ + ch = type->last_child->value.text.string[0]; + mxmlNewText(type, isalnum(ch) || ch == '_', "*"); + } + break; + + case ',' : + if (type && !enumeration) + { +#ifdef DEBUG + fputs("Identifier: <<<< , >>>\n", stderr); +#endif /* DEBUG */ + mxmlNewText(type, 0, ","); + } + break; + + case '&' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< & >>>\n", stderr); +#endif /* DEBUG */ + mxmlNewText(type, 1, "&"); + } + break; + + case '+' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< + >>>\n", stderr); +#endif /* DEBUG */ + ch = type->last_child->value.text.string[0]; + mxmlNewText(type, isalnum(ch) || ch == '_', "+"); + } + break; + + case '-' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< - >>>\n", stderr); +#endif /* DEBUG */ + ch = type->last_child->value.text.string[0]; + mxmlNewText(type, isalnum(ch) || ch == '_', "-"); + } + break; + + case '=' : + if (type) + { +#ifdef DEBUG + fputs("Identifier: <<<< = >>>\n", stderr); +#endif /* DEBUG */ + ch = type->last_child->value.text.string[0]; + mxmlNewText(type, isalnum(ch) || ch == '_', "="); + } + break; + + default : /* Other */ + if (isalnum(ch) || ch == '_' || ch == '.' || ch == ':' || ch == '~') + { + state = STATE_IDENTIFIER; + bufptr = buffer; + *bufptr++ = ch; + } + break; + } + break; + + case STATE_PREPROCESSOR : /* Preprocessor directive */ + if (ch == '\n') + state = STATE_NONE; + else if (ch == '\\') + getc(fp); + break; + + case STATE_C_COMMENT : /* Inside a C comment */ + switch (ch) + { + case '\n' : + while ((ch = getc(fp)) != EOF) + if (ch == '*') + { + ch = getc(fp); + + if (ch == '/') + { + *bufptr = '\0'; + + if (comment->child != comment->last_child) + { +#ifdef DEBUG + fprintf(stderr, " removing comment %p(%20.20s), last comment %p(%20.20s)...\n", + comment->child, + comment->child ? comment->child->value.text.string : "", + comment->last_child, + comment->last_child ? comment->last_child->value.text.string : ""); +#endif /* DEBUG */ + mxmlDelete(comment->child); +#ifdef DEBUG + fprintf(stderr, " new comment %p, last comment %p...\n", + comment->child, comment->last_child); +#endif /* DEBUG */ + } + +#ifdef DEBUG + fprintf(stderr, + " processing comment, variable=%p, " + "constant=%p, typedefnode=%p, tree=\"%s\"\n", + variable, constant, typedefnode, + tree->value.element.name); +#endif /* DEBUG */ + + if (variable) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private variables... + */ + + mxmlDelete(variable); + } + else + { + description = mxmlNewElement(variable, "description"); +#ifdef DEBUG + fprintf(stderr, + " adding comment %p/%p to variable...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(variable, mxmlNewOpaque(description, buffer)); + } + + variable = NULL; + } + else if (constant) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private constants... + */ + + mxmlDelete(constant); + } + else + { + description = mxmlNewElement(constant, "description"); +#ifdef DEBUG + fprintf(stderr, + " adding comment %p/%p to constant...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(constant, mxmlNewOpaque(description, buffer)); + } + + constant = NULL; + } + else if (typedefnode) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private typedefs... + */ + + mxmlDelete(typedefnode); + + if (structclass) + { + mxmlDelete(structclass); + structclass = NULL; + } + + if (enumeration) + { + mxmlDelete(enumeration); + enumeration = NULL; + } + } + else + { + description = mxmlNewElement(typedefnode, "description"); +#ifdef DEBUG + fprintf(stderr, + " adding comment %p/%p to typedef %s...\n", + comment->last_child, comment->child, + mxmlElementGetAttr(typedefnode, "name")); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(typedefnode, mxmlNewOpaque(description, buffer)); + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, + mxmlNewOpaque(description, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, + mxmlNewOpaque(description, buffer)); + } + } + + typedefnode = NULL; + } + else if (strcmp(tree->value.element.name, "mxmldoc") && + !mxmlFindElement(tree, tree, "description", + NULL, NULL, MXML_DESCEND_FIRST)) + { + description = mxmlNewElement(tree, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to parent...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(tree, mxmlNewOpaque(description, buffer)); + } + else + { +#ifdef DEBUG + fprintf(stderr, " before adding comment, child=%p, last_child=%p\n", + comment->child, comment->last_child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); +#ifdef DEBUG + fprintf(stderr, " after adding comment, child=%p, last_child=%p\n", + comment->child, comment->last_child); +#endif /* DEBUG */ + } +#ifdef DEBUG + fprintf(stderr, "C comment: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + + state = STATE_NONE; + break; + } + else + ungetc(ch, fp); + } + else if (ch == '\n' && bufptr > buffer && + bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = ch; + else if (!isspace(ch)) + break; + + if (ch != EOF) + ungetc(ch, fp); + + if (bufptr > buffer && bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = '\n'; + break; + + case '/' : + if (ch == '/' && bufptr > buffer && bufptr[-1] == '*') + { + while (bufptr > buffer && + (bufptr[-1] == '*' || isspace(bufptr[-1] & 255))) + bufptr --; + *bufptr = '\0'; + + if (comment->child != comment->last_child) + { +#ifdef DEBUG + fprintf(stderr, " removing comment %p(%20.20s), last comment %p(%20.20s)...\n", + comment->child, + comment->child ? comment->child->value.text.string : "", + comment->last_child, + comment->last_child ? comment->last_child->value.text.string : ""); +#endif /* DEBUG */ + mxmlDelete(comment->child); +#ifdef DEBUG + fprintf(stderr, " new comment %p, last comment %p...\n", + comment->child, comment->last_child); +#endif /* DEBUG */ + } + +#ifdef DEBUG + fprintf(stderr, + " processing comment, variable=%p, " + "constant=%p, typedefnode=%p, tree=\"%s\"\n", + variable, constant, typedefnode, + tree->value.element.name); +#endif /* DEBUG */ + + if (variable) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private variables... + */ + + mxmlDelete(variable); + } + else + { + description = mxmlNewElement(variable, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to variable...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(variable, mxmlNewOpaque(description, buffer)); + } + + variable = NULL; + } + else if (constant) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private constants... + */ + + mxmlDelete(constant); + } + else + { + description = mxmlNewElement(constant, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to constant...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(constant, mxmlNewOpaque(description, buffer)); + } + + constant = NULL; + } + else if (typedefnode) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private typedefs... + */ + + mxmlDelete(typedefnode); + + if (structclass) + { + mxmlDelete(structclass); + structclass = NULL; + } + + if (enumeration) + { + mxmlDelete(enumeration); + enumeration = NULL; + } + } + else + { + description = mxmlNewElement(typedefnode, "description"); +#ifdef DEBUG + fprintf(stderr, + " adding comment %p/%p to typedef %s...\n", + comment->last_child, comment->child, + mxmlElementGetAttr(typedefnode, "name")); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(typedefnode, mxmlNewOpaque(description, buffer)); + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, mxmlNewOpaque(description, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, mxmlNewOpaque(description, buffer)); + } + } + + typedefnode = NULL; + } + else if (strcmp(tree->value.element.name, "mxmldoc") && + !mxmlFindElement(tree, tree, "description", + NULL, NULL, MXML_DESCEND_FIRST)) + { + description = mxmlNewElement(tree, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to parent...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(tree, mxmlNewOpaque(description, buffer)); + } + else + mxmlNewOpaque(comment, buffer); + +#ifdef DEBUG + fprintf(stderr, "C comment: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + + state = STATE_NONE; + break; + } + + default : + if (ch == ' ' && bufptr == buffer) + break; + + if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = ch; + break; + } + break; + + case STATE_CXX_COMMENT : /* Inside a C++ comment */ + if (ch == '\n') + { + state = STATE_NONE; + *bufptr = '\0'; + + if (comment->child != comment->last_child) + { +#ifdef DEBUG + fprintf(stderr, " removing comment %p(%20.20s), last comment %p(%20.20s)...\n", + comment->child, + comment->child ? comment->child->value.text.string : "", + comment->last_child, + comment->last_child ? comment->last_child->value.text.string : ""); +#endif /* DEBUG */ + mxmlDelete(comment->child); +#ifdef DEBUG + fprintf(stderr, " new comment %p, last comment %p...\n", + comment->child, comment->last_child); +#endif /* DEBUG */ + } + + if (variable) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private variables... + */ + + mxmlDelete(variable); + } + else + { + description = mxmlNewElement(variable, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to variable...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(variable, mxmlNewOpaque(description, buffer)); + } + + variable = NULL; + } + else if (constant) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private constants... + */ + + mxmlDelete(constant); + } + else + { + description = mxmlNewElement(constant, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to constant...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(constant, mxmlNewOpaque(description, buffer)); + } + + constant = NULL; + } + else if (typedefnode) + { + if (strstr(buffer, "@private@")) + { + /* + * Delete private typedefs... + */ + + mxmlDelete(typedefnode); + typedefnode = NULL; + + if (structclass) + { + mxmlDelete(structclass); + structclass = NULL; + } + + if (enumeration) + { + mxmlDelete(enumeration); + enumeration = NULL; + } + } + else + { + description = mxmlNewElement(typedefnode, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to typedef %s...\n", + comment->last_child, comment->child, + mxmlElementGetAttr(typedefnode, "name")); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(typedefnode, mxmlNewOpaque(description, buffer)); + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, mxmlNewOpaque(description, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, mxmlNewOpaque(description, buffer)); + } + } + } + else if (strcmp(tree->value.element.name, "mxmldoc") && + !mxmlFindElement(tree, tree, "description", + NULL, NULL, MXML_DESCEND_FIRST)) + { + description = mxmlNewElement(tree, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to parent...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + mxmlNewOpaque(comment, buffer); + update_comment(tree, mxmlNewOpaque(description, buffer)); + } + else + mxmlNewOpaque(comment, buffer); + +#ifdef DEBUG + fprintf(stderr, "C++ comment: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + } + else if (ch == ' ' && bufptr == buffer) + break; + else if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = ch; + break; + + case STATE_STRING : /* Inside a string constant */ + *bufptr++ = ch; + + if (ch == '\\') + *bufptr++ = getc(fp); + else if (ch == '\"') + { + *bufptr = '\0'; + + if (type) + mxmlNewText(type, type->child != NULL, buffer); + + state = STATE_NONE; + } + break; + + case STATE_CHARACTER : /* Inside a character constant */ + *bufptr++ = ch; + + if (ch == '\\') + *bufptr++ = getc(fp); + else if (ch == '\'') + { + *bufptr = '\0'; + + if (type) + mxmlNewText(type, type->child != NULL, buffer); + + state = STATE_NONE; + } + break; + + case STATE_IDENTIFIER : /* Inside a keyword or identifier */ + if (isalnum(ch) || ch == '_' || ch == '[' || ch == ']' || + (ch == ',' && (parens > 1 || (type && !enumeration && !function))) || + ch == ':' || ch == '.' || ch == '~') + { + if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = ch; + } + else + { + ungetc(ch, fp); + *bufptr = '\0'; + state = STATE_NONE; + +#ifdef DEBUG + fprintf(stderr, " braces=%d, type=%p, type->child=%p, buffer=\"%s\"\n", + braces, type, type ? type->child : NULL, buffer); +#endif /* DEBUG */ + + if (!braces) + { + if (!type || !type->child) + { + if (!strcmp(tree->value.element.name, "class")) + { + if (!strcmp(buffer, "public") || + !strcmp(buffer, "public:")) + { + scope = "public"; +#ifdef DEBUG + fputs(" scope = public\n", stderr); +#endif /* DEBUG */ + break; + } + else if (!strcmp(buffer, "private") || + !strcmp(buffer, "private:")) + { + scope = "private"; +#ifdef DEBUG + fputs(" scope = private\n", stderr); +#endif /* DEBUG */ + break; + } + else if (!strcmp(buffer, "protected") || + !strcmp(buffer, "protected:")) + { + scope = "protected"; +#ifdef DEBUG + fputs(" scope = protected\n", stderr); +#endif /* DEBUG */ + break; + } + } + } + + if (!type) + type = mxmlNewElement(MXML_NO_PARENT, "type"); + +#ifdef DEBUG + fprintf(stderr, " function=%p (%s), type->child=%p, ch='%c', parens=%d\n", + function, + function ? mxmlElementGetAttr(function, "name") : "null", + type->child, ch, parens); +#endif /* DEBUG */ + + if (!function && ch == '(') + { + if (type->child && + !strcmp(type->child->value.text.string, "extern")) + { + /* + * Remove external declarations... + */ + + mxmlDelete(type); + type = NULL; + break; + } + + function = mxmlNewElement(MXML_NO_PARENT, "function"); + if ((bufptr = strchr(buffer, ':')) != NULL && bufptr[1] == ':') + { + *bufptr = '\0'; + bufptr += 2; + + if ((fstructclass = + mxmlFindElement(tree, tree, "class", "name", buffer, + MXML_DESCEND_FIRST)) == NULL) + fstructclass = + mxmlFindElement(tree, tree, "struct", "name", buffer, + MXML_DESCEND_FIRST); + } + else + bufptr = buffer; + + mxmlElementSetAttr(function, "name", bufptr); + + if (scope) + mxmlElementSetAttr(function, "scope", scope); + +#ifdef DEBUG + fprintf(stderr, "function: %s\n", buffer); + fprintf(stderr, " scope = %s\n", scope ? scope : "(null)"); + fprintf(stderr, " comment = %p\n", comment); + fprintf(stderr, " child = (%p) %s\n", + comment->child, + comment->child ? + comment->child->value.text.string : "(null)"); + fprintf(stderr, " last_child = (%p) %s\n", + comment->last_child, + comment->last_child ? + comment->last_child->value.text.string : "(null)"); +#endif /* DEBUG */ + + if (type->last_child && (strcmp(type->last_child->value.text.string, "void") || !strcmp(type->child->value.text.string, "static"))) + { + returnvalue = mxmlNewElement(function, "returnvalue"); + + mxmlAdd(returnvalue, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, type); + + description = mxmlNewElement(returnvalue, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to returnvalue...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + update_comment(returnvalue, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + } + else + mxmlDelete(type); + + description = mxmlNewElement(function, "description"); +#ifdef DEBUG + fprintf(stderr, " adding comment %p/%p to function...\n", + comment->last_child, comment->child); +#endif /* DEBUG */ + update_comment(function, comment->last_child); + mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, + comment->last_child); + + type = NULL; + } + else if (function && ((ch == ')' && parens == 1) || ch == ',')) + { + /* + * Argument definition... + */ + + if (strcmp(buffer, "void")) + { + mxmlNewText(type, type->child != NULL && + type->last_child->value.text.string[0] != '(' && + type->last_child->value.text.string[0] != '*', + buffer); + +#ifdef DEBUG + fprintf(stderr, "Argument: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + + variable = add_variable(function, "argument", type); + } + else + mxmlDelete(type); + + type = NULL; + } + else if (type->child && !function && (ch == ';' || ch == ',')) + { +#ifdef DEBUG + fprintf(stderr, " got semicolon, typedefnode=%p, structclass=%p\n", + typedefnode, structclass); +#endif /* DEBUG */ + + if (typedefnode || structclass) + { +#ifdef DEBUG + fprintf(stderr, "Typedef/struct/class: <<<< %s >>>>\n", buffer); +#endif /* DEBUG */ + + if (typedefnode) + { + mxmlElementSetAttr(typedefnode, "name", buffer); + + sort_node(tree, typedefnode); + } + + if (structclass && !mxmlElementGetAttr(structclass, "name")) + { +#ifdef DEBUG + fprintf(stderr, "setting struct/class name to %s!\n", + type->last_child->value.text.string); +#endif /* DEBUG */ + mxmlElementSetAttr(structclass, "name", buffer); + + sort_node(tree, structclass); + structclass = NULL; + } + + if (typedefnode) + mxmlAdd(typedefnode, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT, + type); + else + mxmlDelete(type); + + type = NULL; + typedefnode = NULL; + } + else if (type->child && + !strcmp(type->child->value.text.string, "typedef")) + { + /* + * Simple typedef... + */ + +#ifdef DEBUG + fprintf(stderr, "Typedef: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + + typedefnode = mxmlNewElement(MXML_NO_PARENT, "typedef"); + mxmlElementSetAttr(typedefnode, "name", buffer); + mxmlDelete(type->child); + + sort_node(tree, typedefnode); + + if (type->child) + type->child->value.text.whitespace = 0; + + mxmlAdd(typedefnode, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, type); + type = NULL; + } + else if (!parens) + { + /* + * Variable definition... + */ + + if (type->child && + !strcmp(type->child->value.text.string, "static") && + !strcmp(tree->value.element.name, "mxmldoc")) + { + /* + * Remove static functions... + */ + + mxmlDelete(type); + type = NULL; + break; + } + + mxmlNewText(type, type->child != NULL && + type->last_child->value.text.string[0] != '(' && + type->last_child->value.text.string[0] != '*', + buffer); + +#ifdef DEBUG + fprintf(stderr, "Variable: <<<< %s >>>>\n", buffer); + fprintf(stderr, " scope = %s\n", scope ? scope : "(null)"); +#endif /* DEBUG */ + + variable = add_variable(MXML_NO_PARENT, "variable", type); + type = NULL; + + sort_node(tree, variable); + + if (scope) + mxmlElementSetAttr(variable, "scope", scope); + } + } + else + { +#ifdef DEBUG + fprintf(stderr, "Identifier: <<<< %s >>>>\n", buffer); +#endif /* DEBUG */ + + mxmlNewText(type, type->child != NULL && + type->last_child->value.text.string[0] != '(' && + type->last_child->value.text.string[0] != '*', + buffer); + } + } + else if (enumeration && !isdigit(buffer[0] & 255)) + { +#ifdef DEBUG + fprintf(stderr, "Constant: <<<< %s >>>\n", buffer); +#endif /* DEBUG */ + + constant = mxmlNewElement(MXML_NO_PARENT, "constant"); + mxmlElementSetAttr(constant, "name", buffer); + sort_node(enumeration, constant); + } + else if (type) + { + mxmlDelete(type); + type = NULL; + } + } + break; + } + +#if DEBUG > 1 + if (state != oldstate) + { + fprintf(stderr, " changed states from %s to %s on receipt of character '%c'...\n", + states[oldstate], states[state], oldch); + fprintf(stderr, " variable = %p\n", variable); + if (type) + { + fputs(" type =", stderr); + for (temp = type->child; temp; temp = temp->next) + fprintf(stderr, " \"%s\"", temp->value.text.string); + fputs("\n", stderr); + } + } +#endif /* DEBUG > 1 */ + } + + mxmlDelete(comment); + + /* + * All done, return with no errors... + */ + + return (0); +} + + +/* + * 'sort_node()' - Insert a node sorted into a tree. + */ + +static void +sort_node(mxml_node_t *tree, /* I - Tree to sort into */ + mxml_node_t *node) /* I - Node to add */ +{ + mxml_node_t *temp; /* Current node */ + const char *tempname, /* Name of current node */ + *nodename, /* Name of node */ + *scope; /* Scope */ + + +#if DEBUG > 1 + fprintf(stderr, " sort_node(tree=%p, node=%p)\n", tree, node); +#endif /* DEBUG > 1 */ + + /* + * Range check input... + */ + + if (!tree || !node || node->parent == tree) + return; + + /* + * Get the node name... + */ + + if ((nodename = mxmlElementGetAttr(node, "name")) == NULL) + return; + + if (nodename[0] == '_') + return; /* Hide private names */ + +#if DEBUG > 1 + fprintf(stderr, " nodename=%p (\"%s\")\n", nodename, nodename); +#endif /* DEBUG > 1 */ + + /* + * Delete any existing definition at this level, if one exists... + */ + + if ((temp = mxmlFindElement(tree, tree, node->value.element.name, + "name", nodename, MXML_DESCEND_FIRST)) != NULL) + { + /* + * Copy the scope if needed... + */ + + if ((scope = mxmlElementGetAttr(temp, "scope")) != NULL && + mxmlElementGetAttr(node, "scope") == NULL) + { +#ifdef DEBUG + fprintf(stderr, " copying scope %s for %s\n", scope, nodename); +#endif /* DEBUG */ + + mxmlElementSetAttr(node, "scope", scope); + } + + mxmlDelete(temp); + } + + /* + * Add the node into the tree at the proper place... + */ + + for (temp = tree->child; temp; temp = temp->next) + { +#if DEBUG > 1 + fprintf(stderr, " temp=%p\n", temp); +#endif /* DEBUG > 1 */ + + if ((tempname = mxmlElementGetAttr(temp, "name")) == NULL) + continue; + +#if DEBUG > 1 + fprintf(stderr, " tempname=%p (\"%s\")\n", tempname, tempname); +#endif /* DEBUG > 1 */ + + if (strcmp(nodename, tempname) < 0) + break; + } + + if (temp) + mxmlAdd(tree, MXML_ADD_BEFORE, temp, node); + else + mxmlAdd(tree, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, node); +} + + +/* + * 'update_comment()' - Update a comment node. + */ + +static void +update_comment(mxml_node_t *parent, /* I - Parent node */ + mxml_node_t *comment) /* I - Comment node */ +{ + char *ptr; /* Pointer into comment */ + + +#ifdef DEBUG + fprintf(stderr, "update_comment(parent=%p, comment=%p)\n", + parent, comment); +#endif /* DEBUG */ + + /* + * Range check the input... + */ + + if (!parent || !comment) + return; + + /* + * Convert "\/" to "/"... + */ + + for (ptr = strstr(comment->value.opaque, "\\/"); + ptr; + ptr = strstr(ptr, "\\/")) + safe_strcpy(ptr, ptr + 1); + + /* + * Update the comment... + */ + + ptr = comment->value.opaque; + + if (*ptr == '\'') + { + /* + * Convert "'name()' - description" to "description". + */ + + for (ptr ++; *ptr && *ptr != '\''; ptr ++); + + if (*ptr == '\'') + { + ptr ++; + while (isspace(*ptr & 255)) + ptr ++; + + if (*ptr == '-') + ptr ++; + + while (isspace(*ptr & 255)) + ptr ++; + + safe_strcpy(comment->value.opaque, ptr); + } + } + else if (!strncmp(ptr, "I ", 2) || !strncmp(ptr, "O ", 2) || + !strncmp(ptr, "IO ", 3)) + { + /* + * 'Convert "I - description", "IO - description", or "O - description" + * to description + direction attribute. + */ + + ptr = strchr(ptr, ' '); + *ptr++ = '\0'; + + if (!strcmp(parent->value.element.name, "argument")) + mxmlElementSetAttr(parent, "direction", comment->value.opaque); + + while (isspace(*ptr & 255)) + ptr ++; + + if (*ptr == '-') + ptr ++; + + while (isspace(*ptr & 255)) + ptr ++; + + safe_strcpy(comment->value.opaque, ptr); + } + + /* + * Eliminate leading and trailing *'s... + */ + + for (ptr = comment->value.opaque; *ptr == '*'; ptr ++); + for (; isspace(*ptr & 255); ptr ++); + if (ptr > comment->value.opaque) + safe_strcpy(comment->value.opaque, ptr); + + for (ptr = comment->value.opaque + strlen(comment->value.opaque) - 1; + ptr > comment->value.opaque && *ptr == '*'; + ptr --) + *ptr = '\0'; + for (; ptr > comment->value.opaque && isspace(*ptr & 255); ptr --) + *ptr = '\0'; + +#ifdef DEBUG + fprintf(stderr, " updated comment = %s\n", comment->value.opaque); +#endif /* DEBUG */ +} + + +/* + * 'usage()' - Show program usage... + */ + +static void +usage(const char *option) /* I - Unknown option */ +{ + if (option) + printf("mxmldoc: Bad option \"%s\"!\n\n", option); + + puts("Usage: mxmldoc [options] [filename.xml] [source files] >filename.html"); + puts("Options:"); + puts(" --author name Set author name"); + puts(" --body bodyfile Set body file (markdown supported)"); + puts(" --copyright text Set copyright text"); + puts(" --coverimage image.png Set cover image (EPUB)"); + puts(" --css filename.css Set CSS stylesheet file"); + puts(" --docset bundleid.docset Generate documentation set"); + puts(" --docversion version Set documentation version"); + puts(" --epub filename.epub Generate EPUB file"); + puts(" --feedname name Set documentation set feed name"); + puts(" --feedurl url Set documentation set feed URL"); + puts(" --footer footerfile Set footer file"); + puts(" --framed basename Generate framed HTML to basename*.html"); + puts(" --header headerfile Set header file"); + puts(" --man name Generate man page"); + puts(" --no-output Do no generate documentation file"); + puts(" --section section Set section name"); + puts(" --title title Set documentation title"); + puts(" --tokens path Generate Xcode docset Tokens.xml file"); + puts(" --version Show mxmldoc/Mini-XML version"); + + exit(1); +} + + +/* + * 'write_description()' - Write the description text. + */ + +static void +write_description( + FILE *out, /* I - Output file */ + int mode, /* I - Output mode */ + mxml_node_t *description, /* I - Description node */ + const char *element, /* I - HTML element, if any */ + int summary) /* I - Show summary (-1 for all) */ +{ + char text[10240], /* Text for description */ + *start, /* Start of code/link */ + *ptr; /* Pointer into text */ + int col; /* Current column */ + + + if (!description) + return; + + get_text(description, text, sizeof(text)); + + ptr = strstr(text, "\n\n"); + + if (summary) + { + if (ptr) + *ptr = '\0'; + + ptr = text; + } + else if (summary >= 0 && (!ptr || !ptr[2])) + return; + else if (summary >= 0) + ptr += 2; + + if (element && *element) + fprintf(out, " <%s class=\"%s\">", element, + summary ? "description" : "discussion"); + else if (!summary) + fputs(".PP\n", out); + + for (col = 0; *ptr; ptr ++) + { + if (*ptr == '@' && + (!strncmp(ptr + 1, "deprecated@", 11) || + !strncmp(ptr + 1, "exclude ", 8) || + !strncmp(ptr + 1, "since ", 6))) + { + ptr ++; + while (*ptr && *ptr != '@') + ptr ++; + + if (!*ptr) + ptr --; + } + else if (!strncmp(ptr, "@code ", 6)) + { + for (ptr += 6; isspace(*ptr & 255); ptr ++); + + for (start = ptr, ptr ++; *ptr && *ptr != '@'; ptr ++); + + if (*ptr) + *ptr = '\0'; + else + ptr --; + + if (element && *element) + { + fputs("", out); + for (; *start; start ++) + { + if (*start == '<') + fputs("<", out); + else if (*start == '>') + fputs(">", out); + else if (*start == '&') + fputs("&", out); + else + putc(*start, out); + } + fputs("", out); + } + else if (element) + fputs(start, out); + else + fprintf(out, "\\fB%s\\fR", start); + } + else if (!strncmp(ptr, "@link ", 6)) + { + for (ptr += 6; isspace(*ptr & 255); ptr ++); + + for (start = ptr, ptr ++; *ptr && *ptr != '@'; ptr ++); + + if (*ptr) + *ptr = '\0'; + else + ptr --; + + if (element && *element) + fprintf(out, "%s", start, start); + else if (element) + fputs(start, out); + else + fprintf(out, "\\fI%s\\fR", start); + } + else if (element) + { + if (*ptr == '&') + fputs("&", out); + else if (*ptr == '<') + fputs("<", out); + else if (*ptr == '>') + fputs(">", out); + else if (*ptr == '\"') + fputs(""", out); + else if (*ptr & 128) + { + /* + * Convert utf-8 to Unicode constant... + */ + + int ch; /* Unicode character */ + + + ch = *ptr & 255; + + if ((ch & 0xe0) == 0xc0) + { + ch = ((ch & 0x1f) << 6) | (ptr[1] & 0x3f); + ptr ++; + } + else if ((ch & 0xf0) == 0xe0) + { + ch = ((((ch * 0x0f) << 6) | (ptr[1] & 0x3f)) << 6) | (ptr[2] & 0x3f); + ptr += 2; + } + + fprintf(out, "&#%d;", ch); + } + else if (*ptr == '\n' && ptr[1] == '\n' && ptr[2] && ptr[2] != '@') + { + if (mode == OUTPUT_EPUB) + fputs("
      \n
      \n", out); + else + fputs("
      \n
      \n", out); + ptr ++; + } + else + putc(*ptr, out); + } + else if (*ptr == '\n' && ptr[1] == '\n' && ptr[2] && ptr[2] != '@') + { + fputs("\n.PP\n", out); + ptr ++; + } + else + { + if (*ptr == '\\' || (*ptr == '.' && col == 0)) + putc('\\', out); + + putc(*ptr, out); + + if (*ptr == '\n') + col = 0; + else + col ++; + } + } + + if (element && *element) + { + if (summary < 0) + fprintf(out, "", element); + else + fprintf(out, "\n", element); + } + else if (!element) + putc('\n', out); +} + + +#ifdef __APPLE__ +/* + * 'write_docset()' - Write Xcode documentation. + */ + +static void +write_docset(const char *docset, /* I - Documentation set directory */ + const char *section, /* I - Section */ + const char *title, /* I - Title */ + const char *author, /* I - Author's name */ + const char *copyright, /* I - Copyright string */ + const char *docversion, /* I - Documentation set version */ + const char *feedname, /* I - Feed name for doc set */ + const char *feedurl, /* I - Feed URL for doc set */ + const char *cssfile, /* I - Stylesheet file */ + const char *headerfile, /* I - Header file */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + mxml_node_t *doc, /* I - XML documentation */ + const char *footerfile) /* I - Footer file */ +{ + FILE *out; /* Output file */ + char filename[1024]; /* Current output filename */ + toc_t *toc; /* Table of contents */ + const char *id; /* Identifier */ + size_t i; /* Looping var */ + toc_entry_t *tentry; /* Current table of contents */ + int toc_level; /* Current table-of-contents level */ + int xmlid = 1; /* Current XML node ID */ + const char *indent; /* Indentation */ + + + + /* + * Create the table-of-contents entries... + */ + + toc = build_toc(doc, bodyfile, body, OUTPUT_DOCSET); + + /* + * Create an Xcode documentation set - start by removing any existing + * output directory... + */ + + if (!access(docset, 0) && !remove_directory(docset)) + return; + + /* + * Then make the Apple standard bundle directory structure... + */ + + if (mkdir(docset, 0755)) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", docset, + strerror(errno)); + return; + } + + snprintf(filename, sizeof(filename), "%s/Contents", docset); + if (mkdir(filename, 0755)) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + snprintf(filename, sizeof(filename), "%s/Contents/Resources", docset); + if (mkdir(filename, 0755)) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + snprintf(filename, sizeof(filename), "%s/Contents/Resources/Documentation", + docset); + if (mkdir(filename, 0755)) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + /* + * The Info.plist file, which describes the documentation set... + */ + + if ((id = strrchr(docset, '/')) != NULL) + id ++; + else + id = docset; + + snprintf(filename, sizeof(filename), "%s/Contents/Info.plist", docset); + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + fputs("\n" + "\n" + "\n" + " \n" + " CFBundleIdentifier\n" + " ", out); + write_string(out, id, OUTPUT_HTML); + fputs("\n" + " CFBundleName\n" + " ", out); + write_string(out, title, OUTPUT_HTML); + fputs("\n" + " CFBundleVersion\n" + " ", out); + write_string(out, docversion ? docversion : "0.0", OUTPUT_HTML); + fputs("\n" + " CFBundleShortVersionString\n" + " ", out); + write_string(out, docversion ? docversion : "0.0", OUTPUT_HTML); + fputs("\n", out); + + if (feedname) + { + fputs(" DocSetFeedName\n" + " ", out); + write_string(out, feedname ? feedname : title, OUTPUT_HTML); + fputs("\n", out); + } + + if (feedurl) + { + fputs(" DocSetFeedURL\n" + " ", out); + write_string(out, feedurl, OUTPUT_HTML); + fputs("\n", out); + } + + fputs(" \n" + "\n", out); + + fclose(out); + + /* + * Next the Nodes.xml file... + */ + + snprintf(filename, sizeof(filename), "%s/Contents/Resources/Nodes.xml", + docset); + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + fputs("\n" + "\n" + " \n" + " \n" + " ", out); + write_string(out, title, OUTPUT_HTML); + fputs(" \n" + " Documentation/index.html\n" + " \n", out); + + for (i = 0, tentry = toc->entries, toc_level = 1; i < toc->num_entries; i ++, tentry ++) + { + if (tentry->level > toc_level) + { + toc_level = tentry->level; + } + else if (tentry->level < toc_level) + { + fputs(" \n" + " \n", out); + toc_level = tentry->level; + } + + indent = toc_level == 2 ? " " : " "; + + fprintf(out, "%s\n" + "%s Documentation/index.html\n" + "%s %s\n" + "%s ", indent, xmlid ++, indent, indent, tentry->anchor, indent); + write_string(out, tentry->title, OUTPUT_HTML); + + if ((i + 1) < toc->num_entries && tentry[1].level > toc_level) + fprintf(out, "\n" + "%s \n", indent); + else + fprintf(out, "\n" + "%s\n", indent); + } + + if (toc_level == 2) + fputs(" \n" + "
      \n", out); + + fputs(" \n" + "
      \n" + " \n" + "\n", out); + + fclose(out); + + /* + * Then the Tokens.xml file... + */ + + snprintf(filename, sizeof(filename), "%s/Contents/Resources/Tokens.xml", + docset); + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + fputs("\n" + "\n", out); + + write_tokens(out, doc, "index.html"); + + fputs("\n", out); + + fclose(out); + + /* + * Finally the HTML file... + */ + + snprintf(filename, sizeof(filename), + "%s/Contents/Resources/Documentation/index.html", + docset); + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + /* + * Standard header... + */ + + write_html_head(out, OUTPUT_HTML, section, title, author, copyright, docversion, cssfile); + + /* + * Header... + */ + + if (headerfile) + { + /* + * Use custom header... + */ + + write_file(out, headerfile, OUTPUT_HTML); + } + else + { + /* + * Use standard header... + */ + + fputs("

      ", out); + write_string(out, title, OUTPUT_HTML); + fputs("

      \n", out); + + if (author) + { + fputs("

      ", out); + write_string(out, author, OUTPUT_HTML); + fputs("

      \n", out); + } + + if (copyright) + { + fputs("

      ", out); + write_string(out, copyright, OUTPUT_HTML); + fputs("

      \n", out); + } + } + + /* + * Table of contents... + */ + + write_html_toc(out, title, toc, NULL, NULL); + + free_toc(toc); + + /* + * Body... + */ + + fputs("
      \n", out); + + write_html_body(out, OUTPUT_HTML, bodyfile, body, doc); + + /* + * Footer... + */ + + if (footerfile) + { + /* + * Use custom footer... + */ + + write_file(out, footerfile, OUTPUT_HTML); + } + + fputs("
      \n" + " \n" + "\n", out); + + fclose(out); + + /* + * When generating document sets, run the docsetutil program to index it... + */ + + if (docset) + { + int argc = 0; /* Argument count */ + const char *args[5]; /* Argument array */ + pid_t pid; /* Process ID */ + int status; /* Exit status */ + + + args[argc++] = "/usr/bin/xcrun"; + args[argc++] = "docsetutil"; + args[argc++] = "index"; + args[argc++] = docset; + args[argc ] = NULL; + + if (posix_spawn(&pid, args[0], NULL, NULL, (char **)args, environ)) + { + fprintf(stderr, "mxmldoc: Unable to index documentation set \"%s\": %s\n", + docset, strerror(errno)); + } + else + { + while (wait(&status) != pid); + + if (status) + { + if (WIFEXITED(status)) + fprintf(stderr, "mxmldoc: docsetutil exited with status %d\n", + WEXITSTATUS(status)); + else + fprintf(stderr, "mxmldoc: docsetutil crashed with signal %d\n", + WTERMSIG(status)); + } + else + { + /* + * Remove unneeded temporary XML files... + */ + + snprintf(filename, sizeof(filename), "%s/Contents/Resources/Nodes.xml", + docset); + unlink(filename); + + snprintf(filename, sizeof(filename), "%s/Contents/Resources/Tokens.xml", + docset); + unlink(filename); + } + } + } +} +#endif /* __APPLE__ */ + + +/* + * 'write_element()' - Write an element's text nodes. + */ + +static void +write_element(FILE *out, /* I - Output file */ + mxml_node_t *doc, /* I - Document tree */ + mxml_node_t *element, /* I - Element to write */ + int mode) /* I - Output mode */ +{ + mxml_node_t *node; /* Current node */ + + + if (!element) + return; + + for (node = element->child; + node; + node = mxmlWalkNext(node, element, MXML_NO_DESCEND)) + if (node->type == MXML_TEXT) + { + if (node->value.text.whitespace) + putc(' ', out); + + if ((mode == OUTPUT_HTML || mode == OUTPUT_EPUB || mode == OUTPUT_DOCSET) && + (mxmlFindElement(doc, doc, "class", "name", node->value.text.string, + MXML_DESCEND) || + mxmlFindElement(doc, doc, "enumeration", "name", + node->value.text.string, MXML_DESCEND) || + mxmlFindElement(doc, doc, "struct", "name", node->value.text.string, + MXML_DESCEND) || + mxmlFindElement(doc, doc, "typedef", "name", node->value.text.string, + MXML_DESCEND) || + mxmlFindElement(doc, doc, "union", "name", node->value.text.string, + MXML_DESCEND))) + { + fputs("value.text.string, mode); + fputs("\">", out); + write_string(out, node->value.text.string, mode); + fputs("", out); + } + else + write_string(out, node->value.text.string, mode); + } + + if (!strcmp(element->value.element.name, "type") && + element->last_child->value.text.string[0] != '*') + putc(' ', out); +} + + +#ifdef HAVE_ZLIB_H +/* + * 'write_epub()' - Write documentation as an EPUB file. + */ + +static void +write_epub(const char *epubfile, /* I - EPUB file (output) */ + const char *section, /* I - Section */ + const char *title, /* I - Title */ + const char *author, /* I - Author */ + const char *copyright, /* I - Copyright */ + const char *docversion, /* I - Document version */ + const char *cssfile, /* I - Stylesheet file */ + const char *coverimage, /* I - Cover image file */ + const char *headerfile, /* I - Header file */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + mxml_node_t *doc, /* I - XML documentation */ + const char *footerfile) /* I - Footer file */ +{ + int status = 0; /* Write status */ + size_t i; /* Looping var */ + FILE *fp; /* Output file */ + char epubbase[256], /* Base name of EPUB file (identifier) */ + *epubptr; /* Pointer into base name */ + zipc_t *epub; /* EPUB ZIP container */ + zipc_file_t *epubf; /* File in EPUB ZIP container */ + char xhtmlfile[1024], /* XHTML output filename */ + *xhtmlptr; /* Pointer into output filename */ + mxml_node_t *package_opf, /* package_opf file */ + *package, /* package node */ + *metadata, /* metadata node */ + *manifest, /* manifest node */ + *spine, /* spine node */ + *temp; /* Other (leaf) node */ + char identifier[256], /* dc:identifier string */ + *package_opf_string; /* package_opf file as a string */ + toc_t *toc; /* Table of contents */ + toc_entry_t *tentry; /* Current table of contents */ + int toc_level; /* Current table-of-contents level */ + static const char *mimetype = /* mimetype file as a string */ + "application/epub+zip"; + static const char *container_xml = /* container.xml file as a string */ + "\n" + "\n" + " \n" + " \n" + " \n" + "\n"; + + + /* + * Start by writing the XHTML content... + */ + + strlcpy(xhtmlfile, epubfile, sizeof(xhtmlfile)); + if ((xhtmlptr = strstr(xhtmlfile, ".epub")) != NULL) + strlcpy(xhtmlptr, ".xhtml", sizeof(xhtmlfile) - (size_t)(xhtmlptr - xhtmlfile)); + else + strlcat(xhtmlfile, ".xhtml", sizeof(xhtmlfile)); + + fp = fopen(xhtmlfile, "w"); + + /* + * Standard header... + */ + + write_html_head(fp, OUTPUT_EPUB, section, title, author, copyright, docversion, cssfile); + + if (coverimage) + fputs("

      ", fp); + + /* + * Header... + */ + + if (headerfile) + { + /* + * Use custom header... + */ + + write_file(fp, headerfile, OUTPUT_EPUB); + } + else + { + /* + * Use standard header... + */ + + fputs("

      ", fp); + write_string(fp, title, OUTPUT_EPUB); + fputs("

      \n", fp); + + if (author) + { + fputs("

      ", fp); + write_string(fp, author, OUTPUT_EPUB); + fputs("

      \n", fp); + } + + if (copyright) + { + fputs("

      ", fp); + write_string(fp, copyright, OUTPUT_EPUB); + fputs("

      \n", fp); + } + } + + /* + * Body... + */ + + fputs("
      \n", fp); + + write_html_body(fp, OUTPUT_EPUB, bodyfile, body, doc); + + /* + * Footer... + */ + + if (footerfile) + { + /* + * Use custom footer... + */ + + write_file(fp, footerfile, OUTPUT_EPUB); + } + + fputs("
      \n" + " \n" + "\n", fp); + + /* + * Close XHTML file... + */ + + fclose(fp); + + /* + * Make the EPUB archive... + */ + + if ((epub = zipcOpen(epubfile, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", epubfile, strerror(errno)); + unlink(xhtmlfile); + return; + } + + /* + * Add the mimetype file... + */ + + status |= zipcCreateFileWithString(epub, "mimetype", mimetype); + + /* + * The META-INF/ directory... + */ + + status |= zipcCreateDirectory(epub, "META-INF/"); + + /* + * The META-INF/container.xml file... + */ + + if ((epubf = zipcCreateFile(epub, "META-INF/container.xml", 1)) != NULL) + { + status |= zipcFilePuts(epubf, container_xml); + status |= zipcFileFinish(epubf); + } + else + status = -1; + + /* + * The OEBPS/ directory... + */ + + status |= zipcCreateDirectory(epub, "OEBPS/"); + + /* + * Copy the OEBPS/body.xhtml file... + */ + + status |= zipcCopyFile(epub, "OEBPS/body.xhtml", xhtmlfile, 1, 1); + + unlink(xhtmlfile); + + /* + * Add the cover image, if specified... + */ + + if (coverimage) + status |= zipcCopyFile(epub, "OEBPS/cover.png", coverimage, 0, 0); + + /* + * Now the OEBPS/package.opf file... + */ + + if ((epubptr = strrchr(epubfile, '/')) != NULL) + strlcpy(epubbase, epubptr + 1, sizeof(epubbase)); + else + strlcpy(epubbase, epubfile, sizeof(epubbase)); + + if ((epubptr = strstr(epubbase, ".epub")) != NULL) + *epubptr = '\0'; + + package_opf = mxmlNewXML("1.0"); + + package = mxmlNewElement(package_opf, "package"); + mxmlElementSetAttr(package, "xmlns", "http://www.idpf.org/2007/opf"); + mxmlElementSetAttr(package, "unique-identifier", epubbase); + mxmlElementSetAttr(package, "version", "3.0"); + + metadata = mxmlNewElement(package, "metadata"); + mxmlElementSetAttr(metadata, "xmlns:dc", "http://purl.org/dc/elements/1.1/"); + mxmlElementSetAttr(metadata, "xmlns:opf", "http://www.idpf.org/2007/opf"); + + temp = mxmlNewElement(metadata, "dc:title"); + mxmlNewOpaque(temp, title); + + temp = mxmlNewElement(metadata, "dc:creator"); + mxmlNewOpaque(temp, author); + + temp = mxmlNewElement(metadata, "meta"); + mxmlElementSetAttr(temp, "property", "dcterms:modified"); + mxmlNewOpaque(temp, get_iso_date(time(NULL))); + + temp = mxmlNewElement(metadata, "dc:language"); + mxmlNewOpaque(temp, "en-US"); /* TODO: Make this settable */ + + temp = mxmlNewElement(metadata, "dc:rights"); + mxmlNewOpaque(temp, copyright); + + temp = mxmlNewElement(metadata, "dc:publisher"); + mxmlNewOpaque(temp, "mxmldoc"); + + temp = mxmlNewElement(metadata, "dc:identifier"); + mxmlElementSetAttr(temp, "id", epubbase); + snprintf(identifier, sizeof(identifier), "%s-%s", epubbase, docversion); + mxmlNewOpaque(temp, identifier); + + if (coverimage) + { + temp = mxmlNewElement(metadata, "meta"); + mxmlElementSetAttr(temp, "name", "cover"); + mxmlElementSetAttr(temp, "content", "cover-image"); + } + + manifest = mxmlNewElement(package, "manifest"); + + temp = mxmlNewElement(manifest, "item"); + mxmlElementSetAttr(temp, "id", "nav"); + mxmlElementSetAttr(temp, "href", "nav.xhtml"); + mxmlElementSetAttr(temp, "media-type", "application/xhtml+xml"); + mxmlElementSetAttr(temp, "properties", "nav"); + + temp = mxmlNewElement(manifest, "item"); + mxmlElementSetAttr(temp, "id", "body"); + mxmlElementSetAttr(temp, "href", "body.xhtml"); + mxmlElementSetAttr(temp, "media-type", "application/xhtml+xml"); + + if (coverimage) + { + temp = mxmlNewElement(manifest, "item"); + mxmlElementSetAttr(temp, "id", "cover-image"); + mxmlElementSetAttr(temp, "href", "cover.png"); + mxmlElementSetAttr(temp, "media-type", "image/png"); + } + + spine = mxmlNewElement(package, "spine"); + + temp = mxmlNewElement(spine, "itemref"); + mxmlElementSetAttr(temp, "idref", "body"); + + package_opf_string = mxmlSaveAllocString(package_opf, epub_ws_cb); + + if ((epubf = zipcCreateFile(epub, "OEBPS/package.opf", 1)) != NULL) + { + status |= zipcFilePuts(epubf, package_opf_string); + status |= zipcFileFinish(epubf); + } + else + status = -1; + + free(package_opf_string); + + /* + * Then the OEBPS/nav.xhtml file... + */ + + if ((epubf = zipcCreateFile(epub, "OEBPS/nav.xhtml", 1)) != NULL) + { + toc = build_toc(doc, bodyfile, body, OUTPUT_EPUB); + + zipcFilePrintf(epubf, "\n" + "\n" + "\n" + " \n" + " %s\n" + " \n" + " \n" + " \n" + "
    • \n"); + toc_level = tentry->level; + } + + zipcFilePrintf(epubf, " %s
    • %s", toc_level == 1 ? "" : " ", tentry->anchor, tentry->title); + if ((i + 1) < toc->num_entries && tentry[1].level > toc_level) + zipcFilePuts(epubf, "
        \n"); + else + zipcFilePuts(epubf, "\n"); + } + + if (toc_level == 2) + zipcFilePuts(epubf, "
    • \n"); + + zipcFilePuts(epubf, " \n" + " \n" + " \n" + "\n"); + + zipcFileFinish(epubf); + free_toc(toc); + } + else + status = -1; + + if (status) + fprintf(stderr, "mxmldoc: Unable to write \"%s\": %s\n", epubfile, zipcError(epub)); + else if (zipcClose(epub)) + fprintf(stderr, "mxmldoc: Unable to write \"%s\": %s\n", epubfile, strerror(errno)); +} +#endif /* HAVE_ZLIB_H */ + + +/* + * 'write_file()' - Copy a file to the output. + */ + +static void +write_file(FILE *out, /* I - Output file */ + const char *file, /* I - File to copy */ + int mode) /* I - Output mode */ +{ + FILE *fp; /* Copy file */ + char line[8192]; /* Line from file */ + + + if ((fp = fopen(file, "r")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to open \"%s\": %s\n", file, + strerror(errno)); + return; + } + + if (mode == OUTPUT_EPUB) + { + char *ptr; /* Pointer into line */ + + while (fgets(line, sizeof(line), fp)) + { + for (ptr = line; *ptr; ptr ++) + { + if (!strncmp(ptr, " ", 6)) + { + ptr += 5; + fputs(" ", out); + } + else if (!strncmp(ptr, "©", 6)) + { + ptr += 5; + fputs("©", out); + } + else if (!strncmp(ptr, "®", 5)) + { + ptr += 4; + fputs("®", out); + } + else if (!strncmp(ptr, "™", 7)) + { + ptr += 6; + fputs("™", out); + } + else + fputc(*ptr, out); + } + } + } + else + { + while (fgets(line, sizeof(line), fp)) + fputs(line, out); + } + + fclose(fp); +} + + +/* + * 'write_function()' - Write documentation for a function. + */ + +static void +write_function(FILE *out, /* I - Output file */ + int mode, /* I - Output mode */ + mxml_node_t *doc, /* I - Document */ + mxml_node_t *function, /* I - Function */ + int level) /* I - Base heading level */ +{ + mxml_node_t *arg, /* Current argument */ + *adesc, /* Description of argument */ + *description, /* Description of function */ + *type, /* Type for argument */ + *node; /* Node in description */ + const char *name, /* Name of function/type */ + *defval; /* Default value */ + const char *prefix; /* Prefix string */ + char *sep; /* Newline separator */ + + + name = mxmlElementGetAttr(function, "name"); + description = mxmlFindElement(function, function, "description", NULL, + NULL, MXML_DESCEND_FIRST); + + fprintf(out, "%s%s\n", level, level == 3 ? "function" : "method", get_comment_info(description), name, name, level); + + if (description) + write_description(out, mode, description, "p", 1); + + fputs("

      \n", out); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_HTML); + else + fputs("void ", out); + + fputs(name, out); + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = "("; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ", ") + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + fputs(prefix, out); + if (type->child) + write_element(out, doc, type, mode); + + fputs(mxmlElementGetAttr(arg, "name"), out); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + fprintf(out, " %s", defval); + } + + if (!strcmp(prefix, "(")) + fputs("(void);

      \n", out); + else + { + fprintf(out, + ");

      \n" + "Parameters\n" + "\n", level + 1, level + 1); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND)) + { + fprintf(out, "\n", mxmlElementGetAttr(arg, "name")); + + adesc = mxmlFindElement(arg, arg, "description", NULL, NULL, + MXML_DESCEND_FIRST); + + write_description(out, mode, adesc, "td", -1); + fputs("\n", out); + } + + fputs("
      %s
      \n", out); + } + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + { + fprintf(out, "Return Value\n", level + 1, + level + 1); + + adesc = mxmlFindElement(arg, arg, "description", NULL, NULL, + MXML_DESCEND_FIRST); + + write_description(out, mode, adesc, "p", 1); + write_description(out, mode, adesc, "p", 0); + } + + if (description) + { + for (node = description->child; node; node = node->next) + if (node->value.opaque && + (sep = strstr(node->value.opaque, "\n\n")) != NULL) + { + sep += 2; + if (*sep && strncmp(sep, "@since ", 7) && + strncmp(sep, "@deprecated@", 12)) + break; + } + + if (node) + { + fprintf(out, "Discussion\n", level + 1, + level + 1); + write_description(out, mode, description, "p", 0); + } + } +} + + +/* + * 'write_html()' - Write HTML documentation. + */ + +static void +write_html(const char *framefile, /* I - Framed HTML basename */ + const char *section, /* I - Section */ + const char *title, /* I - Title */ + const char *author, /* I - Author's name */ + const char *copyright, /* I - Copyright string */ + const char *docversion, /* I - Documentation set version */ + const char *cssfile, /* I - Stylesheet file */ + const char *coverimage, /* I - Cover image file */ + const char *headerfile, /* I - Header file */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + mxml_node_t *doc, /* I - XML documentation */ + const char *footerfile) /* I - Footer file */ +{ + FILE *out; /* Output file */ + const char *basename; /* Base filename for framed output */ + char filename[1024]; /* Current output filename */ + toc_t *toc; /* Table of contents */ + + + /* + * Create the table-of-contents entries... + */ + + toc = build_toc(doc, bodyfile, body, OUTPUT_HTML); + + if (framefile) + { + /* + * Get the basename of the frame file... + */ + + if ((basename = strrchr(framefile, '/')) != NULL) + basename ++; + else + basename = framefile; + + if (strstr(basename, ".html")) + fputs("mxmldoc: Frame base name should not contain .html extension.\n", stderr); + + /* + * Create the container HTML file for the frames... + */ + + snprintf(filename, sizeof(filename), "%s.html", framefile); + + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + fputs("\n" + "\n" + " \n" + " ", out); + write_string(out, title, OUTPUT_HTML); + fputs("\n", out); + + if (section) + fprintf(out, " \n", section); + + fputs(" \n" + "\t\n" + "\t\n" + " \n" + " \n" + " \n", out); + + fputs(" \n", out); + fprintf(out, " \n", basename); + fprintf(out, " \n", basename); + fputs(" \n" + " \n" + " <h1>", out); + write_string(out, title, OUTPUT_HTML); + fprintf(out, + "</h1>\n" + " <ul>\n" + " <li><a href=\"%s-toc.html\">Table of Contents</a></li>\n" + " <li><a href=\"%s-body.html\">Body</a></li>\n" + " </ul>\n", basename, basename); + fputs(" \n" + "\n", out); + fclose(out); + + /* + * Write the table-of-contents file... + */ + + snprintf(filename, sizeof(filename), "%s-toc.html", framefile); + + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + + write_html_head(out, OUTPUT_HTML, section, title, author, copyright, docversion, cssfile); + + if (coverimage) + { + fputs("

      \n", out); + } + + snprintf(filename, sizeof(filename), "%s-body.html", basename); + + write_html_toc(out, title, toc, filename, "body"); + + fputs(" \n" + "\n", out); + fclose(out); + + /* + * Finally, open the body file... + */ + + snprintf(filename, sizeof(filename), "%s-body.html", framefile); + + if ((out = fopen(filename, "w")) == NULL) + { + fprintf(stderr, "mxmldoc: Unable to create \"%s\": %s\n", filename, + strerror(errno)); + return; + } + } + else + out = stdout; + + /* + * Standard header... + */ + + write_html_head(out, OUTPUT_HTML, section, title, author, copyright, docversion, cssfile); + + if (!framefile && coverimage) + { + fputs("

      \n", out); + } + + /* + * Header... + */ + + if (headerfile) + { + /* + * Use custom header... + */ + + write_file(out, headerfile, OUTPUT_HTML); + } + else + { + /* + * Use standard header... + */ + + fputs("

      ", out); + write_string(out, title, OUTPUT_HTML); + fputs("

      \n", out); + + if (author) + { + fputs("

      ", out); + write_string(out, author, OUTPUT_HTML); + fputs("

      \n", out); + } + + if (copyright) + { + fputs("

      ", out); + write_string(out, copyright, OUTPUT_HTML); + fputs("

      \n", out); + } + } + + /* + * Table of contents... + */ + + if (!framefile) + write_html_toc(out, title, toc, NULL, NULL); + + free_toc(toc); + + /* + * Body... + */ + + fputs("
      \n", out); + + write_html_body(out, OUTPUT_HTML, bodyfile, body, doc); + + /* + * Footer... + */ + + if (footerfile) + { + /* + * Use custom footer... + */ + + write_file(out, footerfile, OUTPUT_HTML); + } + + fputs("
      \n" + " \n" + "\n", out); + + /* + * Close output file as needed... + */ + + if (out != stdout) + fclose(out); +} + + +/* + * 'write_html_body()' - Write a HTML/XHTML body. + */ + +static void +write_html_body( + FILE *out, /* I - Output file */ + int mode, /* I - HTML or EPUB/XHTML output */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + mxml_node_t *doc) /* I - XML documentation */ +{ + mxml_node_t *function, /* Current function */ + *scut, /* Struct/class/union/typedef */ + *arg, /* Current argument */ + *description, /* Description of function/var */ + *type; /* Type for argument */ + const char *name, /* Name of function/type */ + *defval; /* Default value */ + + + /* + * Body... + */ + + if (body) + markdown_write_block(out, body, mode); + else if (bodyfile) + write_file(out, bodyfile, mode); + + /* + * List of classes... + */ + + if ((scut = find_public(doc, doc, "class", NULL, mode)) != NULL) + { + fputs("

      Classes

      \n", out); + + while (scut) + { + write_scu(out, mode, doc, scut); + + scut = find_public(scut, doc, "class", NULL, mode); + } + } + + /* + * List of functions... + */ + + if ((function = find_public(doc, doc, "function", NULL, mode)) != NULL) + { + fputs("

      Functions

      \n", out); + + while (function) + { + write_function(out, mode, doc, function, 3); + + function = find_public(function, doc, "function", NULL, mode); + } + } + + /* + * List of types... + */ + + if ((scut = find_public(doc, doc, "typedef", NULL, mode)) != NULL) + { + fputs("

      Data Types

      \n", out); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + fprintf(out, "

      %s%s

      \n", name, get_comment_info(description), name); + + if (description) + write_description(out, mode, description, "p", 1); + + fputs("

      \n" + "typedef ", out); + + type = mxmlFindElement(scut, scut, "type", NULL, NULL, MXML_DESCEND_FIRST); + + for (type = type->child; type; type = type->next) + if (!strcmp(type->value.text.string, "(")) + break; + else + { + if (type->value.text.whitespace) + putc(' ', out); + + if (find_public(doc, doc, "class", type->value.text.string, mode) || + find_public(doc, doc, "enumeration", type->value.text.string, mode) || + find_public(doc, doc, "struct", type->value.text.string, mode) || + find_public(doc, doc, "typedef", type->value.text.string, mode) || + find_public(doc, doc, "union", type->value.text.string, mode)) + { + fputs("value.text.string, OUTPUT_HTML); + fputs("\">", out); + write_string(out, type->value.text.string, OUTPUT_HTML); + fputs("", out); + } + else + write_string(out, type->value.text.string, OUTPUT_HTML); + } + + if (type) + { + /* + * Output function type... + */ + + if (type->prev && type->prev->value.text.string[0] != '*') + putc(' ', out); + + fprintf(out, "(*%s", name); + + for (type = type->next->next; type; type = type->next) + { + if (type->value.text.whitespace) + putc(' ', out); + + if (find_public(doc, doc, "class", type->value.text.string, mode) || + find_public(doc, doc, "enumeration", type->value.text.string, mode) || + find_public(doc, doc, "struct", type->value.text.string, mode) || + find_public(doc, doc, "typedef", type->value.text.string, mode) || + find_public(doc, doc, "union", type->value.text.string, mode)) + { + fputs("value.text.string, OUTPUT_HTML); + fputs("\">", out); + write_string(out, type->value.text.string, OUTPUT_HTML); + fputs("", out); + } + else + write_string(out, type->value.text.string, OUTPUT_HTML); + } + + fputs(";\n", out); + } + else + { + type = mxmlFindElement(scut, scut, "type", NULL, NULL, + MXML_DESCEND_FIRST); + if (type->last_child->value.text.string[0] != '*') + putc(' ', out); + + fprintf(out, "%s;\n", name); + } + + fputs("

      \n", out); + + scut = find_public(scut, doc, "typedef", NULL, mode); + } + } + + /* + * List of structures... + */ + + if ((scut = find_public(doc, doc, "struct", NULL, mode)) != NULL) + { + fputs("

      Structures

      \n", out); + + while (scut) + { + write_scu(out, mode, doc, scut); + + scut = find_public(scut, doc, "struct", NULL, mode); + } + } + + /* + * List of unions... + */ + + if ((scut = find_public(doc, doc, "union", NULL, mode)) != NULL) + { + fputs("

      Unions

      \n", out); + + while (scut) + { + write_scu(out, mode, doc, scut); + + scut = find_public(scut, doc, "union", NULL, mode); + } + } + + /* + * Variables... + */ + + if ((arg = find_public(doc, doc, "variable", NULL, mode)) != NULL) + { + fputs("

      Variables

      \n", out); + + while (arg) + { + name = mxmlElementGetAttr(arg, "name"); + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + fprintf(out, "

      %s%s

      \n", name, get_comment_info(description), name); + + if (description) + write_description(out, mode, description, "p", 1); + + fputs("

      ", out); + + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, NULL, MXML_DESCEND_FIRST), OUTPUT_HTML); + fputs(mxmlElementGetAttr(arg, "name"), out); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + fprintf(out, " %s", defval); + fputs(";

      \n", out); + + arg = find_public(arg, doc, "variable", NULL, mode); + } + } + + /* + * List of enumerations... + */ + + if ((scut = find_public(doc, doc, "enumeration", NULL, mode)) != NULL) + { + fputs("

      Constants

      \n", out); + + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + fprintf(out, "

      %s%s

      \n", name, get_comment_info(description), name); + + if (description) + write_description(out, mode, description, "p", 1); + + fputs("

      Constants

      \n" + " \n", out); + + for (arg = find_public(scut, scut, "constant", NULL, mode); + arg; + arg = find_public(arg, scut, "constant", NULL, mode)) + { + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + fprintf(out, " ", + mxmlElementGetAttr(arg, "name"), get_comment_info(description)); + + write_description(out, mode, description, "td", -1); + fputs("\n", out); + } + + fputs("
      %s %s
      \n", out); + + scut = find_public(scut, doc, "enumeration", NULL, mode); + } + } +} + + +/* + * 'write_html_head()' - Write the standard HTML header. + */ + +static void +write_html_head(FILE *out, /* I - Output file */ + int mode, /* I - HTML or EPUB/XHTML */ + const char *section, /* I - Section */ + const char *title, /* I - Title */ + const char *author, /* I - Author's name */ + const char *copyright, /* I - Copyright string */ + const char *docversion, /* I - Document version string */ + const char *cssfile) /* I - Stylesheet */ +{ + if (mode == OUTPUT_EPUB) + fputs("\n" + "\n" + "\n", out); + else + fputs("\n" + "\n", out); + + if (section) + fprintf(out, "\n", section); + + fputs(" \n" + " ", out); + write_string(out, title, mode); + fputs("\n", out); + + if (mode == OUTPUT_EPUB) + { + if (section) + fprintf(out, " \n", section); + + fputs(" \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n", out); + else + fputs("-->\n" + " \n" + " \n", out); +} + + +/* + * 'write_html_toc()' - Write a HTML table-of-contents. + */ + +static void +write_html_toc(FILE *out, /* I - Output file */ + const char *title, /* I - Title */ + toc_t *toc, /* I - Table of contents */ + const char *filename, /* I - Target filename, if any */ + const char *target) /* I - Target frame name, if any */ +{ + size_t i; /* Looping var */ + toc_entry_t *tentry; /* Current table of contents */ + int toc_level; /* Current table-of-contents level */ + char targetattr[1024]; /* Target attribute, if any */ + + + /* + * If target is set, it is the frame file that contains the body. + * Otherwise, we are creating a single-file... + */ + + if (target) + snprintf(targetattr, sizeof(targetattr), " target=\"%s\"", target); + else + targetattr[0] = '\0'; + + fputs("
      \n", out); + + if (filename) + { + fprintf(out, "

      ", filename, targetattr); + write_string(out, title, OUTPUT_HTML); + fputs("

      \n", out); + } + + fputs("

      Contents

      \n" + "
        \n", out); + + for (i = 0, tentry = toc->entries, toc_level = 1; i < toc->num_entries; i ++, tentry ++) + { + if (tentry->level > toc_level) + { + toc_level = tentry->level; + } + else if (tentry->level < toc_level) + { + fputs("
      \n", out); + toc_level = tentry->level; + } + + fprintf(out, " %s
    • ", toc_level == 1 ? "" : " ", filename ? filename : "", tentry->anchor, targetattr); + write_string(out, tentry->title, OUTPUT_HTML); + + if ((i + 1) < toc->num_entries && tentry[1].level > toc_level) + fputs("
        \n", out); + else + fputs("\n", out); + } + + if (toc_level == 2) + fputs("
    • \n", out); + + fputs(" \n" + "
      \n", out); +} + + +/* + * 'write_man()' - Write manpage documentation. + */ + +static void +write_man(const char *man_name, /* I - Name of manpage */ + const char *section, /* I - Section */ + const char *title, /* I - Title */ + const char *author, /* I - Author's name */ + const char *copyright, /* I - Copyright string */ + const char *headerfile, /* I - Header file */ + const char *bodyfile, /* I - Body file */ + mmd_t *body, /* I - Markdown body */ + mxml_node_t *doc, /* I - XML documentation */ + const char *footerfile) /* I - Footer file */ +{ + int i; /* Looping var */ + mxml_node_t *function, /* Current function */ + *scut, /* Struct/class/union/typedef */ + *arg, /* Current argument */ + *description, /* Description of function/var */ + *type; /* Type for argument */ + const char *name, /* Name of function/type */ + *cname, /* Class name */ + *defval, /* Default value */ + *parent; /* Parent class */ + int inscope; /* Variable/method scope */ + char prefix; /* Prefix character */ + const char *source_date_epoch; /* SOURCE_DATE_EPOCH environment variable */ + time_t curtime; /* Current time */ + struct tm *curdate; /* Current date */ + char buffer[1024]; /* String buffer */ + static const char * const scopes[] = /* Scope strings */ + { + "private", + "protected", + "public" + }; + + + /* + * Standard man page... + * + * Get the current date, using the SOURCE_DATE_EPOCH environment variable, if + * present, for the number of seconds since the epoch - this enables + * reproducible builds (Issue #193). + */ + + if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (curtime = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0) + curtime = time(NULL); + + curdate = localtime(&curtime); + strftime(buffer, sizeof(buffer), "%x", curdate); + + printf(".TH %s %s \"%s\" \"%s\" \"%s\"\n", man_name, section ? section : "3", + title ? title : "", buffer, title ? title : ""); + + /* + * Header... + */ + + if (headerfile) + { + /* + * Use custom header... + */ + + write_file(stdout, headerfile, OUTPUT_MAN); + } + else + { + /* + * Use standard header... + */ + + puts(".SH NAME"); + printf("%s \\- %s\n", man_name, title ? title : man_name); + } + + /* + * Body... + */ + + if (body) + markdown_write_block(stdout, body, OUTPUT_MAN); + else if (bodyfile) + write_file(stdout, bodyfile, OUTPUT_MAN); + + /* + * List of classes... + */ + + if (find_public(doc, doc, "class", NULL, OUTPUT_MAN)) + { + puts(".SH CLASSES"); + + for (scut = find_public(doc, doc, "class", NULL, OUTPUT_MAN); + scut; + scut = find_public(scut, doc, "class", NULL, OUTPUT_MAN)) + { + cname = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", cname); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + printf(".PP\n" + ".nf\n" + "class %s", cname); + if ((parent = mxmlElementGetAttr(scut, "parent")) != NULL) + printf(" %s", parent); + puts("\n{"); + + for (i = 0; i < 3; i ++) + { + inscope = 0; + + for (arg = mxmlFindElement(scut, scut, "variable", "scope", scopes[i], + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "variable", "scope", scopes[i], + MXML_NO_DESCEND)) + { + if (!inscope) + { + inscope = 1; + printf(" %s:\n", scopes[i]); + } + + printf(" "); + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + printf("%s;\n", mxmlElementGetAttr(arg, "name")); + } + + for (function = mxmlFindElement(scut, scut, "function", "scope", + scopes[i], MXML_DESCEND_FIRST); + function; + function = mxmlFindElement(function, scut, "function", "scope", + scopes[i], MXML_NO_DESCEND)) + { + if (!inscope) + { + inscope = 1; + printf(" %s:\n", scopes[i]); + } + + name = mxmlElementGetAttr(function, "name"); + + printf(" "); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + else if (strcmp(cname, name) && strcmp(cname, name + 1)) + fputs("void ", stdout); + + printf("%s", name); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putchar(prefix); + if (prefix == ',') + putchar(' '); + + if (type->child) + write_element(stdout, doc, type, OUTPUT_MAN); + fputs(mxmlElementGetAttr(arg, "name"), stdout); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + printf(" %s", defval); + } + + if (prefix == '(') + puts("(void);"); + else + puts(");"); + } + } + + puts("};\n" + ".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + /* + * List of enumerations... + */ + + if (find_public(doc, doc, "enumeration", NULL, OUTPUT_MAN)) + { + puts(".SH ENUMERATIONS"); + + for (scut = find_public(doc, doc, "enumeration", NULL, OUTPUT_MAN); + scut; + scut = find_public(scut, doc, "enumeration", NULL, OUTPUT_MAN)) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", name); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + + for (arg = mxmlFindElement(scut, scut, "constant", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "constant", NULL, NULL, + MXML_NO_DESCEND)) + { + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".TP 5\n%s\n.br\n", mxmlElementGetAttr(arg, "name")); + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + } + } + } + + /* + * List of functions... + */ + + if (find_public(doc, doc, "function", NULL, OUTPUT_MAN)) + { + puts(".SH FUNCTIONS"); + + for (function = find_public(doc, doc, "function", NULL, OUTPUT_MAN); + function; + function = find_public(function, doc, "function", NULL, OUTPUT_MAN)) + { + name = mxmlElementGetAttr(function, "name"); + description = mxmlFindElement(function, function, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", name); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + puts(".PP\n" + ".nf"); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + else + fputs("void", stdout); + + printf(" %s ", name); + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + printf("%c\n ", prefix); + if (type->child) + write_element(stdout, doc, type, OUTPUT_MAN); + fputs(mxmlElementGetAttr(arg, "name"), stdout); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + printf(" %s", defval); + } + + if (prefix == '(') + puts("(void);"); + else + puts("\n);"); + + puts(".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + /* + * List of structures... + */ + + if (find_public(doc, doc, "struct", NULL, OUTPUT_MAN)) + { + puts(".SH STRUCTURES"); + + for (scut = find_public(doc, doc, "struct", NULL, OUTPUT_MAN); + scut; + scut = find_public(scut, doc, "struct", NULL, OUTPUT_MAN)) + { + cname = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", cname); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + printf(".PP\n" + ".nf\n" + "struct %s\n{\n", cname); + for (arg = mxmlFindElement(scut, scut, "variable", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "variable", NULL, NULL, + MXML_NO_DESCEND)) + { + printf(" "); + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + printf("%s;\n", mxmlElementGetAttr(arg, "name")); + } + + for (function = mxmlFindElement(scut, scut, "function", NULL, NULL, + MXML_DESCEND_FIRST); + function; + function = mxmlFindElement(function, scut, "function", NULL, NULL, + MXML_NO_DESCEND)) + { + name = mxmlElementGetAttr(function, "name"); + + printf(" "); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + else if (strcmp(cname, name) && strcmp(cname, name + 1)) + fputs("void ", stdout); + + fputs(name, stdout); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putchar(prefix); + if (prefix == ',') + putchar(' '); + + if (type->child) + write_element(stdout, doc, type, OUTPUT_MAN); + fputs(mxmlElementGetAttr(arg, "name"), stdout); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + printf(" %s", defval); + } + + if (prefix == '(') + puts("(void);"); + else + puts(");"); + } + + puts("};\n" + ".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + /* + * List of types... + */ + + if (find_public(doc, doc, "typedef", NULL, OUTPUT_MAN)) + { + puts(".SH TYPES"); + + for (scut = find_public(doc, doc, "typedef", NULL, OUTPUT_MAN); + scut; + scut = find_public(scut, doc, "typedef", NULL, OUTPUT_MAN)) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", name); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + fputs(".PP\n" + ".nf\n" + "typedef ", stdout); + + type = mxmlFindElement(scut, scut, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + for (type = type->child; type; type = type->next) + if (!strcmp(type->value.text.string, "(")) + break; + else + { + if (type->value.text.whitespace) + putchar(' '); + + write_string(stdout, type->value.text.string, OUTPUT_MAN); + } + + if (type) + { + /* + * Output function type... + */ + + printf(" (*%s", name); + + for (type = type->next->next; type; type = type->next) + { + if (type->value.text.whitespace) + putchar(' '); + + write_string(stdout, type->value.text.string, OUTPUT_MAN); + } + + puts(";"); + } + else + printf(" %s;\n", name); + + puts(".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + /* + * List of unions... + */ + + if (find_public(doc, doc, "union", NULL, OUTPUT_MAN)) + { + puts(".SH UNIONS"); + + for (scut = find_public(doc, doc, "union", NULL, OUTPUT_MAN); + scut; + scut = find_public(scut, doc, "union", NULL, OUTPUT_MAN)) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", name); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + printf(".PP\n" + ".nf\n" + "union %s\n{\n", name); + for (arg = mxmlFindElement(scut, scut, "variable", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "variable", NULL, NULL, + MXML_NO_DESCEND)) + { + printf(" "); + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + printf("%s;\n", mxmlElementGetAttr(arg, "name")); + } + + puts("};\n" + ".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + /* + * Variables... + */ + + if (find_public(doc, doc, "variable", NULL, OUTPUT_MAN)) + { + puts(".SH VARIABLES"); + + for (arg = find_public(doc, doc, "variable", NULL, OUTPUT_MAN); + arg; + arg = find_public(arg, doc, "variable", NULL, OUTPUT_MAN)) + { + name = mxmlElementGetAttr(arg, "name"); + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + printf(".SS %s\n", name); + + write_description(stdout, OUTPUT_MAN, description, NULL, 1); + + puts(".PP\n" + ".nf"); + + write_element(stdout, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_MAN); + fputs(mxmlElementGetAttr(arg, "name"), stdout); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + printf(" %s", defval); + puts(";\n" + ".fi"); + + write_description(stdout, OUTPUT_MAN, description, NULL, 0); + } + } + + if (footerfile) + { + /* + * Use custom footer... + */ + + write_file(stdout, footerfile, OUTPUT_MAN); + } + else + { + /* + * Use standard footer... + */ + + puts(".SH AUTHOR"); + puts(".PP"); + puts(author); + + puts(".SH COPYRIGHT"); + puts(".PP"); + puts(copyright); + } +} + + +/* + * 'write_scu()' - Write a structure, class, or union. + */ + +static void +write_scu(FILE *out, /* I - Output file */ + int mode, /* I - Output mode */ + mxml_node_t *doc, /* I - Document */ + mxml_node_t *scut) /* I - Structure, class, or union */ +{ + int i; /* Looping var */ + mxml_node_t *function, /* Current function */ + *arg, /* Current argument */ + *description, /* Description of function/var */ + *type; /* Type for argument */ + const char *name, /* Name of function/type */ + *cname, /* Class name */ + *defval, /* Default value */ + *parent, /* Parent class */ + *scope; /* Scope for variable/function */ + int inscope, /* Variable/method scope */ + maxscope; /* Maximum scope */ + char prefix; /* Prefix character */ + const char *br = mode == OUTPUT_EPUB ? "
      " : "
      "; + /* Break sequence */ + static const char * const scopes[] = /* Scope strings */ + { + "private", + "protected", + "public" + }; + + + cname = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", NULL, + NULL, MXML_DESCEND_FIRST); + + fprintf(out, "

      %s%s

      \n", scut->value.element.name, get_comment_info(description), cname, cname); + + if (description) + write_description(out, mode, description, "p", 1); + + fprintf(out, "

      %s %s", scut->value.element.name, cname); + if ((parent = mxmlElementGetAttr(scut, "parent")) != NULL) + fprintf(out, " %s", parent); + fprintf(out, " {%s\n", br); + + maxscope = !strcmp(scut->value.element.name, "class") ? 3 : 1; + + for (i = 0; i < maxscope; i ++) + { + inscope = maxscope == 1; + + for (arg = mxmlFindElement(scut, scut, "variable", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "variable", NULL, NULL, + MXML_NO_DESCEND)) + { + if (maxscope > 1 && + ((scope = mxmlElementGetAttr(arg, "scope")) == NULL || + strcmp(scope, scopes[i]))) + continue; + + if (!inscope) + { + inscope = 1; + fprintf(out, "  %s:
      \n", scopes[i]); + } + + fputs("    ", out); + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_HTML); + fprintf(out, "%s;%s\n", mxmlElementGetAttr(arg, "name"), br); + } + + for (function = mxmlFindElement(scut, scut, "function", NULL, NULL, + MXML_DESCEND_FIRST); + function; + function = mxmlFindElement(function, scut, "function", NULL, NULL, + MXML_NO_DESCEND)) + { + if (maxscope > 1 && + ((scope = mxmlElementGetAttr(arg, "scope")) == NULL || + strcmp(scope, scopes[i]))) + continue; + + if (!inscope) + { + inscope = 1; + fprintf(out, "  %s:%s\n", scopes[i], br); + } + + name = mxmlElementGetAttr(function, "name"); + + fputs("    ", out); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_HTML); + else if (strcmp(cname, name) && strcmp(cname, name + 1)) + fputs("void ", out); + + fprintf(out, "%s", cname, name, name); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putc(prefix, out); + if (prefix == ',') + putc(' ', out); + + if (type->child) + write_element(out, doc, type, OUTPUT_HTML); + + fputs(mxmlElementGetAttr(arg, "name"), out); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + fprintf(out, " %s", defval); + } + + if (prefix == '(') + fprintf(out, "(void);%s\n", br); + else + fprintf(out, ");%s\n", br); + } + } + + fputs("};

      \n" + "

      Members

      \n" + "\n", out); + + for (arg = mxmlFindElement(scut, scut, "variable", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "variable", NULL, NULL, + MXML_NO_DESCEND)) + { + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + + fprintf(out, "\n", + mxmlElementGetAttr(arg, "name"), get_comment_info(description)); + + write_description(out, mode, description, "td", -1); + fputs("\n", out); + } + + fputs("
      %s %s
      \n", out); + + for (function = mxmlFindElement(scut, scut, "function", NULL, NULL, + MXML_DESCEND_FIRST); + function; + function = mxmlFindElement(function, scut, "function", NULL, NULL, + MXML_NO_DESCEND)) + { + write_function(out, mode, doc, function, 4); + } +} + + +/* + * 'write_string()' - Write a string, quoting HTML special chars as needed. + */ + +static void +write_string(FILE *out, /* I - Output file */ + const char *s, /* I - String to write */ + int mode) /* I - Output mode */ +{ + if (!s) + return; + + switch (mode) + { + case OUTPUT_DOCSET : + case OUTPUT_EPUB : + case OUTPUT_HTML : + case OUTPUT_XML : + while (*s) + { + if (*s == '&') + fputs("&", out); + else if (*s == '<') + fputs("<", out); + else if (*s == '>') + fputs(">", out); + else if (*s == '\"') + fputs(""", out); + else if (*s & 128) + { + /* + * Convert utf-8 to Unicode constant... + */ + + int ch; /* Unicode character */ + + + ch = *s & 255; + + if ((ch & 0xe0) == 0xc0) + { + ch = ((ch & 0x1f) << 6) | (s[1] & 0x3f); + s ++; + } + else if ((ch & 0xf0) == 0xe0) + { + ch = ((((ch * 0x0f) << 6) | (s[1] & 0x3f)) << 6) | (s[2] & 0x3f); + s += 2; + } + + if (ch == 0xa0 && mode != OUTPUT_EPUB) + { + /* + * Handle non-breaking space as-is... + */ + + fputs(" ", out); + } + else + fprintf(out, "&#x%x;", ch); + } + else + putc(*s, out); + + s ++; + } + break; + + case OUTPUT_MAN : + while (*s) + { + if (*s == '\\' || *s == '-') + putc('\\', out); + + putc(*s++, out); + } + break; + } +} + + +/* + * 'write_tokens()' - Write nodes for all APIs. + */ + +static void +write_tokens(FILE *out, /* I - Output file */ + mxml_node_t *doc, /* I - Document */ + const char *path) /* I - Path to help file */ +{ + mxml_node_t *function, /* Current function */ + *scut, /* Struct/class/union/typedef */ + *arg, /* Current argument */ + *description, /* Description of function/var */ + *type, /* Type node */ + *node; /* Current child node */ + const char *name, /* Name of function/type */ + *cename, /* Current class/enum name */ + *defval; /* Default value for argument */ + char prefix; /* Prefix for declarations */ + + + /* + * Classes... + */ + + if ((scut = find_public(doc, doc, "class", NULL, OUTPUT_TOKENS)) != NULL) + { + while (scut) + { + cename = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/cpp/cl/%s\n" + " ", path, cename, cename); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + if ((function = find_public(scut, scut, "function", NULL, OUTPUT_TOKENS)) != NULL) + { + while (function) + { + name = mxmlElementGetAttr(function, "name"); + description = mxmlFindElement(function, function, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s.%s\n" + " //apple_ref/cpp/clm/%s/%s", path, + cename, name, cename, name); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg && (type = mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST)) != NULL) + { + for (node = type->child; node; node = node->next) + fputs(node->value.text.string, out); + } + else if (strcmp(cename, name) && strcmp(cename, name + 1)) + fputs("void", out); + + fputs("/", out); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putc(prefix, out); + + for (node = type->child; node; node = node->next) + fputs(node->value.text.string, out); + + fputs(mxmlElementGetAttr(arg, "name"), out); + } + + if (prefix == '(') + fputs("(void", out); + + fputs(")\n" + " ", out); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " ", out); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_XML); + else if (strcmp(cename, name) && strcmp(cename, name + 1)) + fputs("void ", out); + + fputs(name, out); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putc(prefix, out); + if (prefix == ',') + putc(' ', out); + + if (type->child) + write_element(out, doc, type, OUTPUT_XML); + + fputs(mxmlElementGetAttr(arg, "name"), out); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + fprintf(out, " %s", defval); + } + + if (prefix == '(') + fputs("(void);", out); + else + fputs(");", out); + + fputs(" \n" + " \n", out); + + function = find_public(function, doc, "function", NULL, OUTPUT_TOKENS); + } + } + scut = find_public(scut, doc, "class", NULL, OUTPUT_TOKENS); + } + } + + /* + * Functions... + */ + + if ((function = find_public(doc, doc, "function", NULL, OUTPUT_TOKENS)) != NULL) + { + while (function) + { + name = mxmlElementGetAttr(function, "name"); + description = mxmlFindElement(function, function, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/func/%s\n" + " ", path, name, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " ", out); + + arg = mxmlFindElement(function, function, "returnvalue", NULL, + NULL, MXML_DESCEND_FIRST); + + if (arg) + write_element(out, doc, mxmlFindElement(arg, arg, "type", NULL, + NULL, MXML_DESCEND_FIRST), + OUTPUT_XML); + else // if (strcmp(cname, name) && strcmp(cname, name + 1)) + fputs("void ", out); + + fputs(name, out); + + for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, + MXML_DESCEND_FIRST), prefix = '('; + arg; + arg = mxmlFindElement(arg, function, "argument", NULL, NULL, + MXML_NO_DESCEND), prefix = ',') + { + type = mxmlFindElement(arg, arg, "type", NULL, NULL, + MXML_DESCEND_FIRST); + + putc(prefix, out); + if (prefix == ',') + putc(' ', out); + + if (type->child) + write_element(out, doc, type, OUTPUT_XML); + + fputs(mxmlElementGetAttr(arg, "name"), out); + if ((defval = mxmlElementGetAttr(arg, "default")) != NULL) + fprintf(out, " %s", defval); + } + + if (prefix == '(') + fputs("(void);", out); + else + fputs(");", out); + + fputs(" \n" + " \n", out); + + function = find_public(function, doc, "function", NULL, OUTPUT_TOKENS); + } + } + + /* + * Data types... + */ + + if ((scut = find_public(doc, doc, "typedef", NULL, OUTPUT_TOKENS)) != NULL) + { + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/tdef/%s\n" + " ", path, name, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + scut = find_public(scut, doc, "typedef", NULL, OUTPUT_TOKENS); + } + } + + /* + * Structures... + */ + + if ((scut = find_public(doc, doc, "struct", NULL, OUTPUT_TOKENS)) != NULL) + { + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/tag/%s\n" + " ", path, name, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + scut = find_public(scut, doc, "struct", NULL, OUTPUT_TOKENS); + } + } + + /* + * Unions... + */ + + if ((scut = find_public(doc, doc, "union", NULL, OUTPUT_TOKENS)) != NULL) + { + while (scut) + { + name = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/tag/%s\n" + " ", path, name, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + scut = find_public(scut, doc, "union", NULL, OUTPUT_TOKENS); + } + } + + /* + * Globals variables... + */ + + if ((arg = find_public(doc, doc, "variable", NULL, OUTPUT_TOKENS)) != NULL) + { + while (arg) + { + name = mxmlElementGetAttr(arg, "name"); + description = mxmlFindElement(arg, arg, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/data/%s\n" + " ", path, name, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + arg = find_public(arg, doc, "variable", NULL, OUTPUT_TOKENS); + } + } + + /* + * Enumerations/constants... + */ + + if ((scut = find_public(doc, doc, "enumeration", NULL, OUTPUT_TOKENS)) != NULL) + { + while (scut) + { + cename = mxmlElementGetAttr(scut, "name"); + description = mxmlFindElement(scut, scut, "description", + NULL, NULL, MXML_DESCEND_FIRST); + + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/tag/%s\n" + " ", path, cename, cename); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + + for (arg = mxmlFindElement(scut, scut, "constant", NULL, NULL, + MXML_DESCEND_FIRST); + arg; + arg = mxmlFindElement(arg, scut, "constant", NULL, NULL, + MXML_NO_DESCEND)) + { + name = mxmlElementGetAttr(arg, "name"); + description = mxmlFindElement(arg, arg, "description", NULL, + NULL, MXML_DESCEND_FIRST); + fprintf(out, " \n" + " Documentation/%s\n" + " %s\n" + " //apple_ref/c/econst/%s\n" + " ", path, cename, name); + write_description(out, OUTPUT_TOKENS, description, "", 1); + fputs(" \n" + " \n", out); + } + + scut = find_public(scut, doc, "enumeration", NULL, OUTPUT_TOKENS); + } + } +} + + +/* + * 'ws_cb()' - Whitespace callback for saving. + */ + +static const char * /* O - Whitespace string or NULL for none */ +ws_cb(mxml_node_t *node, /* I - Element node */ + int where) /* I - Where value */ +{ + const char *name; /* Name of element */ + int depth; /* Depth of node */ + static const char *spaces = " "; + /* Whitespace (40 spaces) for indent */ + + + name = node->value.element.name; + + switch (where) + { + case MXML_WS_BEFORE_CLOSE : + if (strcmp(name, "argument") && + strcmp(name, "class") && + strcmp(name, "constant") && + strcmp(name, "enumeration") && + strcmp(name, "function") && + strcmp(name, "mxmldoc") && + strcmp(name, "namespace") && + strcmp(name, "returnvalue") && + strcmp(name, "struct") && + strcmp(name, "typedef") && + strcmp(name, "union") && + strcmp(name, "variable")) + return (NULL); + + for (depth = -4; node; node = node->parent, depth += 2); + if (depth > 40) + return (spaces); + else if (depth < 2) + return (NULL); + else + return (spaces + 40 - depth); + + case MXML_WS_AFTER_CLOSE : + return ("\n"); + + case MXML_WS_BEFORE_OPEN : + for (depth = -4; node; node = node->parent, depth += 2); + if (depth > 40) + return (spaces); + else if (depth < 2) + return (NULL); + else + return (spaces + 40 - depth); + + default : + case MXML_WS_AFTER_OPEN : + if (strcmp(name, "argument") && + strcmp(name, "class") && + strcmp(name, "constant") && + strcmp(name, "enumeration") && + strcmp(name, "function") && + strcmp(name, "mxmldoc") && + strcmp(name, "namespace") && + strcmp(name, "returnvalue") && + strcmp(name, "struct") && + strcmp(name, "typedef") && + strcmp(name, "union") && + strcmp(name, "variable") && + strncmp(name, "?xml", 4)) + return (NULL); + else + return ("\n"); + } +} diff --git a/lib/libmxml/test.xml b/lib/libmxml/test.xml new file mode 100644 index 0000000..044304e --- /dev/null +++ b/lib/libmxml/test.xml @@ -0,0 +1,29 @@ + + + + 123 + Now is the time for all good men to come to the aid of their +country. + + + diff --git a/lib/libmxml/test/class.cxx b/lib/libmxml/test/class.cxx new file mode 100644 index 0000000..2703616 --- /dev/null +++ b/lib/libmxml/test/class.cxx @@ -0,0 +1,84 @@ +class foo_c : public bar_c // Foo class derived from bar +{ + float foo; /* Real number */ + int bar; /* Integer */ + + public: + + foo_c(float f, int b); + ~foo_c(); + + // 'get_bar()' - Get the value of bar. + int // O - Value of bar + get_bar() + { + return (bar); + } + + // 'get_foo()' - Get the value of foo. + float // O - Value of foo + get_foo() + { + return (foo); + } + + // 'set_bar()' - Set the value of bar. + void + set_bar(int b) // I - Value of bar + { + bar = b; + } + + // 'set_foo()' - Set the value of foo. + void + set_foo(float f) // I - Value of foo + { + foo = f; + } + + // 'set_foobar()' - Set foo and optionally bar (should show default args). + void + set_foobar(float f, // I - Value of foo + int b = 0) // I - Value of bar + { + foo = f; + bar = b; + } + + protected: + + static int global; /* Global integer */ + + // 'get_global()' - Get the global integer. + int // O - Integer + get_global() + { + return (global); + } + + private: + + int barfoo; // Another private integer + + public: + + // 'get_barfoo()' - Get the barfoo value. + int // O - Barfoo value + get_barfoo() + { + return (barfoo); + } +} + +// 'foo_c::foo_c()' - Create a foo_c class. +foo_c::foo_c(float f, // I - Value of foo + int b) // I - Value of bar +{ + foo = f; + bar = b; +} + +// 'foo_c::~foo_c()' - Destroy a foo_c class. +foo_c::~foo_c() +{ +} diff --git a/lib/libmxml/test/dotest.sh b/lib/libmxml/test/dotest.sh new file mode 100644 index 0000000..5443ffe --- /dev/null +++ b/lib/libmxml/test/dotest.sh @@ -0,0 +1,47 @@ +#!/bin/sh +(cd ..; make mxmldoc-static) + +files="" +mode="" + +while test $# -gt 0; do + arg="$1" + shift + + case "$arg" in + -f) framed="--framed framed" ;; + -g) mode="gdb" ;; + -v) mode="valgrind" ;; + *.h | *.c | *.cxx) files="$files $arg" ;; + *) + echo "Usage: ./dotest.sh [-f] [-g] [-v] [files]" + exit 1 + ;; + esac +done + +if test "$files" = ""; then + files=*.cxx +fi + +rm -f test.xml + +case "$mode" in + gdb) + echo "break malloc_error_break" >.gdbcmds + echo "set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib" >>.gdbcmds + echo "run $framed test.xml $files >test.html 2>test.log" >>.gdbcmds + gdb -x .gdbcmds ../mxmldoc-static + ;; + + valgrind) + valgrind --log-fd=3 --leak-check=yes \ + ../mxmldoc-static $framed test.xml $files \ + >test.html 2>test.log 3>test.valgrind + ;; + + *) + ../mxmldoc-static $framed test.xml $files >test.html 2>test.log + ;; +esac + diff --git a/lib/libmxml/test/enum.cxx b/lib/libmxml/test/enum.cxx new file mode 100644 index 0000000..49f2a7f --- /dev/null +++ b/lib/libmxml/test/enum.cxx @@ -0,0 +1,17 @@ +typedef enum foo_enum_e /* Sample enumeration type */ +{ + FOO_ONE, /* One fish */ + FOO_TWO, /* Two fish */ + FOO_RED, /* Red fish */ + FOO_BLUE, /* Blue fish */ + FOO_PRIVATE /* Private fish @private@ */ +} foo_enum_t; + +typedef enum foo_enum2_e /* Sample enumeration type #2 */ +{ + FOO2_ONE, /* One fish #2 */ + FOO2_TWO, /* Two fish #2 */ + FOO2_RED, /* Red fish #2 */ + FOO2_BLUE, /* Blue fish #2 */ + FOO2_PRIVATE /* Private fish #2 @private@ */ +} foo_enum2_t; diff --git a/lib/libmxml/test/function.cxx b/lib/libmxml/test/function.cxx new file mode 100644 index 0000000..0010a7d --- /dev/null +++ b/lib/libmxml/test/function.cxx @@ -0,0 +1,107 @@ +/* + * 'foo_void_function()' - Do foo with bar. + * + * Use the @link foo_float_function@ or @link foo_int_function@ functions + * instead. Pass @code NULL@ for "three" then there is no string to print. + * + * @deprecated@ + */ + +void +foo_void_function(int one, /* I - Integer */ + float *two, /* O - Real number */ + const char *three) /* I - String */ +{ + if (one) + { + puts("Hello, World!"); + } + else + puts(three); + + *two = 2.0f; +} + + +/* + * 'foo_float_function()' - Do foo with bar. + * + * @since 1.2@ + */ + +float /* O - Real number */ +foo_float_function(int one, /* I - Integer */ + const char *two) /* I - String */ +{ + if (one) + { + puts("Hello, World!"); + } + else + puts(two); + + return (2.0f); +} + + +/* + * 'foo_default_string()' - Do something with a defaulted string arg. + */ + +int /* O - Integer value */ +foo_default_string(int one, /* I - Integer */ + const char *two = "2") + /* I - String */ +{ + if (one) + { + puts("Hello, World!"); + } + else + puts(two); + + return (2); +} + + +/* + * 'foo_default_int()' - Do something with a defaulted int arg. + */ + +int /* O - Integer value */ +foo_default_int(int one, /* I - Integer */ + int two = 2) /* I - Integer */ +{ + if (one) + { + puts("Hello, World!"); + } + else + puts(two); + + return (2); +} + + +/* + * 'foo_void_func()' - Function taking no arguments. + */ + +void +foo_void_func(void) +{ + puts("foo_void_func()"); +} + + +/* + * 'foo_private_func()' - Private function. + * + * @private@ + */ + +void +foo_private_func(void) +{ + puts("foo_private_func()"); +} diff --git a/lib/libmxml/test/functype.cxx b/lib/libmxml/test/functype.cxx new file mode 100644 index 0000000..589e577 --- /dev/null +++ b/lib/libmxml/test/functype.cxx @@ -0,0 +1 @@ +typedef int (*foo_func_t)(void *foo, int bar); /**** Foo function type ****/ diff --git a/lib/libmxml/test/struct.cxx b/lib/libmxml/test/struct.cxx new file mode 100644 index 0000000..2f4bd4b --- /dev/null +++ b/lib/libmxml/test/struct.cxx @@ -0,0 +1,55 @@ +typedef struct foo_s /* Foo structure */ +{ + float foo; /* Real number */ + int bar; /* Integer */ + + foo_s(float f, int b); + ~foo_s(); + + // 'get_bar()' - Get the value of bar. + int // O - Value of bar + get_bar() + { + return (bar); + } + + // 'get_foo()' - Get the value of foo. + float // O - Value of foo + get_foo() + { + return (foo); + } + + // 'set_bar()' - Set the value of bar. + void + set_bar(int b) // I - Value of bar + { + bar = b; + } + + // 'set_foo()' - Set the value of foo. + void + set_foo(float f) // I - Value of foo + { + foo = f; + } +} foo_t; + +// 'foo_s::foo_s()' - Create a foo_s structure. +foo_s::foo_s(float f, // I - Value of foo + int b) // I - Value of bar +{ + foo = f; + bar = b; +} + +// 'foo_s::~foo_s()' - Destroy a foo_s structure. +foo_s::~foo_s() +{ +} + +typedef struct foo_private_s /* @private@ */ +{ + int a; /* Value of "a" */ + char b[255]; /* Value of "b" */ +} foo_private_t; diff --git a/lib/libmxml/test/type.cxx b/lib/libmxml/test/type.cxx new file mode 100644 index 0000000..78349b8 --- /dev/null +++ b/lib/libmxml/test/type.cxx @@ -0,0 +1,3 @@ +typedef int foo_simple_t; /* Simple integer type */ + +typedef int foo_simple_private_t; /* @private@ */ diff --git a/lib/libmxml/testmxml.c b/lib/libmxml/testmxml.c new file mode 100644 index 0000000..b683abf --- /dev/null +++ b/lib/libmxml/testmxml.c @@ -0,0 +1,888 @@ +/* + * Test program for Mini-XML, a small XML file parsing library. + * + * Usage: + * + * ./testmxml input.xml [string-output.xml] >stdio-output.xml + * ./testmxml "stdio-output.xml + * + * Copyright 2003-2017 by Michael R Sweet. + * + * These coded instructions, statements, and computer programs are the + * property of Michael R Sweet and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "COPYING" + * which should have been included with this file. If this file is + * missing or damaged, see the license at: + * + * https://michaelrsweet.github.io/mxml + */ + +/* + * Include necessary headers... + */ + +#include "config.h" +#include "mxml.h" +#ifndef WIN32 +# include +#endif /* !WIN32 */ +#include +#ifndef O_BINARY +# define O_BINARY 0 +#endif /* !O_BINARY */ + + +/* + * Globals... + */ + +int event_counts[6]; + + +/* + * Local functions... + */ + +void sax_cb(mxml_node_t *node, mxml_sax_event_t event, void *data); +mxml_type_t type_cb(mxml_node_t *node); +const char *whitespace_cb(mxml_node_t *node, int where); + + +/* + * 'main()' - Main entry for test program. + */ + +int /* O - Exit status */ +main(int argc, /* I - Number of command-line args */ + char *argv[]) /* I - Command-line args */ +{ + int i; /* Looping var */ + FILE *fp; /* File to read */ + int fd; /* File descriptor */ + mxml_node_t *tree, /* XML tree */ + *node; /* Node which should be in test.xml */ + mxml_index_t *ind; /* XML index */ + char buffer[16384]; /* Save string */ + static const char *types[] = /* Strings for node types */ + { + "MXML_ELEMENT", + "MXML_INTEGER", + "MXML_OPAQUE", + "MXML_REAL", + "MXML_TEXT" + }; + + + /* + * Check arguments... + */ + + if (argc != 2 && argc != 3) + { + fputs("Usage: testmxml filename.xml [string-output.xml]\n", stderr); + return (1); + } + + /* + * Test the basic functionality... + */ + + tree = mxmlNewElement(MXML_NO_PARENT, "element"); + + if (!tree) + { + fputs("ERROR: No parent node in basic test.\n", stderr); + return (1); + } + + if (tree->type != MXML_ELEMENT) + { + fprintf(stderr, "ERROR: Parent has type %s (%d), expected MXML_ELEMENT.\n", + tree->type < MXML_ELEMENT || tree->type > MXML_TEXT ? + "UNKNOWN" : types[tree->type], tree->type); + mxmlDelete(tree); + return (1); + } + + if (strcmp(tree->value.element.name, "element")) + { + fprintf(stderr, "ERROR: Parent value is \"%s\", expected \"element\".\n", + tree->value.element.name); + mxmlDelete(tree); + return (1); + } + + mxmlNewInteger(tree, 123); + mxmlNewOpaque(tree, "opaque"); + mxmlNewReal(tree, 123.4f); + mxmlNewText(tree, 1, "text"); + + mxmlLoadString(tree, "string string string", + MXML_NO_CALLBACK); + mxmlLoadString(tree, "1 2 3", + MXML_INTEGER_CALLBACK); + mxmlLoadString(tree, "1.0 2.0 3.0", + MXML_REAL_CALLBACK); + mxmlLoadString(tree, "opaque opaque opaque", + MXML_OPAQUE_CALLBACK); + mxmlLoadString(tree, "valuevalue2" + "", MXML_OPAQUE_CALLBACK); + + node = tree->child; + + if (!node) + { + fputs("ERROR: No first child node in basic test.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_INTEGER) + { + fprintf(stderr, "ERROR: First child has type %s (%d), expected MXML_INTEGER.\n", + node->type < MXML_ELEMENT || node->type > MXML_TEXT ? + "UNKNOWN" : types[node->type], node->type); + mxmlDelete(tree); + return (1); + } + + if (node->value.integer != 123) + { + fprintf(stderr, "ERROR: First child value is %d, expected 123.\n", + node->value.integer); + mxmlDelete(tree); + return (1); + } + + node = node->next; + + if (!node) + { + fputs("ERROR: No second child node in basic test.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_OPAQUE) + { + fprintf(stderr, "ERROR: Second child has type %s (%d), expected MXML_OPAQUE.\n", + node->type < MXML_ELEMENT || node->type > MXML_TEXT ? + "UNKNOWN" : types[node->type], node->type); + mxmlDelete(tree); + return (1); + } + + if (!node->value.opaque || strcmp(node->value.opaque, "opaque")) + { + fprintf(stderr, "ERROR: Second child value is \"%s\", expected \"opaque\".\n", + node->value.opaque ? node->value.opaque : "(null)"); + mxmlDelete(tree); + return (1); + } + + node = node->next; + + if (!node) + { + fputs("ERROR: No third child node in basic test.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_REAL) + { + fprintf(stderr, "ERROR: Third child has type %s (%d), expected MXML_REAL.\n", + node->type < MXML_ELEMENT || node->type > MXML_TEXT ? + "UNKNOWN" : types[node->type], node->type); + mxmlDelete(tree); + return (1); + } + + if (node->value.real != 123.4f) + { + fprintf(stderr, "ERROR: Third child value is %f, expected 123.4.\n", + node->value.real); + mxmlDelete(tree); + return (1); + } + + node = node->next; + + if (!node) + { + fputs("ERROR: No fourth child node in basic test.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_TEXT) + { + fprintf(stderr, "ERROR: Fourth child has type %s (%d), expected MXML_TEXT.\n", + node->type < MXML_ELEMENT || node->type > MXML_TEXT ? + "UNKNOWN" : types[node->type], node->type); + mxmlDelete(tree); + return (1); + } + + if (!node->value.text.whitespace || + !node->value.text.string || strcmp(node->value.text.string, "text")) + { + fprintf(stderr, "ERROR: Fourth child value is %d,\"%s\", expected 1,\"text\".\n", + node->value.text.whitespace, + node->value.text.string ? node->value.text.string : "(null)"); + mxmlDelete(tree); + return (1); + } + + for (i = 0; i < 4; i ++) + { + node = node->next; + + if (!node) + { + fprintf(stderr, "ERROR: No group #%d child node in basic test.\n", i + 1); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_ELEMENT) + { + fprintf(stderr, "ERROR: Group child #%d has type %s (%d), expected MXML_ELEMENT.\n", + i + 1, node->type < MXML_ELEMENT || node->type > MXML_TEXT ? + "UNKNOWN" : types[node->type], node->type); + mxmlDelete(tree); + return (1); + } + } + + /* + * Test mxmlFindPath... + */ + + node = mxmlFindPath(tree, "*/two"); + if (!node) + { + fputs("ERROR: Unable to find value for \"*/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + else if (node->type != MXML_OPAQUE || strcmp(node->value.opaque, "value")) + { + fputs("ERROR: Bad value for \"*/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + + node = mxmlFindPath(tree, "foo/*/two"); + if (!node) + { + fputs("ERROR: Unable to find value for \"foo/*/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + else if (node->type != MXML_OPAQUE || strcmp(node->value.opaque, "value")) + { + fputs("ERROR: Bad value for \"foo/*/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + + node = mxmlFindPath(tree, "foo/bar/one/two"); + if (!node) + { + fputs("ERROR: Unable to find value for \"foo/bar/one/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + else if (node->type != MXML_OPAQUE || strcmp(node->value.opaque, "value")) + { + fputs("ERROR: Bad value for \"foo/bar/one/two\".\n", stderr); + mxmlDelete(tree); + return (1); + } + + /* + * Test indices... + */ + + ind = mxmlIndexNew(tree, NULL, NULL); + if (!ind) + { + fputs("ERROR: Unable to create index of all nodes.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (ind->num_nodes != 10) + { + fprintf(stderr, "ERROR: Index of all nodes contains %d " + "nodes; expected 10.\n", ind->num_nodes); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexReset(ind); + if (!mxmlIndexFind(ind, "group", NULL)) + { + fputs("ERROR: mxmlIndexFind for \"group\" failed.\n", stderr); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexDelete(ind); + + ind = mxmlIndexNew(tree, "group", NULL); + if (!ind) + { + fputs("ERROR: Unable to create index of groups.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (ind->num_nodes != 4) + { + fprintf(stderr, "ERROR: Index of groups contains %d " + "nodes; expected 4.\n", ind->num_nodes); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexReset(ind); + if (!mxmlIndexEnum(ind)) + { + fputs("ERROR: mxmlIndexEnum failed.\n", stderr); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexDelete(ind); + + ind = mxmlIndexNew(tree, NULL, "type"); + if (!ind) + { + fputs("ERROR: Unable to create index of type attributes.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (ind->num_nodes != 3) + { + fprintf(stderr, "ERROR: Index of type attributes contains %d " + "nodes; expected 3.\n", ind->num_nodes); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexReset(ind); + if (!mxmlIndexFind(ind, NULL, "string")) + { + fputs("ERROR: mxmlIndexFind for \"string\" failed.\n", stderr); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexDelete(ind); + + ind = mxmlIndexNew(tree, "group", "type"); + if (!ind) + { + fputs("ERROR: Unable to create index of elements and attributes.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (ind->num_nodes != 3) + { + fprintf(stderr, "ERROR: Index of elements and attributes contains %d " + "nodes; expected 3.\n", ind->num_nodes); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexReset(ind); + if (!mxmlIndexFind(ind, "group", "string")) + { + fputs("ERROR: mxmlIndexFind for \"string\" failed.\n", stderr); + mxmlIndexDelete(ind); + mxmlDelete(tree); + return (1); + } + + mxmlIndexDelete(ind); + + /* + * Check the mxmlDelete() works properly... + */ + + for (i = 0; i < 9; i ++) + { + if (tree->child) + mxmlDelete(tree->child); + else + { + fprintf(stderr, "ERROR: Child pointer prematurely NULL on child #%d\n", + i + 1); + mxmlDelete(tree); + return (1); + } + } + + if (tree->child) + { + fputs("ERROR: Child pointer not NULL after deleting all children.\n", stderr); + return (1); + } + + if (tree->last_child) + { + fputs("ERROR: Last child pointer not NULL after deleting all children.\n", stderr); + return (1); + } + + mxmlDelete(tree); + + /* + * Open the file/string using the default (MXML_NO_CALLBACK) callback... + */ + + if (argv[1][0] == '<') + tree = mxmlLoadString(NULL, argv[1], MXML_NO_CALLBACK); + else if ((fp = fopen(argv[1], "rb")) == NULL) + { + perror(argv[1]); + return (1); + } + else + { + /* + * Read the file... + */ + + tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); + + fclose(fp); + } + + if (!tree) + { + fputs("Unable to read XML file with default callback.\n", stderr); + return (1); + } + + if (!strcmp(argv[1], "test.xml")) + { + const char *text; /* Text value */ + + /* + * Verify that mxmlFindElement() and indirectly mxmlWalkNext() work + * properly... + */ + + if ((node = mxmlFindPath(tree, "group/option/keyword")) == NULL) + { + fputs("Unable to find group/option/keyword element in XML tree.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (node->type != MXML_TEXT) + { + fputs("No child node of group/option/keyword.\n", stderr); + mxmlSaveFile(tree, stderr, MXML_NO_CALLBACK); + mxmlDelete(tree); + return (1); + } + + if ((text = mxmlGetText(node, NULL)) == NULL || strcmp(text, "InputSlot")) + { + fprintf(stderr, "Child node of group/option/value has value \"%s\" instead of \"InputSlot\".\n", text ? text : "(null)"); + mxmlDelete(tree); + return (1); + } + } + + mxmlDelete(tree); + + /* + * Open the file... + */ + + if (argv[1][0] == '<') + tree = mxmlLoadString(NULL, argv[1], type_cb); + else if ((fp = fopen(argv[1], "rb")) == NULL) + { + perror(argv[1]); + return (1); + } + else + { + /* + * Read the file... + */ + + tree = mxmlLoadFile(NULL, fp, type_cb); + + fclose(fp); + } + + if (!tree) + { + fputs("Unable to read XML file.\n", stderr); + return (1); + } + + if (!strcmp(argv[1], "test.xml")) + { + /* + * Verify that mxmlFindElement() and indirectly mxmlWalkNext() work + * properly... + */ + + if ((node = mxmlFindElement(tree, tree, "choice", NULL, NULL, + MXML_DESCEND)) == NULL) + { + fputs("Unable to find first element in XML tree.\n", stderr); + mxmlDelete(tree); + return (1); + } + + if (!mxmlFindElement(node, tree, "choice", NULL, NULL, MXML_NO_DESCEND)) + { + fputs("Unable to find second element in XML tree.\n", stderr); + mxmlDelete(tree); + return (1); + } + } + + /* + * Print the XML tree... + */ + + mxmlSaveFile(tree, stdout, whitespace_cb); + + /* + * Save the XML tree to a string and print it... + */ + + if (mxmlSaveString(tree, buffer, sizeof(buffer), whitespace_cb) > 0) + { + if (argc == 3) + { + fp = fopen(argv[2], "w"); + fputs(buffer, fp); + fclose(fp); + } + } + + /* + * Delete the tree... + */ + + mxmlDelete(tree); + + /* + * Read from/write to file descriptors... + */ + + if (argv[1][0] != '<') + { + /* + * Open the file again... + */ + + if ((fd = open(argv[1], O_RDONLY | O_BINARY)) < 0) + { + perror(argv[1]); + return (1); + } + + /* + * Read the file... + */ + + tree = mxmlLoadFd(NULL, fd, type_cb); + + close(fd); + + /* + * Create filename.xmlfd... + */ + + snprintf(buffer, sizeof(buffer), "%sfd", argv[1]); + + if ((fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666)) < 0) + { + perror(buffer); + mxmlDelete(tree); + return (1); + } + + /* + * Write the file... + */ + + mxmlSaveFd(tree, fd, whitespace_cb); + + close(fd); + + /* + * Delete the tree... + */ + + mxmlDelete(tree); + } + + /* + * Test SAX methods... + */ + + memset(event_counts, 0, sizeof(event_counts)); + + if (argv[1][0] == '<') + mxmlSAXLoadString(NULL, argv[1], type_cb, sax_cb, NULL); + else if ((fp = fopen(argv[1], "rb")) == NULL) + { + perror(argv[1]); + return (1); + } + else + { + /* + * Read the file... + */ + + mxmlSAXLoadFile(NULL, fp, type_cb, sax_cb, NULL); + + fclose(fp); + } + + if (!strcmp(argv[1], "test.xml")) + { + if (event_counts[MXML_SAX_CDATA] != 1) + { + fprintf(stderr, "MXML_SAX_CDATA seen %d times, expected 1 times.\n", + event_counts[MXML_SAX_CDATA]); + return (1); + } + + if (event_counts[MXML_SAX_COMMENT] != 1) + { + fprintf(stderr, "MXML_SAX_COMMENT seen %d times, expected 1 times.\n", + event_counts[MXML_SAX_COMMENT]); + return (1); + } + + if (event_counts[MXML_SAX_DATA] != 60) + { + fprintf(stderr, "MXML_SAX_DATA seen %d times, expected 60 times.\n", + event_counts[MXML_SAX_DATA]); + return (1); + } + + if (event_counts[MXML_SAX_DIRECTIVE] != 1) + { + fprintf(stderr, "MXML_SAX_DIRECTIVE seen %d times, expected 1 times.\n", + event_counts[MXML_SAX_DIRECTIVE]); + return (1); + } + + if (event_counts[MXML_SAX_ELEMENT_CLOSE] != 20) + { + fprintf(stderr, "MXML_SAX_ELEMENT_CLOSE seen %d times, expected 20 times.\n", + event_counts[MXML_SAX_ELEMENT_CLOSE]); + return (1); + } + + if (event_counts[MXML_SAX_ELEMENT_OPEN] != 20) + { + fprintf(stderr, "MXML_SAX_ELEMENT_OPEN seen %d times, expected 20 times.\n", + event_counts[MXML_SAX_ELEMENT_OPEN]); + return (1); + } + } + +#ifndef WIN32 + /* + * Debug hooks... + */ + + if (getenv("TEST_DELAY") != NULL) + sleep(atoi(getenv("TEST_DELAY"))); +# ifdef __APPLE__ + if (getenv("TEST_LEAKS") != NULL) + { + char command[1024]; + + snprintf(command, sizeof(command), "leaks %d", (int)getpid()); + if (system(command)) + puts("Unable to check for leaks."); + } +# endif /* __APPLE__ */ +#endif /* !WIN32 */ + + /* + * Return... + */ + + return (0); +} + + +/* + * 'sax_cb()' - Process nodes via SAX. + */ + +void +sax_cb(mxml_node_t *node, /* I - Current node */ + mxml_sax_event_t event, /* I - SAX event */ + void *data) /* I - SAX user data */ +{ + static const char * const events[] = /* Events */ + { + "MXML_SAX_CDATA", /* CDATA node */ + "MXML_SAX_COMMENT", /* Comment node */ + "MXML_SAX_DATA", /* Data node */ + "MXML_SAX_DIRECTIVE", /* Processing directive node */ + "MXML_SAX_ELEMENT_CLOSE", /* Element closed */ + "MXML_SAX_ELEMENT_OPEN" /* Element opened */ + }; + + + (void)data; + + /* + * This SAX callback just counts the different events. + */ + + if (!node) + fprintf(stderr, "ERROR: SAX callback for event %s has NULL node.\n", events[event]); + + event_counts[event] ++; +} + + +/* + * 'type_cb()' - XML data type callback for mxmlLoadFile()... + */ + +mxml_type_t /* O - Data type */ +type_cb(mxml_node_t *node) /* I - Element node */ +{ + const char *type; /* Type string */ + + + /* + * You can lookup attributes and/or use the element name, hierarchy, etc... + */ + + if ((type = mxmlElementGetAttr(node, "type")) == NULL) + type = node->value.element.name; + + if (!strcmp(type, "integer")) + return (MXML_INTEGER); + else if (!strcmp(type, "opaque") || !strcmp(type, "pre")) + return (MXML_OPAQUE); + else if (!strcmp(type, "real")) + return (MXML_REAL); + else + return (MXML_TEXT); +} + + +/* + * 'whitespace_cb()' - Let the mxmlSaveFile() function know when to insert + * newlines and tabs... + */ + +const char * /* O - Whitespace string or NULL */ +whitespace_cb(mxml_node_t *node, /* I - Element node */ + int where) /* I - Open or close tag? */ +{ + mxml_node_t *parent; /* Parent node */ + int level; /* Indentation level */ + const char *name; /* Name of element */ + static const char *tabs = "\t\t\t\t\t\t\t\t"; + /* Tabs for indentation */ + + + /* + * We can conditionally break to a new line before or after any element. + * These are just common HTML elements... + */ + + name = node->value.element.name; + + if (!strcmp(name, "html") || !strcmp(name, "head") || !strcmp(name, "body") || + !strcmp(name, "pre") || !strcmp(name, "p") || + !strcmp(name, "h1") || !strcmp(name, "h2") || !strcmp(name, "h3") || + !strcmp(name, "h4") || !strcmp(name, "h5") || !strcmp(name, "h6")) + { + /* + * Newlines before open and after close... + */ + + if (where == MXML_WS_BEFORE_OPEN || where == MXML_WS_AFTER_CLOSE) + return ("\n"); + } + else if (!strcmp(name, "dl") || !strcmp(name, "ol") || !strcmp(name, "ul")) + { + /* + * Put a newline before and after list elements... + */ + + return ("\n"); + } + else if (!strcmp(name, "dd") || !strcmp(name, "dt") || !strcmp(name, "li")) + { + /* + * Put a tab before
    • 's,
      's, and
      's, and a newline after them... + */ + + if (where == MXML_WS_BEFORE_OPEN) + return ("\t"); + else if (where == MXML_WS_AFTER_CLOSE) + return ("\n"); + } + else if (!strncmp(name, "?xml", 4)) + { + if (where == MXML_WS_AFTER_OPEN) + return ("\n"); + else + return (NULL); + } + else if (where == MXML_WS_BEFORE_OPEN || + ((!strcmp(name, "choice") || !strcmp(name, "option")) && + where == MXML_WS_BEFORE_CLOSE)) + { + for (level = -1, parent = node->parent; + parent; + level ++, parent = parent->parent); + + if (level > 8) + level = 8; + else if (level < 0) + level = 0; + + return (tabs + 8 - level); + } + else if (where == MXML_WS_AFTER_CLOSE || + ((!strcmp(name, "group") || !strcmp(name, "option") || + !strcmp(name, "choice")) && + where == MXML_WS_AFTER_OPEN)) + return ("\n"); + else if (where == MXML_WS_AFTER_OPEN && !node->child) + return ("\n"); + + /* + * Return NULL for no added whitespace... + */ + + return (NULL); +} diff --git a/lib/libmxml/vcnet/mxml.sln b/lib/libmxml/vcnet/mxml.sln new file mode 100644 index 0000000..94c8ac6 --- /dev/null +++ b/lib/libmxml/vcnet/mxml.sln @@ -0,0 +1,47 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxmldoc", "mxmldoc.vcxproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml1", "mxml1.vcxproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testmxml", "testmxml.vcxproj", "{75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|Win32.Build.0 = Debug|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|x64.ActiveCfg = Debug|x64 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|x64.Build.0 = Debug|x64 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|Win32.ActiveCfg = Release|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|Win32.Build.0 = Release|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|x64.ActiveCfg = Release|x64 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|x64.Build.0 = Release|x64 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|Win32.ActiveCfg = Debug|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|Win32.Build.0 = Debug|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|x64.ActiveCfg = Debug|x64 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|x64.Build.0 = Debug|x64 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|Win32.ActiveCfg = Release|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|Win32.Build.0 = Release|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|x64.ActiveCfg = Release|x64 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|x64.Build.0 = Release|x64 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|Win32.ActiveCfg = Debug|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|Win32.Build.0 = Debug|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|x64.ActiveCfg = Debug|x64 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|x64.Build.0 = Debug|x64 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Release|Win32.ActiveCfg = Release|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Release|Win32.Build.0 = Release|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Release|x64.ActiveCfg = Release|x64 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/lib/libmxml/vcnet/mxml1.def b/lib/libmxml/vcnet/mxml1.def new file mode 100644 index 0000000..d8bd186 --- /dev/null +++ b/lib/libmxml/vcnet/mxml1.def @@ -0,0 +1,80 @@ +LIBRARY "MXML1" +EXPORTS + _mxml_strdupf + _mxml_strlcpy + _mxml_vstrdupf + mxml_ignore_cb + mxml_integer_cb + mxml_opaque_cb + mxml_real_cb + mxmlAdd + mxmlDelete + mxmlElementDeleteAttr + mxmlElementGetAttrByIndex + mxmlElementGetAttrCount + mxmlElementGetAttr + mxmlElementSetAttr + mxmlElementSetAttrf + mxmlEntityAddCallback + mxmlEntityGetName + mxmlEntityGetValue + mxmlEntityRemoveCallback + mxmlFindElement + mxmlFindPath + mxmlGetCDATA + mxmlGetCustom + mxmlGetElement + mxmlGetFirstChild + mxmlGetInteger + mxmlGetLastChild + mxmlGetNextSibling + mxmlGetOpaque + mxmlGetParent + mxmlGetPrevSibling + mxmlGetReal + mxmlGetRefCount + mxmlGetText + mxmlGetType + mxmlGetUserData + mxmlIndexDelete + mxmlIndexEnum + mxmlIndexFind + mxmlIndexGetCount + mxmlIndexNew + mxmlIndexReset + mxmlLoadFd + mxmlLoadFile + mxmlLoadString + mxmlNewCDATA + mxmlNewCustom + mxmlNewElement + mxmlNewInteger + mxmlNewOpaque + mxmlNewReal + mxmlNewText + mxmlNewTextf + mxmlNewXML + mxmlRelease + mxmlRemove + mxmlRetain + mxmlSaveAllocString + mxmlSaveFd + mxmlSaveFile + mxmlSaveString + mxmlSAXLoadFd + mxmlSAXLoadFile + mxmlSAXLoadString + mxmlSetCDATA + mxmlSetCustom + mxmlSetCustomHandlers + mxmlSetElement + mxmlSetErrorCallback + mxmlSetInteger + mxmlSetOpaque + mxmlSetReal + mxmlSetText + mxmlSetTextf + mxmlSetUserData + mxmlSetWrapMargin + mxmlWalkNext + mxmlWalkPrev diff --git a/lib/libmxml/vcnet/mxml1.vcproj b/lib/libmxml/vcnet/mxml1.vcproj new file mode 100644 index 0000000..5f36ef6 --- /dev/null +++ b/lib/libmxml/vcnet/mxml1.vcproj @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/libmxml/vcnet/mxmldoc.vcproj b/lib/libmxml/vcnet/mxmldoc.vcproj new file mode 100644 index 0000000..5ae9cb1 --- /dev/null +++ b/lib/libmxml/vcnet/mxmldoc.vcproj @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/libmxml/vcnet/testmxml.vcproj b/lib/libmxml/vcnet/testmxml.vcproj new file mode 100644 index 0000000..f1f362e --- /dev/null +++ b/lib/libmxml/vcnet/testmxml.vcproj @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/libmxml/xcode/archive.h b/lib/libmxml/xcode/archive.h new file mode 100644 index 0000000..f9dbec6 --- /dev/null +++ b/lib/libmxml/xcode/archive.h @@ -0,0 +1,741 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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 AUTHOR(S) 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. + * + * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.50 2008/05/26 17:00:22 kientzle Exp $ + */ + +#ifndef ARCHIVE_H_INCLUDED +#define ARCHIVE_H_INCLUDED + +/* + * Note: archive.h is for use outside of libarchive; the configuration + * headers (config.h, archive_platform.h, etc.) are purely internal. + * Do NOT use HAVE_XXX configuration macros to control the behavior of + * this header! If you must conditionalize, use predefined compiler and/or + * platform macros. + */ +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 +# define __LA_STDINT_H +#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) +# define __LA_STDINT_H +#endif + +#include +#include /* Linux requires this for off_t */ +#ifdef __LA_STDINT_H +# include __LA_STDINT_H /* int64_t, etc. */ +#endif +#include /* For FILE * */ + +/* Get appropriate definitions of standard POSIX-style types. */ +/* These should match the types used in 'struct stat' */ +#if defined(_WIN32) && !defined(__CYGWIN__) +#define __LA_INT64_T __int64 +# if defined(_SSIZE_T_DEFINED) +# define __LA_SSIZE_T ssize_t +# elif defined(_WIN64) +# define __LA_SSIZE_T __int64 +# else +# define __LA_SSIZE_T long +# endif +# if defined(__BORLANDC__) +# define __LA_UID_T uid_t +# define __LA_GID_T gid_t +# else +# define __LA_UID_T short +# define __LA_GID_T short +# endif +#else +#include /* ssize_t, uid_t, and gid_t */ +#define __LA_INT64_T int64_t +#define __LA_SSIZE_T ssize_t +#define __LA_UID_T uid_t +#define __LA_GID_T gid_t +#endif + +/* + * On Windows, define LIBARCHIVE_STATIC if you're building or using a + * .lib. The default here assumes you're building a DLL. Only + * libarchive source should ever define __LIBARCHIVE_BUILD. + */ +#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) +# ifdef __LIBARCHIVE_BUILD +# ifdef __GNUC__ +# define __LA_DECL __attribute__((dllexport)) extern +# else +# define __LA_DECL __declspec(dllexport) +# endif +# else +# ifdef __GNUC__ +# define __LA_DECL __attribute__((dllimport)) extern +# else +# define __LA_DECL __declspec(dllimport) +# endif +# endif +#else +/* Static libraries or non-Windows needs no special declaration. */ +# define __LA_DECL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The version number is provided as both a macro and a function. + * The macro identifies the installed header; the function identifies + * the library version (which may not be the same if you're using a + * dynamically-linked version of the library). Of course, if the + * header and library are very different, you should expect some + * strangeness. Don't do that. + */ + +/* + * The version number is expressed as a single integer that makes it + * easy to compare versions at build time: for version a.b.c, the + * version number is printf("%d%03d%03d",a,b,c). For example, if you + * know your application requires version 2.12.108 or later, you can + * assert that ARCHIVE_VERSION >= 2012108. + * + * This single-number format was introduced with libarchive 1.9.0 in + * the libarchive 1.x family and libarchive 2.2.4 in the libarchive + * 2.x family. The following may be useful if you really want to do + * feature detection for earlier libarchive versions (which defined + * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead): + * + * #ifndef ARCHIVE_VERSION_NUMBER + * #define ARCHIVE_VERSION_NUMBER \ + * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) + * #endif + */ +#define ARCHIVE_VERSION_NUMBER 2008003 +__LA_DECL int archive_version_number(void); + +/* + * Textual name/version of the library, useful for version displays. + */ +#define ARCHIVE_VERSION_STRING "libarchive 2.8.3" +__LA_DECL const char * archive_version_string(void); + +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* + * Deprecated; these are older names that will be removed in favor of + * the simpler definitions above. + */ +#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER +__LA_DECL int archive_version_stamp(void); +#define ARCHIVE_LIBRARY_VERSION ARCHIVE_VERSION_STRING +__LA_DECL const char * archive_version(void); +#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000) +__LA_DECL int archive_api_version(void); +#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000) +__LA_DECL int archive_api_feature(void); +#endif + +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* This should never have been here in the first place. */ +/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */ +#define ARCHIVE_BYTES_PER_RECORD 512 +#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240 +#endif + +/* Declare our basic types. */ +struct archive; +struct archive_entry; + +/* + * Error codes: Use archive_errno() and archive_error_string() + * to retrieve details. Unless specified otherwise, all functions + * that return 'int' use these codes. + */ +#define ARCHIVE_EOF 1 /* Found end of archive. */ +#define ARCHIVE_OK 0 /* Operation was successful. */ +#define ARCHIVE_RETRY (-10) /* Retry might succeed. */ +#define ARCHIVE_WARN (-20) /* Partial success. */ +/* For example, if write_header "fails", then you can't push data. */ +#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */ +/* But if write_header is "fatal," then this archive is dead and useless. */ +#define ARCHIVE_FATAL (-30) /* No more operations are possible. */ + +/* + * As far as possible, archive_errno returns standard platform errno codes. + * Of course, the details vary by platform, so the actual definitions + * here are stored in "archive_platform.h". The symbols are listed here + * for reference; as a rule, clients should not need to know the exact + * platform-dependent error code. + */ +/* Unrecognized or invalid file format. */ +/* #define ARCHIVE_ERRNO_FILE_FORMAT */ +/* Illegal usage of the library. */ +/* #define ARCHIVE_ERRNO_PROGRAMMER_ERROR */ +/* Unknown or unclassified error. */ +/* #define ARCHIVE_ERRNO_MISC */ + +/* + * Callbacks are invoked to automatically read/skip/write/open/close the + * archive. You can provide your own for complex tasks (like breaking + * archives across multiple tapes) or use standard ones built into the + * library. + */ + +/* Returns pointer and size of next block of data from archive. */ +typedef __LA_SSIZE_T archive_read_callback(struct archive *, + void *_client_data, const void **_buffer); + +/* Skips at most request bytes from archive and returns the skipped amount */ +#if ARCHIVE_VERSION_NUMBER < 2000000 +/* Libarchive 1.0 used ssize_t for the return, which is only 32 bits + * on most 32-bit platforms; not large enough. */ +typedef __LA_SSIZE_T archive_skip_callback(struct archive *, + void *_client_data, size_t request); +#elif ARCHIVE_VERSION_NUMBER < 3000000 +/* Libarchive 2.0 used off_t here, but that is a bad idea on Linux and a + * few other platforms where off_t varies with build settings. */ +typedef off_t archive_skip_callback(struct archive *, + void *_client_data, off_t request); +#else +/* Libarchive 3.0 uses int64_t here, which is actually guaranteed to be + * 64 bits on every platform. */ +typedef __LA_INT64_T archive_skip_callback(struct archive *, + void *_client_data, __LA_INT64_T request); +#endif + +/* Returns size actually written, zero on EOF, -1 on error. */ +typedef __LA_SSIZE_T archive_write_callback(struct archive *, + void *_client_data, + const void *_buffer, size_t _length); + +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* Open callback is actually never needed; remove it in libarchive 3.0. */ +typedef int archive_open_callback(struct archive *, void *_client_data); +#endif + +typedef int archive_close_callback(struct archive *, void *_client_data); + +/* + * Codes for archive_compression. + */ +#define ARCHIVE_COMPRESSION_NONE 0 +#define ARCHIVE_COMPRESSION_GZIP 1 +#define ARCHIVE_COMPRESSION_BZIP2 2 +#define ARCHIVE_COMPRESSION_COMPRESS 3 +#define ARCHIVE_COMPRESSION_PROGRAM 4 +#define ARCHIVE_COMPRESSION_LZMA 5 +#define ARCHIVE_COMPRESSION_XZ 6 +#define ARCHIVE_COMPRESSION_UU 7 +#define ARCHIVE_COMPRESSION_RPM 8 + +/* + * Codes returned by archive_format. + * + * Top 16 bits identifies the format family (e.g., "tar"); lower + * 16 bits indicate the variant. This is updated by read_next_header. + * Note that the lower 16 bits will often vary from entry to entry. + * In some cases, this variation occurs as libarchive learns more about + * the archive (for example, later entries might utilize extensions that + * weren't necessary earlier in the archive; in this case, libarchive + * will change the format code to indicate the extended format that + * was used). In other cases, it's because different tools have + * modified the archive and so different parts of the archive + * actually have slightly different formts. (Both tar and cpio store + * format codes in each entry, so it is quite possible for each + * entry to be in a different format.) + */ +#define ARCHIVE_FORMAT_BASE_MASK 0xff0000 +#define ARCHIVE_FORMAT_CPIO 0x10000 +#define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1) +#define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2) +#define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3) +#define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4) +#define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5) +#define ARCHIVE_FORMAT_SHAR 0x20000 +#define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1) +#define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2) +#define ARCHIVE_FORMAT_TAR 0x30000 +#define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1) +#define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2) +#define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3) +#define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4) +#define ARCHIVE_FORMAT_ISO9660 0x40000 +#define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1) +#define ARCHIVE_FORMAT_ZIP 0x50000 +#define ARCHIVE_FORMAT_EMPTY 0x60000 +#define ARCHIVE_FORMAT_AR 0x70000 +#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1) +#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2) +#define ARCHIVE_FORMAT_MTREE 0x80000 +#define ARCHIVE_FORMAT_RAW 0x90000 +#define ARCHIVE_FORMAT_XAR 0xA0000 + +/*- + * Basic outline for reading an archive: + * 1) Ask archive_read_new for an archive reader object. + * 2) Update any global properties as appropriate. + * In particular, you'll certainly want to call appropriate + * archive_read_support_XXX functions. + * 3) Call archive_read_open_XXX to open the archive + * 4) Repeatedly call archive_read_next_header to get information about + * successive archive entries. Call archive_read_data to extract + * data for entries of interest. + * 5) Call archive_read_finish to end processing. + */ +__LA_DECL struct archive *archive_read_new(void); + +/* + * The archive_read_support_XXX calls enable auto-detect for this + * archive handle. They also link in the necessary support code. + * For example, if you don't want bzlib linked in, don't invoke + * support_compression_bzip2(). The "all" functions provide the + * obvious shorthand. + */ +__LA_DECL int archive_read_support_compression_all(struct archive *); +__LA_DECL int archive_read_support_compression_bzip2(struct archive *); +__LA_DECL int archive_read_support_compression_compress(struct archive *); +__LA_DECL int archive_read_support_compression_gzip(struct archive *); +__LA_DECL int archive_read_support_compression_lzma(struct archive *); +__LA_DECL int archive_read_support_compression_none(struct archive *); +__LA_DECL int archive_read_support_compression_program(struct archive *, + const char *command); +__LA_DECL int archive_read_support_compression_program_signature + (struct archive *, const char *, + const void * /* match */, size_t); + +__LA_DECL int archive_read_support_compression_rpm(struct archive *); +__LA_DECL int archive_read_support_compression_uu(struct archive *); +__LA_DECL int archive_read_support_compression_xz(struct archive *); + +__LA_DECL int archive_read_support_format_all(struct archive *); +__LA_DECL int archive_read_support_format_ar(struct archive *); +__LA_DECL int archive_read_support_format_cpio(struct archive *); +__LA_DECL int archive_read_support_format_empty(struct archive *); +__LA_DECL int archive_read_support_format_gnutar(struct archive *); +__LA_DECL int archive_read_support_format_iso9660(struct archive *); +__LA_DECL int archive_read_support_format_mtree(struct archive *); +__LA_DECL int archive_read_support_format_raw(struct archive *); +__LA_DECL int archive_read_support_format_tar(struct archive *); +__LA_DECL int archive_read_support_format_xar(struct archive *); +__LA_DECL int archive_read_support_format_zip(struct archive *); + + +/* Open the archive using callbacks for archive I/O. */ +__LA_DECL int archive_read_open(struct archive *, void *_client_data, + archive_open_callback *, archive_read_callback *, + archive_close_callback *); +__LA_DECL int archive_read_open2(struct archive *, void *_client_data, + archive_open_callback *, archive_read_callback *, + archive_skip_callback *, archive_close_callback *); + +/* + * A variety of shortcuts that invoke archive_read_open() with + * canned callbacks suitable for common situations. The ones that + * accept a block size handle tape blocking correctly. + */ +/* Use this if you know the filename. Note: NULL indicates stdin. */ +__LA_DECL int archive_read_open_filename(struct archive *, + const char *_filename, size_t _block_size); +/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */ +__LA_DECL int archive_read_open_file(struct archive *, + const char *_filename, size_t _block_size); +/* Read an archive that's stored in memory. */ +__LA_DECL int archive_read_open_memory(struct archive *, + void * buff, size_t size); +/* A more involved version that is only used for internal testing. */ +__LA_DECL int archive_read_open_memory2(struct archive *a, void *buff, + size_t size, size_t read_size); +/* Read an archive that's already open, using the file descriptor. */ +__LA_DECL int archive_read_open_fd(struct archive *, int _fd, + size_t _block_size); +/* Read an archive that's already open, using a FILE *. */ +/* Note: DO NOT use this with tape drives. */ +__LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file); + +/* Parses and returns next entry header. */ +__LA_DECL int archive_read_next_header(struct archive *, + struct archive_entry **); + +/* Parses and returns next entry header using the archive_entry passed in */ +__LA_DECL int archive_read_next_header2(struct archive *, + struct archive_entry *); + +/* + * Retrieve the byte offset in UNCOMPRESSED data where last-read + * header started. + */ +__LA_DECL __LA_INT64_T archive_read_header_position(struct archive *); + +/* Read data from the body of an entry. Similar to read(2). */ +__LA_DECL __LA_SSIZE_T archive_read_data(struct archive *, + void *, size_t); + +/* + * A zero-copy version of archive_read_data that also exposes the file offset + * of each returned block. Note that the client has no way to specify + * the desired size of the block. The API does guarantee that offsets will + * be strictly increasing and that returned blocks will not overlap. + */ +#if ARCHIVE_VERSION_NUMBER < 3000000 +__LA_DECL int archive_read_data_block(struct archive *a, + const void **buff, size_t *size, off_t *offset); +#else +__LA_DECL int archive_read_data_block(struct archive *a, + const void **buff, size_t *size, + __LA_INT64_T *offset); +#endif + +/*- + * Some convenience functions that are built on archive_read_data: + * 'skip': skips entire entry + * 'into_buffer': writes data into memory buffer that you provide + * 'into_fd': writes data to specified filedes + */ +__LA_DECL int archive_read_data_skip(struct archive *); +__LA_DECL int archive_read_data_into_buffer(struct archive *, + void *buffer, __LA_SSIZE_T len); +__LA_DECL int archive_read_data_into_fd(struct archive *, int fd); + +/* + * Set read options. + */ +/* Apply option string to the format only. */ +__LA_DECL int archive_read_set_format_options(struct archive *_a, + const char *s); +/* Apply option string to the filter only. */ +__LA_DECL int archive_read_set_filter_options(struct archive *_a, + const char *s); +/* Apply option string to both the format and the filter. */ +__LA_DECL int archive_read_set_options(struct archive *_a, + const char *s); + +/*- + * Convenience function to recreate the current entry (whose header + * has just been read) on disk. + * + * This does quite a bit more than just copy data to disk. It also: + * - Creates intermediate directories as required. + * - Manages directory permissions: non-writable directories will + * be initially created with write permission enabled; when the + * archive is closed, dir permissions are edited to the values specified + * in the archive. + * - Checks hardlinks: hardlinks will not be extracted unless the + * linked-to file was also extracted within the same session. (TODO) + */ + +/* The "flags" argument selects optional behavior, 'OR' the flags you want. */ + +/* Default: Do not try to set owner/group. */ +#define ARCHIVE_EXTRACT_OWNER (0x0001) +/* Default: Do obey umask, do not restore SUID/SGID/SVTX bits. */ +#define ARCHIVE_EXTRACT_PERM (0x0002) +/* Default: Do not restore mtime/atime. */ +#define ARCHIVE_EXTRACT_TIME (0x0004) +/* Default: Replace existing files. */ +#define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008) +/* Default: Try create first, unlink only if create fails with EEXIST. */ +#define ARCHIVE_EXTRACT_UNLINK (0x0010) +/* Default: Do not restore ACLs. */ +#define ARCHIVE_EXTRACT_ACL (0x0020) +/* Default: Do not restore fflags. */ +#define ARCHIVE_EXTRACT_FFLAGS (0x0040) +/* Default: Do not restore xattrs. */ +#define ARCHIVE_EXTRACT_XATTR (0x0080) +/* Default: Do not try to guard against extracts redirected by symlinks. */ +/* Note: With ARCHIVE_EXTRACT_UNLINK, will remove any intermediate symlink. */ +#define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100) +/* Default: Do not reject entries with '..' as path elements. */ +#define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200) +/* Default: Create parent directories as needed. */ +#define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400) +/* Default: Overwrite files, even if one on disk is newer. */ +#define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800) +/* Detect blocks of 0 and write holes instead. */ +#define ARCHIVE_EXTRACT_SPARSE (0x1000) + +__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, + int flags); +__LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *, + struct archive * /* dest */); +__LA_DECL void archive_read_extract_set_progress_callback(struct archive *, + void (*_progress_func)(void *), void *_user_data); + +/* Record the dev/ino of a file that will not be written. This is + * generally set to the dev/ino of the archive being read. */ +__LA_DECL void archive_read_extract_set_skip_file(struct archive *, + dev_t, ino_t); + +/* Close the file and release most resources. */ +__LA_DECL int archive_read_close(struct archive *); +/* Release all resources and destroy the object. */ +/* Note that archive_read_finish will call archive_read_close for you. */ +#if ARCHIVE_VERSION_NUMBER < 2000000 +/* Erroneously declared to return void in libarchive 1.x */ +__LA_DECL void archive_read_finish(struct archive *); +#else +__LA_DECL int archive_read_finish(struct archive *); +#endif + +/*- + * To create an archive: + * 1) Ask archive_write_new for a archive writer object. + * 2) Set any global properties. In particular, you should set + * the compression and format to use. + * 3) Call archive_write_open to open the file (most people + * will use archive_write_open_file or archive_write_open_fd, + * which provide convenient canned I/O callbacks for you). + * 4) For each entry: + * - construct an appropriate struct archive_entry structure + * - archive_write_header to write the header + * - archive_write_data to write the entry data + * 5) archive_write_close to close the output + * 6) archive_write_finish to cleanup the writer and release resources + */ +__LA_DECL struct archive *archive_write_new(void); +__LA_DECL int archive_write_set_bytes_per_block(struct archive *, + int bytes_per_block); +__LA_DECL int archive_write_get_bytes_per_block(struct archive *); +/* XXX This is badly misnamed; suggestions appreciated. XXX */ +__LA_DECL int archive_write_set_bytes_in_last_block(struct archive *, + int bytes_in_last_block); +__LA_DECL int archive_write_get_bytes_in_last_block(struct archive *); + +/* The dev/ino of a file that won't be archived. This is used + * to avoid recursively adding an archive to itself. */ +__LA_DECL int archive_write_set_skip_file(struct archive *, dev_t, ino_t); + +__LA_DECL int archive_write_set_compression_bzip2(struct archive *); +__LA_DECL int archive_write_set_compression_compress(struct archive *); +__LA_DECL int archive_write_set_compression_gzip(struct archive *); +__LA_DECL int archive_write_set_compression_lzma(struct archive *); +__LA_DECL int archive_write_set_compression_none(struct archive *); +__LA_DECL int archive_write_set_compression_program(struct archive *, + const char *cmd); +__LA_DECL int archive_write_set_compression_xz(struct archive *); +/* A convenience function to set the format based on the code or name. */ +__LA_DECL int archive_write_set_format(struct archive *, int format_code); +__LA_DECL int archive_write_set_format_by_name(struct archive *, + const char *name); +/* To minimize link pollution, use one or more of the following. */ +__LA_DECL int archive_write_set_format_ar_bsd(struct archive *); +__LA_DECL int archive_write_set_format_ar_svr4(struct archive *); +__LA_DECL int archive_write_set_format_cpio(struct archive *); +__LA_DECL int archive_write_set_format_cpio_newc(struct archive *); +__LA_DECL int archive_write_set_format_mtree(struct archive *); +/* TODO: int archive_write_set_format_old_tar(struct archive *); */ +__LA_DECL int archive_write_set_format_pax(struct archive *); +__LA_DECL int archive_write_set_format_pax_restricted(struct archive *); +__LA_DECL int archive_write_set_format_shar(struct archive *); +__LA_DECL int archive_write_set_format_shar_dump(struct archive *); +__LA_DECL int archive_write_set_format_ustar(struct archive *); +__LA_DECL int archive_write_set_format_zip(struct archive *); +__LA_DECL int archive_write_open(struct archive *, void *, + archive_open_callback *, archive_write_callback *, + archive_close_callback *); +__LA_DECL int archive_write_open_fd(struct archive *, int _fd); +__LA_DECL int archive_write_open_filename(struct archive *, const char *_file); +/* A deprecated synonym for archive_write_open_filename() */ +__LA_DECL int archive_write_open_file(struct archive *, const char *_file); +__LA_DECL int archive_write_open_FILE(struct archive *, FILE *); +/* _buffSize is the size of the buffer, _used refers to a variable that + * will be updated after each write into the buffer. */ +__LA_DECL int archive_write_open_memory(struct archive *, + void *_buffer, size_t _buffSize, size_t *_used); + +/* + * Note that the library will truncate writes beyond the size provided + * to archive_write_header or pad if the provided data is short. + */ +__LA_DECL int archive_write_header(struct archive *, + struct archive_entry *); +#if ARCHIVE_VERSION_NUMBER < 2000000 +/* This was erroneously declared to return "int" in libarchive 1.x. */ +__LA_DECL int archive_write_data(struct archive *, + const void *, size_t); +#else +/* Libarchive 2.0 and later return ssize_t here. */ +__LA_DECL __LA_SSIZE_T archive_write_data(struct archive *, + const void *, size_t); +#endif + +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* Libarchive 1.x and 2.x use off_t for the argument, but that's not + * stable on Linux. */ +__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *, + const void *, size_t, off_t); +#else +/* Libarchive 3.0 uses explicit int64_t to ensure consistent 64-bit support. */ +__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *, + const void *, size_t, __LA_INT64_T); +#endif +__LA_DECL int archive_write_finish_entry(struct archive *); +__LA_DECL int archive_write_close(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 2000000 +/* Return value was incorrect in libarchive 1.x. */ +__LA_DECL void archive_write_finish(struct archive *); +#else +/* Libarchive 2.x and later returns an error if this fails. */ +/* It can fail if the archive wasn't already closed, in which case + * archive_write_finish() will implicitly call archive_write_close(). */ +__LA_DECL int archive_write_finish(struct archive *); +#endif + +/* + * Set write options. + */ +/* Apply option string to the format only. */ +__LA_DECL int archive_write_set_format_options(struct archive *_a, + const char *s); +/* Apply option string to the compressor only. */ +__LA_DECL int archive_write_set_compressor_options(struct archive *_a, + const char *s); +/* Apply option string to both the format and the compressor. */ +__LA_DECL int archive_write_set_options(struct archive *_a, + const char *s); + + +/*- + * ARCHIVE_WRITE_DISK API + * + * To create objects on disk: + * 1) Ask archive_write_disk_new for a new archive_write_disk object. + * 2) Set any global properties. In particular, you probably + * want to set the options. + * 3) For each entry: + * - construct an appropriate struct archive_entry structure + * - archive_write_header to create the file/dir/etc on disk + * - archive_write_data to write the entry data + * 4) archive_write_finish to cleanup the writer and release resources + * + * In particular, you can use this in conjunction with archive_read() + * to pull entries out of an archive and create them on disk. + */ +__LA_DECL struct archive *archive_write_disk_new(void); +/* This file will not be overwritten. */ +__LA_DECL int archive_write_disk_set_skip_file(struct archive *, + dev_t, ino_t); +/* Set flags to control how the next item gets created. + * This accepts a bitmask of ARCHIVE_EXTRACT_XXX flags defined above. */ +__LA_DECL int archive_write_disk_set_options(struct archive *, + int flags); +/* + * The lookup functions are given uname/uid (or gname/gid) pairs and + * return a uid (gid) suitable for this system. These are used for + * restoring ownership and for setting ACLs. The default functions + * are naive, they just return the uid/gid. These are small, so reasonable + * for applications that don't need to preserve ownership; they + * are probably also appropriate for applications that are doing + * same-system backup and restore. + */ +/* + * The "standard" lookup functions use common system calls to lookup + * the uname/gname, falling back to the uid/gid if the names can't be + * found. They cache lookups and are reasonably fast, but can be very + * large, so they are not used unless you ask for them. In + * particular, these match the specifications of POSIX "pax" and old + * POSIX "tar". + */ +__LA_DECL int archive_write_disk_set_standard_lookup(struct archive *); +/* + * If neither the default (naive) nor the standard (big) functions suit + * your needs, you can write your own and register them. Be sure to + * include a cleanup function if you have allocated private data. + */ +__LA_DECL int archive_write_disk_set_group_lookup(struct archive *, + void * /* private_data */, + __LA_GID_T (*)(void *, const char *, __LA_GID_T), + void (* /* cleanup */)(void *)); +__LA_DECL int archive_write_disk_set_user_lookup(struct archive *, + void * /* private_data */, + __LA_UID_T (*)(void *, const char *, __LA_UID_T), + void (* /* cleanup */)(void *)); + +/* + * ARCHIVE_READ_DISK API + * + * This is still evolving and somewhat experimental. + */ +__LA_DECL struct archive *archive_read_disk_new(void); +/* The names for symlink modes here correspond to an old BSD + * command-line argument convention: -L, -P, -H */ +/* Follow all symlinks. */ +__LA_DECL int archive_read_disk_set_symlink_logical(struct archive *); +/* Follow no symlinks. */ +__LA_DECL int archive_read_disk_set_symlink_physical(struct archive *); +/* Follow symlink initially, then not. */ +__LA_DECL int archive_read_disk_set_symlink_hybrid(struct archive *); +/* TODO: Handle Linux stat32/stat64 ugliness. */ +__LA_DECL int archive_read_disk_entry_from_file(struct archive *, + struct archive_entry *, int /* fd */, const struct stat *); +/* Look up gname for gid or uname for uid. */ +/* Default implementations are very, very stupid. */ +__LA_DECL const char *archive_read_disk_gname(struct archive *, __LA_GID_T); +__LA_DECL const char *archive_read_disk_uname(struct archive *, __LA_UID_T); +/* "Standard" implementation uses getpwuid_r, getgrgid_r and caches the + * results for performance. */ +__LA_DECL int archive_read_disk_set_standard_lookup(struct archive *); +/* You can install your own lookups if you like. */ +__LA_DECL int archive_read_disk_set_gname_lookup(struct archive *, + void * /* private_data */, + const char *(* /* lookup_fn */)(void *, __LA_GID_T), + void (* /* cleanup_fn */)(void *)); +__LA_DECL int archive_read_disk_set_uname_lookup(struct archive *, + void * /* private_data */, + const char *(* /* lookup_fn */)(void *, __LA_UID_T), + void (* /* cleanup_fn */)(void *)); + +/* + * Accessor functions to read/set various information in + * the struct archive object: + */ +/* Bytes written after compression or read before decompression. */ +__LA_DECL __LA_INT64_T archive_position_compressed(struct archive *); +/* Bytes written to compressor or read from decompressor. */ +__LA_DECL __LA_INT64_T archive_position_uncompressed(struct archive *); + +__LA_DECL const char *archive_compression_name(struct archive *); +__LA_DECL int archive_compression(struct archive *); +__LA_DECL int archive_errno(struct archive *); +__LA_DECL const char *archive_error_string(struct archive *); +__LA_DECL const char *archive_format_name(struct archive *); +__LA_DECL int archive_format(struct archive *); +__LA_DECL void archive_clear_error(struct archive *); +__LA_DECL void archive_set_error(struct archive *, int _err, + const char *fmt, ...); +__LA_DECL void archive_copy_error(struct archive *dest, + struct archive *src); +__LA_DECL int archive_file_count(struct archive *); + +#ifdef __cplusplus +} +#endif + +/* These are meaningless outside of this header. */ +#undef __LA_DECL +#undef __LA_GID_T +#undef __LA_UID_T + +/* These need to remain defined because they're used in the + * callback type definitions. XXX Fix this. This is ugly. XXX */ +/* #undef __LA_INT64_T */ +/* #undef __LA_SSIZE_T */ + +#endif /* !ARCHIVE_H_INCLUDED */ diff --git a/lib/libmxml/xcode/archive_entry.h b/lib/libmxml/xcode/archive_entry.h new file mode 100644 index 0000000..d572817 --- /dev/null +++ b/lib/libmxml/xcode/archive_entry.h @@ -0,0 +1,524 @@ +/*- + * Copyright (c) 2003-2008 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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 AUTHOR(S) 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. + * + * $FreeBSD: head/lib/libarchive/archive_entry.h 201096 2009-12-28 02:41:27Z kientzle $ + */ + +#ifndef ARCHIVE_ENTRY_H_INCLUDED +#define ARCHIVE_ENTRY_H_INCLUDED + +/* + * Note: archive_entry.h is for use outside of libarchive; the + * configuration headers (config.h, archive_platform.h, etc.) are + * purely internal. Do NOT use HAVE_XXX configuration macros to + * control the behavior of this header! If you must conditionalize, + * use predefined compiler and/or platform macros. + */ + +#include +#include /* for wchar_t */ +#include + +#if defined(_WIN32) && !defined(__CYGWIN__) +#include +#endif + +/* Get appropriate definitions of standard POSIX-style types. */ +/* These should match the types used in 'struct stat' */ +#if defined(_WIN32) && !defined(__CYGWIN__) +#define __LA_INT64_T __int64 +# if defined(__BORLANDC__) +# define __LA_UID_T uid_t +# define __LA_GID_T gid_t +# define __LA_DEV_T dev_t +# define __LA_MODE_T mode_t +# else +# define __LA_UID_T short +# define __LA_GID_T short +# define __LA_DEV_T unsigned int +# define __LA_MODE_T unsigned short +# endif +#else +#include +#define __LA_INT64_T int64_t +#define __LA_UID_T uid_t +#define __LA_GID_T gid_t +#define __LA_DEV_T dev_t +#define __LA_MODE_T mode_t +#endif + +/* + * XXX Is this defined for all Windows compilers? If so, in what + * header? It would be nice to remove the __LA_INO_T indirection and + * just use plain ino_t everywhere. Likewise for the other types just + * above. + */ +#define __LA_INO_T ino_t + + +/* + * On Windows, define LIBARCHIVE_STATIC if you're building or using a + * .lib. The default here assumes you're building a DLL. Only + * libarchive source should ever define __LIBARCHIVE_BUILD. + */ +#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) +# ifdef __LIBARCHIVE_BUILD +# ifdef __GNUC__ +# define __LA_DECL __attribute__((dllexport)) extern +# else +# define __LA_DECL __declspec(dllexport) +# endif +# else +# ifdef __GNUC__ +# define __LA_DECL __attribute__((dllimport)) extern +# else +# define __LA_DECL __declspec(dllimport) +# endif +# endif +#else +/* Static libraries on all platforms and shared libraries on non-Windows. */ +# define __LA_DECL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Description of an archive entry. + * + * You can think of this as "struct stat" with some text fields added in. + * + * TODO: Add "comment", "charset", and possibly other entries that are + * supported by "pax interchange" format. However, GNU, ustar, cpio, + * and other variants don't support these features, so they're not an + * excruciatingly high priority right now. + * + * TODO: "pax interchange" format allows essentially arbitrary + * key/value attributes to be attached to any entry. Supporting + * such extensions may make this library useful for special + * applications (e.g., a package manager could attach special + * package-management attributes to each entry). + */ +struct archive_entry; + +/* + * File-type constants. These are returned from archive_entry_filetype() + * and passed to archive_entry_set_filetype(). + * + * These values match S_XXX defines on every platform I've checked, + * including Windows, AIX, Linux, Solaris, and BSD. They're + * (re)defined here because platforms generally don't define the ones + * they don't support. For example, Windows doesn't define S_IFLNK or + * S_IFBLK. Instead of having a mass of conditional logic and system + * checks to define any S_XXX values that aren't supported locally, + * I've just defined a new set of such constants so that + * libarchive-based applications can manipulate and identify archive + * entries properly even if the hosting platform can't store them on + * disk. + * + * These values are also used directly within some portable formats, + * such as cpio. If you find a platform that varies from these, the + * correct solution is to leave these alone and translate from these + * portable values to platform-native values when entries are read from + * or written to disk. + */ +#define AE_IFMT 0170000 +#define AE_IFREG 0100000 +#define AE_IFLNK 0120000 +#define AE_IFSOCK 0140000 +#define AE_IFCHR 0020000 +#define AE_IFBLK 0060000 +#define AE_IFDIR 0040000 +#define AE_IFIFO 0010000 + +/* + * Basic object manipulation + */ + +__LA_DECL struct archive_entry *archive_entry_clear(struct archive_entry *); +/* The 'clone' function does a deep copy; all of the strings are copied too. */ +__LA_DECL struct archive_entry *archive_entry_clone(struct archive_entry *); +__LA_DECL void archive_entry_free(struct archive_entry *); +__LA_DECL struct archive_entry *archive_entry_new(void); + +/* + * Retrieve fields from an archive_entry. + * + * There are a number of implicit conversions among these fields. For + * example, if a regular string field is set and you read the _w wide + * character field, the entry will implicitly convert narrow-to-wide + * using the current locale. Similarly, dev values are automatically + * updated when you write devmajor or devminor and vice versa. + * + * In addition, fields can be "set" or "unset." Unset string fields + * return NULL, non-string fields have _is_set() functions to test + * whether they've been set. You can "unset" a string field by + * assigning NULL; non-string fields have _unset() functions to + * unset them. + * + * Note: There is one ambiguity in the above; string fields will + * also return NULL when implicit character set conversions fail. + * This is usually what you want. + */ +__LA_DECL time_t archive_entry_atime(struct archive_entry *); +__LA_DECL long archive_entry_atime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_atime_is_set(struct archive_entry *); +__LA_DECL time_t archive_entry_birthtime(struct archive_entry *); +__LA_DECL long archive_entry_birthtime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_birthtime_is_set(struct archive_entry *); +__LA_DECL time_t archive_entry_ctime(struct archive_entry *); +__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_ctime_is_set(struct archive_entry *); +__LA_DECL dev_t archive_entry_dev(struct archive_entry *); +__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *); +__LA_DECL dev_t archive_entry_devminor(struct archive_entry *); +__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *); +__LA_DECL void archive_entry_fflags(struct archive_entry *, + unsigned long * /* set */, + unsigned long * /* clear */); +__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *); +__LA_DECL __LA_GID_T archive_entry_gid(struct archive_entry *); +__LA_DECL const char *archive_entry_gname(struct archive_entry *); +__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *); +__LA_DECL const char *archive_entry_hardlink(struct archive_entry *); +__LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *); +__LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *); +__LA_DECL __LA_INT64_T archive_entry_ino64(struct archive_entry *); +__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *); +__LA_DECL time_t archive_entry_mtime(struct archive_entry *); +__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_mtime_is_set(struct archive_entry *); +__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *); +__LA_DECL const char *archive_entry_pathname(struct archive_entry *); +__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *); +__LA_DECL dev_t archive_entry_rdev(struct archive_entry *); +__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *); +__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *); +__LA_DECL const char *archive_entry_sourcepath(struct archive_entry *); +__LA_DECL __LA_INT64_T archive_entry_size(struct archive_entry *); +__LA_DECL int archive_entry_size_is_set(struct archive_entry *); +__LA_DECL const char *archive_entry_strmode(struct archive_entry *); +__LA_DECL const char *archive_entry_symlink(struct archive_entry *); +__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); +__LA_DECL __LA_UID_T archive_entry_uid(struct archive_entry *); +__LA_DECL const char *archive_entry_uname(struct archive_entry *); +__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *); + +/* + * Set fields in an archive_entry. + * + * Note that string 'set' functions do not copy the string, only the pointer. + * In contrast, 'copy' functions do copy the object pointed to. + * + * Note: As of libarchive 2.4, 'set' functions do copy the string and + * are therefore exact synonyms for the 'copy' versions. The 'copy' + * names will be retired in libarchive 3.0. + */ + +__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_atime(struct archive_entry *); +#if defined(_WIN32) && !defined(__CYGWIN__) +__LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, + BY_HANDLE_FILE_INFORMATION *); +#endif +__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_birthtime(struct archive_entry *); +__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_ctime(struct archive_entry *); +__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_filetype(struct archive_entry *, unsigned int); +__LA_DECL void archive_entry_set_fflags(struct archive_entry *, + unsigned long /* set */, unsigned long /* clear */); +/* Returns pointer to start of first invalid token, or NULL if none. */ +/* Note that all recognized tokens are processed, regardless. */ +__LA_DECL const char *archive_entry_copy_fflags_text(struct archive_entry *, + const char *); +__LA_DECL const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *, + const wchar_t *); +__LA_DECL void archive_entry_set_gid(struct archive_entry *, __LA_GID_T); +__LA_DECL void archive_entry_set_gname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_gname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_gname_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_gname_utf8(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_hardlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_hardlink_utf8(struct archive_entry *, const char *); +#if ARCHIVE_VERSION_NUMBER >= 3000000 +/* Starting with libarchive 3.0, this will be synonym for ino64. */ +__LA_DECL void archive_entry_set_ino(struct archive_entry *, __LA_INT64_T); +#else +__LA_DECL void archive_entry_set_ino(struct archive_entry *, unsigned long); +#endif +__LA_DECL void archive_entry_set_ino64(struct archive_entry *, __LA_INT64_T); +__LA_DECL void archive_entry_set_link(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T); +__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_mtime(struct archive_entry *); +__LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int); +__LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_pathname_utf8(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_perm(struct archive_entry *, __LA_MODE_T); +__LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_size(struct archive_entry *, __LA_INT64_T); +__LA_DECL void archive_entry_unset_size(struct archive_entry *); +__LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_symlink_utf8(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_uid(struct archive_entry *, __LA_UID_T); +__LA_DECL void archive_entry_set_uname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_uname(struct archive_entry *, const char *); +__LA_DECL void archive_entry_copy_uname_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_uname_utf8(struct archive_entry *, const char *); +/* + * Routines to bulk copy fields to/from a platform-native "struct + * stat." Libarchive used to just store a struct stat inside of each + * archive_entry object, but this created issues when trying to + * manipulate archives on systems different than the ones they were + * created on. + * + * TODO: On Linux, provide both stat32 and stat64 versions of these functions. + */ +__LA_DECL const struct stat *archive_entry_stat(struct archive_entry *); +__LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *); + + +/* + * ACL routines. This used to simply store and return text-format ACL + * strings, but that proved insufficient for a number of reasons: + * = clients need control over uname/uid and gname/gid mappings + * = there are many different ACL text formats + * = would like to be able to read/convert archives containing ACLs + * on platforms that lack ACL libraries + * + * This last point, in particular, forces me to implement a reasonably + * complete set of ACL support routines. + * + * TODO: Extend this to support NFSv4/NTFS permissions. That should + * allow full ACL support on Mac OS, in particular, which uses + * POSIX.1e-style interfaces to manipulate NFSv4/NTFS permissions. + */ + +/* + * Permission bits mimic POSIX.1e. Note that I've not followed POSIX.1e's + * "permset"/"perm" abstract type nonsense. A permset is just a simple + * bitmap, following long-standing Unix tradition. + */ +#define ARCHIVE_ENTRY_ACL_EXECUTE 1 +#define ARCHIVE_ENTRY_ACL_WRITE 2 +#define ARCHIVE_ENTRY_ACL_READ 4 + +/* We need to be able to specify either or both of these. */ +#define ARCHIVE_ENTRY_ACL_TYPE_ACCESS 256 +#define ARCHIVE_ENTRY_ACL_TYPE_DEFAULT 512 + +/* Tag values mimic POSIX.1e */ +#define ARCHIVE_ENTRY_ACL_USER 10001 /* Specified user. */ +#define ARCHIVE_ENTRY_ACL_USER_OBJ 10002 /* User who owns the file. */ +#define ARCHIVE_ENTRY_ACL_GROUP 10003 /* Specified group. */ +#define ARCHIVE_ENTRY_ACL_GROUP_OBJ 10004 /* Group who owns the file. */ +#define ARCHIVE_ENTRY_ACL_MASK 10005 /* Modify group access. */ +#define ARCHIVE_ENTRY_ACL_OTHER 10006 /* Public. */ + +/* + * Set the ACL by clearing it and adding entries one at a time. + * Unlike the POSIX.1e ACL routines, you must specify the type + * (access/default) for each entry. Internally, the ACL data is just + * a soup of entries. API calls here allow you to retrieve just the + * entries of interest. This design (which goes against the spirit of + * POSIX.1e) is useful for handling archive formats that combine + * default and access information in a single ACL list. + */ +__LA_DECL void archive_entry_acl_clear(struct archive_entry *); +__LA_DECL void archive_entry_acl_add_entry(struct archive_entry *, + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const char * /* name */); +__LA_DECL void archive_entry_acl_add_entry_w(struct archive_entry *, + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const wchar_t * /* name */); + +/* + * To retrieve the ACL, first "reset", then repeatedly ask for the + * "next" entry. The want_type parameter allows you to request only + * access entries or only default entries. + */ +__LA_DECL int archive_entry_acl_reset(struct archive_entry *, int /* want_type */); +__LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const char ** /* name */); +__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const wchar_t ** /* name */); + +/* + * Construct a text-format ACL. The flags argument is a bitmask that + * can include any of the following: + * + * ARCHIVE_ENTRY_ACL_TYPE_ACCESS - Include access entries. + * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT - Include default entries. + * ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID - Include extra numeric ID field in + * each ACL entry. (As used by 'star'.) + * ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT - Include "default:" before each + * default ACL entry. + */ +#define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024 +#define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048 +__LA_DECL const wchar_t *archive_entry_acl_text_w(struct archive_entry *, + int /* flags */); + +/* Return a count of entries matching 'want_type' */ +__LA_DECL int archive_entry_acl_count(struct archive_entry *, int /* want_type */); + +/* + * Private ACL parser. This is private because it handles some + * very weird formats that clients should not be messing with. + * Clients should only deal with their platform-native formats. + * Because of the need to support many formats cleanly, new arguments + * are likely to get added on a regular basis. Clients who try to use + * this interface are likely to be surprised when it changes. + * + * You were warned! + * + * TODO: Move this declaration out of the public header and into + * a private header. Warnings above are silly. + */ +__LA_DECL int __archive_entry_acl_parse_w(struct archive_entry *, + const wchar_t *, int /* type */); + +/* + * extended attributes + */ + +__LA_DECL void archive_entry_xattr_clear(struct archive_entry *); +__LA_DECL void archive_entry_xattr_add_entry(struct archive_entry *, + const char * /* name */, const void * /* value */, + size_t /* size */); + +/* + * To retrieve the xattr list, first "reset", then repeatedly ask for the + * "next" entry. + */ + +__LA_DECL int archive_entry_xattr_count(struct archive_entry *); +__LA_DECL int archive_entry_xattr_reset(struct archive_entry *); +__LA_DECL int archive_entry_xattr_next(struct archive_entry *, + const char ** /* name */, const void ** /* value */, size_t *); + +/* + * Utility to match up hardlinks. + * + * The 'struct archive_entry_linkresolver' is a cache of archive entries + * for files with multiple links. Here's how to use it: + * 1. Create a lookup object with archive_entry_linkresolver_new() + * 2. Tell it the archive format you're using. + * 3. Hand each archive_entry to archive_entry_linkify(). + * That function will return 0, 1, or 2 entries that should + * be written. + * 4. Call archive_entry_linkify(resolver, NULL) until + * no more entries are returned. + * 5. Call archive_entry_link_resolver_free(resolver) to free resources. + * + * The entries returned have their hardlink and size fields updated + * appropriately. If an entry is passed in that does not refer to + * a file with multiple links, it is returned unchanged. The intention + * is that you should be able to simply filter all entries through + * this machine. + * + * To make things more efficient, be sure that each entry has a valid + * nlinks value. The hardlink cache uses this to track when all links + * have been found. If the nlinks value is zero, it will keep every + * name in the cache indefinitely, which can use a lot of memory. + * + * Note that archive_entry_size() is reset to zero if the file + * body should not be written to the archive. Pay attention! + */ +struct archive_entry_linkresolver; + +/* + * There are three different strategies for marking hardlinks. + * The descriptions below name them after the best-known + * formats that rely on each strategy: + * + * "Old cpio" is the simplest, it always returns any entry unmodified. + * As far as I know, only cpio formats use this. Old cpio archives + * store every link with the full body; the onus is on the dearchiver + * to detect and properly link the files as they are restored. + * "tar" is also pretty simple; it caches a copy the first time it sees + * any link. Subsequent appearances are modified to be hardlink + * references to the first one without any body. Used by all tar + * formats, although the newest tar formats permit the "old cpio" strategy + * as well. This strategy is very simple for the dearchiver, + * and reasonably straightforward for the archiver. + * "new cpio" is trickier. It stores the body only with the last + * occurrence. The complication is that we might not + * see every link to a particular file in a single session, so + * there's no easy way to know when we've seen the last occurrence. + * The solution here is to queue one link until we see the next. + * At the end of the session, you can enumerate any remaining + * entries by calling archive_entry_linkify(NULL) and store those + * bodies. If you have a file with three links l1, l2, and l3, + * you'll get the following behavior if you see all three links: + * linkify(l1) => NULL (the resolver stores l1 internally) + * linkify(l2) => l1 (resolver stores l2, you write l1) + * linkify(l3) => l2, l3 (all links seen, you can write both). + * If you only see l1 and l2, you'll get this behavior: + * linkify(l1) => NULL + * linkify(l2) => l1 + * linkify(NULL) => l2 (at end, you retrieve remaining links) + * As the name suggests, this strategy is used by newer cpio variants. + * It's noticably more complex for the archiver, slightly more complex + * for the dearchiver than the tar strategy, but makes it straightforward + * to restore a file using any link by simply continuing to scan until + * you see a link that is stored with a body. In contrast, the tar + * strategy requires you to rescan the archive from the beginning to + * correctly extract an arbitrary link. + */ + +__LA_DECL struct archive_entry_linkresolver *archive_entry_linkresolver_new(void); +__LA_DECL void archive_entry_linkresolver_set_strategy( + struct archive_entry_linkresolver *, int /* format_code */); +__LA_DECL void archive_entry_linkresolver_free(struct archive_entry_linkresolver *); +__LA_DECL void archive_entry_linkify(struct archive_entry_linkresolver *, + struct archive_entry **, struct archive_entry **); + +#ifdef __cplusplus +} +#endif + +/* This is meaningless outside of this header. */ +#undef __LA_DECL + +#endif /* !ARCHIVE_ENTRY_H_INCLUDED */ diff --git a/lib/libmxml/xcode/mxml.xcodeproj/project.pbxproj b/lib/libmxml/xcode/mxml.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ab232fc --- /dev/null +++ b/lib/libmxml/xcode/mxml.xcodeproj/project.pbxproj @@ -0,0 +1,633 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXAggregateTarget section */ + 272C00441E8C6B5A007EBCAC /* All */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 272C00451E8C6B5A007EBCAC /* Build configuration list for PBXAggregateTarget "All" */; + buildPhases = ( + ); + dependencies = ( + 272C00491E8C6B61007EBCAC /* PBXTargetDependency */, + 272C004B1E8C6B61007EBCAC /* PBXTargetDependency */, + 272C004D1E8C6B61007EBCAC /* PBXTargetDependency */, + ); + name = All; + productName = All; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 271227FF1EAADBE200167F24 /* mmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 271227FD1EAADBE200167F24 /* mmd.c */; }; + 272C00191E8C66C8007EBCAC /* mxml-attr.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C000D1E8C66C8007EBCAC /* mxml-attr.c */; }; + 272C001A1E8C66C8007EBCAC /* mxml-entity.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C000E1E8C66C8007EBCAC /* mxml-entity.c */; }; + 272C001B1E8C66C8007EBCAC /* mxml-file.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C000F1E8C66C8007EBCAC /* mxml-file.c */; }; + 272C001C1E8C66C8007EBCAC /* mxml-get.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00101E8C66C8007EBCAC /* mxml-get.c */; }; + 272C001D1E8C66C8007EBCAC /* mxml-index.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00111E8C66C8007EBCAC /* mxml-index.c */; }; + 272C001E1E8C66C8007EBCAC /* mxml-node.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00121E8C66C8007EBCAC /* mxml-node.c */; }; + 272C001F1E8C66C8007EBCAC /* mxml-private.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00131E8C66C8007EBCAC /* mxml-private.c */; }; + 272C00201E8C66C8007EBCAC /* mxml-private.h in Headers */ = {isa = PBXBuildFile; fileRef = 272C00141E8C66C8007EBCAC /* mxml-private.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 272C00211E8C66C8007EBCAC /* mxml-search.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00151E8C66C8007EBCAC /* mxml-search.c */; }; + 272C00221E8C66C8007EBCAC /* mxml-set.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00161E8C66C8007EBCAC /* mxml-set.c */; }; + 272C00231E8C66C8007EBCAC /* mxml-string.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00171E8C66C8007EBCAC /* mxml-string.c */; }; + 272C00241E8C66C8007EBCAC /* mxml.h in Headers */ = {isa = PBXBuildFile; fileRef = 272C00181E8C66C8007EBCAC /* mxml.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 272C00261E8C66CF007EBCAC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 272C00251E8C66CF007EBCAC /* config.h */; }; + 272C00421E8C6B30007EBCAC /* testmxml.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00401E8C6B1B007EBCAC /* testmxml.c */; }; + 272C00431E8C6B34007EBCAC /* mxmldoc.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00331E8C6ADE007EBCAC /* mxmldoc.c */; }; + 272C00501E8C6B89007EBCAC /* libmxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 272C00051E8C6664007EBCAC /* libmxml.a */; }; + 272C00511E8C6B8E007EBCAC /* libmxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 272C00051E8C6664007EBCAC /* libmxml.a */; }; + 272C00591E943266007EBCAC /* zipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C00571E943266007EBCAC /* zipc.c */; }; + 272C005B1E943423007EBCAC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 272C005A1E943423007EBCAC /* libz.tbd */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 272C00481E8C6B61007EBCAC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 272CFFFD1E8C6664007EBCAC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272C00041E8C6664007EBCAC; + remoteInfo = libmxml; + }; + 272C004A1E8C6B61007EBCAC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 272CFFFD1E8C6664007EBCAC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272C002A1E8C6A94007EBCAC; + remoteInfo = mxmldoc; + }; + 272C004C1E8C6B61007EBCAC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 272CFFFD1E8C6664007EBCAC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272C00381E8C6AEB007EBCAC; + remoteInfo = testmxml; + }; + 272C004E1E8C6B83007EBCAC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 272CFFFD1E8C6664007EBCAC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272C00041E8C6664007EBCAC; + remoteInfo = libmxml; + }; + 272C00521E8C6B91007EBCAC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 272CFFFD1E8C6664007EBCAC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272C00041E8C6664007EBCAC; + remoteInfo = libmxml; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 272C00291E8C6A94007EBCAC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 272C00371E8C6AEB007EBCAC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 271227FD1EAADBE200167F24 /* mmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mmd.c; path = ../mmd.c; sourceTree = ""; }; + 271227FE1EAADBE200167F24 /* mmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mmd.h; path = ../mmd.h; sourceTree = ""; }; + 272C00051E8C6664007EBCAC /* libmxml.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmxml.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 272C000D1E8C66C8007EBCAC /* mxml-attr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-attr.c"; path = "../mxml-attr.c"; sourceTree = ""; }; + 272C000E1E8C66C8007EBCAC /* mxml-entity.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-entity.c"; path = "../mxml-entity.c"; sourceTree = ""; }; + 272C000F1E8C66C8007EBCAC /* mxml-file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-file.c"; path = "../mxml-file.c"; sourceTree = ""; }; + 272C00101E8C66C8007EBCAC /* mxml-get.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-get.c"; path = "../mxml-get.c"; sourceTree = ""; }; + 272C00111E8C66C8007EBCAC /* mxml-index.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-index.c"; path = "../mxml-index.c"; sourceTree = ""; }; + 272C00121E8C66C8007EBCAC /* mxml-node.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-node.c"; path = "../mxml-node.c"; sourceTree = ""; }; + 272C00131E8C66C8007EBCAC /* mxml-private.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-private.c"; path = "../mxml-private.c"; sourceTree = ""; }; + 272C00141E8C66C8007EBCAC /* mxml-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "mxml-private.h"; path = "../mxml-private.h"; sourceTree = ""; }; + 272C00151E8C66C8007EBCAC /* mxml-search.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-search.c"; path = "../mxml-search.c"; sourceTree = ""; }; + 272C00161E8C66C8007EBCAC /* mxml-set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-set.c"; path = "../mxml-set.c"; sourceTree = ""; }; + 272C00171E8C66C8007EBCAC /* mxml-string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mxml-string.c"; path = "../mxml-string.c"; sourceTree = ""; }; + 272C00181E8C66C8007EBCAC /* mxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mxml.h; path = ../mxml.h; sourceTree = ""; }; + 272C00251E8C66CF007EBCAC /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; + 272C002B1E8C6A94007EBCAC /* mxmldoc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mxmldoc; sourceTree = BUILT_PRODUCTS_DIR; }; + 272C00331E8C6ADE007EBCAC /* mxmldoc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mxmldoc.c; path = ../mxmldoc.c; sourceTree = ""; }; + 272C00391E8C6AEB007EBCAC /* testmxml */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmxml; sourceTree = BUILT_PRODUCTS_DIR; }; + 272C00401E8C6B1B007EBCAC /* testmxml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmxml.c; path = ../testmxml.c; sourceTree = ""; }; + 272C00551E8EF972007EBCAC /* libarchive.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libarchive.tbd; path = usr/lib/libarchive.tbd; sourceTree = SDKROOT; }; + 272C00571E943266007EBCAC /* zipc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zipc.c; path = ../zipc.c; sourceTree = ""; }; + 272C00581E943266007EBCAC /* zipc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zipc.h; path = ../zipc.h; sourceTree = ""; }; + 272C005A1E943423007EBCAC /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 272C00021E8C6664007EBCAC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 272C00281E8C6A94007EBCAC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 272C005B1E943423007EBCAC /* libz.tbd in Frameworks */, + 272C00511E8C6B8E007EBCAC /* libmxml.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 272C00361E8C6AEB007EBCAC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 272C00501E8C6B89007EBCAC /* libmxml.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 272C00061E8C6664007EBCAC /* Products */ = { + isa = PBXGroup; + children = ( + 272C00051E8C6664007EBCAC /* libmxml.a */, + 272C002B1E8C6A94007EBCAC /* mxmldoc */, + 272C00391E8C6AEB007EBCAC /* testmxml */, + ); + name = Products; + sourceTree = ""; + }; + 272C000C1E8C66A2007EBCAC /* libmxml */ = { + isa = PBXGroup; + children = ( + 272C00251E8C66CF007EBCAC /* config.h */, + 272C000D1E8C66C8007EBCAC /* mxml-attr.c */, + 272C000E1E8C66C8007EBCAC /* mxml-entity.c */, + 272C000F1E8C66C8007EBCAC /* mxml-file.c */, + 272C00101E8C66C8007EBCAC /* mxml-get.c */, + 272C00111E8C66C8007EBCAC /* mxml-index.c */, + 272C00121E8C66C8007EBCAC /* mxml-node.c */, + 272C00131E8C66C8007EBCAC /* mxml-private.c */, + 272C00141E8C66C8007EBCAC /* mxml-private.h */, + 272C00151E8C66C8007EBCAC /* mxml-search.c */, + 272C00161E8C66C8007EBCAC /* mxml-set.c */, + 272C00171E8C66C8007EBCAC /* mxml-string.c */, + 272C00181E8C66C8007EBCAC /* mxml.h */, + ); + name = libmxml; + sourceTree = ""; + }; + 272C00321E8C6ABB007EBCAC /* tools */ = { + isa = PBXGroup; + children = ( + 271227FD1EAADBE200167F24 /* mmd.c */, + 271227FE1EAADBE200167F24 /* mmd.h */, + 272C00331E8C6ADE007EBCAC /* mxmldoc.c */, + 272C00401E8C6B1B007EBCAC /* testmxml.c */, + 272C00571E943266007EBCAC /* zipc.c */, + 272C00581E943266007EBCAC /* zipc.h */, + ); + name = tools; + sourceTree = ""; + }; + 272C00541E8EF971007EBCAC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 272C005A1E943423007EBCAC /* libz.tbd */, + 272C00551E8EF972007EBCAC /* libarchive.tbd */, + ); + name = Frameworks; + sourceTree = ""; + }; + 272CFFFC1E8C6664007EBCAC = { + isa = PBXGroup; + children = ( + 272C000C1E8C66A2007EBCAC /* libmxml */, + 272C00321E8C6ABB007EBCAC /* tools */, + 272C00061E8C6664007EBCAC /* Products */, + 272C00541E8EF971007EBCAC /* Frameworks */, + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 272C00031E8C6664007EBCAC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 272C00241E8C66C8007EBCAC /* mxml.h in Headers */, + 272C00201E8C66C8007EBCAC /* mxml-private.h in Headers */, + 272C00261E8C66CF007EBCAC /* config.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 272C00041E8C6664007EBCAC /* libmxml */ = { + isa = PBXNativeTarget; + buildConfigurationList = 272C00091E8C6664007EBCAC /* Build configuration list for PBXNativeTarget "libmxml" */; + buildPhases = ( + 272C00011E8C6664007EBCAC /* Sources */, + 272C00021E8C6664007EBCAC /* Frameworks */, + 272C00031E8C6664007EBCAC /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libmxml; + productName = mxml; + productReference = 272C00051E8C6664007EBCAC /* libmxml.a */; + productType = "com.apple.product-type.library.static"; + }; + 272C002A1E8C6A94007EBCAC /* mxmldoc */ = { + isa = PBXNativeTarget; + buildConfigurationList = 272C00311E8C6A94007EBCAC /* Build configuration list for PBXNativeTarget "mxmldoc" */; + buildPhases = ( + 272C00271E8C6A94007EBCAC /* Sources */, + 272C00281E8C6A94007EBCAC /* Frameworks */, + 272C00291E8C6A94007EBCAC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 272C00531E8C6B91007EBCAC /* PBXTargetDependency */, + ); + name = mxmldoc; + productName = mxmldoc; + productReference = 272C002B1E8C6A94007EBCAC /* mxmldoc */; + productType = "com.apple.product-type.tool"; + }; + 272C00381E8C6AEB007EBCAC /* testmxml */ = { + isa = PBXNativeTarget; + buildConfigurationList = 272C003D1E8C6AEB007EBCAC /* Build configuration list for PBXNativeTarget "testmxml" */; + buildPhases = ( + 272C00351E8C6AEB007EBCAC /* Sources */, + 272C00361E8C6AEB007EBCAC /* Frameworks */, + 272C00371E8C6AEB007EBCAC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 272C004F1E8C6B83007EBCAC /* PBXTargetDependency */, + ); + name = testmxml; + productName = testmxml; + productReference = 272C00391E8C6AEB007EBCAC /* testmxml */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 272CFFFD1E8C6664007EBCAC /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Michael R Sweet"; + TargetAttributes = { + 272C00041E8C6664007EBCAC = { + CreatedOnToolsVersion = 8.3; + DevelopmentTeam = RU58A2256H; + ProvisioningStyle = Automatic; + }; + 272C002A1E8C6A94007EBCAC = { + CreatedOnToolsVersion = 8.3; + DevelopmentTeam = RU58A2256H; + ProvisioningStyle = Automatic; + }; + 272C00381E8C6AEB007EBCAC = { + CreatedOnToolsVersion = 8.3; + DevelopmentTeam = RU58A2256H; + ProvisioningStyle = Automatic; + }; + 272C00441E8C6B5A007EBCAC = { + CreatedOnToolsVersion = 8.3; + DevelopmentTeam = RU58A2256H; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 272C00001E8C6664007EBCAC /* Build configuration list for PBXProject "mxml" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 272CFFFC1E8C6664007EBCAC; + productRefGroup = 272C00061E8C6664007EBCAC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 272C00441E8C6B5A007EBCAC /* All */, + 272C00041E8C6664007EBCAC /* libmxml */, + 272C002A1E8C6A94007EBCAC /* mxmldoc */, + 272C00381E8C6AEB007EBCAC /* testmxml */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 272C00011E8C6664007EBCAC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 272C001A1E8C66C8007EBCAC /* mxml-entity.c in Sources */, + 272C001E1E8C66C8007EBCAC /* mxml-node.c in Sources */, + 272C001B1E8C66C8007EBCAC /* mxml-file.c in Sources */, + 272C001C1E8C66C8007EBCAC /* mxml-get.c in Sources */, + 272C00221E8C66C8007EBCAC /* mxml-set.c in Sources */, + 272C00191E8C66C8007EBCAC /* mxml-attr.c in Sources */, + 272C001D1E8C66C8007EBCAC /* mxml-index.c in Sources */, + 272C001F1E8C66C8007EBCAC /* mxml-private.c in Sources */, + 272C00231E8C66C8007EBCAC /* mxml-string.c in Sources */, + 272C00211E8C66C8007EBCAC /* mxml-search.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 272C00271E8C6A94007EBCAC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 271227FF1EAADBE200167F24 /* mmd.c in Sources */, + 272C00431E8C6B34007EBCAC /* mxmldoc.c in Sources */, + 272C00591E943266007EBCAC /* zipc.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 272C00351E8C6AEB007EBCAC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 272C00421E8C6B30007EBCAC /* testmxml.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 272C00491E8C6B61007EBCAC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272C00041E8C6664007EBCAC /* libmxml */; + targetProxy = 272C00481E8C6B61007EBCAC /* PBXContainerItemProxy */; + }; + 272C004B1E8C6B61007EBCAC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272C002A1E8C6A94007EBCAC /* mxmldoc */; + targetProxy = 272C004A1E8C6B61007EBCAC /* PBXContainerItemProxy */; + }; + 272C004D1E8C6B61007EBCAC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272C00381E8C6AEB007EBCAC /* testmxml */; + targetProxy = 272C004C1E8C6B61007EBCAC /* PBXContainerItemProxy */; + }; + 272C004F1E8C6B83007EBCAC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272C00041E8C6664007EBCAC /* libmxml */; + targetProxy = 272C004E1E8C6B83007EBCAC /* PBXContainerItemProxy */; + }; + 272C00531E8C6B91007EBCAC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272C00041E8C6664007EBCAC /* libmxml */; + targetProxy = 272C00521E8C6B91007EBCAC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 272C00071E8C6664007EBCAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 272C00081E8C6664007EBCAC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx; + }; + name = Release; + }; + 272C000A1E8C6664007EBCAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + EXECUTABLE_PREFIX = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 272C000B1E8C6664007EBCAC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + EXECUTABLE_PREFIX = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 272C002F1E8C6A94007EBCAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 272C00301E8C6A94007EBCAC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 272C003E1E8C6AEB007EBCAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 272C003F1E8C6AEB007EBCAC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 272C00461E8C6B5A007EBCAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 272C00471E8C6B5A007EBCAC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = RU58A2256H; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 272C00001E8C6664007EBCAC /* Build configuration list for PBXProject "mxml" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272C00071E8C6664007EBCAC /* Debug */, + 272C00081E8C6664007EBCAC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 272C00091E8C6664007EBCAC /* Build configuration list for PBXNativeTarget "libmxml" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272C000A1E8C6664007EBCAC /* Debug */, + 272C000B1E8C6664007EBCAC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 272C00311E8C6A94007EBCAC /* Build configuration list for PBXNativeTarget "mxmldoc" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272C002F1E8C6A94007EBCAC /* Debug */, + 272C00301E8C6A94007EBCAC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 272C003D1E8C6AEB007EBCAC /* Build configuration list for PBXNativeTarget "testmxml" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272C003E1E8C6AEB007EBCAC /* Debug */, + 272C003F1E8C6AEB007EBCAC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 272C00451E8C6B5A007EBCAC /* Build configuration list for PBXAggregateTarget "All" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272C00461E8C6B5A007EBCAC /* Debug */, + 272C00471E8C6B5A007EBCAC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 272CFFFD1E8C6664007EBCAC /* Project object */; +} diff --git a/lib/libmxml/zipc.c b/lib/libmxml/zipc.c new file mode 100644 index 0000000..6ee62df --- /dev/null +++ b/lib/libmxml/zipc.c @@ -0,0 +1,940 @@ +/* + * Implementation of ZIP container mini-library. + * + * https://github.com/michaelrsweet/zipc + * + * Copyright 2017 by Michael R Sweet. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * + * 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 HOLDER 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. + */ + +/* + * Include necessary headers... + */ + +#include "zipc.h" +#include +#include +#include +#include +#include +#include + + +/* + * Local constants... + */ + +#define ZIPC_LOCAL_HEADER 0x04034b50 /* Start of a local file header */ +#define ZIPC_DIR_HEADER 0x02014b50 /* File header in central directory */ +#define ZIPC_END_RECORD 0x06054b50 /* End of central directory record */ + +#define ZIPC_MADE_BY 0x031e /* Version made by UNIX using zip 2.0 */ +#define ZIPC_DIR_VERSION 0x000a /* Version needed: 1.0 */ +#define ZIPC_FILE_VERSION 0x0014 /* Version needed: 2.0 */ + +#define ZIPC_FLAG_CMAX 0x0002 /* Maximum compression */ +#define ZIPC_FLAG_MASK 0x7fff /* Mask for "standard" flags we want to write */ +#define ZIPC_FLAG_STREAMED 0x8000 /* Internal bit used to flag when we need to update the CRC and length fields */ + +#define ZIPC_COMP_STORE 0 /* No compression */ +#define ZIPC_COMP_DEFLATE 8 /* Deflate compression */ + +#define ZIPC_INTERNAL_BIN 0x0000 /* Internal attributes = binary */ +#define ZIPC_INTERNAL_TEXT 0x0001 /* Internal attributes = text */ + +#define ZIPC_EXTERNAL_DIR 0x41ed0010 /* External attributes = directory */ +#define ZIPC_EXTERNAL_FILE 0x81a40000 /* External attributes = file */ + + +/* + * Local types... + */ + +struct _zipc_s +{ + FILE *fp; /* ZIP file */ + const char *error; /* Last error message */ + size_t alloc_files, /* Allocated file entries in ZIP */ + num_files; /* Number of file entries in ZIP */ + zipc_file_t *files; /* File entries in ZIP */ + z_stream stream; /* Deflate stream for current file */ + unsigned int modtime; /* MS-DOS modification date/time */ + char buffer[16384]; /* Deflate output buffer */ +}; + +struct _zipc_file_s +{ + zipc_t *zc; /* ZIP container */ + char filename[256]; /* File/directory name */ + unsigned short flags; /* General purpose bit flags */ + unsigned short method; /* Compression method */ + unsigned int crc32; /* 32-bit CRC */ + size_t compressed_size; /* Size of file (compressed) */ + size_t uncompressed_size; /* Size of file (uncompressed) */ + size_t offset; /* Offset of this entry in file */ + unsigned short internal_attrs; /* Internal attributes */ + unsigned int external_attrs; /* External attributes */ +}; + + +/* + * Local functions... + */ + +static zipc_file_t *zipc_add_file(zipc_t *zc, const char *filename, int compression); +static int zipc_write(zipc_t *zc, const void *buffer, size_t bytes); +static int zipc_write_dir_header(zipc_t *zc, zipc_file_t *zf); +static int zipc_write_local_header(zipc_t *zc, zipc_file_t *zf); +static int zipc_write_local_trailer(zipc_t *zc, zipc_file_t *zf); +static int zipc_write_u16(zipc_t *zc, unsigned value); +static int zipc_write_u32(zipc_t *zc, unsigned value); + + +/* + * 'zipcClose()' - Close a ZIP container, writing out the central directory. + */ + +int /* O - 0 on success, -1 on error */ +zipcClose(zipc_t *zc) /* I - ZIP container */ +{ + size_t i; /* Looping var */ + zipc_file_t *zf; /* Current file */ + long start, end; /* Central directory offsets */ + int status = 0; /* Return status */ + + + /* + * First write the central directory headers... + */ + + start = ftell(zc->fp); + + for (i = zc->num_files, zf = zc->files; i > 0; i --, zf ++) + status |= zipc_write_dir_header(zc, zf); + + end = ftell(zc->fp); + + /* + * Then write the end of central directory block... + */ + + status |= zipc_write_u32(zc, ZIPC_END_RECORD); + status |= zipc_write_u16(zc, 0); /* Disk number */ + status |= zipc_write_u16(zc, 0); /* Disk number containing directory */ + status |= zipc_write_u16(zc, (unsigned)zc->num_files); + status |= zipc_write_u16(zc, (unsigned)zc->num_files); + status |= zipc_write_u32(zc, (unsigned)(end - start)); + status |= zipc_write_u32(zc, (unsigned)start); + status |= zipc_write_u16(zc, 0); /* file comment length */ + + if (fclose(zc->fp)) + status = -1; + + if (zc->alloc_files) + free(zc->files); + + free(zc); + + return (status); +} + + +/* + * 'zipcCopyFile()' - Copy a file into a ZIP container. + * + * The file referenced by "srcname" will be efficiently copied into the ZIP + * container with the name "dstname". + * + * The "compressed" value determines whether the file is compressed within the + * container. + */ + +int /* O - 0 on success, -1 on error */ +zipcCopyFile(zipc_t *zc, /* I - ZIP container */ + const char *dstname, /* I - Destination file (in ZIP container) */ + const char *srcname, /* I - Source file (on disk) */ + int text, /* I - 0 for binary, 1 for text */ + int compressed) /* I - 0 for uncompressed, 1 for compressed */ +{ + zipc_file_t *dstfile; /* Destination file */ + FILE *srcfile; /* Source file */ + char buffer[65536]; /* Copy buffer */ + size_t length; /* Number of bytes read */ + + + if ((srcfile = fopen(srcname, text ? "r" : "rb")) == NULL) + { + zc->error = strerror(errno); + return (-1); + } + + if ((dstfile = zipcCreateFile(zc, dstname, compressed)) == NULL) + { + fclose(srcfile); + return (-1); + } + + if (text) + { + /* + * Copy as text... + */ + + while (fgets(buffer, sizeof(buffer), srcfile)) + { + if (zipcFilePuts(dstfile, buffer)) + { + fclose(srcfile); + zipcFileFinish(dstfile); + return (-1); + } + } + } + else + { + /* + * Copy as binary... + */ + + while ((length = fread(buffer, 1, sizeof(buffer), srcfile)) > 0) + { + if (zipcFileWrite(dstfile, buffer, length)) + { + fclose(srcfile); + zipcFileFinish(dstfile); + return (-1); + } + } + } + + fclose(srcfile); + + return (zipcFileFinish(dstfile)); +} + + +/* + * 'zipcCreateDirectory()' - Create a directory in a ZIP container. + * + * The "filename" value is the path within the ZIP container. Directories are + * separated by the forward slash ("/"). + */ + +int /* O - 0 on success, -1 on error */ +zipcCreateDirectory( + zipc_t *zc, /* I - ZIP container */ + const char *filename) /* I - Directory name */ +{ + zipc_file_t *zf = zipc_add_file(zc, filename, 0); + /* ZIP container file */ + int status = 0; /* Return status */ + + + if (zf) + { + char *end = zf->filename + strlen(zf->filename); + + if (end > zf->filename && end < (zf->filename + sizeof(zf->filename) - 1) && end[-1] != '/') + *end = '/'; + + zf->crc32 = 0; + zf->external_attrs = ZIPC_EXTERNAL_DIR; + + status |= zipc_write_local_header(zc, zf); + } + else + status = -1; + + return (status); +} + + +/* + * 'zipcCreateFile()' - Create a ZIP container file. + * + * The "filename" value is the path within the ZIP container. Directories are + * separated by the forward slash ("/"). + * + * The "compressed" value determines whether the file is compressed within the + * container. + */ + +zipc_file_t * /* I - ZIP container file */ +zipcCreateFile( + zipc_t *zc, /* I - ZIP container */ + const char *filename, /* I - Filename in container */ + int compressed) /* I - 0 for uncompressed, 1 for compressed */ +{ + /* + * Add the file and write the header... + */ + + zipc_file_t *zf = zipc_add_file(zc, filename, compressed); + /* ZIP container file */ + + zf->flags |= ZIPC_FLAG_STREAMED; + zf->external_attrs = ZIPC_EXTERNAL_FILE; + + if (zipc_write_local_header(zc, zf)) + return (NULL); + else + return (zf); +} + + +/* + * 'zipcCreateFileWithString()' - Add a file whose contents are a string. + * + * This function should be used for short ZIP container files like mimetype + * or container descriptions. + * + * Note: Files added this way are not compressed. + */ + +int /* O - 0 on success, -1 on failure */ +zipcCreateFileWithString( + zipc_t *zc, /* I - ZIP container */ + const char *filename, /* I - Filename in container */ + const char *contents) /* I - Contents of file */ +{ + zipc_file_t *zf = zipc_add_file(zc, filename, 0); + /* ZIP container file */ + size_t len = strlen(contents); /* Length of contents */ + int status = 0; /* Return status */ + + + if (zf) + { + zf->uncompressed_size = len; + zf->compressed_size = len; + zf->crc32 = crc32(zf->crc32, (const Bytef *)contents, (unsigned)len); + zf->internal_attrs = ZIPC_INTERNAL_TEXT; + zf->external_attrs = ZIPC_EXTERNAL_FILE; + + status |= zipc_write_local_header(zc, zf); + status |= zipc_write(zc, contents, len); + } + else + status = -1; + + return (status); +} + + +/* + * 'zipcError()' - Return a message describing the last detected error. + */ + +const char * /* O - Error string or NULL */ +zipcError(zipc_t *zc) /* I - ZIP container */ +{ + return (zc ? zc->error : NULL); +} + + +/* + * 'zipcFileFinish()' - Finish writing to a file in a ZIP container. + */ + +int /* O - 0 on success, -1 on error */ +zipcFileFinish(zipc_file_t *zf) /* I - ZIP container file */ +{ + int status = 0; /* Return status */ + zipc_t *zc = zf->zc; /* ZIP container */ + + + if (zf->method != ZIPC_COMP_STORE) + { + int zstatus; /* Deflate status */ + + while ((zstatus = deflate(&zc->stream, Z_FINISH)) != Z_STREAM_END) + { + if (zstatus < Z_OK && zstatus != Z_BUF_ERROR) + { + zc->error = "Deflate failed."; + status = -1; + break; + } + + status |= zipc_write(zf->zc, zc->buffer, (size_t)((char *)zc->stream.next_out - zc->buffer)); + zf->compressed_size += (size_t)((char *)zc->stream.next_out - zc->buffer); + + zc->stream.next_out = (Bytef *)zc->buffer; + zc->stream.avail_out = sizeof(zc->buffer); + } + + if ((char *)zc->stream.next_out > zc->buffer) + { + status |= zipc_write(zf->zc, zc->buffer, (size_t)((char *)zc->stream.next_out - zc->buffer)); + zf->compressed_size += (size_t)((char *)zc->stream.next_out - zc->buffer); + } + + deflateEnd(&zc->stream); + } + + status |= zipc_write_local_trailer(zc, zf); + + return (status); +} + + +/* + * 'zipcFilePrintf()' - Write a formatted string to a file. + * + * The "zf" value is the one returned by the @link zipc_start_file@ function + * used to create the ZIP container file. + * + * The "format" value is a standard printf format string and is followed by + * any arguments needed by the string. + */ + +int /* O - 0 on success, -1 on error */ +zipcFilePrintf(zipc_file_t *zf, /* I - ZIP container file */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + char buffer[8192]; /* Format buffer */ + va_list ap; /* Pointer to additional arguments */ + + + va_start(ap, format); + if (vsnprintf(buffer, sizeof(buffer), format, ap) < 0) + { + zf->zc->error = strerror(errno); + va_end(ap); + return (-1); + } + va_end(ap); + + zf->internal_attrs = ZIPC_INTERNAL_TEXT; + + return (zipcFileWrite(zf, buffer, strlen(buffer))); +} + + +/* + * 'zipcFilePuts()' - Write a string to a file. + * + * The "zf" value is the one returned by the @link zipc_start_file@ function + * used to create the ZIP container file. + * + * The "s" value is literal string that is written to the file. No newline is + * added. + */ + +int /* O - 0 on success, -1 on error */ +zipcFilePuts(zipc_file_t *zf, /* I - ZIP container file */ + const char *s) /* I - String to write */ +{ + zf->internal_attrs = ZIPC_INTERNAL_TEXT; + + return (zipcFileWrite(zf, s, strlen(s))); +} + + +/* + * 'zipcFileWrite()' - Write data to a ZIP container file. + * + * The "zf" value is the one returned by the @link zipc_file_start@ function + * used to create the ZIP container file. + * + * The "data" value points to the bytes to be written. + * + * The "bytes" value specifies the number of bytes to write. + */ + +int /* O - 0 on success, -1 on error */ +zipcFileWrite(zipc_file_t *zf, /* I - ZIP container file */ + const void *data, /* I - Data to write */ + size_t bytes) /* I - Number of bytes to write */ +{ + int status = 0; /* Return status */ + zipc_t *zc = zf->zc; /* ZIP container */ + + + zf->uncompressed_size += bytes; + zf->crc32 = crc32(zf->crc32, (const Bytef *)data, (unsigned)bytes); + + if (zf->method == ZIPC_COMP_STORE) + { + /* + * Store the contents as literal data... + */ + + status = zipc_write(zc, data, bytes); + zf->compressed_size += bytes; + } + else + { + /* + * Deflate (compress) the contents... + */ + + int zstatus; /* Deflate status */ + + zc->stream.next_in = (Bytef *)data; + zc->stream.avail_in = (unsigned)bytes; + + while (zc->stream.avail_in > 0) + { + if (zc->stream.avail_out < (int)(sizeof(zc->buffer) / 8)) + { + status |= zipc_write(zf->zc, zc->buffer, (size_t)((char *)zc->stream.next_out - zc->buffer)); + zf->compressed_size += (size_t)((char *)zc->stream.next_out - zc->buffer); + + zc->stream.next_out = (Bytef *)zc->buffer; + zc->stream.avail_out = sizeof(zc->buffer); + } + + zstatus = deflate(&zc->stream, Z_NO_FLUSH); + + if (zstatus < Z_OK && zstatus != Z_BUF_ERROR) + { + zc->error = "Deflate failed."; + status = -1; + break; + } + } + } + + return (status); +} + + +/* + * 'zipcFileXMLPrintf()' - Write a formatted XML string to a file. + * + * The "zf" value is the one returned by the @link zipc_start_file@ function + * used to create the ZIP container file. + * + * The "format" value is a printf-style format string supporting "%d", "%s", + * and "%%" and is followed by any arguments needed by the string. Strings + * ("%s") are escaped as needed. + */ + +int /* O - 0 on success, -1 on error */ +zipcFileXMLPrintf( + zipc_file_t *zf, /* I - ZIP container file */ + const char *format, /* I - Printf-style format string */ + ...) /* I - Additional arguments as needed */ +{ + int status = 0; /* Return status */ + va_list ap; /* Pointer to additional arguments */ + char buffer[65536], /* Buffer */ + *bufend = buffer + sizeof(buffer) - 6, + /* End of buffer less """ */ + *bufptr = buffer; /* Pointer into buffer */ + const char *s; /* String pointer */ + int d; /* Number */ + + + va_start(ap, format); + + while (*format && bufptr < bufend) + { + if (*format == '%') + { + format ++; + + switch (*format) + { + case '%' : /* Substitute a single % */ + format ++; + + *bufptr++ = '%'; + break; + + case 'd' : /* Substitute a single integer */ + format ++; + + d = va_arg(ap, int); + snprintf(bufptr, bufend - bufptr, "%d", d); + bufptr += strlen(bufptr); + break; + + case 's' : /* Substitute a single string */ + format ++; + + s = va_arg(ap, const char *); + while (*s && bufptr < bufend) + { + switch (*s) + { + case '&' : /* & */ + *bufptr++ = '&'; + *bufptr++ = 'a'; + *bufptr++ = 'm'; + *bufptr++ = 'p'; + *bufptr++ = ';'; + break; + case '<' : /* < */ + *bufptr++ = '&'; + *bufptr++ = 'l'; + *bufptr++ = 't'; + *bufptr++ = ';'; + break; + case '>' : /* > */ + *bufptr++ = '&'; + *bufptr++ = 'g'; + *bufptr++ = 't'; + *bufptr++ = ';'; + break; + case '\"' : /* " */ + *bufptr++ = '&'; + *bufptr++ = 'q'; + *bufptr++ = 'u'; + *bufptr++ = 'o'; + *bufptr++ = 't'; + *bufptr++ = ';'; + break; + default : + *bufptr++ = *s; + break; + } + + s ++; + } + + if (*s) + { + format += strlen(format); + status = -1; + zf->zc->error = "Not enough memory to hold XML string."; + } + break; + + default : /* Something else we don't support... */ + format += strlen(format); + status = -1; + zf->zc->error = "Unsupported format character - only %%, %d, and %s are supported."; + break; + } + } + else + *bufptr++ = *format++; + } + + va_end(ap); + + if (*format) + { + status = -1; + zf->zc->error = "Not enough memory to hold XML string."; + } + + if (bufptr > buffer) + { + zf->internal_attrs = ZIPC_INTERNAL_TEXT; + + status |= zipcFileWrite(zf, buffer, (size_t)(bufptr - buffer)); + } + + return (status); +} + + +/* + * 'zipcOpen()' - Open a ZIP container. + * + * Currently the only supported "mode" value is "w" (write). + */ + +zipc_t * /* O - ZIP container */ +zipcOpen(const char *filename, /* I - Filename of container */ + const char *mode) /* I - Open mode ("w") */ +{ + zipc_t *zc; /* ZIP container */ + + + /* + * Only support write mode for now... + */ + + if (strcmp(mode, "w")) + { + errno = EINVAL; + return (NULL); + } + + /* + * Allocate memory... + */ + + if ((zc = calloc(1, sizeof(zipc_t))) != NULL) + { + time_t curtime; /* Current timestamp */ + struct tm *curdate; /* Current date/time */ + + /* + * Open the container file... + */ + + if ((zc->fp = fopen(filename, "w+b")) == NULL) + { + free(zc); + return (NULL); + } + + /* + * Get the current date/time and convert it to the packed MS-DOS format: + * + * Bits Description + * ------ ----------- + * 0-4 Seconds / 2 (0-29) + * 5-10 Minute (0-59) + * 11-15 Hour (0-23) + * 16-20 Day (1-31) + * 21-24 Month (1-12) + * 25-31 Years since 1980 + */ + + curtime = time(NULL); + curdate = localtime(&curtime); + + zc->modtime = (unsigned)(curdate->tm_sec / 2) | + ((unsigned)curdate->tm_min << 5) | + ((unsigned)curdate->tm_hour << 11) | + ((unsigned)curdate->tm_mday << 16) | + ((unsigned)(curdate->tm_mon + 1) << 21) | + ((unsigned)(curdate->tm_year - 80) << 25); + } + + return (zc); +} + + +/* + * 'zipc_add_file()' - Add a file to the ZIP container. + */ + +static zipc_file_t * /* O - New file */ +zipc_add_file(zipc_t *zc, /* I - ZIP container */ + const char *filename, /* I - Name of file in container */ + int compression) /* I - 0 = uncompressed, 1 = compressed */ +{ + zipc_file_t *temp; /* File(s) */ + + + if (zc->num_files >= zc->alloc_files) + { + /* + * Allocate more files... + */ + + zc->alloc_files += 10; + + if (!zc->files) + temp = malloc(zc->alloc_files * sizeof(zipc_file_t)); + else + temp = realloc(zc->files, zc->alloc_files * sizeof(zipc_file_t)); + + if (!temp) + { + zc->error = strerror(errno); + return (NULL); + } + + zc->files = temp; + } + + temp = zc->files + zc->num_files; + zc->num_files ++; + + memset(temp, 0, sizeof(zipc_file_t)); + + strncpy(temp->filename, filename, sizeof(temp->filename) - 1); + + temp->zc = zc; + temp->crc32 = crc32(0, NULL, 0); + temp->offset = (size_t)ftell(zc->fp); + + if (compression) + { + temp->flags = ZIPC_FLAG_CMAX; + temp->method = ZIPC_COMP_DEFLATE; + + zc->stream.zalloc = (alloc_func)0; + zc->stream.zfree = (free_func)0; + zc->stream.opaque = (voidpf)0; + + deflateInit2(&zc->stream, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); + + zc->stream.next_out = (Bytef *)zc->buffer; + zc->stream.avail_out = sizeof(zc->buffer); + } + + return (temp); +} + + +/* + * 'zipc_write()' - Write bytes to a ZIP container. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write(zipc_t *zc, /* I - ZIP container */ + const void *buffer, /* I - Buffer to write */ + size_t bytes) /* I - Number of bytes */ +{ + if (fwrite(buffer, bytes, 1, zc->fp)) + return (0); + + zc->error = strerror(ferror(zc->fp)); + + return (-1); +} + + +/* + * 'zipc_write_dir_header()' - Write a central directory file header. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write_dir_header( + zipc_t *zc, /* I - ZIP container */ + zipc_file_t *zf) /* I - ZIP container file */ +{ + int status = 0; /* Return status */ + size_t filenamelen = strlen(zf->filename); + /* Length of filename */ + + status |= zipc_write_u32(zc, ZIPC_DIR_HEADER); + status |= zipc_write_u16(zc, ZIPC_MADE_BY); + status |= zipc_write_u16(zc, zf->external_attrs == ZIPC_EXTERNAL_DIR ? ZIPC_DIR_VERSION : ZIPC_FILE_VERSION); + status |= zipc_write_u16(zc, zf->flags); + status |= zipc_write_u16(zc, zf->method); + status |= zipc_write_u32(zc, zc->modtime); + status |= zipc_write_u32(zc, zf->crc32); + status |= zipc_write_u32(zc, (unsigned)zf->compressed_size); + status |= zipc_write_u32(zc, (unsigned)zf->uncompressed_size); + status |= zipc_write_u16(zc, (unsigned)filenamelen); + status |= zipc_write_u16(zc, 0); /* extra field length */ + status |= zipc_write_u16(zc, 0); /* comment length */ + status |= zipc_write_u16(zc, 0); /* disk number start */ + status |= zipc_write_u16(zc, zf->internal_attrs); + status |= zipc_write_u32(zc, zf->external_attrs); + status |= zipc_write_u32(zc, (unsigned)zf->offset); + status |= zipc_write(zc, zf->filename, filenamelen); + + return (status); +} + + +/* + * 'zipc_write_local_header()' - Write a local file header. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write_local_header( + zipc_t *zc, /* I - ZIP container */ + zipc_file_t *zf) /* I - ZIP container file */ +{ + int status = 0; /* Return status */ + size_t filenamelen = strlen(zf->filename); + /* Length of filename */ + + status |= zipc_write_u32(zc, ZIPC_LOCAL_HEADER); + status |= zipc_write_u16(zc, zf->external_attrs == ZIPC_EXTERNAL_DIR ? ZIPC_DIR_VERSION : ZIPC_FILE_VERSION); + status |= zipc_write_u16(zc, zf->flags & ZIPC_FLAG_MASK); + status |= zipc_write_u16(zc, zf->method); + status |= zipc_write_u32(zc, zc->modtime); + status |= zipc_write_u32(zc, zf->uncompressed_size == 0 ? 0 : zf->crc32); + status |= zipc_write_u32(zc, (unsigned)zf->compressed_size); + status |= zipc_write_u32(zc, (unsigned)zf->uncompressed_size); + status |= zipc_write_u16(zc, (unsigned)filenamelen); + status |= zipc_write_u16(zc, 0); /* extra field length */ + status |= zipc_write(zc, zf->filename, filenamelen); + + return (status); +} + + +/* + * 'zipc_write_local_trailer()' - Write a local file trailer. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write_local_trailer( + zipc_t *zc, /* I - ZIP container */ + zipc_file_t *zf) /* I - ZIP container file */ +{ + int status = 0; /* Return status */ + + + if (zf->flags & ZIPC_FLAG_STREAMED) + { + /* + * Update the CRC-32, compressed size, and uncompressed size fields... + */ + + fseek(zc->fp, (long)(zf->offset + 14), SEEK_SET); + + status |= zipc_write_u32(zc, zf->crc32); + status |= zipc_write_u32(zc, (unsigned)zf->compressed_size); + status |= zipc_write_u32(zc, (unsigned)zf->uncompressed_size); + + fseek(zc->fp, 0, SEEK_END); + + zf->flags &= ZIPC_FLAG_MASK; + } + + return (status); +} + + +/* + * 'zipc_write_u16()' - Write a 16-bit unsigned integer. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write_u16(zipc_t *zc, /* I - ZIP container */ + unsigned value) /* I - Value to write */ +{ + unsigned char buffer[2]; /* Buffer */ + + + buffer[0] = (unsigned char)value; + buffer[1] = (unsigned char)(value >> 8); + + return (zipc_write(zc, buffer, sizeof(buffer))); +} + + +/* + * 'zipc_write_u32()' - Write a 32-bit unsigned integer. + */ + +static int /* I - 0 on success, -1 on error */ +zipc_write_u32(zipc_t *zc, /* I - ZIP container */ + unsigned value) /* I - Value to write */ +{ + unsigned char buffer[4]; /* Buffer */ + + + buffer[0] = (unsigned char)value; + buffer[1] = (unsigned char)(value >> 8); + buffer[2] = (unsigned char)(value >> 16); + buffer[3] = (unsigned char)(value >> 24); + + return (zipc_write(zc, buffer, sizeof(buffer))); +} diff --git a/lib/libmxml/zipc.h b/lib/libmxml/zipc.h new file mode 100644 index 0000000..21770c8 --- /dev/null +++ b/lib/libmxml/zipc.h @@ -0,0 +1,82 @@ +/* + * Header file for ZIP container mini-library. + * + * https://github.com/michaelrsweet/zipc + * + * Copyright 2017 by Michael R Sweet. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * + * 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 HOLDER 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. + */ + +#ifndef ZIPC_H +# define ZIPC_H + +/* + * Include necessary headers... + */ + +# include +# include + + +/* + * Types... + */ + +typedef struct _zipc_s zipc_t; /* ZIP container */ +typedef struct _zipc_file_s zipc_file_t;/* File/directory in ZIP container */ + + +/* + * Functions... + */ + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + +extern int zipcClose(zipc_t *zc); +extern int zipcCopyFile(zipc_t *zc, const char *dstname, const char *srcname, int text, int compressed); +extern int zipcCreateDirectory(zipc_t *zc, const char *filename); +extern zipc_file_t *zipcCreateFile(zipc_t *zc, const char *filename, int compressed); +extern int zipcCreateFileWithString(zipc_t *zc, const char *filename, const char *contents); +extern const char *zipcError(zipc_t *zc); +extern int zipcFileFinish(zipc_file_t *zf); +extern int zipcFilePrintf(zipc_file_t *zf, const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 2, 3))) +# endif /* __GNUC__ */ +; +extern int zipcFilePuts(zipc_file_t *zf, const char *s); +extern int zipcFileWrite(zipc_file_t *zf, const void *data, size_t bytes); +extern int zipcFileXMLPrintf(zipc_file_t *zf, const char *format, ...) +# ifdef __GNUC__ +__attribute__ ((__format__ (__printf__, 2, 3))) +# endif /* __GNUC__ */ +; +extern zipc_t *zipcOpen(const char *filename, const char *mode); + +# ifdef __cplusplus +} +# endif /* __cplusplus */ + +#endif /* !ZIPC_H */ diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..2c3adb8 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,21 @@ +TARGET = ebclient +SRC = $(wildcard *.c *.cpp) +OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SRC))) +CC = gcc +CPP = g++ +INCLUDE = -I. +LINKPARAM = -static -pthread -L. /usr/local/lib/libebu.a /usr/local/lib/libmxml.a /usr/lib/x86_64-linux-gnu/libz.a +#LINKPARAM = -pthread -L. -lebu -lmxml +CFLAGS = -fPIC + +%.o: %.c + $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ + +%.o: %.cpp + $(CPP) $(CFLAGS) $(INCLUDE) -c $< -o $@ + +$(TARGET):$(OBJS) + libtool --mode=link $(CPP) -o $(TARGET) $(LINKPARAM) $(OBJS) + +clean: + rm $(OBJS) $(TARGET) diff --git a/src/book.c b/src/book.c new file mode 100644 index 0000000..3cf183c --- /dev/null +++ b/src/book.c @@ -0,0 +1,916 @@ + +#include +#include +#include +#include + +#include "book.h" +#include "conv.h" + +#define MAX_HITS 100 +#define MAXLEN_HEADING 255 +#define MAXLEN_TEXT 65535 + +typedef struct book_node { + book_t* book; + char* title; + int subbook_index; + struct book_node_t* next; +} book_node_t; + +book_t* current_bookw; +EB_Hookset hookset; +EB_Hookset hookset_header; +char xpath[32] = {0}; +char utf16bec[3] = {0}; +char heading[MAXLEN_HEADING + 1]; +char text[MAXLEN_TEXT+1]; +char buf[128]; // general temp buf +char buf_color[EB_MAX_COLOR_VALUE_LENGTH + 1]; +char buf_gaiji[10]; +char buf_gaiji_narrow_bitmap[EB_SIZE_NARROW_FONT_16]; +char buf_gaiji_wide_bitmap[EB_SIZE_WIDE_FONT_16]; +char buf_binary[1024*1024*16]; // 32MB max +int hit_count; +ssize_t heading_length; +ssize_t text_length; +EB_Hit hits[MAX_HITS]; +int hits_index_sorted[MAX_HITS]; +book_node_t* books = NULL; +size_t books_count = 0; +char in[3] = {0}; + +#define EUC_TO_ASCII_TABLE_START 0xa0 +#define EUC_TO_ASCII_TABLE_END 0xff + +static const unsigned char euc_a1_to_ascii_table[] = { + 0x00, 0x20, 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x3a, /* 0xa0 */ + 0x3b, 0x3f, 0x21, 0x00, 0x00, 0x00, 0x60, 0x00, /* 0xa8 */ + 0x5e, 0x7e, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2f, /* 0xb8 */ + 0x5c, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x27, /* 0xc0 */ + 0x00, 0x22, 0x28, 0x29, 0x00, 0x00, 0x5b, 0x5d, /* 0xc8 */ + 0x7b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0 */ + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2d, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x3d, 0x00, 0x3c, 0x3e, 0x00, 0x00, 0x00, /* 0xe0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, /* 0xe8 */ + 0x24, 0x00, 0x00, 0x25, 0x23, 0x26, 0x2a, 0x40, /* 0xf0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + +static const unsigned char euc_a3_to_ascii_table[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8 */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0xb0 */ + 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8 */ + 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0xc0 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0xc8 */ + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0xd0 */ + 0x58, 0x59, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8 */ + 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0xe0 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0xe8 */ + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0xf0 */ + 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ +}; + +EB_Book* select_book(int index) { + book_t* bookw; + EB_Book* book; + book_node_t* current; + + current = books; + while( index > 0 ) { + if( current != NULL ) + current = current->next; + index--; + } + if( current == NULL ) + return NULL; + + bookw = current->book; + book = &bookw->book; + + EB_Error_Code error_code = eb_set_subbook(book, bookw->subbook_list[current->subbook_index]); + if( bookw->app != NULL) { + eb_set_appendix_subbook(bookw->app, bookw->subbook_list[current->subbook_index]); + } + if (error_code != EB_SUCCESS) { + return NULL; + } + + current_bookw = bookw; + return book; +} + +char* convert_to_internal_encoding(EB_Book* book, char* s) { + if( book->character_code == EB_CHARCODE_JISX0208 ) + return conv_utf8_to_euc_str(s, strlen(s)); + return s; +} + +char* convert_from_internal_encoding(EB_Book* book, char* s) { + if( book->character_code == EB_CHARCODE_JISX0208 ) + return conv_euc_str(s, strlen(s)); + return s; +} + +EB_Error_Code hook_iso8859(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + in[0] = argv[0]; + eb_write_text_string(book, conv_iso8859_str(in, 1)); + return EB_SUCCESS; +} + +EB_Error_Code hook_euc(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + in[0] = argv[0] >> 8; + in[1] = argv[0] & 0xff; + eb_write_text_string(book, conv_euc_str(in, 3)); + //eb_write_text_byte2(book, in_code1, in_code2); + return EB_SUCCESS; +} + +EB_Error_Code hook_euc_narrow(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + int in_code1, in_code2; + int out_code = 0; + + in_code1 = argv[0] >> 8; + in_code2 = argv[0] & 0xff; + + if (in_code2 < EUC_TO_ASCII_TABLE_START + || EUC_TO_ASCII_TABLE_END < in_code2) { + out_code = 0; + } else if (in_code1 == 0xa1) { + out_code = euc_a1_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; + } else if (in_code1 == 0xa3) { + out_code = euc_a3_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; + } + + if (out_code == 0) { + in[0] = in_code1; + in[1] = in_code2; + eb_write_text_string(book, conv_euc_str(in, 3)); + //eb_write_text_byte2(book, in_code1, in_code2); + } else { + eb_write_text_byte1(book, out_code); + } + + return EB_SUCCESS; +} + +// GAIJI EPWINGの外字(書籍定義文字)です。hXXXXは半角、zXXXXは全角を表します。 + +EB_Error_Code narrow_character_text(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + + if( current_bookw->gaijimap_tree != NULL ) { + sprintf(xpath, "%04X", argv[0]); + mxml_node_t *node = mxmlFindElement(current_bookw->gaijimap_tree, current_bookw->gaijimap_tree, "gaijiMap", "ebcode", xpath, MXML_DESCEND); + if( node != NULL ) { + char *unicode = mxmlElementGetAttr(node, "unicode"); // "#x60FD" format + sscanf(unicode,"#x%2x%2x", utf16bec, utf16bec+1); + eb_write_text_string(book, conv_utf16be_str(utf16bec, sizeof(utf16bec))); + return EB_SUCCESS; + } + } + + sprintf(buf_gaiji,"{{h%04x}}", argv[0]); + eb_write_text_string(book, buf_gaiji); + return EB_SUCCESS; +} + +EB_Error_Code wide_character_text(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + + if( current_bookw->gaijimap_tree != NULL ) { + sprintf(xpath, "%04X", argv[0]); + mxml_node_t *node = mxmlFindElement(current_bookw->gaijimap_tree, current_bookw->gaijimap_tree, "gaijiMap", "ebcode", xpath, MXML_DESCEND); + if( node != NULL ) { + char *unicode = mxmlElementGetAttr(node, "unicode"); // "#x60FD" format + sscanf(unicode,"#x%2x%2x", utf16bec, utf16bec+1); + eb_write_text_string(book, conv_utf16be_str(utf16bec, sizeof(utf16bec))); + return EB_SUCCESS; + } + } + + sprintf(buf_gaiji,"{{z%04x}}", argv[0]); + eb_write_text_string(book, buf_gaiji); + return EB_SUCCESS; +} + +// ebu 4.5 色見本 (color chart) +EB_Error_Code hook_color(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + + // argv[0] color number + EB_Error_Code error_code = eb_color_value(book, argv[1], buf_color); + /* + 黄色: 5Y8\/14 + */ + if (error_code == EB_SUCCESS) { + sprintf(buf, "Munsell color system: %s", buf_color); + eb_write_text_string(book, buf); + } + return EB_SUCCESS; +} + +EB_Error_Code hook_general(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + switch( argv[0] ) { + case 0x1f0e: + eb_write_text_string(book, "[superscript]"); + break; + case 0x1f0f: + eb_write_text_string(book, "[/superscript]"); + break; + case 0x1f41: + eb_write_text_string(book, "[keyword]"); + break; + case 0x1f61: + eb_write_text_string(book, "[/keyword]"); + break; + case 0x1f06: + eb_write_text_string(book, "[subscript]"); + break; + case 0x1f07: + eb_write_text_string(book, "[/subscript]"); + break; + case 0x1fe0: + eb_write_text_string(book, "[decoration]"); + break; + case 0x1fe1: + eb_write_text_string(book, "[/decoration]"); + break; + case 0x1f12: + eb_write_text_string(book, "[emphasis]"); + break; + case 0x1f13: + eb_write_text_string(book, "[/emphasis]"); + break; + case 0x1f42: + eb_write_text_string(book, "[reference]"); + break; + case 0x1f62: + sprintf(buf, "[/reference page=%d,offset=%d]", argv[1], argv[2]); + eb_write_text_string(book, buf); + break; + default: + break; + } + return EB_SUCCESS; +} + +EB_Error_Code hook_bmp(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + switch( argv[0] ) { + case 0x1f32: // EB_HOOK_BEGIN_MONO_GRAPHIC + case 0x1f44: + sprintf(buf, "[mono width=%d,height=%d]", argv[3], argv[2]); + eb_write_text_string(book, buf); + break; + case 0x1f4d: // EB_HOOK_BEGIN_COLOR_BMP,EB_HOOK_BEGIN_COLOR_JPEG + sprintf(buf, "[image format=bmp,inline=0,page=%d,offset=%d]", argv[2], argv[3]); + eb_write_text_string(book, buf); + break; + case 0x1f3c: // EB_HOOK_BEGIN_IN_COLOR_BMP,EB_HOOK_BEGIN_IN_COLOR_JPEG + sprintf(buf, "[image format=bmp,inline=1,page=%d,offset=%d]", argv[2], argv[3]); + eb_write_text_string(book, buf); + break; + case 0x1f52: //EB_HOOK_END_MONO_GRAPHIC + case 0x1f64: + sprintf(buf, "[/mono page=%d,offset=%d]", argv[1], argv[2]); + eb_write_text_string(book, buf); + break; + case 0x1f6d: //EB_HOOK_END_COLOR_GRAPHIC, 8045 + case 0x1f5c: //EB_HOOK_END_IN_COLOR_GRAPHIC + eb_write_text_string(book, "[/image]"); + break; + default: + break; + } + return EB_SUCCESS; +} + +EB_Error_Code hook_jpg(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + switch( argv[0] ) { + case 0x1f4d: // EB_HOOK_BEGIN_COLOR_BMP,EB_HOOK_BEGIN_COLOR_JPEG + sprintf(buf, "[image format=jpg,inline=0,page=%d,offset=%d]", argv[2], argv[3]); + eb_write_text_string(book, buf); + break; + case 0x1f3c: // EB_HOOK_BEGIN_IN_COLOR_BMP,EB_HOOK_BEGIN_IN_COLOR_JPEG + sprintf(buf, "[image format=jpg,inline=1,page=%d,offset=%d]", argv[2], argv[3]); + eb_write_text_string(book, buf); + break; + default: + break; + } + return EB_SUCCESS; +} + +EB_Error_Code hook_wav(EB_Book *book, EB_Appendix *appendix, void *container, + EB_Hook_Code hook_code, int argc, const unsigned int *argv) { + switch( argv[0] ) { + case 0x1f4a: // EB_HOOK_BEGIN_WAVE + sprintf(buf, "[wav page=%d,offset=%d,endpage=%d,endoffset=%d]", argv[2], argv[3], argv[4], argv[5]); + eb_write_text_string(book, buf); + break; + case 0x1f6a: // EB_HOOK_END_WAVE + eb_write_text_string(book, "[/wav]"); + break; + default: + break; + } + return EB_SUCCESS; +} + +void books_init(const char* rootpath) { + DIR *dp; + struct dirent *ep; + char path[PATH_MAX] = {0}; + + eb_initialize_library(); + eb_initialize_hookset(&hookset); + eb_initialize_hookset(&hookset_header); + hookset.hooks[EB_HOOK_ISO8859_1].function = hook_iso8859; + hookset.hooks[EB_HOOK_WIDE_JISX0208].function = hook_euc; + hookset.hooks[EB_HOOK_NARROW_JISX0208].function = hook_euc_narrow; + hookset.hooks[EB_HOOK_WIDE_FONT].function = wide_character_text; + hookset.hooks[EB_HOOK_NARROW_FONT].function= narrow_character_text; + hookset.hooks[EB_HOOK_BEGIN_REFERENCE].function= hook_general; + hookset.hooks[EB_HOOK_END_REFERENCE].function= hook_general; + hookset.hooks[EB_HOOK_BEGIN_KEYWORD].function= hook_general; + hookset.hooks[EB_HOOK_END_KEYWORD].function= hook_general; + hookset.hooks[EB_HOOK_BEGIN_DECORATION].function= hook_general; + hookset.hooks[EB_HOOK_END_DECORATION].function= hook_general; + hookset.hooks[EB_HOOK_BEGIN_SUBSCRIPT].function= hook_general; + hookset.hooks[EB_HOOK_END_SUBSCRIPT].function= hook_general; + hookset.hooks[EB_HOOK_BEGIN_SUPERSCRIPT].function= hook_general; + hookset.hooks[EB_HOOK_END_SUPERSCRIPT].function= hook_general; + hookset.hooks[EB_HOOK_BEGIN_EMPHASIS].function= hook_general; + hookset.hooks[EB_HOOK_END_EMPHASIS].function= hook_general; + + hookset.hooks[EB_HOOK_BEGIN_MONO_GRAPHIC].function= hook_bmp; + hookset.hooks[EB_HOOK_END_MONO_GRAPHIC].function= hook_bmp; + hookset.hooks[EB_HOOK_BEGIN_COLOR_BMP].function= hook_bmp; + hookset.hooks[EB_HOOK_BEGIN_COLOR_JPEG].function= hook_jpg; + hookset.hooks[EB_HOOK_END_COLOR_GRAPHIC].function= hook_bmp; + hookset.hooks[EB_HOOK_BEGIN_IN_COLOR_BMP].function= hook_bmp; + hookset.hooks[EB_HOOK_BEGIN_IN_COLOR_JPEG].function= hook_jpg; + hookset.hooks[EB_HOOK_END_IN_COLOR_GRAPHIC].function= hook_bmp; + hookset.hooks[EB_HOOK_BEGIN_WAVE].function= hook_wav; + hookset.hooks[EB_HOOK_END_WAVE].function= hook_wav; + hookset.hooks[EB_HOOK_BEGIN_COLOR_CHART].function= hook_color; + + hookset_header.hooks[EB_HOOK_ISO8859_1].function = hook_iso8859; + hookset_header.hooks[EB_HOOK_WIDE_JISX0208].function = hook_euc; + hookset_header.hooks[EB_HOOK_NARROW_JISX0208].function = hook_euc_narrow; + hookset_header.hooks[EB_HOOK_WIDE_FONT].function = wide_character_text; + hookset_header.hooks[EB_HOOK_NARROW_FONT].function= narrow_character_text; + hookset_header.hooks[EB_HOOK_BEGIN_DECORATION].function= hook_general; + hookset_header.hooks[EB_HOOK_END_DECORATION].function= hook_general; + hookset_header.hooks[EB_HOOK_BEGIN_SUBSCRIPT].function= hook_general; + hookset_header.hooks[EB_HOOK_END_SUBSCRIPT].function= hook_general; + hookset_header.hooks[EB_HOOK_BEGIN_SUPERSCRIPT].function= hook_general; + hookset_header.hooks[EB_HOOK_END_SUPERSCRIPT].function= hook_general; + hookset_header.hooks[EB_HOOK_BEGIN_EMPHASIS].function= hook_general; + hookset_header.hooks[EB_HOOK_END_EMPHASIS].function= hook_general; + + dp = opendir(rootpath); + if (dp != NULL) { + + while (ep = readdir(dp)) { + if( ep->d_type != DT_DIR || ep->d_name[0] == '.') + continue; + if( rootpath[strlen(rootpath)-1] == '/' ) + sprintf(path, "%s%s", rootpath, ep->d_name); + else + sprintf(path, "%s/%s", rootpath, ep->d_name); + book_load(path); + } + + closedir (dp); + } +} + +book_t* book_load(const char* path) { + book_t* bookw = (book_t*)malloc(sizeof(book_t)); + eb_initialize_book(&(bookw->book)); + bookw->gaijimap_tree = NULL; + bookw->app = NULL; + EB_Book* book = &bookw->book; + int i = 0; + char title[256]; + + EB_Error_Code error_code = eb_bind(book, path); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "failed to bind the book, %s: %s\n", eb_error_message(error_code), path); + goto die; + } + error_code = eb_subbook_list(book, bookw->subbook_list, &bookw->subbook_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "failed to get the subbbook list, %s\n", eb_error_message(error_code)); + goto die; + } + char gaijimap_path[PATH_MAX] = {0}; + if( path[strlen(path)-1] == '/' ) + sprintf(gaijimap_path, "%sgaijimap.xml", path); + else + sprintf(gaijimap_path, "%s/gaijimap.xml", path); + FILE *fp = fopen(gaijimap_path, "r"); + if( fp != NULL ) { + bookw->gaijimap_tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK); + fclose(fp); + } + + EB_Appendix *app_pointer; + app_pointer = (EB_Appendix *) malloc(sizeof(EB_Appendix)); + eb_initialize_appendix(app_pointer); + if (eb_bind_appendix(app_pointer, path) == EB_SUCCESS) { + bookw->app = app_pointer; + } else { + eb_finalize_appendix(app_pointer); + free(app_pointer); + } + + int count = bookw->subbook_count; // 这尼玛见鬼了,直接比较 i < bookw->subbook_count 在某些机器上死活有问题!! + for(i = 0; i < count; i++) { + book_node_t* new_book_node = (book_node_t*)malloc(sizeof(book_node_t)); + memset(new_book_node, 0, sizeof(book_node_t)); + new_book_node->book = bookw; + new_book_node->subbook_index = i; + + eb_subbook_title2(book, bookw->subbook_list[i], title); + char* utf8title = convert_from_internal_encoding(book, title); + new_book_node->title = (char*)malloc(strlen(utf8title) + 1); + strcpy(new_book_node->title, utf8title); + + // printf("subbook title: %d %s %d\n", i, utf8title, bookw->subbook_list[i]); + // eb_subbook_directory2(book, bookw->subbook_list[i], title); + // printf("subbook path: %s\n", utf8title); + + if( books == NULL ) { + books = new_book_node; + } else { + book_node_t* end = books; + while( end->next ) + end = end->next; + end->next = new_book_node; + } + } + + return bookw; +die: + book_unload(bookw); + return NULL; +} + +void book_unload(book_t* bookw) { + if( bookw == NULL ) + return; + if( bookw->gaijimap_tree != NULL ) + mxmlDelete(bookw->gaijimap_tree); + eb_finalize_book(&(bookw->book)); + free(bookw); +} + +char* book_binary_gaiji_narrow(int index, int code, size_t* size) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + eb_set_font(book, EB_FONT_16); + + EB_Error_Code error_code = eb_narrow_font_character_bitmap(book, code, buf_gaiji_narrow_bitmap); + if (error_code != EB_SUCCESS) { + return NULL; + } + + if (eb_bitmap_to_png(buf_gaiji_narrow_bitmap, EB_WIDTH_NARROW_FONT_16, + EB_HEIGHT_FONT_16, buf_binary, size) != EB_SUCCESS) { + return NULL; + } + return buf_binary; +} + +char* book_binary_gaiji_wide(int index, int code, size_t* size) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + eb_set_font(book, EB_FONT_16); + + EB_Error_Code error_code = eb_wide_font_character_bitmap(book, code, buf_gaiji_wide_bitmap); + if (error_code != EB_SUCCESS) { + return NULL; + } + + if (eb_bitmap_to_png(buf_gaiji_wide_bitmap, EB_WIDTH_WIDE_FONT_16, + EB_HEIGHT_FONT_16, buf_binary, size) != EB_SUCCESS) { + return NULL; + } + return buf_binary; +} + +char* book_binary_mono(int index, int page, int offset, int width, int height, size_t* size) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position; + position.page = page; + position.offset = offset; + EB_Error_Code error_code = eb_set_binary_mono_graphic(book, &position, width, height); + if (error_code != EB_SUCCESS) { + return NULL; + } + + *size = 0; + ssize_t readcnt = 0; + while( 1 ) { + error_code = eb_read_binary(book, sizeof(buf_binary) - *size, buf_binary + *size, &readcnt); + if( error_code != EB_SUCCESS ) + return NULL; + if( readcnt == 0 ) + break; + *size += readcnt; + if( *size == sizeof(buf_binary) ) { // buff full, consider as fail + return NULL; + } + } + + return buf_binary; +} + +char* book_binary_color(int index, int page, int offset, size_t* size) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position; + position.page = page; + position.offset = offset; + EB_Error_Code error_code = eb_set_binary_color_graphic(book, &position); + if (error_code != EB_SUCCESS) { + return NULL; + } + + *size = 0; + ssize_t readcnt = 0; + while( 1 ) { + error_code = eb_read_binary(book, sizeof(buf_binary) - *size, buf_binary + *size, &readcnt); + if( error_code != EB_SUCCESS ) + return NULL; + if( readcnt == 0 ) + break; + *size += readcnt; + if( *size == sizeof(buf_binary) ) { // buff full, consider as fail + return NULL; + } + } + + return buf_binary; +} + +char* book_binary_wav(int index, int page, int offset, int endpage, int endoffset, size_t* size) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position, endposition; + position.page = page; + position.offset = offset; + endposition.page = endpage; + endposition.offset = endoffset; + EB_Error_Code error_code = eb_set_binary_wave(book, &position, &endposition); + if (error_code != EB_SUCCESS) { + return NULL; + } + + *size = 0; + ssize_t readcnt = 0; + while( 1 ) { + error_code = eb_read_binary(book, sizeof(buf_binary) - *size, buf_binary + *size, &readcnt); + if( error_code != EB_SUCCESS ) + return NULL; + if( readcnt == 0 ) + break; + *size += readcnt; + if( *size == sizeof(buf_binary) ) { // buff full, consider as fail + return NULL; + } + } + + return buf_binary; +} + +JSON_Value* book_page(int index, int page) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + EB_Position position; + position.page = page; + position.offset = 0; + + EB_Error_Code error_code = eb_seek_text(book, &position); + if (error_code != EB_SUCCESS) { + goto page_end; + } + + while (1) { + error_code = eb_forward_text(book, NULL); + if (error_code != EB_SUCCESS) { + break; + } + error_code = eb_tell_text(book, &position); + if (error_code != EB_SUCCESS || position.page > page + 1 || (position.page == page + 1 && position.offset != 0) ) { + break; + } + + error_code = eb_seek_text(book, &position); + if (error_code != EB_SUCCESS) { + break; + } + error_code = eb_read_heading(book, NULL, &hookset_header, NULL, MAXLEN_HEADING, heading, &heading_length); + if (error_code != EB_SUCCESS) { + break; + } + error_code = eb_seek_text(book, &position); + error_code = eb_read_text(book, current_bookw->app, &hookset, NULL, MAXLEN_TEXT, text, &text_length); + if (error_code != EB_SUCCESS) { + break; + } + + json_array_append_string(root_array, heading); + json_array_append_string(root_array, text); + json_array_append_number(root_array, position.page); + json_array_append_number(root_array, position.offset); + } +page_end: + return root_value; +} + +// directly read a position +JSON_Value* book_get(int index, int page, int offset) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + EB_Position position; + position.page = page; + position.offset = offset; + + EB_Error_Code error_code = eb_seek_text(book, &position); + if (error_code != EB_SUCCESS) { + goto get_end; + } + + error_code = eb_read_heading(book, NULL, &hookset_header, NULL, MAXLEN_HEADING, heading, &heading_length); + if (error_code != EB_SUCCESS) { + goto get_end; + } + // printf("heading: %s\n", heading); + + error_code = eb_seek_text(book, &position); + if (error_code != EB_SUCCESS) { + goto get_end; + } + + error_code = eb_read_text(book, current_bookw->app, &hookset, NULL, MAXLEN_TEXT, text, &text_length); + if (error_code != EB_SUCCESS) { + goto get_end; + } + + json_array_append_string(root_array, heading); + json_array_append_string(root_array, text); + json_array_append_number(root_array, position.page); + json_array_append_number(root_array, position.offset); + +get_end: + return root_value; +} + +JSON_Value* book_text(int index) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position; + EB_Error_Code error_code = eb_text(&book, &position); + if (error_code == EB_SUCCESS) { + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + json_array_append_number(root_array, position.page); + json_array_append_number(root_array, position.offset); + return root_value; + } + //printf("error %d\n", error_code); + return NULL; // no menu or error +} + +JSON_Value* book_menu(int index) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position; + EB_Error_Code error_code = eb_menu(&book, &position); + if (error_code == EB_SUCCESS) { + // printf("eb_menu result %d %d %d\n", error_code, position.page, position.offset); + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + eb_seek_text(book, &position); + eb_read_text(book, current_bookw->app, &hookset, NULL, MAXLEN_TEXT, text, &text_length); + json_array_append_string(root_array, text); + return root_value; + } + return NULL; // no menu or error +} + +JSON_Value* book_copyright(int index) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + EB_Position position; + EB_Error_Code error_code = eb_copyright(&book, &position); + if (error_code == EB_SUCCESS) { + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + eb_seek_text(book, &position); + eb_read_text(book, current_bookw->app, &hookset, NULL, MAXLEN_TEXT, text, &text_length); + json_array_append_string(root_array, text); + return root_value; + } + return NULL; // no menu or error +} + +// type: +// 0 prefix +// 1 suffix +// 2 exactly + +JSON_Value* book_query(int index, int type, int max_hit, const char* s, const char* marker) { + EB_Book* book = select_book(index); + if( book == NULL ) { + return NULL; + } + + int i,j; + EB_Error_Code error_code; + + switch(type) { + case 1: + error_code = eb_search_endword(book, convert_to_internal_encoding(book, s)); + break; + case 2: + error_code = eb_search_exactword(book, convert_to_internal_encoding(book, s)); + break; + default: + error_code = eb_search_word(book, convert_to_internal_encoding(book, s)); + } + + if (error_code != EB_SUCCESS) { + fprintf(stderr, "failed to search for the word, %s: %s\n", eb_error_message(error_code), s); + return NULL; + } + + if( marker != NULL && strcmp(marker, "0") != 0 ) { + int page; + int offset; + int page_id; + int entry_count; + int entry_index; + int entry_length; + int entry_arrangement; + int in_group_entry; + if( sscanf(marker, "%d_%d_%d_%d_%d_%d_%d_%d", &page, &offset, &page_id, &entry_count, + &entry_index, &entry_length, &entry_arrangement, &in_group_entry) != 8 ) { + return NULL; + } + book->search_contexts->page = page; + book->search_contexts->offset = offset; + book->search_contexts->page_id = page_id; + book->search_contexts->entry_count = entry_count; + book->search_contexts->entry_index = entry_index; + book->search_contexts->entry_length = entry_length; + book->search_contexts->entry_arrangement = entry_arrangement; + book->search_contexts->in_group_entry = in_group_entry; + } + + if( max_hit < 0 || max_hit > MAX_HITS ) + max_hit = MAX_HITS; + error_code = eb_hit_list(book, max_hit, hits, &hit_count); + if (error_code != EB_SUCCESS) { + fprintf(stderr, "failed to get hit entries, %s\n", eb_error_message(error_code)); + return NULL; + } + + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + if( hit_count == 0 ) + return root_value; + + //insert sort hits indexes according to text position to help detecting duplication + hits_index_sorted[0] = 0; + for(i = 1; i < hit_count;i++) { + j = i; + while( j > 0 && + ( hits[hits_index_sorted[j-1]].text.page > hits[i].text.page || + (hits[hits_index_sorted[j-1]].text.offset > hits[i].text.offset && (hits[hits_index_sorted[j-1]].text.page == hits[i].text.page)) + ) + ) { + hits_index_sorted[j] = hits_index_sorted[j-1]; + j--; + } + hits_index_sorted[j] = i; + } + // for( i = 0; i < hit_count; i++ ) + // printf("%d: %d, %d\n", hits_index_sorted[i], hits[hits_index_sorted[i]].text.page, hits[hits_index_sorted[i]].text.offset); + + EB_Hit* last = NULL; + for (i = 0; i < hit_count; i++) { + j = hits_index_sorted[i]; + //printf("hit: heading: %d %d text: %d %d\n", hits[j].heading.page, hits[j].heading.offset, hits[j].text.page, hits[j].text.offset); + + if( last != NULL && memcmp(&(last->text), &(hits[j].text), sizeof(EB_Position)) == 0 ) { + // printf("detech duplicate"); + continue; + } + + error_code = eb_seek_text(book, &(hits[j].heading)); + if (error_code != EB_SUCCESS) { + continue; + } + + error_code = eb_read_heading(book, NULL, &hookset_header, NULL, MAXLEN_HEADING, heading, &heading_length); + if (error_code != EB_SUCCESS) { + continue; + } + // printf("heading: %s\n", heading); + + error_code = eb_seek_text(book, &(hits[j].text)); + if (error_code != EB_SUCCESS) { + continue; + } + + error_code = eb_read_text(book, current_bookw->app, &hookset, NULL, MAXLEN_TEXT, text, &text_length); + if (error_code != EB_SUCCESS) { + continue; + } + // printf("text: %s\n", text); + + last = &hits[j]; + json_array_append_string(root_array, heading); + json_array_append_string(root_array, text); + json_array_append_number(root_array, hits[j].text.page); + json_array_append_number(root_array, hits[j].text.offset); + } + char nextPageMarker[1024] = {0}; + if( book->search_contexts->comparison_result >= 0) { + sprintf(nextPageMarker, "%d_%d_%d_%d_%d_%d_%d_%d", + book->search_contexts->page, + book->search_contexts->offset, + book->search_contexts->page_id, + book->search_contexts->entry_count, + book->search_contexts->entry_index, + book->search_contexts->entry_length, + book->search_contexts->entry_arrangement, + book->search_contexts->in_group_entry + ); + } + json_array_append_string(root_array, nextPageMarker); + + return root_value; +} + +JSON_Value* book_list() { + JSON_Value *root_value = json_value_init_array(); + JSON_Array *root_array = json_value_get_array(root_value); + + book_node_t* current = books; + while( current != NULL ) { + json_array_append_string(root_array, current->title); + current = current->next; + } + + return root_value; +} diff --git a/src/book.h b/src/book.h new file mode 100644 index 0000000..d3c7797 --- /dev/null +++ b/src/book.h @@ -0,0 +1,42 @@ + +#ifndef _BOOK_H +#define _BOOK_H + +#include +#include +#include +#include +#include +#include + +#include "parson.h" + +typedef struct { + EB_Book book; + EB_Appendix* app; + mxml_node_t *gaijimap_tree; + EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; // EB_MAX_SUBBOOKS: 50 + size_t subbook_count; +} book_t; + +extern EB_Hookset hookset; +extern book_t* current_bookw; + +void books_init(const char* rootpath); +book_t* book_load(const char* path); +void book_unload(book_t* book); +char* convert_to_internal_encoding(EB_Book* book, char* s); +JSON_Value* book_query(int index, int type, int max_hit, const char* s, const char* marker); +JSON_Value* book_get(int index, int page, int offset); +JSON_Value* book_menu(int index); +JSON_Value* book_text(int index); +JSON_Value* book_page(int index, int page); +JSON_Value* book_copyright(int index); +char* book_binary_mono(int index, int page, int offset, int width, int height, size_t* size); +char* book_binary_color(int index, int page, int offset, size_t* size); +char* book_binary_wav(int index, int page, int offset, int endpage, int endoffset, size_t* size); +char* book_binary_gaiji_wide(int index, int code, size_t* size); // gaiji bitmap to png +char* book_binary_gaiji_narrow(int index, int code, size_t* size); +JSON_Value* book_list(); + +#endif diff --git a/src/conv.c b/src/conv.c new file mode 100644 index 0000000..42799cf --- /dev/null +++ b/src/conv.c @@ -0,0 +1,44 @@ + +#include "conv.h" +#include + +char out[MAX_STR_LEN] = {0}; +iconv_t iso8859_iconver; +iconv_t euc_iconver; +iconv_t utf16be_iconver; +iconv_t utf8_to_euc_iconver; +size_t inbytesleft; +size_t outbytesleft; + +void init_conv() { + iso8859_iconver = iconv_open("utf8", "iso-8859-1"); + euc_iconver = iconv_open("utf8", "euc-jp"); + utf16be_iconver = iconv_open("utf8", "utf16be"); + utf8_to_euc_iconver = iconv_open("euc-jp", "utf8"); +} + + +char* conv(iconv_t cd, char* in, size_t len) { + char *inptr = in, *outptr = out; + inbytesleft = len; + outbytesleft = MAX_STR_LEN; + iconv(cd, &inptr, &inbytesleft, &outptr, &outbytesleft); + *outptr = 0; + return out; +} + +char* conv_iso8859_str(char* in, size_t len) { + return conv(iso8859_iconver, in, len); +} + +char* conv_euc_str(char* in, size_t len) { + return conv(euc_iconver, in, len); +} + +char* conv_utf16be_str(char* in, size_t len) { + return conv(utf16be_iconver, in, len); +} + +char* conv_utf8_to_euc_str(char* in, size_t len) { + return conv(utf8_to_euc_iconver, in, len); +} \ No newline at end of file diff --git a/src/conv.h b/src/conv.h new file mode 100644 index 0000000..c6065ba --- /dev/null +++ b/src/conv.h @@ -0,0 +1,16 @@ + +#ifndef _CONV_H +#define _CONV_H + +#include + +#define MAX_STR_LEN 4096 + +void init_conv(); +char* conv_iso8859_str(char* in, size_t len); +char* conv_euc_str(char* in, size_t len); +char* conv_utf16be_str(char* in, size_t len); +char* conv_utf8_to_euc_str(char* in, size_t len); // utf8 -> euc for internal usage + + +#endif \ No newline at end of file diff --git a/src/functions.c b/src/functions.c new file mode 100644 index 0000000..c6713c9 --- /dev/null +++ b/src/functions.c @@ -0,0 +1,56 @@ + +#include "functions.h" +#include +#include + +void hexDump (char *desc, void *addr, int len) { + int i; + unsigned char buff[17]; + unsigned char *pc = (unsigned char*)addr; + + // Output description if given. + if (desc != NULL) + printf ("%s:\n", desc); + + if (len == 0) { + printf(" ZERO LENGTH\n"); + return; + } + if (len < 0) { + printf(" NEGATIVE LENGTH: %i\n",len); + return; + } + + // Process every byte in the data. + for (i = 0; i < len; i++) { + // Multiple of 16 means new line (with line offset). + + if ((i % 16) == 0) { + // Just don't print ASCII for the zeroth line. + if (i != 0) + printf (" %s\n", buff); + + // Output the offset. + printf (" %04x ", i); + } + + // Now the hex code for the specific character. + printf (" %02x", pc[i]); + + // And store a printable ASCII character for later. + if ((pc[i] < 0x20) || (pc[i] > 0x7e)) + buff[i % 16] = '.'; + else + buff[i % 16] = pc[i]; + buff[(i % 16) + 1] = '\0'; + } + + // Pad out last line if not exactly 16 characters. + while ((i % 16) != 0) { + printf (" "); + i++; + } + + // And print the final ASCII bit. + printf (" %s\n", buff); +} \ No newline at end of file diff --git a/src/functions.h b/src/functions.h new file mode 100644 index 0000000..23c234a --- /dev/null +++ b/src/functions.h @@ -0,0 +1,7 @@ + +#ifndef _FUNCTIONS_H +#define _FUNCTIONS_H + +void hexDump (char *desc, void *addr, int len); + +#endif \ No newline at end of file diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..089c1fb --- /dev/null +++ b/src/main.c @@ -0,0 +1,184 @@ + +#include +#include + +#include "book.h" +#include "conv.h" +#include "functions.h" +#include "parson.h" + +void dumpHex(const void* data, size_t size) { + char ascii[17]; + size_t i, j; + ascii[16] = '\0'; + for (i = 0; i < size; ++i) { + printf("%02X ", ((unsigned char*)data)[i]); + if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { + ascii[i % 16] = ((unsigned char*)data)[i]; + } else { + ascii[i % 16] = '.'; + } + if ((i+1) % 8 == 0 || i+1 == size) { + printf(" "); + if ((i+1) % 16 == 0) { + printf("| %s \n", ascii); + } else if (i+1 == size) { + ascii[(i+1) % 16] = '\0'; + if ((i+1) % 16 <= 8) { + printf(" "); + } + for (j = (i+1) % 16; j < 16; ++j) { + printf(" "); + } + printf("| %s \n", ascii); + } + } + } +} + +int output_and_free_json(JSON_Value* value) { + if( value != NULL ) { + char* s = json_serialize_to_string(value); + printf("%s\n", s); + fflush(stdout); + json_value_free(value); + json_free_serialized_string(s); + return 1; + } + return 0; +} + +int main(int argc, char *argv[]) { + if (argc < 2) { + fprintf(stderr, "Usage: %s books-path\n", argv[0]); + exit(1); + } + + init_conv(); + books_init(argv[1]); + output_and_free_json(book_list()); + + char* line = NULL; + size_t n = 0; + char word[513] = {0}; + char marker[1024] = {0}; + int index; + int code; // gaiji code + int type = 0; + int max_hit = 10; + int page = 0; + int offset = 0; + int endpage = 0; + int endoffset = 0; + char* binary_buf; + size_t binary_size; + int mono_width; + int mono_height; + + while( 1 ) { + getline(&line, &n, stdin); + if( *line == 'a' ) { + if( sscanf(line, "a %d %d %d", &index, &page, &offset) != 3 || !output_and_free_json(book_get(index, page, offset)) ) { + printf("[]\n"); + fflush(stdout); + } + } else if( *line == 'b' ) { // read binary mono graph bmp + if( sscanf(line, "b %d %d %d %d %d", &index, &page, &offset, &mono_width, &mono_height) != 5 ) { + fwrite("\x00\x01\x00\x00\x00\x00", 1, 6, stdout); + fflush(stdout); + continue; + } + binary_buf = book_binary_mono(index, page, offset, mono_width, mono_height, &binary_size); + if( binary_buf == NULL ) { + fwrite("\x00\x02\x00\x00\x00\x00", 1, 6, stdout); + } else { + // dumpHex(binary_buf,256); + fwrite("\x00\x00", 1, 2, stdout); + fwrite(&binary_size, 4, 1, stdout); // only support little endian machine + fwrite(binary_buf, 1, binary_size, stdout); + } + fflush(stdout); + } else if( *line == 'c' ) { // read binary color graph + if( sscanf(line, "c %d %d %d", &index, &page, &offset) != 3 ) { + fwrite("\x00\x01\x00\x00\x00\x00", 1, 6, stdout); + fflush(stdout); + continue; + } + binary_buf = book_binary_color(index, page, offset, &binary_size); + if( binary_buf == NULL ) { + fwrite("\x00\x02\x00\x00\x00\x00", 1, 6, stdout); + } else { + // dumpHex(binary_buf,256); + fwrite("\x00\x00", 1, 2, stdout); + fwrite(&binary_size, 4, 1, stdout); + fwrite(binary_buf, 1, binary_size, stdout); + } + fflush(stdout); + } else if( *line == 'd' ) { // read binary wav + if( sscanf(line, "d %d %d %d %d %d", &index, &page, &offset, &endpage, &endoffset) != 5 ) { + fwrite("\x00\x01\x00\x00\x00\x00", 1, 6, stdout); + fflush(stdout); + continue; + } + binary_buf = book_binary_wav(index, page, offset, endpage, endoffset, &binary_size); + if( binary_buf == NULL ) { + fwrite("\x00\x02\x00\x00\x00\x00", 1, 6, stdout); + } else { + // dumpHex(binary_buf,256); + fwrite("\x00\x00", 1, 2, stdout); + fwrite(&binary_size, 4, 1, stdout); + fwrite(binary_buf, 1, binary_size, stdout); + } + fflush(stdout); + } else if( *line == 'e' ) { // copyright + if( sscanf(line, "e %d", &index) != 1 || !output_and_free_json(book_copyright(index)) ) { + printf("[]\n"); + fflush(stdout); + } + } else if( *line == 'f' ) { // menu + if( sscanf(line, "f %d", &index) != 1 || !output_and_free_json(book_menu(index)) ) { + printf("[]\n"); + fflush(stdout); + } + } else if( *line == 'g' ) { // gaiji png + if( sscanf(line, "g %d %d %04X", &index, &type, &code) != 3 ) { + fwrite("\x00\x01\x00\x00\x00\x00", 1, 6, stdout); + fflush(stdout); + continue; + } + if( type ) { // wide + binary_buf = book_binary_gaiji_wide(index, code, &binary_size); + } else { // type == 0 narrow + binary_buf = book_binary_gaiji_narrow(index, code, &binary_size); + } + if( binary_buf == NULL ) { + fwrite("\x00\x02\x00\x00\x00\x00", 1, 6, stdout); + } else { + fwrite("\x00\x00", 1, 2, stdout); + fwrite(&binary_size, 4, 1, stdout); + fwrite(binary_buf, 1, binary_size, stdout); + } + fflush(stdout); + } else if( *line == 'h' ) { // + if( sscanf(line, "h %d", &index) != 1 || !output_and_free_json(book_text(index)) ) { + printf("[]\n"); + fflush(stdout); + } + } else if( *line == 'i' ) { // + if( sscanf(line, "i %d %d", &index, &page) != 2 || !output_and_free_json(book_page(index, page)) ) { + printf("[]\n"); + fflush(stdout); + } + } else { + if( sscanf(line, "%d %d %d %[^\t\r\n,],%[^\t\r\n]", &index, &type, &max_hit, &marker, word) != 5 || !output_and_free_json(book_query(index, type, max_hit, word, marker)) ) { + printf("[]\n"); + fflush(stdout); + } + } + free(line); + line = NULL; + n = 0; + } + + exit(0); +} diff --git a/src/parson.c b/src/parson.c new file mode 100644 index 0000000..384280e --- /dev/null +++ b/src/parson.c @@ -0,0 +1,2007 @@ +/* + Parson ( http://kgabis.github.com/parson/ ) + Copyright (c) 2012 - 2017 Krzysztof Gabis + + 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. +*/ +#ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif /* _CRT_SECURE_NO_WARNINGS */ +#endif /* _MSC_VER */ + +#include "parson.h" + +#include +#include +#include +#include +#include +#include + +/* Apparently sscanf is not implemented in some "standard" libraries, so don't use it, if you + * don't have to. */ +#define sscanf THINK_TWICE_ABOUT_USING_SSCANF + +#define STARTING_CAPACITY 15 +#define ARRAY_MAX_CAPACITY 122880 /* 15*(2^13) */ +#define OBJECT_MAX_CAPACITY 960 /* 15*(2^6) */ +#define MAX_NESTING 2048 +#define DOUBLE_SERIALIZATION_FORMAT "%f" + +#define SIZEOF_TOKEN(a) (sizeof(a) - 1) +#define SKIP_CHAR(str) ((*str)++) +#define SKIP_WHITESPACES(str) while (isspace(**str)) { SKIP_CHAR(str); } +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +#undef malloc +#undef free + +static JSON_Malloc_Function parson_malloc = malloc; +static JSON_Free_Function parson_free = free; + +#define IS_CONT(b) (((unsigned char)(b) & 0xC0) == 0x80) /* is utf-8 continuation byte */ + +/* Type definitions */ +typedef union json_value_value { + char *string; + double number; + JSON_Object *object; + JSON_Array *array; + int boolean; + int null; +} JSON_Value_Value; + +struct json_value_t { + JSON_Value *parent; + JSON_Value_Type type; + JSON_Value_Value value; +}; + +struct json_object_t { + JSON_Value *wrapping_value; + char **names; + JSON_Value **values; + size_t count; + size_t capacity; +}; + +struct json_array_t { + JSON_Value *wrapping_value; + JSON_Value **items; + size_t count; + size_t capacity; +}; + +/* Various */ +static char * read_file(const char *filename); +static void remove_comments(char *string, const char *start_token, const char *end_token); +static char * parson_strndup(const char *string, size_t n); +static char * parson_strdup(const char *string); +static int hex_char_to_int(char c); +static int parse_utf16_hex(const char *string, unsigned int *result); +static int num_bytes_in_utf8_sequence(unsigned char c); +static int verify_utf8_sequence(const unsigned char *string, int *len); +static int is_valid_utf8(const char *string, size_t string_len); +static int is_decimal(const char *string, size_t length); + +/* JSON Object */ +static JSON_Object * json_object_init(JSON_Value *wrapping_value); +static JSON_Status json_object_add(JSON_Object *object, const char *name, JSON_Value *value); +static JSON_Status json_object_resize(JSON_Object *object, size_t new_capacity); +static JSON_Value * json_object_nget_value(const JSON_Object *object, const char *name, size_t n); +static void json_object_free(JSON_Object *object); + +/* JSON Array */ +static JSON_Array * json_array_init(JSON_Value *wrapping_value); +static JSON_Status json_array_add(JSON_Array *array, JSON_Value *value); +static JSON_Status json_array_resize(JSON_Array *array, size_t new_capacity); +static void json_array_free(JSON_Array *array); + +/* JSON Value */ +static JSON_Value * json_value_init_string_no_copy(char *string); + +/* Parser */ +static JSON_Status skip_quotes(const char **string); +static int parse_utf16(const char **unprocessed, char **processed); +static char * process_string(const char *input, size_t len); +static char * get_quoted_string(const char **string); +static JSON_Value * parse_object_value(const char **string, size_t nesting); +static JSON_Value * parse_array_value(const char **string, size_t nesting); +static JSON_Value * parse_string_value(const char **string); +static JSON_Value * parse_boolean_value(const char **string); +static JSON_Value * parse_number_value(const char **string); +static JSON_Value * parse_null_value(const char **string); +static JSON_Value * parse_value(const char **string, size_t nesting); + +/* Serialization */ +static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int level, int is_pretty, char *num_buf); +static int json_serialize_string(const char *string, char *buf); +static int append_indent(char *buf, int level); +static int append_string(char *buf, const char *string); + +/* Various */ +static char * parson_strndup(const char *string, size_t n) { + char *output_string = (char*)parson_malloc(n + 1); + if (!output_string) { + return NULL; + } + output_string[n] = '\0'; + strncpy(output_string, string, n); + return output_string; +} + +static char * parson_strdup(const char *string) { + return parson_strndup(string, strlen(string)); +} + +static int hex_char_to_int(char c) { + if (c >= '0' && c <= '9') { + return c - '0'; + } else if (c >= 'a' && c <= 'f') { + return c - 'a' + 10; + } else if (c >= 'A' && c <= 'F') { + return c - 'A' + 10; + } + return -1; +} + +static int parse_utf16_hex(const char *s, unsigned int *result) { + int x1, x2, x3, x4; + if (s[0] == '\0' || s[1] == '\0' || s[2] == '\0' || s[3] == '\0') { + return 0; + } + x1 = hex_char_to_int(s[0]); + x2 = hex_char_to_int(s[1]); + x3 = hex_char_to_int(s[2]); + x4 = hex_char_to_int(s[3]); + if (x1 == -1 || x2 == -1 || x3 == -1 || x4 == -1) { + return 0; + } + *result = (unsigned int)((x1 << 12) | (x2 << 8) | (x3 << 4) | x4); + return 1; +} + +static int num_bytes_in_utf8_sequence(unsigned char c) { + if (c == 0xC0 || c == 0xC1 || c > 0xF4 || IS_CONT(c)) { + return 0; + } else if ((c & 0x80) == 0) { /* 0xxxxxxx */ + return 1; + } else if ((c & 0xE0) == 0xC0) { /* 110xxxxx */ + return 2; + } else if ((c & 0xF0) == 0xE0) { /* 1110xxxx */ + return 3; + } else if ((c & 0xF8) == 0xF0) { /* 11110xxx */ + return 4; + } + return 0; /* won't happen */ +} + +static int verify_utf8_sequence(const unsigned char *string, int *len) { + unsigned int cp = 0; + *len = num_bytes_in_utf8_sequence(string[0]); + + if (*len == 1) { + cp = string[0]; + } else if (*len == 2 && IS_CONT(string[1])) { + cp = string[0] & 0x1F; + cp = (cp << 6) | (string[1] & 0x3F); + } else if (*len == 3 && IS_CONT(string[1]) && IS_CONT(string[2])) { + cp = ((unsigned char)string[0]) & 0xF; + cp = (cp << 6) | (string[1] & 0x3F); + cp = (cp << 6) | (string[2] & 0x3F); + } else if (*len == 4 && IS_CONT(string[1]) && IS_CONT(string[2]) && IS_CONT(string[3])) { + cp = string[0] & 0x7; + cp = (cp << 6) | (string[1] & 0x3F); + cp = (cp << 6) | (string[2] & 0x3F); + cp = (cp << 6) | (string[3] & 0x3F); + } else { + return 0; + } + + /* overlong encodings */ + if ((cp < 0x80 && *len > 1) || + (cp < 0x800 && *len > 2) || + (cp < 0x10000 && *len > 3)) { + return 0; + } + + /* invalid unicode */ + if (cp > 0x10FFFF) { + return 0; + } + + /* surrogate halves */ + if (cp >= 0xD800 && cp <= 0xDFFF) { + return 0; + } + + return 1; +} + +static int is_valid_utf8(const char *string, size_t string_len) { + int len = 0; + const char *string_end = string + string_len; + while (string < string_end) { + if (!verify_utf8_sequence((const unsigned char*)string, &len)) { + return 0; + } + string += len; + } + return 1; +} + +static int is_decimal(const char *string, size_t length) { + if (length > 1 && string[0] == '0' && string[1] != '.') { + return 0; + } + if (length > 2 && !strncmp(string, "-0", 2) && string[2] != '.') { + return 0; + } + while (length--) { + if (strchr("xX", string[length])) { + return 0; + } + } + return 1; +} + +static char * read_file(const char * filename) { + FILE *fp = fopen(filename, "r"); + size_t file_size; + long pos; + char *file_contents; + if (!fp) { + return NULL; + } + fseek(fp, 0L, SEEK_END); + pos = ftell(fp); + if (pos < 0) { + fclose(fp); + return NULL; + } + file_size = pos; + rewind(fp); + file_contents = (char*)parson_malloc(sizeof(char) * (file_size + 1)); + if (!file_contents) { + fclose(fp); + return NULL; + } + if (fread(file_contents, file_size, 1, fp) < 1) { + if (ferror(fp)) { + fclose(fp); + parson_free(file_contents); + return NULL; + } + } + fclose(fp); + file_contents[file_size] = '\0'; + return file_contents; +} + +static void remove_comments(char *string, const char *start_token, const char *end_token) { + int in_string = 0, escaped = 0; + size_t i; + char *ptr = NULL, current_char; + size_t start_token_len = strlen(start_token); + size_t end_token_len = strlen(end_token); + if (start_token_len == 0 || end_token_len == 0) { + return; + } + while ((current_char = *string) != '\0') { + if (current_char == '\\' && !escaped) { + escaped = 1; + string++; + continue; + } else if (current_char == '\"' && !escaped) { + in_string = !in_string; + } else if (!in_string && strncmp(string, start_token, start_token_len) == 0) { + for(i = 0; i < start_token_len; i++) { + string[i] = ' '; + } + string = string + start_token_len; + ptr = strstr(string, end_token); + if (!ptr) { + return; + } + for (i = 0; i < (ptr - string) + end_token_len; i++) { + string[i] = ' '; + } + string = ptr + end_token_len - 1; + } + escaped = 0; + string++; + } +} + +/* JSON Object */ +static JSON_Object * json_object_init(JSON_Value *wrapping_value) { + JSON_Object *new_obj = (JSON_Object*)parson_malloc(sizeof(JSON_Object)); + if (new_obj == NULL) { + return NULL; + } + new_obj->wrapping_value = wrapping_value; + new_obj->names = (char**)NULL; + new_obj->values = (JSON_Value**)NULL; + new_obj->capacity = 0; + new_obj->count = 0; + return new_obj; +} + +static JSON_Status json_object_add(JSON_Object *object, const char *name, JSON_Value *value) { + size_t index = 0; + if (object == NULL || name == NULL || value == NULL) { + return JSONFailure; + } + if (json_object_get_value(object, name) != NULL) { + return JSONFailure; + } + if (object->count >= object->capacity) { + size_t new_capacity = MAX(object->capacity * 2, STARTING_CAPACITY); + if (new_capacity > OBJECT_MAX_CAPACITY) { + return JSONFailure; + } + if (json_object_resize(object, new_capacity) == JSONFailure) { + return JSONFailure; + } + } + index = object->count; + object->names[index] = parson_strdup(name); + if (object->names[index] == NULL) { + return JSONFailure; + } + value->parent = json_object_get_wrapping_value(object); + object->values[index] = value; + object->count++; + return JSONSuccess; +} + +static JSON_Status json_object_resize(JSON_Object *object, size_t new_capacity) { + char **temp_names = NULL; + JSON_Value **temp_values = NULL; + + if ((object->names == NULL && object->values != NULL) || + (object->names != NULL && object->values == NULL) || + new_capacity == 0) { + return JSONFailure; /* Shouldn't happen */ + } + temp_names = (char**)parson_malloc(new_capacity * sizeof(char*)); + if (temp_names == NULL) { + return JSONFailure; + } + temp_values = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*)); + if (temp_values == NULL) { + parson_free(temp_names); + return JSONFailure; + } + if (object->names != NULL && object->values != NULL && object->count > 0) { + memcpy(temp_names, object->names, object->count * sizeof(char*)); + memcpy(temp_values, object->values, object->count * sizeof(JSON_Value*)); + } + parson_free(object->names); + parson_free(object->values); + object->names = temp_names; + object->values = temp_values; + object->capacity = new_capacity; + return JSONSuccess; +} + +static JSON_Value * json_object_nget_value(const JSON_Object *object, const char *name, size_t n) { + size_t i, name_length; + for (i = 0; i < json_object_get_count(object); i++) { + name_length = strlen(object->names[i]); + if (name_length != n) { + continue; + } + if (strncmp(object->names[i], name, n) == 0) { + return object->values[i]; + } + } + return NULL; +} + +static void json_object_free(JSON_Object *object) { + size_t i; + for (i = 0; i < object->count; i++) { + parson_free(object->names[i]); + json_value_free(object->values[i]); + } + parson_free(object->names); + parson_free(object->values); + parson_free(object); +} + +/* JSON Array */ +static JSON_Array * json_array_init(JSON_Value *wrapping_value) { + JSON_Array *new_array = (JSON_Array*)parson_malloc(sizeof(JSON_Array)); + if (new_array == NULL) { + return NULL; + } + new_array->wrapping_value = wrapping_value; + new_array->items = (JSON_Value**)NULL; + new_array->capacity = 0; + new_array->count = 0; + return new_array; +} + +static JSON_Status json_array_add(JSON_Array *array, JSON_Value *value) { + if (array->count >= array->capacity) { + size_t new_capacity = MAX(array->capacity * 2, STARTING_CAPACITY); + if (new_capacity > ARRAY_MAX_CAPACITY) { + return JSONFailure; + } + if (json_array_resize(array, new_capacity) == JSONFailure) { + return JSONFailure; + } + } + value->parent = json_array_get_wrapping_value(array); + array->items[array->count] = value; + array->count++; + return JSONSuccess; +} + +static JSON_Status json_array_resize(JSON_Array *array, size_t new_capacity) { + JSON_Value **new_items = NULL; + if (new_capacity == 0) { + return JSONFailure; + } + new_items = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*)); + if (new_items == NULL) { + return JSONFailure; + } + if (array->items != NULL && array->count > 0) { + memcpy(new_items, array->items, array->count * sizeof(JSON_Value*)); + } + parson_free(array->items); + array->items = new_items; + array->capacity = new_capacity; + return JSONSuccess; +} + +static void json_array_free(JSON_Array *array) { + size_t i; + for (i = 0; i < array->count; i++) { + json_value_free(array->items[i]); + } + parson_free(array->items); + parson_free(array); +} + +/* JSON Value */ +static JSON_Value * json_value_init_string_no_copy(char *string) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONString; + new_value->value.string = string; + return new_value; +} + +/* Parser */ +static JSON_Status skip_quotes(const char **string) { + if (**string != '\"') { + return JSONFailure; + } + SKIP_CHAR(string); + while (**string != '\"') { + if (**string == '\0') { + return JSONFailure; + } else if (**string == '\\') { + SKIP_CHAR(string); + if (**string == '\0') { + return JSONFailure; + } + } + SKIP_CHAR(string); + } + SKIP_CHAR(string); + return JSONSuccess; +} + +static int parse_utf16(const char **unprocessed, char **processed) { + unsigned int cp, lead, trail; + int parse_succeeded = 0; + char *processed_ptr = *processed; + const char *unprocessed_ptr = *unprocessed; + unprocessed_ptr++; /* skips u */ + parse_succeeded = parse_utf16_hex(unprocessed_ptr, &cp); + if (!parse_succeeded) { + return JSONFailure; + } + if (cp < 0x80) { + *processed_ptr = (char)cp; /* 0xxxxxxx */ + } else if (cp < 0x800) { + *processed_ptr++ = ((cp >> 6) & 0x1F) | 0xC0; /* 110xxxxx */ + *processed_ptr = ((cp ) & 0x3F) | 0x80; /* 10xxxxxx */ + } else if (cp < 0xD800 || cp > 0xDFFF) { + *processed_ptr++ = ((cp >> 12) & 0x0F) | 0xE0; /* 1110xxxx */ + *processed_ptr++ = ((cp >> 6) & 0x3F) | 0x80; /* 10xxxxxx */ + *processed_ptr = ((cp ) & 0x3F) | 0x80; /* 10xxxxxx */ + } else if (cp >= 0xD800 && cp <= 0xDBFF) { /* lead surrogate (0xD800..0xDBFF) */ + lead = cp; + unprocessed_ptr += 4; /* should always be within the buffer, otherwise previous sscanf would fail */ + if (*unprocessed_ptr++ != '\\' || *unprocessed_ptr++ != 'u') { + return JSONFailure; + } + parse_succeeded = parse_utf16_hex(unprocessed_ptr, &trail); + if (!parse_succeeded || trail < 0xDC00 || trail > 0xDFFF) { /* valid trail surrogate? (0xDC00..0xDFFF) */ + return JSONFailure; + } + cp = ((((lead-0xD800)&0x3FF)<<10)|((trail-0xDC00)&0x3FF))+0x010000; + *processed_ptr++ = (((cp >> 18) & 0x07) | 0xF0); /* 11110xxx */ + *processed_ptr++ = (((cp >> 12) & 0x3F) | 0x80); /* 10xxxxxx */ + *processed_ptr++ = (((cp >> 6) & 0x3F) | 0x80); /* 10xxxxxx */ + *processed_ptr = (((cp ) & 0x3F) | 0x80); /* 10xxxxxx */ + } else { /* trail surrogate before lead surrogate */ + return JSONFailure; + } + unprocessed_ptr += 3; + *processed = processed_ptr; + *unprocessed = unprocessed_ptr; + return JSONSuccess; +} + + +/* Copies and processes passed string up to supplied length. +Example: "\u006Corem ipsum" -> lorem ipsum */ +static char* process_string(const char *input, size_t len) { + const char *input_ptr = input; + size_t initial_size = (len + 1) * sizeof(char); + size_t final_size = 0; + char *output = NULL, *output_ptr = NULL, *resized_output = NULL; + output = (char*)parson_malloc(initial_size); + if (output == NULL) { + goto error; + } + output_ptr = output; + while ((*input_ptr != '\0') && (size_t)(input_ptr - input) < len) { + if (*input_ptr == '\\') { + input_ptr++; + switch (*input_ptr) { + case '\"': *output_ptr = '\"'; break; + case '\\': *output_ptr = '\\'; break; + case '/': *output_ptr = '/'; break; + case 'b': *output_ptr = '\b'; break; + case 'f': *output_ptr = '\f'; break; + case 'n': *output_ptr = '\n'; break; + case 'r': *output_ptr = '\r'; break; + case 't': *output_ptr = '\t'; break; + case 'u': + if (parse_utf16(&input_ptr, &output_ptr) == JSONFailure) { + goto error; + } + break; + default: + goto error; + } + } else if ((unsigned char)*input_ptr < 0x20) { + goto error; /* 0x00-0x19 are invalid characters for json string (http://www.ietf.org/rfc/rfc4627.txt) */ + } else { + *output_ptr = *input_ptr; + } + output_ptr++; + input_ptr++; + } + *output_ptr = '\0'; + /* resize to new length */ + final_size = (size_t)(output_ptr-output) + 1; + /* todo: don't resize if final_size == initial_size */ + resized_output = (char*)parson_malloc(final_size); + if (resized_output == NULL) { + goto error; + } + memcpy(resized_output, output, final_size); + parson_free(output); + return resized_output; +error: + parson_free(output); + return NULL; +} + +/* Return processed contents of a string between quotes and + skips passed argument to a matching quote. */ +static char * get_quoted_string(const char **string) { + const char *string_start = *string; + size_t string_len = 0; + JSON_Status status = skip_quotes(string); + if (status != JSONSuccess) { + return NULL; + } + string_len = *string - string_start - 2; /* length without quotes */ + return process_string(string_start + 1, string_len); +} + +static JSON_Value * parse_value(const char **string, size_t nesting) { + if (nesting > MAX_NESTING) { + return NULL; + } + SKIP_WHITESPACES(string); + switch (**string) { + case '{': + return parse_object_value(string, nesting + 1); + case '[': + return parse_array_value(string, nesting + 1); + case '\"': + return parse_string_value(string); + case 'f': case 't': + return parse_boolean_value(string); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return parse_number_value(string); + case 'n': + return parse_null_value(string); + default: + return NULL; + } +} + +static JSON_Value * parse_object_value(const char **string, size_t nesting) { + JSON_Value *output_value = json_value_init_object(), *new_value = NULL; + JSON_Object *output_object = json_value_get_object(output_value); + char *new_key = NULL; + if (output_value == NULL || **string != '{') { + return NULL; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + if (**string == '}') { /* empty object */ + SKIP_CHAR(string); + return output_value; + } + while (**string != '\0') { + new_key = get_quoted_string(string); + SKIP_WHITESPACES(string); + if (new_key == NULL || **string != ':') { + json_value_free(output_value); + return NULL; + } + SKIP_CHAR(string); + new_value = parse_value(string, nesting); + if (new_value == NULL) { + parson_free(new_key); + json_value_free(output_value); + return NULL; + } + if (json_object_add(output_object, new_key, new_value) == JSONFailure) { + parson_free(new_key); + json_value_free(new_value); + json_value_free(output_value); + return NULL; + } + parson_free(new_key); + SKIP_WHITESPACES(string); + if (**string != ',') { + break; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + } + SKIP_WHITESPACES(string); + if (**string != '}' || /* Trim object after parsing is over */ + json_object_resize(output_object, json_object_get_count(output_object)) == JSONFailure) { + json_value_free(output_value); + return NULL; + } + SKIP_CHAR(string); + return output_value; +} + +static JSON_Value * parse_array_value(const char **string, size_t nesting) { + JSON_Value *output_value = json_value_init_array(), *new_array_value = NULL; + JSON_Array *output_array = json_value_get_array(output_value); + if (!output_value || **string != '[') { + return NULL; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + if (**string == ']') { /* empty array */ + SKIP_CHAR(string); + return output_value; + } + while (**string != '\0') { + new_array_value = parse_value(string, nesting); + if (new_array_value == NULL) { + json_value_free(output_value); + return NULL; + } + if (json_array_add(output_array, new_array_value) == JSONFailure) { + json_value_free(new_array_value); + json_value_free(output_value); + return NULL; + } + SKIP_WHITESPACES(string); + if (**string != ',') { + break; + } + SKIP_CHAR(string); + SKIP_WHITESPACES(string); + } + SKIP_WHITESPACES(string); + if (**string != ']' || /* Trim array after parsing is over */ + json_array_resize(output_array, json_array_get_count(output_array)) == JSONFailure) { + json_value_free(output_value); + return NULL; + } + SKIP_CHAR(string); + return output_value; +} + +static JSON_Value * parse_string_value(const char **string) { + JSON_Value *value = NULL; + char *new_string = get_quoted_string(string); + if (new_string == NULL) { + return NULL; + } + value = json_value_init_string_no_copy(new_string); + if (value == NULL) { + parson_free(new_string); + return NULL; + } + return value; +} + +static JSON_Value * parse_boolean_value(const char **string) { + size_t true_token_size = SIZEOF_TOKEN("true"); + size_t false_token_size = SIZEOF_TOKEN("false"); + if (strncmp("true", *string, true_token_size) == 0) { + *string += true_token_size; + return json_value_init_boolean(1); + } else if (strncmp("false", *string, false_token_size) == 0) { + *string += false_token_size; + return json_value_init_boolean(0); + } + return NULL; +} + +static JSON_Value * parse_number_value(const char **string) { + char *end; + double number = 0; + errno = 0; + number = strtod(*string, &end); + if (errno || !is_decimal(*string, end - *string)) { + return NULL; + } + *string = end; + return json_value_init_number(number); +} + +static JSON_Value * parse_null_value(const char **string) { + size_t token_size = SIZEOF_TOKEN("null"); + if (strncmp("null", *string, token_size) == 0) { + *string += token_size; + return json_value_init_null(); + } + return NULL; +} + +/* Serialization */ +#define APPEND_STRING(str) do { written = append_string(buf, (str));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ + written_total += written; } while(0) + +#define APPEND_INDENT(level) do { written = append_indent(buf, (level));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ + written_total += written; } while(0) + +static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int level, int is_pretty, char *num_buf) +{ + const char *key = NULL, *string = NULL; + JSON_Value *temp_value = NULL; + JSON_Array *array = NULL; + JSON_Object *object = NULL; + size_t i = 0, count = 0; + double num = 0.0; + int written = -1, written_total = 0; + + switch (json_value_get_type(value)) { + case JSONArray: + array = json_value_get_array(value); + count = json_array_get_count(array); + APPEND_STRING("["); + if (count > 0 && is_pretty) { + APPEND_STRING("\n"); + } + for (i = 0; i < count; i++) { + if (is_pretty) { + APPEND_INDENT(level+1); + } + temp_value = json_array_get_value(array, i); + written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + if (i < (count - 1)) { + APPEND_STRING(","); + } + if (is_pretty) { + APPEND_STRING("\n"); + } + } + if (count > 0 && is_pretty) { + APPEND_INDENT(level); + } + APPEND_STRING("]"); + return written_total; + case JSONObject: + object = json_value_get_object(value); + count = json_object_get_count(object); + APPEND_STRING("{"); + if (count > 0 && is_pretty) { + APPEND_STRING("\n"); + } + for (i = 0; i < count; i++) { + key = json_object_get_name(object, i); + if (key == NULL) { + return -1; + } + if (is_pretty) { + APPEND_INDENT(level+1); + } + written = json_serialize_string(key, buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + APPEND_STRING(":"); + if (is_pretty) { + APPEND_STRING(" "); + } + temp_value = json_object_get_value(object, key); + written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + if (i < (count - 1)) { + APPEND_STRING(","); + } + if (is_pretty) { + APPEND_STRING("\n"); + } + } + if (count > 0 && is_pretty) { + APPEND_INDENT(level); + } + APPEND_STRING("}"); + return written_total; + case JSONString: + string = json_value_get_string(value); + if (string == NULL) { + return -1; + } + written = json_serialize_string(string, buf); + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + return written_total; + case JSONBoolean: + if (json_value_get_boolean(value)) { + APPEND_STRING("true"); + } else { + APPEND_STRING("false"); + } + return written_total; + case JSONNumber: + num = json_value_get_number(value); + if (buf != NULL) { + num_buf = buf; + } + if (num == ((double)(int)num)) { /* check if num is integer */ + written = sprintf(num_buf, "%d", (int)num); + } else if (num == ((double)(unsigned int)num)) { + written = sprintf(num_buf, "%u", (unsigned int)num); + } else { + written = sprintf(num_buf, DOUBLE_SERIALIZATION_FORMAT, num); + } + if (written < 0) { + return -1; + } + if (buf != NULL) { + buf += written; + } + written_total += written; + return written_total; + case JSONNull: + APPEND_STRING("null"); + return written_total; + case JSONError: + return -1; + default: + return -1; + } +} + +static int json_serialize_string(const char *string, char *buf) { + size_t i = 0, len = strlen(string); + char c = '\0'; + int written = -1, written_total = 0; + APPEND_STRING("\""); + for (i = 0; i < len; i++) { + c = string[i]; + switch (c) { + case '\"': APPEND_STRING("\\\""); break; + case '\\': APPEND_STRING("\\\\"); break; + case '/': APPEND_STRING("\\/"); break; /* to make json embeddable in xml\/html */ + case '\b': APPEND_STRING("\\b"); break; + case '\f': APPEND_STRING("\\f"); break; + case '\n': APPEND_STRING("\\n"); break; + case '\r': APPEND_STRING("\\r"); break; + case '\t': APPEND_STRING("\\t"); break; + case '\x00': APPEND_STRING("\\u0000"); break; + case '\x01': APPEND_STRING("\\u0001"); break; + case '\x02': APPEND_STRING("\\u0002"); break; + case '\x03': APPEND_STRING("\\u0003"); break; + case '\x04': APPEND_STRING("\\u0004"); break; + case '\x05': APPEND_STRING("\\u0005"); break; + case '\x06': APPEND_STRING("\\u0006"); break; + case '\x07': APPEND_STRING("\\u0007"); break; + /* '\x08' duplicate: '\b' */ + /* '\x09' duplicate: '\t' */ + /* '\x0a' duplicate: '\n' */ + case '\x0b': APPEND_STRING("\\u000b"); break; + /* '\x0c' duplicate: '\f' */ + /* '\x0d' duplicate: '\r' */ + case '\x0e': APPEND_STRING("\\u000e"); break; + case '\x0f': APPEND_STRING("\\u000f"); break; + case '\x10': APPEND_STRING("\\u0010"); break; + case '\x11': APPEND_STRING("\\u0011"); break; + case '\x12': APPEND_STRING("\\u0012"); break; + case '\x13': APPEND_STRING("\\u0013"); break; + case '\x14': APPEND_STRING("\\u0014"); break; + case '\x15': APPEND_STRING("\\u0015"); break; + case '\x16': APPEND_STRING("\\u0016"); break; + case '\x17': APPEND_STRING("\\u0017"); break; + case '\x18': APPEND_STRING("\\u0018"); break; + case '\x19': APPEND_STRING("\\u0019"); break; + case '\x1a': APPEND_STRING("\\u001a"); break; + case '\x1b': APPEND_STRING("\\u001b"); break; + case '\x1c': APPEND_STRING("\\u001c"); break; + case '\x1d': APPEND_STRING("\\u001d"); break; + case '\x1e': APPEND_STRING("\\u001e"); break; + case '\x1f': APPEND_STRING("\\u001f"); break; + default: + if (buf != NULL) { + buf[0] = c; + buf += 1; + } + written_total += 1; + break; + } + } + APPEND_STRING("\""); + return written_total; +} + +static int append_indent(char *buf, int level) { + int i; + int written = -1, written_total = 0; + for (i = 0; i < level; i++) { + APPEND_STRING(" "); + } + return written_total; +} + +static int append_string(char *buf, const char *string) { + if (buf == NULL) { + return (int)strlen(string); + } + return sprintf(buf, "%s", string); +} + +#undef APPEND_STRING +#undef APPEND_INDENT + +/* Parser API */ +JSON_Value * json_parse_file(const char *filename) { + char *file_contents = read_file(filename); + JSON_Value *output_value = NULL; + if (file_contents == NULL) { + return NULL; + } + output_value = json_parse_string(file_contents); + parson_free(file_contents); + return output_value; +} + +JSON_Value * json_parse_file_with_comments(const char *filename) { + char *file_contents = read_file(filename); + JSON_Value *output_value = NULL; + if (file_contents == NULL) { + return NULL; + } + output_value = json_parse_string_with_comments(file_contents); + parson_free(file_contents); + return output_value; +} + +JSON_Value * json_parse_string(const char *string) { + if (string == NULL) { + return NULL; + } + if (string[0] == '\xEF' && string[1] == '\xBB' && string[2] == '\xBF') { + string = string + 3; /* Support for UTF-8 BOM */ + } + return parse_value((const char**)&string, 0); +} + +JSON_Value * json_parse_string_with_comments(const char *string) { + JSON_Value *result = NULL; + char *string_mutable_copy = NULL, *string_mutable_copy_ptr = NULL; + string_mutable_copy = parson_strdup(string); + if (string_mutable_copy == NULL) { + return NULL; + } + remove_comments(string_mutable_copy, "/*", "*/"); + remove_comments(string_mutable_copy, "//", "\n"); + string_mutable_copy_ptr = string_mutable_copy; + result = parse_value((const char**)&string_mutable_copy_ptr, 0); + parson_free(string_mutable_copy); + return result; +} + +/* JSON Object API */ + +JSON_Value * json_object_get_value(const JSON_Object *object, const char *name) { + if (object == NULL || name == NULL) { + return NULL; + } + return json_object_nget_value(object, name, strlen(name)); +} + +const char * json_object_get_string(const JSON_Object *object, const char *name) { + return json_value_get_string(json_object_get_value(object, name)); +} + +double json_object_get_number(const JSON_Object *object, const char *name) { + return json_value_get_number(json_object_get_value(object, name)); +} + +JSON_Object * json_object_get_object(const JSON_Object *object, const char *name) { + return json_value_get_object(json_object_get_value(object, name)); +} + +JSON_Array * json_object_get_array(const JSON_Object *object, const char *name) { + return json_value_get_array(json_object_get_value(object, name)); +} + +int json_object_get_boolean(const JSON_Object *object, const char *name) { + return json_value_get_boolean(json_object_get_value(object, name)); +} + +JSON_Value * json_object_dotget_value(const JSON_Object *object, const char *name) { + const char *dot_position = strchr(name, '.'); + if (!dot_position) { + return json_object_get_value(object, name); + } + object = json_value_get_object(json_object_nget_value(object, name, dot_position - name)); + return json_object_dotget_value(object, dot_position + 1); +} + +const char * json_object_dotget_string(const JSON_Object *object, const char *name) { + return json_value_get_string(json_object_dotget_value(object, name)); +} + +double json_object_dotget_number(const JSON_Object *object, const char *name) { + return json_value_get_number(json_object_dotget_value(object, name)); +} + +JSON_Object * json_object_dotget_object(const JSON_Object *object, const char *name) { + return json_value_get_object(json_object_dotget_value(object, name)); +} + +JSON_Array * json_object_dotget_array(const JSON_Object *object, const char *name) { + return json_value_get_array(json_object_dotget_value(object, name)); +} + +int json_object_dotget_boolean(const JSON_Object *object, const char *name) { + return json_value_get_boolean(json_object_dotget_value(object, name)); +} + +size_t json_object_get_count(const JSON_Object *object) { + return object ? object->count : 0; +} + +const char * json_object_get_name(const JSON_Object *object, size_t index) { + if (object == NULL || index >= json_object_get_count(object)) { + return NULL; + } + return object->names[index]; +} + +JSON_Value * json_object_get_value_at(const JSON_Object *object, size_t index) { + if (object == NULL || index >= json_object_get_count(object)) { + return NULL; + } + return object->values[index]; +} + +JSON_Value *json_object_get_wrapping_value(const JSON_Object *object) { + return object->wrapping_value; +} + +int json_object_has_value (const JSON_Object *object, const char *name) { + return json_object_get_value(object, name) != NULL; +} + +int json_object_has_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type) { + JSON_Value *val = json_object_get_value(object, name); + return val != NULL && json_value_get_type(val) == type; +} + +int json_object_dothas_value (const JSON_Object *object, const char *name) { + return json_object_dotget_value(object, name) != NULL; +} + +int json_object_dothas_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type) { + JSON_Value *val = json_object_dotget_value(object, name); + return val != NULL && json_value_get_type(val) == type; +} + +/* JSON Array API */ +JSON_Value * json_array_get_value(const JSON_Array *array, size_t index) { + if (array == NULL || index >= json_array_get_count(array)) { + return NULL; + } + return array->items[index]; +} + +const char * json_array_get_string(const JSON_Array *array, size_t index) { + return json_value_get_string(json_array_get_value(array, index)); +} + +double json_array_get_number(const JSON_Array *array, size_t index) { + return json_value_get_number(json_array_get_value(array, index)); +} + +JSON_Object * json_array_get_object(const JSON_Array *array, size_t index) { + return json_value_get_object(json_array_get_value(array, index)); +} + +JSON_Array * json_array_get_array(const JSON_Array *array, size_t index) { + return json_value_get_array(json_array_get_value(array, index)); +} + +int json_array_get_boolean(const JSON_Array *array, size_t index) { + return json_value_get_boolean(json_array_get_value(array, index)); +} + +size_t json_array_get_count(const JSON_Array *array) { + return array ? array->count : 0; +} + +JSON_Value * json_array_get_wrapping_value(const JSON_Array *array) { + return array->wrapping_value; +} + +/* JSON Value API */ +JSON_Value_Type json_value_get_type(const JSON_Value *value) { + return value ? value->type : JSONError; +} + +JSON_Object * json_value_get_object(const JSON_Value *value) { + return json_value_get_type(value) == JSONObject ? value->value.object : NULL; +} + +JSON_Array * json_value_get_array(const JSON_Value *value) { + return json_value_get_type(value) == JSONArray ? value->value.array : NULL; +} + +const char * json_value_get_string(const JSON_Value *value) { + return json_value_get_type(value) == JSONString ? value->value.string : NULL; +} + +double json_value_get_number(const JSON_Value *value) { + return json_value_get_type(value) == JSONNumber ? value->value.number : 0; +} + +int json_value_get_boolean(const JSON_Value *value) { + return json_value_get_type(value) == JSONBoolean ? value->value.boolean : -1; +} + +JSON_Value * json_value_get_parent (const JSON_Value *value) { + return value ? value->parent : NULL; +} + +void json_value_free(JSON_Value *value) { + switch (json_value_get_type(value)) { + case JSONObject: + json_object_free(value->value.object); + break; + case JSONString: + parson_free(value->value.string); + break; + case JSONArray: + json_array_free(value->value.array); + break; + default: + break; + } + parson_free(value); +} + +JSON_Value * json_value_init_object(void) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONObject; + new_value->value.object = json_object_init(new_value); + if (!new_value->value.object) { + parson_free(new_value); + return NULL; + } + return new_value; +} + +JSON_Value * json_value_init_array(void) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONArray; + new_value->value.array = json_array_init(new_value); + if (!new_value->value.array) { + parson_free(new_value); + return NULL; + } + return new_value; +} + +JSON_Value * json_value_init_string(const char *string) { + char *copy = NULL; + JSON_Value *value; + size_t string_len = 0; + if (string == NULL) { + return NULL; + } + string_len = strlen(string); + if (!is_valid_utf8(string, string_len)) { + return NULL; + } + copy = parson_strndup(string, string_len); + if (copy == NULL) { + return NULL; + } + value = json_value_init_string_no_copy(copy); + if (value == NULL) { + parson_free(copy); + } + return value; +} + +JSON_Value * json_value_init_number(double number) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONNumber; + new_value->value.number = number; + return new_value; +} + +JSON_Value * json_value_init_boolean(int boolean) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONBoolean; + new_value->value.boolean = boolean ? 1 : 0; + return new_value; +} + +JSON_Value * json_value_init_null(void) { + JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); + if (!new_value) { + return NULL; + } + new_value->parent = NULL; + new_value->type = JSONNull; + return new_value; +} + +JSON_Value * json_value_deep_copy(const JSON_Value *value) { + size_t i = 0; + JSON_Value *return_value = NULL, *temp_value_copy = NULL, *temp_value = NULL; + const char *temp_string = NULL, *temp_key = NULL; + char *temp_string_copy = NULL; + JSON_Array *temp_array = NULL, *temp_array_copy = NULL; + JSON_Object *temp_object = NULL, *temp_object_copy = NULL; + + switch (json_value_get_type(value)) { + case JSONArray: + temp_array = json_value_get_array(value); + return_value = json_value_init_array(); + if (return_value == NULL) { + return NULL; + } + temp_array_copy = json_value_get_array(return_value); + for (i = 0; i < json_array_get_count(temp_array); i++) { + temp_value = json_array_get_value(temp_array, i); + temp_value_copy = json_value_deep_copy(temp_value); + if (temp_value_copy == NULL) { + json_value_free(return_value); + return NULL; + } + if (json_array_add(temp_array_copy, temp_value_copy) == JSONFailure) { + json_value_free(return_value); + json_value_free(temp_value_copy); + return NULL; + } + } + return return_value; + case JSONObject: + temp_object = json_value_get_object(value); + return_value = json_value_init_object(); + if (return_value == NULL) { + return NULL; + } + temp_object_copy = json_value_get_object(return_value); + for (i = 0; i < json_object_get_count(temp_object); i++) { + temp_key = json_object_get_name(temp_object, i); + temp_value = json_object_get_value(temp_object, temp_key); + temp_value_copy = json_value_deep_copy(temp_value); + if (temp_value_copy == NULL) { + json_value_free(return_value); + return NULL; + } + if (json_object_add(temp_object_copy, temp_key, temp_value_copy) == JSONFailure) { + json_value_free(return_value); + json_value_free(temp_value_copy); + return NULL; + } + } + return return_value; + case JSONBoolean: + return json_value_init_boolean(json_value_get_boolean(value)); + case JSONNumber: + return json_value_init_number(json_value_get_number(value)); + case JSONString: + temp_string = json_value_get_string(value); + if (temp_string == NULL) { + return NULL; + } + temp_string_copy = parson_strdup(temp_string); + if (temp_string_copy == NULL) { + return NULL; + } + return_value = json_value_init_string_no_copy(temp_string_copy); + if (return_value == NULL) { + parson_free(temp_string_copy); + } + return return_value; + case JSONNull: + return json_value_init_null(); + case JSONError: + return NULL; + default: + return NULL; + } +} + +size_t json_serialization_size(const JSON_Value *value) { + char num_buf[1100]; /* recursively allocating buffer on stack is a bad idea, so let's do it only once */ + int res = json_serialize_to_buffer_r(value, NULL, 0, 0, num_buf); + return res < 0 ? 0 : (size_t)(res + 1); +} + +JSON_Status json_serialize_to_buffer(const JSON_Value *value, char *buf, size_t buf_size_in_bytes) { + int written = -1; + size_t needed_size_in_bytes = json_serialization_size(value); + if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) { + return JSONFailure; + } + written = json_serialize_to_buffer_r(value, buf, 0, 0, NULL); + if (written < 0) { + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_serialize_to_file(const JSON_Value *value, const char *filename) { + JSON_Status return_code = JSONSuccess; + FILE *fp = NULL; + char *serialized_string = json_serialize_to_string(value); + if (serialized_string == NULL) { + return JSONFailure; + } + fp = fopen (filename, "w"); + if (fp == NULL) { + json_free_serialized_string(serialized_string); + return JSONFailure; + } + if (fputs(serialized_string, fp) == EOF) { + return_code = JSONFailure; + } + if (fclose(fp) == EOF) { + return_code = JSONFailure; + } + json_free_serialized_string(serialized_string); + return return_code; +} + +char * json_serialize_to_string(const JSON_Value *value) { + JSON_Status serialization_result = JSONFailure; + size_t buf_size_bytes = json_serialization_size(value); + char *buf = NULL; + if (buf_size_bytes == 0) { + return NULL; + } + buf = (char*)parson_malloc(buf_size_bytes); + if (buf == NULL) { + return NULL; + } + serialization_result = json_serialize_to_buffer(value, buf, buf_size_bytes); + if (serialization_result == JSONFailure) { + json_free_serialized_string(buf); + return NULL; + } + return buf; +} + +size_t json_serialization_size_pretty(const JSON_Value *value) { + char num_buf[1100]; /* recursively allocating buffer on stack is a bad idea, so let's do it only once */ + int res = json_serialize_to_buffer_r(value, NULL, 0, 1, num_buf); + return res < 0 ? 0 : (size_t)(res + 1); +} + +JSON_Status json_serialize_to_buffer_pretty(const JSON_Value *value, char *buf, size_t buf_size_in_bytes) { + int written = -1; + size_t needed_size_in_bytes = json_serialization_size_pretty(value); + if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) { + return JSONFailure; + } + written = json_serialize_to_buffer_r(value, buf, 0, 1, NULL); + if (written < 0) { + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_serialize_to_file_pretty(const JSON_Value *value, const char *filename) { + JSON_Status return_code = JSONSuccess; + FILE *fp = NULL; + char *serialized_string = json_serialize_to_string_pretty(value); + if (serialized_string == NULL) { + return JSONFailure; + } + fp = fopen (filename, "w"); + if (fp == NULL) { + json_free_serialized_string(serialized_string); + return JSONFailure; + } + if (fputs(serialized_string, fp) == EOF) { + return_code = JSONFailure; + } + if (fclose(fp) == EOF) { + return_code = JSONFailure; + } + json_free_serialized_string(serialized_string); + return return_code; +} + +char * json_serialize_to_string_pretty(const JSON_Value *value) { + JSON_Status serialization_result = JSONFailure; + size_t buf_size_bytes = json_serialization_size_pretty(value); + char *buf = NULL; + if (buf_size_bytes == 0) { + return NULL; + } + buf = (char*)parson_malloc(buf_size_bytes); + if (buf == NULL) { + return NULL; + } + serialization_result = json_serialize_to_buffer_pretty(value, buf, buf_size_bytes); + if (serialization_result == JSONFailure) { + json_free_serialized_string(buf); + return NULL; + } + return buf; +} + +void json_free_serialized_string(char *string) { + parson_free(string); +} + +JSON_Status json_array_remove(JSON_Array *array, size_t ix) { + JSON_Value *temp_value = NULL; + size_t last_element_ix = 0; + if (array == NULL || ix >= json_array_get_count(array)) { + return JSONFailure; + } + last_element_ix = json_array_get_count(array) - 1; + json_value_free(json_array_get_value(array, ix)); + if (ix != last_element_ix) { /* Replace value with one from the end of array */ + temp_value = json_array_get_value(array, last_element_ix); + if (temp_value == NULL) { + return JSONFailure; + } + array->items[ix] = temp_value; + } + array->count -= 1; + return JSONSuccess; +} + +JSON_Status json_array_replace_value(JSON_Array *array, size_t ix, JSON_Value *value) { + if (array == NULL || value == NULL || value->parent != NULL || ix >= json_array_get_count(array)) { + return JSONFailure; + } + json_value_free(json_array_get_value(array, ix)); + value->parent = json_array_get_wrapping_value(array); + array->items[ix] = value; + return JSONSuccess; +} + +JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* string) { + JSON_Value *value = json_value_init_string(string); + if (value == NULL) { + return JSONFailure; + } + if (json_array_replace_value(array, i, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_replace_number(JSON_Array *array, size_t i, double number) { + JSON_Value *value = json_value_init_number(number); + if (value == NULL) { + return JSONFailure; + } + if (json_array_replace_value(array, i, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_replace_boolean(JSON_Array *array, size_t i, int boolean) { + JSON_Value *value = json_value_init_boolean(boolean); + if (value == NULL) { + return JSONFailure; + } + if (json_array_replace_value(array, i, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_replace_null(JSON_Array *array, size_t i) { + JSON_Value *value = json_value_init_null(); + if (value == NULL) { + return JSONFailure; + } + if (json_array_replace_value(array, i, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_clear(JSON_Array *array) { + size_t i = 0; + if (array == NULL) { + return JSONFailure; + } + for (i = 0; i < json_array_get_count(array); i++) { + json_value_free(json_array_get_value(array, i)); + } + array->count = 0; + return JSONSuccess; +} + +JSON_Status json_array_append_value(JSON_Array *array, JSON_Value *value) { + if (array == NULL || value == NULL || value->parent != NULL) { + return JSONFailure; + } + return json_array_add(array, value); +} + +JSON_Status json_array_append_string(JSON_Array *array, const char *string) { + JSON_Value *value = json_value_init_string(string); + if (value == NULL) { + return JSONFailure; + } + if (json_array_append_value(array, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_append_number(JSON_Array *array, double number) { + JSON_Value *value = json_value_init_number(number); + if (value == NULL) { + return JSONFailure; + } + if (json_array_append_value(array, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_append_boolean(JSON_Array *array, int boolean) { + JSON_Value *value = json_value_init_boolean(boolean); + if (value == NULL) { + return JSONFailure; + } + if (json_array_append_value(array, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_array_append_null(JSON_Array *array) { + JSON_Value *value = json_value_init_null(); + if (value == NULL) { + return JSONFailure; + } + if (json_array_append_value(array, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_object_set_value(JSON_Object *object, const char *name, JSON_Value *value) { + size_t i = 0; + JSON_Value *old_value; + if (object == NULL || name == NULL || value == NULL || value->parent != NULL) { + return JSONFailure; + } + old_value = json_object_get_value(object, name); + if (old_value != NULL) { /* free and overwrite old value */ + json_value_free(old_value); + for (i = 0; i < json_object_get_count(object); i++) { + if (strcmp(object->names[i], name) == 0) { + value->parent = json_object_get_wrapping_value(object); + object->values[i] = value; + return JSONSuccess; + } + } + } + /* add new key value pair */ + return json_object_add(object, name, value); +} + +JSON_Status json_object_set_string(JSON_Object *object, const char *name, const char *string) { + return json_object_set_value(object, name, json_value_init_string(string)); +} + +JSON_Status json_object_set_number(JSON_Object *object, const char *name, double number) { + return json_object_set_value(object, name, json_value_init_number(number)); +} + +JSON_Status json_object_set_boolean(JSON_Object *object, const char *name, int boolean) { + return json_object_set_value(object, name, json_value_init_boolean(boolean)); +} + +JSON_Status json_object_set_null(JSON_Object *object, const char *name) { + return json_object_set_value(object, name, json_value_init_null()); +} + +JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON_Value *value) { + const char *dot_pos = NULL; + char *current_name = NULL; + JSON_Object *temp_obj = NULL; + JSON_Value *new_value = NULL; + if (value == NULL || name == NULL || value == NULL) { + return JSONFailure; + } + dot_pos = strchr(name, '.'); + if (dot_pos == NULL) { + return json_object_set_value(object, name, value); + } else { + current_name = parson_strndup(name, dot_pos - name); + temp_obj = json_object_get_object(object, current_name); + if (temp_obj == NULL) { + new_value = json_value_init_object(); + if (new_value == NULL) { + parson_free(current_name); + return JSONFailure; + } + if (json_object_add(object, current_name, new_value) == JSONFailure) { + json_value_free(new_value); + parson_free(current_name); + return JSONFailure; + } + temp_obj = json_object_get_object(object, current_name); + } + parson_free(current_name); + return json_object_dotset_value(temp_obj, dot_pos + 1, value); + } +} + +JSON_Status json_object_dotset_string(JSON_Object *object, const char *name, const char *string) { + JSON_Value *value = json_value_init_string(string); + if (value == NULL) { + return JSONFailure; + } + if (json_object_dotset_value(object, name, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_object_dotset_number(JSON_Object *object, const char *name, double number) { + JSON_Value *value = json_value_init_number(number); + if (value == NULL) { + return JSONFailure; + } + if (json_object_dotset_value(object, name, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_object_dotset_boolean(JSON_Object *object, const char *name, int boolean) { + JSON_Value *value = json_value_init_boolean(boolean); + if (value == NULL) { + return JSONFailure; + } + if (json_object_dotset_value(object, name, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_object_dotset_null(JSON_Object *object, const char *name) { + JSON_Value *value = json_value_init_null(); + if (value == NULL) { + return JSONFailure; + } + if (json_object_dotset_value(object, name, value) == JSONFailure) { + json_value_free(value); + return JSONFailure; + } + return JSONSuccess; +} + +JSON_Status json_object_remove(JSON_Object *object, const char *name) { + size_t i = 0, last_item_index = 0; + if (object == NULL || json_object_get_value(object, name) == NULL) { + return JSONFailure; + } + last_item_index = json_object_get_count(object) - 1; + for (i = 0; i < json_object_get_count(object); i++) { + if (strcmp(object->names[i], name) == 0) { + parson_free(object->names[i]); + json_value_free(object->values[i]); + if (i != last_item_index) { /* Replace key value pair with one from the end */ + object->names[i] = object->names[last_item_index]; + object->values[i] = object->values[last_item_index]; + } + object->count -= 1; + return JSONSuccess; + } + } + return JSONFailure; /* No execution path should end here */ +} + +JSON_Status json_object_dotremove(JSON_Object *object, const char *name) { + const char *dot_pos = strchr(name, '.'); + char *current_name = NULL; + JSON_Object *temp_obj = NULL; + if (dot_pos == NULL) { + return json_object_remove(object, name); + } else { + current_name = parson_strndup(name, dot_pos - name); + temp_obj = json_object_get_object(object, current_name); + parson_free(current_name); + if (temp_obj == NULL) { + return JSONFailure; + } + return json_object_dotremove(temp_obj, dot_pos + 1); + } +} + +JSON_Status json_object_clear(JSON_Object *object) { + size_t i = 0; + if (object == NULL) { + return JSONFailure; + } + for (i = 0; i < json_object_get_count(object); i++) { + parson_free(object->names[i]); + json_value_free(object->values[i]); + } + object->count = 0; + return JSONSuccess; +} + +JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value) { + JSON_Value *temp_schema_value = NULL, *temp_value = NULL; + JSON_Array *schema_array = NULL, *value_array = NULL; + JSON_Object *schema_object = NULL, *value_object = NULL; + JSON_Value_Type schema_type = JSONError, value_type = JSONError; + const char *key = NULL; + size_t i = 0, count = 0; + if (schema == NULL || value == NULL) { + return JSONFailure; + } + schema_type = json_value_get_type(schema); + value_type = json_value_get_type(value); + if (schema_type != value_type && schema_type != JSONNull) { /* null represents all values */ + return JSONFailure; + } + switch (schema_type) { + case JSONArray: + schema_array = json_value_get_array(schema); + value_array = json_value_get_array(value); + count = json_array_get_count(schema_array); + if (count == 0) { + return JSONSuccess; /* Empty array allows all types */ + } + /* Get first value from array, rest is ignored */ + temp_schema_value = json_array_get_value(schema_array, 0); + for (i = 0; i < json_array_get_count(value_array); i++) { + temp_value = json_array_get_value(value_array, i); + if (json_validate(temp_schema_value, temp_value) == JSONFailure) { + return JSONFailure; + } + } + return JSONSuccess; + case JSONObject: + schema_object = json_value_get_object(schema); + value_object = json_value_get_object(value); + count = json_object_get_count(schema_object); + if (count == 0) { + return JSONSuccess; /* Empty object allows all objects */ + } else if (json_object_get_count(value_object) < count) { + return JSONFailure; /* Tested object mustn't have less name-value pairs than schema */ + } + for (i = 0; i < count; i++) { + key = json_object_get_name(schema_object, i); + temp_schema_value = json_object_get_value(schema_object, key); + temp_value = json_object_get_value(value_object, key); + if (temp_value == NULL) { + return JSONFailure; + } + if (json_validate(temp_schema_value, temp_value) == JSONFailure) { + return JSONFailure; + } + } + return JSONSuccess; + case JSONString: case JSONNumber: case JSONBoolean: case JSONNull: + return JSONSuccess; /* equality already tested before switch */ + case JSONError: default: + return JSONFailure; + } +} + +JSON_Status json_value_equals(const JSON_Value *a, const JSON_Value *b) { + JSON_Object *a_object = NULL, *b_object = NULL; + JSON_Array *a_array = NULL, *b_array = NULL; + const char *a_string = NULL, *b_string = NULL; + const char *key = NULL; + size_t a_count = 0, b_count = 0, i = 0; + JSON_Value_Type a_type, b_type; + a_type = json_value_get_type(a); + b_type = json_value_get_type(b); + if (a_type != b_type) { + return 0; + } + switch (a_type) { + case JSONArray: + a_array = json_value_get_array(a); + b_array = json_value_get_array(b); + a_count = json_array_get_count(a_array); + b_count = json_array_get_count(b_array); + if (a_count != b_count) { + return 0; + } + for (i = 0; i < a_count; i++) { + if (!json_value_equals(json_array_get_value(a_array, i), + json_array_get_value(b_array, i))) { + return 0; + } + } + return 1; + case JSONObject: + a_object = json_value_get_object(a); + b_object = json_value_get_object(b); + a_count = json_object_get_count(a_object); + b_count = json_object_get_count(b_object); + if (a_count != b_count) { + return 0; + } + for (i = 0; i < a_count; i++) { + key = json_object_get_name(a_object, i); + if (!json_value_equals(json_object_get_value(a_object, key), + json_object_get_value(b_object, key))) { + return 0; + } + } + return 1; + case JSONString: + a_string = json_value_get_string(a); + b_string = json_value_get_string(b); + if (a_string == NULL || b_string == NULL) { + return 0; /* shouldn't happen */ + } + return strcmp(a_string, b_string) == 0; + case JSONBoolean: + return json_value_get_boolean(a) == json_value_get_boolean(b); + case JSONNumber: + return fabs(json_value_get_number(a) - json_value_get_number(b)) < 0.000001; /* EPSILON */ + case JSONError: + return 1; + case JSONNull: + return 1; + default: + return 1; + } +} + +JSON_Value_Type json_type(const JSON_Value *value) { + return json_value_get_type(value); +} + +JSON_Object * json_object (const JSON_Value *value) { + return json_value_get_object(value); +} + +JSON_Array * json_array (const JSON_Value *value) { + return json_value_get_array(value); +} + +const char * json_string (const JSON_Value *value) { + return json_value_get_string(value); +} + +double json_number (const JSON_Value *value) { + return json_value_get_number(value); +} + +int json_boolean(const JSON_Value *value) { + return json_value_get_boolean(value); +} + +void json_set_allocation_functions(JSON_Malloc_Function malloc_fun, JSON_Free_Function free_fun) { + parson_malloc = malloc_fun; + parson_free = free_fun; +} diff --git a/src/parson.h b/src/parson.h new file mode 100644 index 0000000..6438c93 --- /dev/null +++ b/src/parson.h @@ -0,0 +1,234 @@ +/* + Parson ( http://kgabis.github.com/parson/ ) + Copyright (c) 2012 - 2017 Krzysztof Gabis + + 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. +*/ + +#ifndef parson_parson_h +#define parson_parson_h + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include /* size_t */ + +/* Types and enums */ +typedef struct json_object_t JSON_Object; +typedef struct json_array_t JSON_Array; +typedef struct json_value_t JSON_Value; + +enum json_value_type { + JSONError = -1, + JSONNull = 1, + JSONString = 2, + JSONNumber = 3, + JSONObject = 4, + JSONArray = 5, + JSONBoolean = 6 +}; +typedef int JSON_Value_Type; + +enum json_result_t { + JSONSuccess = 0, + JSONFailure = -1 +}; +typedef int JSON_Status; + +typedef void * (*JSON_Malloc_Function)(size_t); +typedef void (*JSON_Free_Function)(void *); + +/* Call only once, before calling any other function from parson API. If not called, malloc and free + from stdlib will be used for all allocations */ +void json_set_allocation_functions(JSON_Malloc_Function malloc_fun, JSON_Free_Function free_fun); + +/* Parses first JSON value in a file, returns NULL in case of error */ +JSON_Value * json_parse_file(const char *filename); + +/* Parses first JSON value in a file and ignores comments (/ * * / and //), + returns NULL in case of error */ +JSON_Value * json_parse_file_with_comments(const char *filename); + +/* Parses first JSON value in a string, returns NULL in case of error */ +JSON_Value * json_parse_string(const char *string); + +/* Parses first JSON value in a string and ignores comments (/ * * / and //), + returns NULL in case of error */ +JSON_Value * json_parse_string_with_comments(const char *string); + +/* Serialization */ +size_t json_serialization_size(const JSON_Value *value); /* returns 0 on fail */ +JSON_Status json_serialize_to_buffer(const JSON_Value *value, char *buf, size_t buf_size_in_bytes); +JSON_Status json_serialize_to_file(const JSON_Value *value, const char *filename); +char * json_serialize_to_string(const JSON_Value *value); + +/* Pretty serialization */ +size_t json_serialization_size_pretty(const JSON_Value *value); /* returns 0 on fail */ +JSON_Status json_serialize_to_buffer_pretty(const JSON_Value *value, char *buf, size_t buf_size_in_bytes); +JSON_Status json_serialize_to_file_pretty(const JSON_Value *value, const char *filename); +char * json_serialize_to_string_pretty(const JSON_Value *value); + +void json_free_serialized_string(char *string); /* frees string from json_serialize_to_string and json_serialize_to_string_pretty */ + +/* Comparing */ +int json_value_equals(const JSON_Value *a, const JSON_Value *b); + +/* Validation + This is *NOT* JSON Schema. It validates json by checking if object have identically + named fields with matching types. + For example schema {"name":"", "age":0} will validate + {"name":"Joe", "age":25} and {"name":"Joe", "age":25, "gender":"m"}, + but not {"name":"Joe"} or {"name":"Joe", "age":"Cucumber"}. + In case of arrays, only first value in schema is checked against all values in tested array. + Empty objects ({}) validate all objects, empty arrays ([]) validate all arrays, + null validates values of every type. + */ +JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value); + +/* + * JSON Object + */ +JSON_Value * json_object_get_value (const JSON_Object *object, const char *name); +const char * json_object_get_string (const JSON_Object *object, const char *name); +JSON_Object * json_object_get_object (const JSON_Object *object, const char *name); +JSON_Array * json_object_get_array (const JSON_Object *object, const char *name); +double json_object_get_number (const JSON_Object *object, const char *name); /* returns 0 on fail */ +int json_object_get_boolean(const JSON_Object *object, const char *name); /* returns -1 on fail */ + +/* dotget functions enable addressing values with dot notation in nested objects, + just like in structs or c++/java/c# objects (e.g. objectA.objectB.value). + Because valid names in JSON can contain dots, some values may be inaccessible + this way. */ +JSON_Value * json_object_dotget_value (const JSON_Object *object, const char *name); +const char * json_object_dotget_string (const JSON_Object *object, const char *name); +JSON_Object * json_object_dotget_object (const JSON_Object *object, const char *name); +JSON_Array * json_object_dotget_array (const JSON_Object *object, const char *name); +double json_object_dotget_number (const JSON_Object *object, const char *name); /* returns 0 on fail */ +int json_object_dotget_boolean(const JSON_Object *object, const char *name); /* returns -1 on fail */ + +/* Functions to get available names */ +size_t json_object_get_count (const JSON_Object *object); +const char * json_object_get_name (const JSON_Object *object, size_t index); +JSON_Value * json_object_get_value_at(const JSON_Object *object, size_t index); +JSON_Value * json_object_get_wrapping_value(const JSON_Object *object); + +/* Functions to check if object has a value with a specific name. Returned value is 1 if object has + * a value and 0 if it doesn't. dothas functions behave exactly like dotget functions. */ +int json_object_has_value (const JSON_Object *object, const char *name); +int json_object_has_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type); + +int json_object_dothas_value (const JSON_Object *object, const char *name); +int json_object_dothas_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type); + +/* Creates new name-value pair or frees and replaces old value with a new one. + * json_object_set_value does not copy passed value so it shouldn't be freed afterwards. */ +JSON_Status json_object_set_value(JSON_Object *object, const char *name, JSON_Value *value); +JSON_Status json_object_set_string(JSON_Object *object, const char *name, const char *string); +JSON_Status json_object_set_number(JSON_Object *object, const char *name, double number); +JSON_Status json_object_set_boolean(JSON_Object *object, const char *name, int boolean); +JSON_Status json_object_set_null(JSON_Object *object, const char *name); + +/* Works like dotget functions, but creates whole hierarchy if necessary. + * json_object_dotset_value does not copy passed value so it shouldn't be freed afterwards. */ +JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON_Value *value); +JSON_Status json_object_dotset_string(JSON_Object *object, const char *name, const char *string); +JSON_Status json_object_dotset_number(JSON_Object *object, const char *name, double number); +JSON_Status json_object_dotset_boolean(JSON_Object *object, const char *name, int boolean); +JSON_Status json_object_dotset_null(JSON_Object *object, const char *name); + +/* Frees and removes name-value pair */ +JSON_Status json_object_remove(JSON_Object *object, const char *name); + +/* Works like dotget function, but removes name-value pair only on exact match. */ +JSON_Status json_object_dotremove(JSON_Object *object, const char *key); + +/* Removes all name-value pairs in object */ +JSON_Status json_object_clear(JSON_Object *object); + +/* + *JSON Array + */ +JSON_Value * json_array_get_value (const JSON_Array *array, size_t index); +const char * json_array_get_string (const JSON_Array *array, size_t index); +JSON_Object * json_array_get_object (const JSON_Array *array, size_t index); +JSON_Array * json_array_get_array (const JSON_Array *array, size_t index); +double json_array_get_number (const JSON_Array *array, size_t index); /* returns 0 on fail */ +int json_array_get_boolean(const JSON_Array *array, size_t index); /* returns -1 on fail */ +size_t json_array_get_count (const JSON_Array *array); +JSON_Value * json_array_get_wrapping_value(const JSON_Array *array); + +/* Frees and removes value at given index, does nothing and returns JSONFailure if index doesn't exist. + * Order of values in array may change during execution. */ +JSON_Status json_array_remove(JSON_Array *array, size_t i); + +/* Frees and removes from array value at given index and replaces it with given one. + * Does nothing and returns JSONFailure if index doesn't exist. + * json_array_replace_value does not copy passed value so it shouldn't be freed afterwards. */ +JSON_Status json_array_replace_value(JSON_Array *array, size_t i, JSON_Value *value); +JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* string); +JSON_Status json_array_replace_number(JSON_Array *array, size_t i, double number); +JSON_Status json_array_replace_boolean(JSON_Array *array, size_t i, int boolean); +JSON_Status json_array_replace_null(JSON_Array *array, size_t i); + +/* Frees and removes all values from array */ +JSON_Status json_array_clear(JSON_Array *array); + +/* Appends new value at the end of array. + * json_array_append_value does not copy passed value so it shouldn't be freed afterwards. */ +JSON_Status json_array_append_value(JSON_Array *array, JSON_Value *value); +JSON_Status json_array_append_string(JSON_Array *array, const char *string); +JSON_Status json_array_append_number(JSON_Array *array, double number); +JSON_Status json_array_append_boolean(JSON_Array *array, int boolean); +JSON_Status json_array_append_null(JSON_Array *array); + +/* + *JSON Value + */ +JSON_Value * json_value_init_object (void); +JSON_Value * json_value_init_array (void); +JSON_Value * json_value_init_string (const char *string); /* copies passed string */ +JSON_Value * json_value_init_number (double number); +JSON_Value * json_value_init_boolean(int boolean); +JSON_Value * json_value_init_null (void); +JSON_Value * json_value_deep_copy (const JSON_Value *value); +void json_value_free (JSON_Value *value); + +JSON_Value_Type json_value_get_type (const JSON_Value *value); +JSON_Object * json_value_get_object (const JSON_Value *value); +JSON_Array * json_value_get_array (const JSON_Value *value); +const char * json_value_get_string (const JSON_Value *value); +double json_value_get_number (const JSON_Value *value); +int json_value_get_boolean(const JSON_Value *value); +JSON_Value * json_value_get_parent (const JSON_Value *value); + +/* Same as above, but shorter */ +JSON_Value_Type json_type (const JSON_Value *value); +JSON_Object * json_object (const JSON_Value *value); +JSON_Array * json_array (const JSON_Value *value); +const char * json_string (const JSON_Value *value); +double json_number (const JSON_Value *value); +int json_boolean(const JSON_Value *value); + +#ifdef __cplusplus +} +#endif + +#endif